1var DT=Object.defineProperty;var BT=(i,t,s)=>t in i?DT(i,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[t]=s;var rt=(i,t,s)=>(BT(i,typeof t!="symbol"?t+"":t,s),s);import{c as ba,W as kT,g as GT}from"./webfontloader-149e559e.js";import{g as it,h as Ap,i as wt,u as Ws,j as os,k as Xh,l as Qe,s as Uh,p as NT,m as VT,n as zT,q as YT,t as XT,v as UT,a as ot,d as Bt,x as Ya,y as WT,e as ce,z as Cf,o as Q,c as Rt,w as Dt,A as Ot,B as H,V as te,C as ct,D as et,E as ft,F as Jc,G as Nx,H as ti,I as Vx,J as HT,K as Xt,L as rs,M as ue,N as Tf,_ as kt,O as zx,P as Hs,Q as Lt,S as fe,T as ve,U as Ct,W as Ce,X as Or,Y as Lr,Z as kr,$ as Mi,a0 as Rp,a1 as $T,a2 as td,a3 as ed,a4 as jT,b as KT,a5 as Do,a6 as ZT,a7 as JT}from"./index-5fc04f06.js";import{u as Te,a as Gr,b as $s,V as QT,c as Op,d as qT,e as Lp,_ as _T,f as tS,m as gl}from"./VWindowItem-a45cea93.js";import{F as Oe,_ as Sf}from"./AppForm.vue_vue_type_script_setup_true_lang-0f63e37b.js";import{f as Gt}from"./formRules-eff04bbd.js";import{V as Ef,a as Aa,b as Ra,c as eS}from"./VCard-32c10d1a.js";import{V as Yx}from"./VDialog-0279981a.js";import{A as iS}from"./AppDataDisplay-1dec14e0.js";import{_ as sS}from"./AppEmailValidation.vue_vue_type_script_setup_true_lang-4cbdd6fa.js";import{V as Fh,a as Qi}from"./VRow-9904abe3.js";import{V as Qc}from"./VBtn-bac34b23.js";import"./forwardRefs-cd8119fa.js";import"./scopeId-140e15ae.js";import"./ssrBoot-b2b9cbb8.js";import"./resizeObserver-4b0ca6f7.js";import"./colorsSet-944529e4.js";const nS="/assets/rotate.png";var Xx={exports:{}};(function(i,t){(function(c,C){i.exports=C()})(ba,()=>(()=>{var s={6659:l=>{var T=Object.prototype.hasOwnProperty,e="~";function d(){}Object.create&&(d.prototype=Object.create(null),new d().__proto__||(e=!1));function g(n,o,f){this.fn=n,this.context=o,this.once=f||!1}function r(n,o,f,u,v){if(typeof f!="function")throw new TypeError("The listener must be a function");var m=new g(f,u||n,v),p=e?e+o:o;return n._events[p]?n._events[p].fn?n._events[p]=[n._events[p],m]:n._events[p].push(m):(n._events[p]=m,n._eventsCount++),n}function a(n,o){--n._eventsCount===0?n._events=new d:delete n._events[o]}function h(){this._events=new d,this._eventsCount=0}h.prototype.eventNames=function(){var o=[],f,u;if(this._eventsCount===0)return o;for(u in f=this._events)T.call(f,u)&&o.push(e?u.slice(1):u);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(f)):o},h.prototype.listeners=function(o){var f=e?e+o:o,u=this._events[f];if(!u)return[];if(u.fn)return[u.fn];for(var v=0,m=u.length,p=new Array(m);v<m;v++)p[v]=u[v].fn;return p},h.prototype.listenerCount=function(o){var f=e?e+o:o,u=this._events[f];return u?u.fn?1:u.length:0},h.prototype.emit=function(o,f,u,v,m,p){var x=e?e+o:o;if(!this._events[x])return!1;var y=this._events[x],P=arguments.length,b,E;if(y.fn){switch(y.once&&this.removeListener(o,y.fn,void 0,!0),P){case 1:return y.fn.call(y.context),!0;case 2:return y.fn.call(y.context,f),!0;case 3:return y.fn.call(y.context,f,u),!0;case 4:return y.fn.call(y.context,f,u,v),!0;case 5:return y.fn.call(y.context,f,u,v,m),!0;case 6:return y.fn.call(y.context,f,u,v,m,p),!0}for(E=1,b=new Array(P-1);E<P;E++)b[E-1]=arguments[E];y.fn.apply(y.context,b)}else{var M=y.length,w;for(E=0;E<M;E++)switch(y[E].once&&this.removeListener(o,y[E].fn,void 0,!0),P){case 1:y[E].fn.call(y[E].context);break;case 2:y[E].fn.call(y[E].context,f);break;case 3:y[E].fn.call(y[E].context,f,u);break;case 4:y[E].fn.call(y[E].context,f,u,v);break;default:if(!b)for(w=1,b=new Array(P-1);w<P;w++)b[w-1]=arguments[w];y[E].fn.apply(y[E].context,b)}}return!0},h.prototype.on=function(o,f,u){return r(this,o,f,u,!1)},h.prototype.once=function(o,f,u){return r(this,o,f,u,!0)},h.prototype.removeListener=function(o,f,u,v){var m=e?e+o:o;if(!this._events[m])return this;if(!f)return a(this,m),this;var p=this._events[m];if(p.fn)p.fn===f&&(!v||p.once)&&(!u||p.context===u)&&a(this,m);else{for(var x=0,y=[],P=p.length;x<P;x++)(p[x].fn!==f||v&&!p[x].once||u&&p[x].context!==u)&&y.push(p[x]);y.length?this._events[m]=y.length===1?y[0]:y:a(this,m)}return this},h.prototype.removeAllListeners=function(o){var f;return o?(f=e?e+o:o,this._events[f]&&a(this,f)):(this._events=new d,this._eventsCount=0),this},h.prototype.off=h.prototype.removeListener,h.prototype.addListener=h.prototype.on,h.prefixed=e,h.EventEmitter=h,l.exports=h},62270:(l,T,e)=>{/** 2 * @author samme 3 * @copyright 2013-2023 Photon Storm Ltd. 4 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5 */var d=e(82590),g=function(r,a,h,n){for(var o=r[0],f=1;f<r.length;f++){var u=r[f];d(u,o,a,h,n),o=u}return r};l.exports=g},61148:(l,T,e)=>{/** 6 * @author Richard Davey <[email protected]> 7 * @copyright 2013-2023 Photon Storm Ltd. 8 * @license {@link https://opensource.org/licenses/MIT|MIT License} 9 */var d=e(6124),g=function(r,a,h,n,o){return d(r,"angle",a,h,n,o)};l.exports=g},22015:l=>{/** 10 * @author Richard Davey <[email protected]> 11 * @copyright 2013-2023 Photon Storm Ltd. 12 * @license {@link https://opensource.org/licenses/MIT|MIT License} 13 */var T=function(e,d,g){for(var r=0;r<e.length;r++){var a=e[r];d.call(g,a)}return e};l.exports=T},31060:l=>{/** 14 * @author Richard Davey <[email protected]> 15 * @copyright 2013-2023 Photon Storm Ltd. 16 * @license {@link https://opensource.org/licenses/MIT|MIT License} 17 */var T=function(e,d,g){g===void 0&&(g=0);for(var r=g;r<e.length;r++){var a=e[r],h=!0;for(var n in d)a[n]!==d[n]&&(h=!1);if(h)return a}return null};l.exports=T},52367:l=>{/** 18 * @author Richard Davey <[email protected]> 19 * @copyright 2013-2023 Photon Storm Ltd. 20 * @license {@link https://opensource.org/licenses/MIT|MIT License} 21 */var T=function(e,d,g){g===void 0&&(g=0);for(var r=g;r<e.length;r++){var a=e[r],h=!0;for(var n in d)a[n]!==d[n]&&(h=!1);if(h)return a}return null};l.exports=T},12673:(l,T,e)=>{/** 22 * @author Richard Davey <[email protected]> 23 * @copyright 2013-2023 Photon Storm Ltd. 24 * @license {@link https://opensource.org/licenses/MIT|MIT License} 25 */var d=e(40327),g=e(84093),r=e(72632),a=e(72283),h=e(71030),n=new h({sys:{queueDepthSort:a,events:{once:a}}},0,0,1,1).setOrigin(0,0),o=function(f,u){u===void 0&&(u={});var v=u.hasOwnProperty("width"),m=u.hasOwnProperty("height"),p=r(u,"width",-1),x=r
25(u,"height",-1),y=r(u,"cellWidth",1),P=r(u,"cellHeight",y),b=r(u,"position",g.TOP_LEFT),E=r(u,"x",0),M=r(u,"y",0),w=0,A=0,R=p*y,L=x*P;n.setPosition(E,M),n.setSize(y,P);for(var O=0;O<f.length;O++)if(d(f[O],n,b),v&&p===-1)n.x+=y;else if(m&&x===-1)n.y+=P;else if(m&&!v){if(A+=P,n.y+=P,A===L&&(A=0,w+=y,n.y=M,n.x+=y,w===R))break}else if(w+=y,n.x+=y,w===R&&(w=0,A+=P,n.x=E,n.y+=P,A===L))break;return f};l.exports=o},691:(l,T,e)=>{/** 26 * @author Richard Davey <[email protected]> 27 * @copyright 2013-2023 Photon Storm Ltd. 28 * @license {@link https://opensource.org/licenses/MIT|MIT License} 29 */var d=e(6124),g=function(r,a,h,n,o){return d(r,"alpha",a,h,n,o)};l.exports=g},3877:(l,T,e)=>{/** 30 * @author Richard Davey <[email protected]> 31 * @copyright 2013-2023 Photon Storm Ltd. 32 * @license {@link https://opensource.org/licenses/MIT|MIT License} 33 */var d=e(6124),g=function(r,a,h,n,o){return d(r,"x",a,h,n,o)};l.exports=g},71020:(l,T,e)=>{/** 34 * @author Richard Davey <[email protected]> 35 * @copyright 2013-2023 Photon Storm Ltd. 36 * @license {@link https://opensource.org/licenses/MIT|MIT License} 37 */var d=e(6124),g=function(r,a,h,n,o,f,u){return h==null&&(h=a),d(r,"x",a,n,f,u),d(r,"y",h,o,f,u)};l.exports=g},28970:(l,T,e)=>{/** 38 * @author Richard Davey <[email protected]> 39 * @copyright 2013-2023 Photon Storm Ltd. 40 * @license {@link https://opensource.org/licenses/MIT|MIT License} 41 */var d=e(6124),g=function(r,a,h,n,o){return d(r,"y",a,h,n,o)};l.exports=g},82249:l=>{/** 42 * @author Richard Davey <[email protected]> 43 * @copyright 2013-2023 Photon Storm Ltd. 44 * @license {@link https://opensource.org/licenses/MIT|MIT License} 45 */var T=function(e,d,g,r){g===void 0&&(g=0),r===void 0&&(r=6.28);for(var a=g,h=(r-g)/e.length,n=d.x,o=d.y,f=d.radius,u=0;u<e.length;u++)e[u].x=n+f*Math.cos(a),e[u].y=o+f*Math.sin(a),a+=h;return e};l.exports=T},30285:l=>{/** 46 * @author Richard Davey <[email protected]> 47 * @copyright 2013-2023 Photon Storm Ltd. 48 * @license {@link https://opensource.org/licenses/MIT|MIT License} 49 */var T=function(e,d,g,r){g===void 0&&(g=0),r===void 0&&(r=6.28);for(var a=g,h=(r-g)/e.length,n=d.width/2,o=d.height/2,f=0;f<e.length;f++)e[f].x=d.x+n*Math.cos(a),e[f].y=d.y+o*Math.sin(a),a+=h;return e};l.exports=T},61557:(l,T,e)=>{/** 50 * @author Richard Davey <[email protected]> 51 * @copyright 2013-2023 Photon Storm Ltd. 52 * @license {@link https://opensource.org/licenses/MIT|MIT License} 53 */var d=e(8570),g=function(r,a){for(var h=d(a,r.length),n=0;n<r.length;n++){var o=r[n],f=h[n];o.x=f.x,o.y=f.y}return r};l.exports=g},63549:(l,T,e)=>{/** 54 * @author Richard Davey <[email protected]> 55 * @copyright 2013-2023 Photon Storm Ltd. 56 * @license {@link https://opensource.org/licenses/MIT|MIT License} 57 */var d=e(40053),g=e(77640),r=e(38487),a=function(h,n,o){o===void 0&&(o=0);var f=d(n,!1,h.length);o>0?g(f,o):o<0&&r(f,Math.abs(o));for(var u=0;u<h.length;u++)h[u].x=f[u].x,h[u].y=f[u].y;return h};l.exports=a},51629:(l,T,e)=>{/** 58 * @author Richard Davey <[email protected]> 59 * @copyright 2013-2023 Photon Storm Ltd. 60 * @license {@link https://opensource.org/licenses/MIT|MIT License} 61 */var d=e(58813),g=function(r,a,h){var n=d({x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2},h),o=d({x1:a.x2,y1:a.y2,x2:a.x3,y2:a.y3},h),f=d({x1:a.x3,y1:a.y3,x2:a.x1,y2:a.y1},h);n.pop(),o.pop(),f.pop(),n=n.concat(o,f);for(var u=n.length/r.length,v=0,m=0;m<r.length;m++){var p=r[m],x=n[Math.floor(v)];p.x=x.x,p.y=x.y,v+=u}return r};l.exports=g},1045:l=>{/** 62 * @author Richard Davey <[email protected]> 63 * @copyright 2013-2023 Photon Storm Ltd. 64 * @license {@link https://opensource.org/licenses/MIT|MIT License} 65 */var T=function(e,d,g){for(var r=0;r<e.length;r++){var a=e[r];a.anims&&a.anims.play(d,g)}return e};l.exports=T},6124:l=>{/** 66 * @author Richard Davey <[email protected]> 67 * @copyright 2013-2023 Photon Storm Ltd. 68 * @license {@link https://opensource.org/licenses/MIT|MIT License} 69 */var T=function(e,d,g,r,a,h){r===void 0&&(r=0),a===void 0&&(a=0),h===void 0&&(h=1);var n,o=0,f=e.length;if(h===1)for(n=a;n<f;n++)e[n][d]+=g+o*r,o++;else for(n=a;n>=0;n--)e[n][d]+=g+o*r,o++;return e};l.exports=T},23646:l=>{/** 70 * @author Richard Davey <[email protected]> 71 * @copyright 2013-2023 Photon Storm Ltd. 72 * @license {@link https://opensource.org/licenses/MIT|MIT License} 73 */var T=function(e,d,g,r,a,h){r===void 0&&(r=0),a===void 0&&(a=0),h===void 0&&(h=1);var n,o=0,f=e.length;if(h===1)for(n=a;n<f;n++)e[n][d]=g+o*r,o++;else for(n=a;n>=0;n--)e[n][d]=g+o*r,o++;return e};l.exports=T},4392:(l,T,e)=>{/** 74 * @author Richard Davey <[email protected]> 75 * @copyright 2013-2023 Photon Storm Ltd. 76 * @license {@link https://opensource.org/licenses/MIT|MIT License} 77 */var d=e(30977),g=function(r,a){for(var h=0;h<r.length;h++)d(a,r[h]);return r};l.exports=g},94985:(l,T,e)=>{/** 78 * @author Richard Davey <[email protected]> 79 * @copyright 2013-2023 Photon Storm Ltd. 80 * @license {@link https://opensource.org/licenses/MIT|MIT License} 81 */var d=e(72006),g=function(r,a){for(var h=0;h<r.length;h++)d(a,r[h]);return r};l.exports=g},63305:(l,T,e)=>{/** 82 * @author Richard Davey <[email protected]> 83 * @copyright 2013-2023 Photon Storm Ltd. 84 * @license {@link https://opensource.org/licenses/MIT|MIT License} 85 */var d=e(74077),g=function(r,a){for(var h=0;h<r.length;h++)d(a,r[h]);return r};l.exports=g},90739:(l,T,e)=>{/** 86 * @author Richard Davey <[email protected]> 87 * @copyright 2013-2023 Photon Storm Ltd. 88 * @license {@link https://opensource.org/licenses/MIT|MIT License} 89 */var d=e(30001),g=function(r,a){for(var h=0;h<r.length;h++)d(a,r[h]);return r};l.exports=g},91417:(l,T,e)=>{/** 90 * @author Richard Davey <[email protected]> 91 * @copyright 2013-2023 Photon Storm Ltd. 92 * @license {@link https://opensource.org/licenses/MIT|MIT License} 93 */var d=e(99761),g=function(r,a){for(var h=0;h<r.length;h++)d(a,r[h]);return r};l.exports=g},26182:(l,T,e)=>{/** 94 * @author Richard Davey <[email protected]> 95 * @copyright 2013-2023 Photon Storm Ltd. 96 * @license {@link https://opensource.org/licenses/MIT|MIT License} 97 */var d=e(6124),g=function(r,a,h,n,o){return d(r,"rotation",a,h,n,o)};l.exports=g},87299:(l,T,e)=>{/** 98 * @author Richard Davey <[email protected]> 99 * @copyright 2013-2023 Photon Storm Ltd. 100 * @license {@link https://opensource.org/licenses/MIT|MIT License} 101 */var d=e(72395),g=e(53996),r=function(a,h,n){for(var o=h.x,f=h.y,u=0;u<a.length;u++){var v=a[u];d(v,o,f,n,Math.max(1,g(v.x,v.y,o,f)))}return a};l.exports=r},92194:(l,T,e)=>{/** 102 * @author Richard Davey <[email protected]> 103 * @copyright 2013-2023 Photon Storm Ltd. 104 * @license {@link https://opensource.org/licenses/MIT|MIT License} 105 */var d=e(72395),g=function(r,a,h,n){var o=a.x,f=a.y;if(n===0)return r;for(var u=0;u<r.length;u++)d(r[u],o,f,h,n);return r};l.exports=g},30363:(l,T,e)=>{/** 106 * @author Richard Davey <[email protected]> 107 * @copyright 2013-2023 Photon Storm Ltd. 108 * @license {@link https://opensource.org/licenses/MIT|MIT License} 109 */var d=e(6124),g=function(r,a,h,n,o){return d(r,"scaleX",a,h,n,o)};l.exports=g},51449:(l,T,e)=>{/** 110 * @author Richard Davey <[email protected]> 111 * @copyright 2013-2023 Photon Storm Ltd. 112 * @license {@link https://opensource.org/licenses/MIT|MIT License} 113 */var d=e(6124),g=function(r,a,h,n,o,f,u){return h==null&&(h=a),d(r,"scaleX",a,n,f,u),d(r,"scaleY",h,o,f,u)};l.exports=g},64895:(l,T,e)=>{/** 114 * @author Richard Davey <[email protected]> 115 * @copyright 2013-2023 Photon Storm Ltd. 116 * @license {@link https://opensource.org/licenses/MIT|MIT License} 117 */var d=e(6124),g=function(r,a,h,n,o){return d(r,"scaleY",a,h,n,o)};l.exports=g},30329:(l,T,e)=>{/** 118 * @author Richard Davey <[email protected]> 119 * @copyright 2013-2023 Photon Storm Ltd. 120 * @license {@link https://opensource.org/licenses/MIT|MIT License} 121 */var d=e(23646),g=function(r,a,h,n,o){return d(r,"alpha",a,h,n,o)};l.exports=g},43954:(l,T,e)=>{/** 122 * @author Richard Davey <[email protected]> 123 * @copyright 2013-2023 Photon Storm Ltd. 124 * @license {@link https://opensource.org/licenses/MIT|MIT License} 125 */var d=e(23646),g=function(r,a,h,n){return d(r,"blendMode",a,0,h,n)};l.exports=g},70688:(l,T,e)=>{/** 126 * @author Richard Davey <[email protected]> 127 * @copyright 2013-2023 Photon Storm Ltd. 128 * @license {@link https://opensource.org/licenses/MIT|MIT License} 129 */var d=e(23646),g=function(r,a,h,n,o){return d(r,"depth",a,h,n,o)};l.exports=g},8314:l=>{/** 130 * @author Richard Davey <[email protected]> 131 * @copyright 2013-2023 Photon Storm Ltd. 132 * @license {@link https://opensource.org/licenses/MIT|MIT License} 133 */var T=function(e,d,g){for(var r=0;r<e.length;r++)e[r].setInteractive(d,g);return e};l.exports=T},12894:(l,T,e)=>{/** 134 * @author Richard Davey <[email protected]> 135 * @copyright 2013-2023 Photon Storm Ltd. 136 * @license {@link https://opensource.org/licenses/MIT|MIT License} 137 */var d=e(23646),g=function(r,a,h,n,o,f,u){return h==null&&(h=a),d(r,"originX",a,n,f,u),d(r,"originY",h,o,f,u),r.forEach(function(v){v.updateDisplayOrigin()}),r};l.exports=g},38767:(l,T,e)=>{/** 138 * @author Richard Davey <[email protected]> 139 * @copyright 2013-2023 Photon Storm Ltd. 140 * @license {@link https://opensource.org/licenses/MIT|MIT License} 141 */var d=e(23646),g=function(r,a,h,n,o){return d(r,"rotation",a,h,n,o)};l.exports=g},18584:(l,T,e)=>{/** 142 * @author Richard Davey <[email protected]> 143 * @copyright 2013-2023 Photon Storm Ltd. 144 * @license {@link https://opensource.org/licenses/MIT|MIT License} 145 */var d=e(23646),g=function(r,a,h,n,o,f,u){return h==null&&(h=a),d(r,"scaleX",a,n,f,u),d(r,"scaleY",h,o,f,u)};l.exports=g},17381:(l,T,e)=>{/** 146 * @author Richard Davey <[email protected]> 147 * @copyright 2013-2023 Photon Storm Ltd. 148 * @license {@link https://opensource.org/licenses/MIT|MIT License} 149 */var d=e(23646),g=function(r,a,h,n,o){return d(r,"scaleX",a,h,n,o)};l.exports=g},74370:(l,T,e)=>{/** 150 * @author Richard Davey <[email protected]> 151 * @copyright 2013-2023 Photon Storm Ltd. 152 * @license {@link https://opensource.org/licenses/MIT|MIT License} 153 */var d=e(23646),g=function(r,a,h,n,o){return d(r,"scaleY",a,h,n,o)};l.exports=g},27773:(l,T,e)=>{/** 154 * @author Richard Davey <[email protected]> 155 * @copyright 2013-2023 Photon Storm Ltd. 156 * @license {@link https://opensource.org/licenses/MIT|MIT License} 157 */var d=e(23646),g=function(r,a,h,n,o,f,u){return h==null&&(h=a),d(r,"scrollFactorX",a,n,f,u),d(r,"scrollFactorY",h,o,f,u)};l.exports=g},75257:(l,T,e)=>{/** 158 * @author Richard Davey <[email protected]> 159 * @copyright 2013-2023 Photon Storm Ltd. 160 * @license {@link https://opensource.org/licenses/MIT|MIT License} 161 */var d=e(23646),g=function(r,a,h,n,o){return d(r,"scrollFactorX",a,h,n,o)};l.exports=g},54512:(l,T,e)=>{/** 162 * @author Richard Davey <[email protected]> 163 * @copyright 2013-2023 Photon Storm Ltd. 164 * @license {@link https://opensource.org/licenses/MIT|MIT License} 165 */var d=e(23646),g=function(r,a,h,n,o){return d(r,"scrollFactorY",a,h,n,o)};l.exports=g},69423:l=>{/** 166 * @author Richard Davey <[email protected]> 167 * @copyright 2013-2023 Photon Storm Ltd. 168 * @license {@link https://opensource.org/licenses/MIT|MIT License} 169 */var T=function(e,d,g,r,a){for(var h=0;h<e.length;h++)e[h].setTint(d,g,r,a);return e};l.exports=T},58291:(l,T,e)=>{/** 170 * @author Richard Davey <[email protected]> 171 * @copyright 2013-2023 Photon Storm Ltd. 172 * @license {@link https://opensource.org/licenses/MIT|MIT License} 173 */var d=e(23646),g=function(r,a,h,n){return d(r,"visible",a,0,h,n)};l.exports=g},94833:(l,T,e)=>{/** 174 * @author Richard Davey <[email protected]> 175 * @copyright 2013-2023 Photon Storm Ltd. 176 * @license {@link https://opensource.org/licenses/MIT|MIT License} 177 */var d=e(23646),g=function(r,a,h,n,o){return d(r,"x",a,h,n,o)};l.exports=g},14284:(l,T,e)=>{/** 178 * @author Richard Davey <[email protected]> 179 * @copyright 2013-2023 Photon Storm Ltd. 180 * @license {@link https://opensource.org/licenses/MIT|MIT License} 181 */var d=e(23646),g=function(r,a,h,n,o,f,u){return h==null&&(h=a),d(r,"x",a,n,f,u),d(r,"y",h,o,f,u)};l.exports=g},96574:(l,T,e)=>{/** 182 * @author Richard Davey <[email protected]> 183 * @copyright 2013-2023 Photon Storm Ltd. 184 * @license {@link https://opensource.org/licenses/MIT|MIT License} 185 */var d=e(23646),g=function(r,a,h,n,o){return d(r,"y",a,h,n,o)};l.exports=g},74086:(l,T,e)=>{/** 186 * @author Richard Davey <[email protected]> 187 * @copyright 2013-2023 Photon Storm Ltd. 188 * @license {@link https://opensource.org/licenses/MIT|MIT License} 189 */var d=e(93736),g=function(r,a,h,n,o){n===void 0&&(n=0),o===void 0&&(o=new d);var f,u,v=r.length;if(v===1)f=r[0].x,u=r[0].y,r[0].x=a,r[0].y=h;else{var m=1,p=0;n===0&&(p=v-1,m=v-2),f=r[p].x,u=r[p].y,r[p].x=a,r[p].y=h;for(var x=0;x<v;x++)if(!(m>=v||m===-1)){var y=r[m],P=y.x,b=y.y;y.x=f,y.y=u,f=P,u=b,n===0?m--:m++}}return o.x=f,o.y=u,o};l.exports=g},86347:(l,T,e)=>{/** 190 * @author Richard Davey <[email protected]> 191 * @copyright 2013-2023 Photon Storm Ltd. 192 * @license {@link https://opensource.org/licenses/MIT|MIT License} 193 */var d=e(18592),g=function(r){return d(r)};l.exports=g},1558:(l,T,e)=>{/** 194 * @author Richard Davey <[email protected]> 195 * @copyright 2013-2023 Photon Storm Ltd. 196 * @license {@link https://opensource.org/licenses/MIT|MIT License} 197 */var d=e(5514),g=function(r,a,h,n,o){o===void 0&&(o=!1);var f=Math.abs(n-h)/r.length,u;if(o)for(u=0;
197u<r.length;u++)r[u][a]+=d(u*f,h,n);else for(u=0;u<r.length;u++)r[u][a]=d(u*f,h,n);return r};l.exports=g},9938:(l,T,e)=>{/** 198 * @author Richard Davey <[email protected]> 199 * @copyright 2013-2023 Photon Storm Ltd. 200 * @license {@link https://opensource.org/licenses/MIT|MIT License} 201 */var d=e(87736),g=function(r,a,h,n,o){o===void 0&&(o=!1);var f=Math.abs(n-h)/r.length,u;if(o)for(u=0;u<r.length;u++)r[u][a]+=d(u*f,h,n);else for(u=0;u<r.length;u++)r[u][a]=d(u*f,h,n);return r};l.exports=g},71060:l=>{/** 202 * @author Richard Davey <[email protected]> 203 * @copyright 2013-2023 Photon Storm Ltd. 204 * @license {@link https://opensource.org/licenses/MIT|MIT License} 205 */var T=function(e,d,g,r,a){if(a===void 0&&(a=!1),e.length===0)return e;if(e.length===1)return a?e[0][d]+=(r+g)/2:e[0][d]=(r+g)/2,e;var h=Math.abs(r-g)/(e.length-1),n;if(a)for(n=0;n<e.length;n++)e[n][d]+=n*h+g;else for(n=0;n<e.length;n++)e[n][d]=n*h+g;return e};l.exports=T},11207:l=>{/** 206 * @author Richard Davey <[email protected]> 207 * @copyright 2013-2023 Photon Storm Ltd. 208 * @license {@link https://opensource.org/licenses/MIT|MIT License} 209 */var T=function(e){for(var d=0;d<e.length;d++)e[d].visible=!e[d].visible;return e};l.exports=T},24404:(l,T,e)=>{/** 210 * @author Richard Davey <[email protected]> 211 * @author samme <[email protected]> 212 * @copyright 2013-2023 Photon Storm Ltd. 213 * @license {@link https://opensource.org/licenses/MIT|MIT License} 214 */var d=e(1071),g=function(r,a,h){h===void 0&&(h=0);for(var n=0;n<r.length;n++){var o=r[n];o.x=d(o.x,a.left-h,a.right+h),o.y=d(o.y,a.top-h,a.bottom+h)}return r};l.exports=g},83979:(l,T,e)=>{/** 215 * @author Richard Davey <[email protected]> 216 * @copyright 2013-2023 Photon Storm Ltd. 217 * @license {@link https://opensource.org/licenses/MIT|MIT License} 218 */l.exports={AlignTo:e(62270),Angle:e(61148),Call:e(22015),GetFirst:e(31060),GetLast:e(52367),GridAlign:e(12673),IncAlpha:e(691),IncX:e(3877),IncXY:e(71020),IncY:e(28970),PlaceOnCircle:e(82249),PlaceOnEllipse:e(30285),PlaceOnLine:e(61557),PlaceOnRectangle:e(63549),PlaceOnTriangle:e(51629),PlayAnimation:e(1045),PropertyValueInc:e(6124),PropertyValueSet:e(23646),RandomCircle:e(4392),RandomEllipse:e(94985),RandomLine:e(63305),RandomRectangle:e(90739),RandomTriangle:e(91417),Rotate:e(26182),RotateAround:e(87299),RotateAroundDistance:e(92194),ScaleX:e(30363),ScaleXY:e(51449),ScaleY:e(64895),SetAlpha:e(30329),SetBlendMode:e(43954),SetDepth:e(70688),SetHitArea:e(8314),SetOrigin:e(12894),SetRotation:e(38767),SetScale:e(18584),SetScaleX:e(17381),SetScaleY:e(74370),SetScrollFactor:e(27773),SetScrollFactorX:e(75257),SetScrollFactorY:e(54512),SetTint:e(69423),SetVisible:e(58291),SetX:e(94833),SetXY:e(14284),SetY:e(96574),ShiftPosition:e(74086),Shuffle:e(86347),SmootherStep:e(9938),SmoothStep:e(1558),Spread:e(71060),ToggleVisible:e(11207),WrapInRectangle:e(24404)}},85463:(l,T,e)=>{/** 219 * @author Richard Davey <[email protected]> 220 * @copyright 2013-2023 Photon Storm Ltd. 221 * @license {@link https://opensource.org/licenses/MIT|MIT License} 222 */var d=e(82897),g=e(56694),r=e(16938),a=e(2406),h=e(71519),n=e(10850),o=e(28834),f=new g({initialize:function(v,m,p){this.manager=v,this.key=m,this.type="frame",this.frames=this.getFrames(v.textureManager,n(p,"frames",[]),n(p,"defaultTextureKey",null),n(p,"sortFrames",!0)),this.frameRate=n(p,"frameRate",null),this.duration=n(p,"duration",null),this.msPerFrame,this.skipMissedFrames=n(p,"skipMissedFrames",!0),this.delay=n(p,"delay",0),this.repeat=n(p,"repeat",0),this.repeatDelay=n(p,"repeatDelay",0),this.yoyo=n(p,"yoyo",!1),this.showBeforeDelay=n(p,"showBeforeDelay",!1),this.showOnStart=n(p,"showOnStart",!1),this.hideOnComplete=n(p,"hideOnComplete",!1),this.paused=!1,this.calculateDuration(this,this.getTotalFrames(),this.duration,this.frameRate),this.manager.on&&(this.manager.on(r.PAUSE_ALL,this.pause,this),this.manager.on(r.RESUME_ALL,this.resume,this))},getTotalFrames:function(){return this.frames.length},calculateDuration:function(u,v,m,p){m===null&&p===null?(u.frameRate=24,u.duration=24/v*1e3):m&&p===null?(u.duration=m,u.frameRate=v/(m/1e3)):(u.frameRate=p,u.duration=v/p*1e3),u.msPerFrame=1e3/u.frameRate},addFrame:function(u){return this.addFrameAt(this.frames.length,u)},addFrameAt:function(u,v){var m=this.getFrames(this.manager.textureManager,v);if(m.length>0){if(u===0)this.frames=m.concat(this.frames);else if(u===this.frames.length)this.frames=this.frames.concat(m);else{var p=this.frames.slice(0,u),x=this.frames.slice(u);this.frames=p.concat(m,x)}this.updateFrameSequence()}return this},checkFrame:function(u){return u>=0&&u<this.frames.length},getFirstTick:function(u){u.accumulator=0,u.nextTick=u.msPerFrame+u.currentFrame.duration},getFrameAt:function(u){return this.frames[u]},getFrames:function(u,v,m,p){p===void 0&&(p=!0);var x=[],y,P,b=1,E,M;if(typeof v=="string"){if(M=v,!u.exists(M))return console.warn('Texture "%s" not found',M),x;var w=u.get(M),A=w.getFrameNames();p&&o(A),v=[],A.forEach(function(B){v.push({key:M,frame:B})})}if(!Array.isArray(v)||v.length===0)return x;for(E=0;E<v.length;E++){var R=v[E],L=n(R,"key",m);if(L){var O=n(R,"frame",0),I=u.getFrame(L,O);if(!I){console.warn('Texture "%s" not found',L);continue}P=new h(L,O,b,I),P.duration=n(R,"duration",0),P.isFirst=!y,y&&(y.nextFrame=P,P.prevFrame=y),x.push(P),y=P,b++}}if(x.length>0){P.isLast=!0,P.nextFrame=x[0],x[0].prevFrame=P;var D=1/(x.length-1);for(E=0;E<x.length;E++)x[E].progress=E*D}return x},getNextTick:function(u){u.accumulator-=u.nextTick,u.nextTick=u.msPerFrame+u.currentFrame.duration},getFrameByProgress:function(u){return u=d(u,0,1),a(u,this.frames,"progress")},nextFrame:function(u){var v=u.currentFrame;v.isLast?u.yoyo?this.handleYoyoFrame(u,!1):u.repeatCounter>0?u.inReverse&&u.forward?u.forward=!1:this.repeatAnimation(u):u.complete():this.updateAndGetNextTick(u,v.nextFrame)},handleYoyoFrame:function(u,v){if(v||(v=!1),u.inReverse===!v&&u.repeatCounter>0){(u.repeatDelay===0||u.pendingRepeat)&&(u.forward=v),this.repeatAnimation(u);return}if(u.inReverse!==v&&u.repeatCounter===0){u.complete();return}u.forward=v;var m=v?u.currentFrame.nextFrame:u.currentFrame.prevFrame;this.updateAndGetNextTick(u,m)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(u){var v=u.currentFrame;v.isFirst?u.yoyo?this.handleYoyoFrame(u,!0):u.repeatCounter>0?u.inReverse&&!u.forward?this.repeatAnimation(u):(u.forward=!0,this.repeatAnimation(u)):u.complete():this.updateAndGetNextTick(u,v.prevFrame)},updateAndGetNextTick:function(u,v){u.setCurrentFrame(v),this.getNextTick(u)},removeFrame:function(u){var v=this.frames.indexOf(u);return v!==-1&&this.removeFrameAt(v),this},removeFrameAt:function(u){return this.frames.splice(u,1),this.updateFrameSequence(),this},repeatAnimation:function(u){if(u._pendingStop===2){if(u._pendingStopValue===0)return u.stop();u._pendingStopValue--}
222u.repeatDelay>0&&!u.pendingRepeat?(u.pendingRepeat=!0,u.accumulator-=u.nextTick,u.nextTick+=u.repeatDelay):(u.repeatCounter--,u.forward?u.setCurrentFrame(u.currentFrame.nextFrame):u.setCurrentFrame(u.currentFrame.prevFrame),u.isPlaying&&(this.getNextTick(u),u.handleRepeat()))},toJSON:function(){var u={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,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(v){u.frames.push(v.toJSON())}),u},updateFrameSequence:function(){for(var u=this.frames.length,v=1/(u-1),m,p=0;p<u;p++)m=this.frames[p],m.index=p+1,m.isFirst=!1,m.isLast=!1,m.progress=p*v,p===0?(m.isFirst=!0,u===1?(m.isLast=!0,m.nextFrame=m,m.prevFrame=m):(m.isLast=!1,m.prevFrame=this.frames[u-1],m.nextFrame=this.frames[p+1])):p===u-1&&u>1?(m.isLast=!0,m.prevFrame=this.frames[u-2],m.nextFrame=this.frames[0]):u>1&&(m.prevFrame=this.frames[p-1],m.nextFrame=this.frames[p+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(r.PAUSE_ALL,this.pause,this),this.manager.off(r.RESUME_ALL,this.resume,this)),this.manager.remove(this.key);for(var u=0;u<this.frames.length;u++)this.frames[u].destroy();this.frames=[],this.manager=null}});l.exports=f},71519:(l,T,e)=>{/** 223 * @author Richard Davey <[email protected]> 224 * @copyright 2013-2023 Photon Storm Ltd. 225 * @license {@link https://opensource.org/licenses/MIT|MIT License} 226 */var d=e(56694),g=new d({initialize:function(a,h,n,o,f){f===void 0&&(f=!1),this.textureKey=a,this.textureFrame=h,this.index=n,this.frame=o,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0,this.isKeyFrame=f},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}});l.exports=g},90249:(l,T,e)=>{/** 227 * @author Richard Davey <[email protected]> 228 * @copyright 2013-2023 Photon Storm Ltd. 229 * @license {@link https://opensource.org/licenses/MIT|MIT License} 230 */var d=e(85463),g=e(56694),r=e(33885),a=e(6659),h=e(16938),n=e(97081),o=e(72632),f=e(10850),u=e(83392),v=e(13401),m=e(76400),p=new g({Extends:a,initialize:function(y){a.call(this),this.game=y,this.textureManager=null,this.globalTimeScale=1,this.anims=new r,this.mixes=new r,this.paused=!1,this.name="AnimationManager",y.events.once(n.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(n.DESTROY,this.destroy,this)},addMix:function(x,y,P){var b=this.anims,E=this.mixes,M=typeof x=="string"?x:x.key,w=typeof y=="string"?y:y.key;if(b.has(M)&&b.has(w)){var A=E.get(M);A||(A={}),A[w]=P,E.set(M,A)}return this},removeMix:function(x,y){var P=this.mixes,b=typeof x=="string"?x:x.key,E=P.get(b);if(E)if(y){var M=typeof y=="string"?y:y.key;E.hasOwnProperty(M)&&delete E[M]}else y||P.delete(b);return this},getMix:function(x,y){var P=this.mixes,b=typeof x=="string"?x:x.key,E=typeof y=="string"?y:y.key,M=P.get(b);return M&&M.hasOwnProperty(E)?M[E]:0},add:function(x,y){return this.anims.has(x)?(console.warn("Animation key exists: "+x),this):(y.key=x,this.anims.set(x,y),this.emit(h.ADD_ANIMATION,x,y),this)},exists:function(x){return this.anims.has(x)},createFromAseprite:function(x,y,P){var b=[],E=this.game.cache.json.get(x);if(!E)return console.warn("No Aseprite data found for: "+x),b;var M=this,w=f(E,"meta",null),A=f(E,"frames",null);if(w&&A){var R=f(w,"frameTags",[]);R.forEach(function(L){var O=[],I=o(L,"name",null),D=o(L,"from",0),B=o(L,"to",0),z=o(L,"direction","forward");if(I&&(!y||y&&y.indexOf(I)>-1)){for(var X=0,W=D;W<=B;W++){var j=W.toString(),N=A[j];if(N){var Y=o(N,"duration",u.MAX_SAFE_INTEGER);O.push({key:x,frame:j,duration:Y}),X+=Y}}var F=X/O.length;O.forEach(function(V){V.duration-=F}),z==="reverse"&&(O=O.reverse());var G={key:I,frames:O,duration:X,yoyo:z==="pingpong"},k;P?P.anims&&(k=P.anims.create(G)):k=M.create(G),k&&b.push(k)}})}return b},create:function(x){var y=x.key,P=!1;return y&&(P=this.get(y),P?console.warn("AnimationManager key already exists: "+y):(P=new d(this,y,x),this.anims.set(y,P),this.emit
230(h.ADD_ANIMATION,y,P))),P},fromJSON:function(x,y){y===void 0&&(y=!1),y&&this.anims.clear(),typeof x=="string"&&(x=JSON.parse(x));var P=[];if(x.hasOwnProperty("anims")&&Array.isArray(x.anims)){for(var b=0;b<x.anims.length;b++)P.push(this.create(x.anims[b]));x.hasOwnProperty("globalTimeScale")&&(this.globalTimeScale=x.globalTimeScale)}else x.hasOwnProperty("key")&&x.type==="frame"&&P.push(this.create(x));return P},generateFrameNames:function(x,y){var P=f(y,"prefix",""),b=f(y,"start",0),E=f(y,"end",0),M=f(y,"suffix",""),w=f(y,"zeroPad",0),A=f(y,"outputArray",[]),R=f(y,"frames",!1);if(!this.textureManager.exists(x))return console.warn('Texture "%s" not found',x),A;var L=this.textureManager.get(x);if(!L)return A;var O;if(y)for(R||(R=v(b,E)),O=0;O<R.length;O++){var I=P+m(R[O],w,"0",1)+M;L.has(I)?A.push({key:x,frame:I}):console.warn('Frame "%s" not found in texture "%s"',I,x)}else for(R=L.getFrameNames(),O=0;O<R.length;O++)A.push({key:x,frame:R[O]});return A},generateFrameNumbers:function(x,y){var P=f(y,"start",0),b=f(y,"end",-1),E=f(y,"first",!1),M=f(y,"outputArray",[]),w=f(y,"frames",!1);if(!this.textureManager.exists(x))return console.warn('Texture "%s" not found',x),M;var A=this.textureManager.get(x);if(!A)return M;E&&A.has(E)&&M.push({key:x,frame:E}),w||(b===-1&&(b=A.frameTotal-2),w=v(P,b));for(var R=0;R<w.length;R++){var L=w[R];A.has(L)?M.push({key:x,frame:L}):console.warn('Frame "%s" not found in texture "%s"',L,x)}return M},get:function(x){return this.anims.get(x)},getAnimsFromTexture:function(x){for(var y=this.textureManager.get(x),P=y.key,b=this.anims.getArray(),E=[],M=0;M<b.length;M++)for(var w=b[M],A=w.frames,R=0;R<A.length;R++)if(A[R].textureKey===P){E.push(w.key);break}return E},pauseAll:function(){return this.paused||(this.paused=!0,this.emit(h.PAUSE_ALL)),this},play:function(x,y){Array.isArray(y)||(y=[y]);for(var P=0;P<y.length;P++)y[P].anims.play(x);return this},staggerPlay:function(x,y,P,b){P===void 0&&(P=0),b===void 0&&(b=!0),Array.isArray(y)||(y=[y]);var E=y.length;b||E--;for(var M=0;M<y.length;M++){var w=P<0?Math.abs(P)*(E-M):P*M;y[M].anims.playAfterDelay(x,w)}return this},remove:function(x){var y=this.get(x);return y&&(this.emit(h.REMOVE_ANIMATION,x,y),this.anims.delete(x),this.removeMix(x)),y},resumeAll:function(){return this.paused&&(this.paused=!1,this.emit(h.RESUME_ALL)),this},toJSON:function(x){var y={anims:[],globalTimeScale:this.globalTimeScale};return x!==void 0&&x!==""?y.anims.push(this.anims.get(x).toJSON()):this.anims.each(function(P,b){y.anims.push(b.toJSON())}),y},destroy:function(){this.anims.clear(),this.mixes.clear(),this.textureManager=null,this.game=null}});l.exports=p},16569:(l,T,e)=>{/** 231 * @author Richard Davey <[email protected]> 232 * @copyright 2013-2023 Photon Storm Ltd. 233 * @license {@link https://opensource.org/licenses/MIT|MIT License} 234 */var d=e(56694),g=e(33885),r=e(72632),a=e(16938),h=e(85463),n=new d({initialize:function(f){this.parent=f,this.animationManager=f.scene.sys.anims,this.animationManager.on(a.REMOVE_ANIMATION,this.globalRemove,this),this.textureManager=this.animationManager.textureManager,this.anims=null,this.isPlaying=!1,this.hasStarted=!1,this.currentAnim=null,this.currentFrame=null,this.nextAnim=null,this.nextAnimsQueue=[],this.timeScale=1,this.frameRate=0,this.duration=0,this.msPerFrame=0,this.skipMissedFrames=!0,this.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(o){var f=this.parent;if(o===void 0)return this.nextAnimsQueue.length=0,this.nextAnim=null,f;Array.isArray(o)||(o=[o]);for(var u=0;u<o.length;u++){var v=o[u];this.nextAnim?this.nextAnimsQueue.push(v):this.nextAnim=v}return this.parent},getName:function(){return this.currentAnim?this.currentAnim.key:""},getFrameName:function(){return this.currentFrame?this.currentFrame.textureFrame:""},load:function(o){this.isPlaying&&this.stop();
234var f=this.animationManager,u=typeof o=="string"?o:r(o,"key",null),v=this.exists(u)?this.get(u):f.get(u);if(!v)console.warn("Missing animation: "+u);else{this.currentAnim=v;var m=v.getTotalFrames(),p=r(o,"frameRate",v.frameRate),x=r(o,"duration",v.duration);v.calculateDuration(this,m,x,p),this.delay=r(o,"delay",v.delay),this.repeat=r(o,"repeat",v.repeat),this.repeatDelay=r(o,"repeatDelay",v.repeatDelay),this.yoyo=r(o,"yoyo",v.yoyo),this.showBeforeDelay=r(o,"showBeforeDelay",v.showBeforeDelay),this.showOnStart=r(o,"showOnStart",v.showOnStart),this.hideOnComplete=r(o,"hideOnComplete",v.hideOnComplete),this.skipMissedFrames=r(o,"skipMissedFrames",v.skipMissedFrames),this.timeScale=r(o,"timeScale",this.timeScale);var y=r(o,"startFrame",0);y>v.getTotalFrames()&&(y=0);var P=v.frames[y];y===0&&!this.forward&&(P=v.getLastFrame()),this.currentFrame=P}return this.parent},pause:function(o){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),o!==void 0&&this.setCurrentFrame(o),this.parent},resume:function(o){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),o!==void 0&&this.setCurrentFrame(o),this.parent},playAfterDelay:function(o,f){if(!this.isPlaying)this.delayCounter=f,this.play(o,!0);else{var u=this.nextAnim,v=this.nextAnimsQueue;u&&v.unshift(u),this.nextAnim=o,this._pendingStop=1,this._pendingStopValue=f}return this.parent},playAfterRepeat:function(o,f){if(f===void 0&&(f=1),!this.isPlaying)this.play(o);else{var u=this.nextAnim,v=this.nextAnimsQueue;u&&v.unshift(u),this.repeatCounter!==-1&&f>this.repeatCounter&&(f=this.repeatCounter),this.nextAnim=o,this._pendingStop=2,this._pendingStopValue=f}return this.parent},play:function(o,f){f===void 0&&(f=!1);var u=this.currentAnim,v=this.parent,m=typeof o=="string"?o:o.key;if(f&&this.isPlaying&&u.key===m)return v;if(u&&this.isPlaying){var p=this.animationManager.getMix(u.key,o);if(p>0)return this.playAfterDelay(o,p)}return this.forward=!0,this.inReverse=!1,this._paused=!1,this._wasPlaying=!0,this.startAnimation(o)},playReverse:function(o,f){f===void 0&&(f=!1);var u=typeof o=="string"?o:o.key;return f&&this.isPlaying&&this.currentAnim.key===u?this.parent:(this.forward=!1,this.inReverse=!0,this._paused=!1,this._wasPlaying=!0,this.startAnimation(o))},startAnimation:function(o){this.load(o);var f=this.currentAnim,u=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)),u},handleStart:function(){this.showOnStart&&this.parent.setVisible(!0),this.setCurrentFrame(this.currentFrame),this.hasStarted=!0,this.emitEvents(a.ANIMATION_START)},handleRepeat:function(){this.pendingRepeat=!1,this.emitEvents(a.ANIMATION_REPEAT)},handleStop:function(){this._pendingStop=0,this.isPlaying=!1,this.emitEvents(a.ANIMATION_STOP)},handleComplete:function(){this._pendingStop=0,this.isPlaying=!1,this.hideOnComplete&&this.parent.setVisible(!1),this.emitEvents(a.ANIMATION_COMPLETE,a.ANIMATION_COMPLETE_KEY)},emitEvents:function(o,f){var u=this.currentAnim;if(u){var v=this.currentFrame,m=this.parent,p=v.textureFrame;m.emit(o,u,v,m,p),f&&m.emit(f+u.key,u,v,m,p)}},reverse:function(){return this.isPlaying&&(this.inReverse=!this.inReverse,this.forward=!this.forward),this.parent},getProgress:function(){var o=this.currentFrame;if(!o)return 0;var f=o.progress;return this.inReverse&&(f*=-1),f},setProgress:function(o){return this.forward||(o=1-o),this.setCurrentFrame(this.currentAnim.getFrameByProgress(o)),this.parent},setRepeat:function(o){return this.repeatCounter=o===-1?Number.MAX_VALUE:o,this.parent},globalRemove:function(o,f){f===void 0&&(f=this.currentAnim),this.isPlaying&&f.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},restart:function(o,f){o===void 0&&(o=!1),f===void 0&&(f=!1);var u=this.currentAnim,v=this.parent;return u?(f&&(this.repeatCounter=this.repeat===-1?Number.MAX_VALUE:this.repeat),u.getFirstTick(this),this.emitEvents(a.ANIMATION_RESTART),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!o,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.setCurrentFrame(u.frames[0]),this.parent):v}
234,complete:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleComplete(),this.nextAnim){var o=this.nextAnim;this.nextAnim=this.nextAnimsQueue.length>0?this.nextAnimsQueue.shift():null,this.play(o)}return this.parent},stop:function(){if(this._pendingStop=0,this.isPlaying=!1,this.delayCounter=0,this.currentAnim&&this.handleStop(),this.nextAnim){var o=this.nextAnim;this.nextAnim=this.nextAnimsQueue.shift(),this.play(o)}return this.parent},stopAfterDelay:function(o){return this._pendingStop=1,this._pendingStopValue=o,this.parent},stopAfterRepeat:function(o){return o===void 0&&(o=1),this.repeatCounter!==-1&&o>this.repeatCounter&&(o=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=o,this.parent},stopOnFrame:function(o){return this._pendingStop=3,this._pendingStopValue=o,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(o,f){var u=this.currentAnim;if(!(!this.isPlaying||!u||u.paused)){if(this.accumulator+=f*this.timeScale,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?u.nextFrame(this):u.previousFrame(this),this.isPlaying&&this._pendingStop===0&&this.skipMissedFrames&&this.accumulator>this.nextTick)){var v=0;do this.forward?u.nextFrame(this):u.previousFrame(this),v++;while(this.isPlaying&&this.accumulator>this.nextTick&&v<60)}}},setCurrentFrame:function(o){var f=this.parent;return this.currentFrame=o,f.texture=o.frame.texture,f.frame=o.frame,f.isCropped&&f.frame.updateCropUVs(f._crop,f.flipX,f.flipY),o.setAlpha&&(f.alpha=o.alpha),f.setSizeToFrame(),f._originComponent&&(o.frame.customPivot?f.setOrigin(o.frame.pivotX,o.frame.pivotY):f.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(a.ANIMATION_UPDATE),this._pendingStop===3&&this._pendingStopValue===o&&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(o){return this.anims?this.anims.get(o):null},exists:function(o){return this.anims?this.anims.has(o):!1},create:function(o){var f=o.key,u=!1;return f&&(u=this.get(f),u?console.warn("Animation key already exists: "+f):(u=new h(this,f,o),this.anims||(this.anims=new g),this.anims.set(f,u))),u},createFromAseprite:function(o,f){return this.animationManager.createFromAseprite(o,f,this.parent)},generateFrameNames:function(o,f){return this.animationManager.generateFrameNames(o,f)},generateFrameNumbers:function(o,f){return this.animationManager.generateFrameNumbers(o,f)},remove:function(o){var f=this.get(o);return f&&(this.currentAnim===f&&this.stop(),this.anims.delete(o)),f},destroy:function(){this.animationManager.off(a.REMOVE_ANIMATION,this.globalRemove,this),this.anims&&this.anims.clear(),this.animationManager=null,this.parent=null,this.nextAnim=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null},isPaused:{get:function(){return this._paused}}});l.exports=n},44509:l=>{/** 235 * @author Richard Davey <[email protected]> 236 * @copyright 2013-2023 Photon Storm Ltd. 237 * @license {@link https://opensource.org/licenses/MIT|MIT License} 238 */l.exports="add"},84563:l=>{/** 239 * @author Richard Davey <[email protected]> 240 * @copyright 2013-2023 Photon Storm Ltd. 241 * @license {@link https://opensource.org/licenses/MIT|MIT License} 242 */l.exports="animationcomplete"},61586:l=>{/** 243 * @author Richard Davey <[email protected]> 244 * @copyright 2013-2023 Photon Storm Ltd. 245 * @license {@link https://opensource.org/licenses/MIT|MIT License} 246 */l.exports="animationcomplete-"},72175:l=>{/** 247 * @author Richard Davey <[email protected]> 248 * @copyright 2013-2023 Photon Storm Ltd. 249 * @license {@link https://opensource.org/licenses/MIT|MIT License} 250 */l.exports="animationrepeat"},568:l=>{/** 251 * @author Richard Davey <[email protected]> 252 * @copyright 2013-2023 Photon Storm Ltd. 253 * @license {@link https://opensource.org/licenses/MIT|MIT License}
254 */l.exports="animationrestart"},37690:l=>{/** 255 * @author Richard Davey <[email protected]> 256 * @copyright 2013-2023 Photon Storm Ltd. 257 * @license {@link https://opensource.org/licenses/MIT|MIT License} 258 */l.exports="animationstart"},58525:l=>{/** 259 * @author Richard Davey <[email protected]> 260 * @copyright 2013-2023 Photon Storm Ltd. 261 * @license {@link https://opensource.org/licenses/MIT|MIT License} 262 */l.exports="animationstop"},5243:l=>{/** 263 * @author Richard Davey <[email protected]> 264 * @copyright 2013-2023 Photon Storm Ltd. 265 * @license {@link https://opensource.org/licenses/MIT|MIT License} 266 */l.exports="animationupdate"},10598:l=>{/** 267 * @author Richard Davey <[email protected]> 268 * @copyright 2013-2023 Photon Storm Ltd. 269 * @license {@link https://opensource.org/licenses/MIT|MIT License} 270 */l.exports="pauseall"},4860:l=>{/** 271 * @author Richard Davey <[email protected]> 272 * @copyright 2013-2023 Photon Storm Ltd. 273 * @license {@link https://opensource.org/licenses/MIT|MIT License} 274 */l.exports="remove"},31865:l=>{/** 275 * @author Richard Davey <[email protected]> 276 * @copyright 2013-2023 Photon Storm Ltd. 277 * @license {@link https://opensource.org/licenses/MIT|MIT License} 278 */l.exports="resumeall"},16938:(l,T,e)=>{/** 279 * @author Richard Davey <[email protected]> 280 * @copyright 2013-2023 Photon Storm Ltd. 281 * @license {@link https://opensource.org/licenses/MIT|MIT License} 282 */l.exports={ADD_ANIMATION:e(44509),ANIMATION_COMPLETE:e(84563),ANIMATION_COMPLETE_KEY:e(61586),ANIMATION_REPEAT:e(72175),ANIMATION_RESTART:e(568),ANIMATION_START:e(37690),ANIMATION_STOP:e(58525),ANIMATION_UPDATE:e(5243),PAUSE_ALL:e(10598),REMOVE_ANIMATION:e(4860),RESUME_ALL:e(31865)}},13517:(l,T,e)=>{/** 283 * @author Richard Davey <[email protected]> 284 * @copyright 2013-2023 Photon Storm Ltd. 285 * @license {@link https://opensource.org/licenses/MIT|MIT License} 286 */l.exports={Animation:e(85463),AnimationFrame:e(71519),AnimationManager:e(90249),AnimationState:e(16569),Events:e(16938)}},23740:(l,T,e)=>{/** 287 * @author Richard Davey <[email protected]> 288 * @copyright 2013-2023 Photon Storm Ltd. 289 * @license {@link https://opensource.org/licenses/MIT|MIT License} 290 */var d=e(56694),g=e(33885),r=e(6659),a=e(69773),h=new d({initialize:function(){this.entries=new g,this.events=new r},add:function(n,o){return this.entries.set(n,o),this.events.emit(a.ADD,this,n,o),this},has:function(n){return this.entries.has(n)},exists:function(n){return this.entries.has(n)},get:function(n){return this.entries.get(n)},remove:function(n){var o=this.get(n);return o&&(this.entries.delete(n),this.events.emit(a.REMOVE,this,n,o.data)),this},getKeys:function(){return this.entries.keys()},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});l.exports=h},43474:(l,T,e)=>{/** 291 * @author Richard Davey <[email protected]> 292 * @copyright 2013-2023 Photon Storm Ltd. 293 * @license {@link https://opensource.org/licenses/MIT|MIT License} 294 */var d=e(23740),g=e(56694),r=e(97081),a=new g({initialize:function(n){this.game=n,this.binary=new d,this.bitmapFont=new d,this.json=new d,this.physics=new d,this.shader=new d,this.audio=new d,this.video=new d,this.text=new d,this.html=new d,this.obj=new d,this.tilemap=new d,this.xml=new d,this.custom={},this.game.events.once(r.DESTROY,this.destroy,this)},addCustom:function(h){return this.custom.hasOwnProperty(h)||(this.custom[h]=new d),this.custom[h]},destroy:function(){for(var h=["binary","bitmapFont","json","physics","shader","audio","video","text","html","obj","tilemap","xml"],n=0;n<h.length;n++)this[h[n]].destroy(),this[h[n]]=null;for(var o in this.custom)this.custom[o].destroy();this.custom=null,this.game=null}});l.exports=a},94762:l=>{/** 295 * @author Richard Davey <[email protected]> 296 * @copyright 2013-2023 Photon Storm Ltd. 297 * @license {@link https://opensource.org/licenses/MIT|MIT License} 298 */l.exports="add"},75968:l=>{/** 299 * @author Richard Davey <[email protected]> 300 * @copyright 2013-2023 Photon Storm Ltd. 301 * @license {@link https://opensource.org/licenses/MIT|MIT License}
302 */l.exports="remove"},69773:(l,T,e)=>{/** 303 * @author Richard Davey <[email protected]> 304 * @copyright 2013-2023 Photon Storm Ltd. 305 * @license {@link https://opensource.org/licenses/MIT|MIT License} 306 */l.exports={ADD:e(94762),REMOVE:e(75968)}},45820:(l,T,e)=>{/** 307 * @author Richard Davey <[email protected]> 308 * @copyright 2013-2023 Photon Storm Ltd. 309 * @license {@link https://opensource.org/licenses/MIT|MIT License} 310 */l.exports={BaseCache:e(23740),CacheManager:e(43474),Events:e(69773)}},51052:(l,T,e)=>{/** 311 * @author Richard Davey <[email protected]> 312 * @copyright 2013-2023 Photon Storm Ltd. 313 * @license {@link https://opensource.org/licenses/MIT|MIT License} 314 */var d=e(56694),g=e(64937),r=e(75606),a=e(6659),h=e(89787),n=e(74118),o=e(69360),f=e(93222),u=e(93736),v=new d({Extends:a,Mixins:[g.AlphaSingle,g.Visible],initialize:function(p,x,y,P){p===void 0&&(p=0),x===void 0&&(x=0),y===void 0&&(y=0),P===void 0&&(P=0),a.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.roundPixels=!1,this.useBounds=!1,this.worldView=new n,this.dirty=!0,this._x=p,this._y=x,this._width=y,this._height=P,this._bounds=new n,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new o,this.transparent=!0,this.backgroundColor=f("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new u(y/2,P/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[],this.isSceneCamera=!0},addToRenderList:function(m){this.renderList.push(m)},setOrigin:function(m,p){return m===void 0&&(m=.5),p===void 0&&(p=m),this.originX=m,this.originY=p,this},getScroll:function(m,p,x){x===void 0&&(x=new u);var y=this.width*.5,P=this.height*.5;return x.x=m-y,x.y=p-P,this.useBounds&&(x.x=this.clampX(x.x),x.y=this.clampY(x.y)),x},centerOnX:function(m){var p=this.width*.5;return this.midPoint.x=m,this.scrollX=m-p,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(m){var p=this.height*.5;return this.midPoint.y=m,this.scrollY=m-p,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(m,p){return this.centerOnX(m),this.centerOnY(p),this},centerToBounds:function(){if(this.useBounds){var m=this._bounds,p=this.width*.5,x=this.height*.5;this.midPoint.set(m.centerX,m.centerY),this.scrollX=m.centerX-p,this.scrollY=m.centerY-x}return this},centerToSize:function(){return this.scrollX=this.width*.5,this.scrollY=this.height*.5,this},cull:function(m){if(this.disableCull)return m;var p=this.matrix.matrix,x=p[0],y=p[1],P=p[2],b=p[3],E=x*b-y*P;if(!E)return m;var M=p[4],w=p[5],A=this.scrollX,R=this.scrollY,L=this.width,O=this.height,I=this.y,D=I+O,B=this.x,z=B+L,X=this.culledObjects,W=m.length;E=1/E,X.length=0;for(var j=0;j<W;++j){var N=m[j];if(!N.hasOwnProperty("width")||N.parentContainer){X.push(N);continue}var Y=N.width,F=N.height,G=N.x-A*N.scrollFactorX-Y*N.originX,k=N.y-R*N.scrollFactorY-F*N.originY,V=G*x+k*P+M,U=G*y+k*b+w,$=(G+Y)*x+(k+F)*P+M,K=(G+Y)*y+(k+F)*b+w;$>B&&V<z&&K>I&&U<D&&X.push(N)}return X},getWorldPoint:function(m,p,x){x===void 0&&(x=new u);var y=this.matrix.matrix,P=y[0],b=y[1],E=y[2],M=y[3],w=y[4],A=y[5],R=P*M-b*E;if(!R)return x.x=m,x.y=p,x;R=1/R;var L=M*R,O=-b*R,I=-E*R,D=P*R,B=(E*A-M*w)*R,z=(b*w-P*A)*R,X=Math.cos(this.rotation),W=Math.sin(this.rotation),j=this.zoomX,N=this.zoomY,Y=this.scrollX,F=this.scrollY,G=m+(Y*X-F*W)*j,k=p+(Y*W+F*X)*N;return x.x=G*L+k*I+B,x.y=G*O+k*D+z,x},ignore:function(m){var p=this.id;Array.isArray(m)||(m=[m]);for(var x=0;x<m.length;x++){var y=m[x];Array.isArray(y)?this.ignore(y):y.isParent?this.ignore(y.getChildren()):y.cameraFilter|=p}return this},preRender:function(){this.renderList.length=0;var m=this.width,p=this.height,x=m*.5,y=p*.5,P=this.zoomX,b=this.zoomY,E=this.matrix,M=m*this.originX,w=p*this.originY,A=this.scrollX,R=this.scrollY;this.useBounds&&(A=this.clampX(A),R=this.clampY(R)),this.roundPixels&&(M=Math.round(M),w=Math.round(w)),this.scrollX=A,this.scrollY=R;var L=A+x,O=R+y;this.midPoint.set(L,O);var I=m/P,D=p/b;this.worldView.setTo(L-I/2,O-D/2,I,D),E.applyITRS(this.x+M,this.y+w,this.rotation,P,b),E.translate(-M,-w)},clampX:function(m){var p=this._bounds,x=this.displayWidth,y=p.x+(x-this.width)/2,P=Math.max(y,y+p.width-x);return m<y?m=y:m>P&&(m=P),m},clampY:function(m){var p=this._bounds,x=this.displayHeight,y=p.y+(x-this.height)/2,P=Math.max(y,y+p.height-x);return m<y?m=y:m>P&&(m=P),m},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(m){return m===void 0&&(m=0),this.rotation=r(m),this}
314,setBackgroundColor:function(m){return m===void 0&&(m="rgba(0,0,0,0)"),this.backgroundColor=f(m),this.transparent=this.backgroundColor.alpha===0,this},setBounds:function(m,p,x,y,P){return P===void 0&&(P=!1),this._bounds.setTo(m,p,x,y),this.dirty=!0,this.useBounds=!0,P?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(m){m===void 0&&(m=new n);var p=this._bounds;return m.setTo(p.x,p.y,p.width,p.height),m},setName:function(m){return m===void 0&&(m=""),this.name=m,this},setPosition:function(m,p){return p===void 0&&(p=m),this.x=m,this.y=p,this},setRotation:function(m){return m===void 0&&(m=0),this.rotation=m,this},setRoundPixels:function(m){return this.roundPixels=m,this},setScene:function(m,p){p===void 0&&(p=!0),this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=m,this.isSceneCamera=p;var x=m.sys;return this.sceneManager=x.game.scene,this.scaleManager=x.scale,this.cameraManager=x.cameras,this.updateSystem(),this},setScroll:function(m,p){return p===void 0&&(p=m),this.scrollX=m,this.scrollY=p,this},setSize:function(m,p){return p===void 0&&(p=m),this.width=m,this.height=p,this},setViewport:function(m,p,x,y){return this.x=m,this.y=p,this.width=x,this.height=y,this},setZoom:function(m,p){return m===void 0&&(m=1),p===void 0&&(p=m),m===0&&(m=.001),p===0&&(p=.001),this.zoomX=m,this.zoomY=p,this},setMask:function(m,p){return p===void 0&&(p=!0),this.mask=m,this._maskCamera=p?this.cameraManager.default:this,this},clearMask:function(m){return m===void 0&&(m=!1),m&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var m={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&&(m.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),m},update:function(){},setIsSceneCamera:function(m){return this.isSceneCamera=m,this},updateSystem:function(){if(!(!this.scaleManager||!this.isSceneCamera)){var m=this._x!==0||this._y!==0||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,p=this.sceneManager;m&&!this._customViewport?p.customViewports++:!m&&this._customViewport&&p.customViewports--,this.dirty=!0,this._customViewport=m}},destroy:function(){this.emit(h.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this.renderList=[],this._bounds=null,this.scene=null,this.scaleManager=null,this.sceneManager=null,this.cameraManager=null},x:{get:function(){return this._x},set:function(m){this._x=m,this.updateSystem()}},y:{get:function(){return this._y},set:function(m){this._y=m,this.updateSystem()}},width:{get:function(){return this._width},set:function(m){this._width=m,this.updateSystem()}},height:{get:function(){return this._height},set:function(m){this._height=m,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(m){m!==this._scrollX&&(this._scrollX=m,this.dirty=!0)}},scrollY:{get:function(){return this._scrollY},set:function(m){m!==this._scrollY&&(this._scrollY=m,this.dirty=!0)}},zoom:{get:function(){return(this._zoomX+this._zoomY)/2},set:function(m){this._zoomX=m,this._zoomY=m,this.dirty=!0}},zoomX:{get:function(){return this._zoomX},set:function(m){this._zoomX=m,this.dirty=!0}},zoomY:{get:function(){return this._zoomY},set:function(m){this._zoomY=m,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(m){this._rotation=m,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}}});l.exports=v},47751:(l,T,e)=>{/** 315 * @author Richard Davey <[email protected]> 316 * @copyright 2013-2023 Photon Storm Ltd. 317 * @license {@link https://opensource.org/licenses/MIT|MIT License} 318 */var d=e(51052),g=e(79993),r=e(82897),a=e(56694),h=e(64937),n=e(53030),o=e(89787),f=e(42798),u=e(74118),v=e(93736),m=new a({Extends:d,Mixins:[h.PostPipeline],initialize:function(x,y,P,b){d.call(this,x,y,P,b),this.initPostPipeline(),this.inputEnabled=!0,this.fadeEffect=new n.Fade(this),this.flashEffect=new n.Flash(this),this.shakeEffect=new n.Shake(this),this.panEffect=new n.Pan(this),this.rotateToEffect=new n.RotateTo(this),this.zoomEffect=new n.Zoom(this),this.lerp=new v(1,1),this.followOffset=new v,this.deadzone=null,this._follow=null},setDeadzone:function(p,x){if(p===void 0)this.deadzone=null;else{if(this.deadzone?(this.deadzone.width=p,this.deadzone.height=x):this.deadzone=new u(0,0,p,x),this._follow){var y=this.width/2,P=this.height/2,b=this._follow.x-this.followOffset.x,E=this._follow.y-this.followOffset.
318y;this.midPoint.set(b,E),this.scrollX=b-y,this.scrollY=E-P}g(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},fadeIn:function(p,x,y,P,b,E){return this.fadeEffect.start(!1,p,x,y,P,!0,b,E)},fadeOut:function(p,x,y,P,b,E){return this.fadeEffect.start(!0,p,x,y,P,!0,b,E)},fadeFrom:function(p,x,y,P,b,E,M){return this.fadeEffect.start(!1,p,x,y,P,b,E,M)},fade:function(p,x,y,P,b,E,M){return this.fadeEffect.start(!0,p,x,y,P,b,E,M)},flash:function(p,x,y,P,b,E,M){return this.flashEffect.start(p,x,y,P,b,E,M)},shake:function(p,x,y,P,b){return this.shakeEffect.start(p,x,y,P,b)},pan:function(p,x,y,P,b,E,M){return this.panEffect.start(p,x,y,P,b,E,M)},rotateTo:function(p,x,y,P,b,E,M){return this.rotateToEffect.start(p,x,y,P,b,E,M)},zoomTo:function(p,x,y,P,b,E){return this.zoomEffect.start(p,x,y,P,b,E)},preRender:function(){this.renderList.length=0;var p=this.width,x=this.height,y=p*.5,P=x*.5,b=this.zoom,E=this.matrix,M=p*this.originX,w=x*this.originY,A=this._follow,R=this.deadzone,L=this.scrollX,O=this.scrollY;R&&g(R,this.midPoint.x,this.midPoint.y);var I=!1;if(this.roundPixels&&(M=Math.floor(M),w=Math.floor(w)),A&&!this.panEffect.isRunning){var D=this.lerp,B=A.x-this.followOffset.x,z=A.y-this.followOffset.y;this.roundPixels&&(B=Math.floor(B),z=Math.floor(z)),R?(B<R.x?L=f(L,L-(R.x-B),D.x):B>R.right&&(L=f(L,L+(B-R.right),D.x)),z<R.y?O=f(O,O-(R.y-z),D.y):z>R.bottom&&(O=f(O,O+(z-R.bottom),D.y))):(L=f(L,B-M,D.x),O=f(O,z-w,D.y)),I=!0}this.useBounds&&(L=this.clampX(L),O=this.clampY(O)),this.roundPixels&&(L=Math.floor(L),O=Math.floor(O)),this.scrollX=L,this.scrollY=O;var X=L+y,W=O+P;this.midPoint.set(X,W);var j=p/b,N=x/b,Y=X-j/2,F=W-N/2;this.roundPixels&&(Y=Math.floor(Y),F=Math.floor(F)),this.worldView.setTo(Y,F,j,N),E.applyITRS(Math.floor(this.x+M),Math.floor(this.y+w),this.rotation,b,b),E.translate(-M,-w),this.shakeEffect.preRender(),I&&this.emit(o.FOLLOW_UPDATE,this,A)},setLerp:function(p,x){return p===void 0&&(p=1),x===void 0&&(x=p),this.lerp.set(p,x),this},setFollowOffset:function(p,x){return p===void 0&&(p=0),x===void 0&&(x=0),this.followOffset.set(p,x),this},startFollow:function(p,x,y,P,b,E){x===void 0&&(x=!1),y===void 0&&(y=1),P===void 0&&(P=y),b===void 0&&(b=0),E===void 0&&(E=b),this._follow=p,this.roundPixels=x,y=r(y,0,1),P=r(P,0,1),this.lerp.set(y,P),this.followOffset.set(b,E);var M=this.width/2,w=this.height/2,A=p.x-b,R=p.y-E;return this.midPoint.set(A,R),this.scrollX=A-M,this.scrollY=R-w,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(p,x){this.visible&&(this.rotateToEffect.update(p,x),this.panEffect.update(p,x),this.zoomEffect.update(p,x),this.shakeEffect.update(p,x),this.flashEffect.update(p,x),this.fadeEffect.update(p,x))},destroy:function(){this.resetFX(),d.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});l.exports=m},62382:(l,T,e)=>{/** 319 * @author Richard Davey <[email protected]> 320 * @copyright 2013-2023 Photon Storm Ltd. 321 * @license {@link https://opensource.org/licenses/MIT|MIT License} 322 */var d=e(47751),g=e(56694),r=e(72632),a=e(91963),h=e(94287),n=e(40444),o=e(7599),f=new g({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(o.BOOT,this.boot,this),v.sys.events.on(o.START,this.start,this)},boot:function(){var u=this.systems;u.settings.cameras?this.fromJSON(u.settings.cameras):this.add(),this.main=this.cameras[0],this.default=new d(0,0,u.scale.width,u.scale.height).setScene(this.scene),u.game.scale.on(n.RESIZE,this.onResize,this),this.systems.events.once(o.DESTROY,this.destroy,this)},start:function(){if(!this.main){var u=this.systems;u.settings.cameras?this.fromJSON(u.settings.cameras):this.add(),this.main=this.cameras[0]}var v=this.systems.events;v.on(o.UPDATE,this.update,this),v.once(o.SHUTDOWN,this.shutdown,this)},add:function(u,v,m,p,x,y){u===void 0&&(u=0),v===void 0&&(v=0),m===void 0&&(m=this.scene.sys.scale.width),p===void 0&&(p=this.scene.sys.scale.height),x===void 0&&(x=!1),y===void 0&&(y="");var P=new d(u,v,m,p);return P.setName(y),P.setScene(this.scene),P.setRoundPixels(this.roundPixels),P.id=this.getNextID(),this.cameras.push(P),x&&(this.main=P),P},addExisting:function(u,v){v===void 0&&(v=!1);var m=this.cameras.indexOf(u);return m===-1?(u.id=this.getNextID(),u.setRoundPixels(this.roundPixels),this.cameras.push(u),v&&(this.main=u),u):null},getNextID:function(){for(var u=this.cameras,v=1,m=0;m<32;m++){for(var p=!1,x=0;x<u.length;x++){var y=u[x];if(y&&y.id===v){p=!0;continue}}if(p)v=v<<1;else return v}return 0},getTotal:function(u){u===void 0&&(u=!1);for(var v=0,m=this.cameras,p=0;p<m.length;p++){var x=m[p];(!u||u&&x.visible)&&v++}return v},fromJSON:function(u){Array.isArray(u)||(u=[u]);for(var v=this.scene.sys.scale.width,m=this.scene.sys.scale.height,p=0;p<u.length;p++){var x=u[p],y=r(x,"x",0),P=r(x,"y",0),b=r(x,"width",v),E=r(x,"height",m),M=this.add(y,P,b,E);M.name=r(x,"name",""),M.zoom=r(x,"zoom",1),M.rotation=r(x,"rotation",0),M.scrollX=r(x,"scrollX",0),M.scrollY=r(x,"scrollY",0),M.roundPixels=r(x,"roundPixels",!1),M.visible=r(x,"visible",!0);var w=r(x,"backgroundColor",!1);
322w&&M.setBackgroundColor(w);var A=r(x,"bounds",null);if(A){var R=r(A,"x",0),L=r(A,"y",0),O=r(A,"width",v),I=r(A,"height",m);M.setBounds(R,L,O,I)}}return this},getCamera:function(u){for(var v=this.cameras,m=0;m<v.length;m++)if(v[m].name===u)return v[m];return null},getCamerasBelowPointer:function(u){for(var v=this.cameras,m=u.x,p=u.y,x=[],y=0;y<v.length;y++){var P=v[y];P.visible&&P.inputEnabled&&h(P,m,p)&&x.unshift(P)}return x},remove:function(u,v){v===void 0&&(v=!0),Array.isArray(u)||(u=[u]);for(var m=0,p=this.cameras,x=0;x<u.length;x++){var y=p.indexOf(u[x]);y!==-1&&(v?p[y].destroy():p[y].renderList=[],p.splice(y,1),m++)}return!this.main&&p[0]&&(this.main=p[0]),m},render:function(u,v){for(var m=this.scene,p=this.cameras,x=0;x<p.length;x++){var y=p[x];if(y.visible&&y.alpha>0){y.preRender();var P=this.getVisibleChildren(v.getChildren(),y);u.render(m,P,y)}}},getVisibleChildren:function(u,v){return u.filter(function(m){return m.willRender(v)})},resetAll:function(){for(var u=0;u<this.cameras.length;u++)this.cameras[u].destroy();return this.cameras=[],this.main=this.add(),this.main},update:function(u,v){for(var m=0;m<this.cameras.length;m++)this.cameras[m].update(u,v)},onResize:function(u,v,m,p,x){for(var y=0;y<this.cameras.length;y++){var P=this.cameras[y];P._x===0&&P._y===0&&P._width===p&&P._height===x&&P.setSize(v.width,v.height)}},resize:function(u,v){for(var m=0;m<this.cameras.length;m++)this.cameras[m].setSize(u,v)},shutdown:function(){this.main=void 0;for(var u=0;u<this.cameras.length;u++)this.cameras[u].destroy();this.cameras=[];var v=this.systems.events;v.off(o.UPDATE,this.update,this),v.off(o.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.default.destroy(),this.systems.events.off(o.START,this.start,this),this.systems.events.off(o.DESTROY,this.destroy,this),this.systems.game.scale.off(n.RESIZE,this.onResize,this),this.scene=null,this.systems=null}});a.register("CameraManager",f,"cameras"),l.exports=f},92522:(l,T,e)=>{/** 323 * @author Richard Davey <[email protected]> 324 * @copyright 2013-2023 Photon Storm Ltd. 325 * @license {@link https://opensource.org/licenses/MIT|MIT License} 326 */var d=e(82897),g=e(56694),r=e(89787),a=new g({initialize:function(n){this.camera=n,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(h,n,o,f,u,v,m,p){if(h===void 0&&(h=!0),n===void 0&&(n=1e3),o===void 0&&(o=0),f===void 0&&(f=0),u===void 0&&(u=0),v===void 0&&(v=!1),m===void 0&&(m=null),p===void 0&&(p=this.camera.scene),!v&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=n,this.direction=h,this.progress=0,this.red=o,this.green=f,this.blue=u,this.alpha=h?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=m,this._onUpdateScope=p;var x=h?r.FADE_OUT_START:r.FADE_IN_START;
326return this.camera.emit(x,this.camera,this,n,o,f,u),this.camera},update:function(h,n){this.isRunning&&(this._elapsed+=n,this.progress=d(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(h){if(!this.isRunning&&!this.isComplete)return!1;var n=this.camera;return h.fillStyle="rgba("+this.red+","+this.green+","+this.blue+","+this.alpha+")",h.fillRect(n.x,n.y,n.width,n.height),!0},postRenderWebGL:function(h,n){if(!this.isRunning&&!this.isComplete)return!1;var o=this.camera,f=this.red/255,u=this.green/255,v=this.blue/255;return h.drawFillRect(o.x,o.y,o.width,o.height,n(v,u,f,1),this.alpha),!0},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.isComplete=!0;var h=this.direction?r.FADE_OUT_COMPLETE:r.FADE_IN_COMPLETE;this.camera.emit(h,this.camera,this)},reset:function(){this.isRunning=!1,this.isComplete=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});l.exports=a},22151:(l,T,e)=>{/** 327 * @author Richard Davey <[email protected]> 328 * @copyright 2013-2023 Photon Storm Ltd. 329 * @license {@link https://opensource.org/licenses/MIT|MIT License} 330 */var d=e(82897),g=e(56694),r=e(89787),a=new g({initialize:function(n){this.camera=n,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(h,n,o,f,u,v,m){return h===void 0&&(h=250),n===void 0&&(n=255),o===void 0&&(o=255),f===void 0&&(f=255),u===void 0&&(u=!1),v===void 0&&(v=null),m===void 0&&(m=this.camera.scene),!u&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=h,this.progress=0,this.red=n,this.green=o,this.blue=f,this._alpha=this.alpha,this._elapsed=0,this._onUpdate=v,this._onUpdateScope=m,this.camera.emit
330(r.FLASH_START,this.camera,this,h,n,o,f),this.camera)},update:function(h,n){this.isRunning&&(this._elapsed+=n,this.progress=d(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(h){if(!this.isRunning)return!1;var n=this.camera;return h.fillStyle="rgba("+this.red+","+this.green+","+this.blue+","+this.alpha+")",h.fillRect(n.x,n.y,n.width,n.height),!0},postRenderWebGL:function(h,n){if(!this.isRunning)return!1;var o=this.camera,f=this.red/255,u=this.green/255,v=this.blue/255;return h.drawFillRect(o.x,o.y,o.width,o.height,n(v,u,f,1),this.alpha),!0},effectComplete:function(){this.alpha=this._alpha,this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(r.FLASH_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});l.exports=a},37551:(l,T,e)=>{/** 331 * @author Richard Davey <[email protected]> 332 * @copyright 2013-2023 Photon Storm Ltd. 333 * @license {@link https://opensource.org/licenses/MIT|MIT License} 334 */var d=e(82897),g=e(56694),r=e(35060),a=e(89787),h=e(93736),n=new g({initialize:function(f){this.camera=f,this.isRunning=!1,this.duration=0,this.source=new h,this.current=new h,this.destination=new h,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(o,f,u,v,m,p,x){u===void 0&&(u=1e3),v===void 0&&(v=r.Linear),m===void 0&&(m=!1),p===void 0&&(p=null),x===void 0&&(x=this.camera.scene);var y=this.camera;return!m&&this.isRunning||(this.isRunning=!0,this.duration=u,this.progress=0,this.source.set(y.scrollX,y.scrollY),this.destination.set(o,f),y.getScroll(o,f,this.current),typeof v=="string"&&r.hasOwnProperty(v)?this.ease=r[v]:typeof v=="function"&&(this.ease=v),this._elapsed=0,this._onUpdate=p,this._onUpdateScope=x,this.camera.emit
334(a.PAN_START,this.camera,this,u,o,f)),y},update:function(o,f){if(this.isRunning){this._elapsed+=f;var u=d(this._elapsed/this.duration,0,1);this.progress=u;var v=this.camera;if(this._elapsed<this.duration){var m=this.ease(u);v.getScroll(this.destination.x,this.destination.y,this.current);var p=this.source.x+(this.current.x-this.source.x)*m,x=this.source.y+(this.current.y-this.source.y)*m;v.setScroll(p,x),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,v,u,p,x)}else v.centerOn(this.destination.x,this.destination.y),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,v,u,v.scrollX,v.scrollY),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(a.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}});l.exports=n},1771:(l,T,e)=>{/** 335 * @author Jason Nicholls <[email protected]> 336 * @copyright 2018 Photon Storm Ltd. 337 * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} 338 */var d=e(82897),g=e(56694),r=e(89787),a=e(35060),h=new g({initialize:function(o){this.camera=o,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(n,o,f,u,v,m,p){f===void 0&&(f=1e3),u===void 0&&(u=a.Linear),v===void 0&&(v=!1),m===void 0&&(m=null),p===void 0&&(p=this.camera.scene),o===void 0&&(o=!1),this.shortestPath=o;var x=n;n<0?(x=-1*n,this.clockwise=!1):this.clockwise=!0;var y=360*Math.PI/180;x=x-Math.floor(x/y)*y;var P=this.camera;if(!v&&this.isRunning)return P;if(this.isRunning=!0,this.duration=f,this.progress=0,this.source=P.rotation,this.destination=x,typeof u=="string"&&a.hasOwnProperty(u)?this.ease=a[u]:typeof u=="function"&&(this.ease=u),this._elapsed=0,this._onUpdate=m,this._onUpdateScope=p,this.shortestPath){var b=0,E=0;this.destination>this.source?b=Math.abs(this.destination-this.source):b=Math.abs(this.destination+y)-this.source,this.source>this.destination?E=Math.abs(this.source-this.destination):E=Math.abs(this.source+y)-this.destination,b<E?this.clockwise=!0:b>E&&(this.clockwise=!1)}
338return this.camera.emit(r.ROTATE_START,this.camera,this,f,x),P},update:function(n,o){if(this.isRunning){this._elapsed+=o;var f=d(this._elapsed/this.duration,0,1);this.progress=f;var u=this.camera;if(this._elapsed<this.duration){var v=this.ease(f);this.current=u.rotation;var m=0,p=360*Math.PI/180,x=this.destination,y=this.current;this.clockwise===!1&&(x=this.current,y=this.destination),x>=y?m=Math.abs(x-y):m=Math.abs(x+p)-y;var P=0;this.clockwise?P=u.rotation+m*v:P=u.rotation-m*v,u.rotation=P,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,u,f,P)}else u.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,u,f,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(r.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}});l.exports=h},3241:(l,T,e)=>{/** 339 * @author Richard Davey <[email protected]> 340 * @copyright 2013-2023 Photon Storm Ltd. 341 * @license {@link https://opensource.org/licenses/MIT|MIT License} 342 */var d=e(82897),g=e(56694),r=e(89787),a=e(93736),h=new g({initialize:function(o){this.camera=o,this.isRunning=!1,this.duration=0,this.intensity=new a,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(n,o,f,u,v){return n===void 0&&(n=100),o===void 0&&(o=.05),f===void 0&&(f=!1),u===void 0&&(u=null),v===void 0&&(v=this.camera.scene),!f&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=n,this.progress=0,typeof o=="number"?this.intensity.set(o):this.intensity.set(o.x,o.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=u,this._onUpdateScope=v,this.camera.emit
342(r.SHAKE_START,this.camera,this,n,o),this.camera)},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(n,o){if(this.isRunning)if(this._elapsed+=o,this.progress=d(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed<this.duration){var f=this.intensity,u=this.camera.width,v=this.camera.height,m=this.camera.zoom;this._offsetX=(Math.random()*f.x*u*2-f.x*u)*m,this._offsetY=(Math.random()*f.y*v*2-f.y*v)*m,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(r.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}});l.exports=h},13383:(l,T,e)=>{/** 343 * @author Richard Davey <[email protected]> 344 * @copyright 2013-2023 Photon Storm Ltd. 345 * @license {@link https://opensource.org/licenses/MIT|MIT License} 346 */var d=e(82897),g=e(56694),r=e(35060),a=e(89787),h=new g({initialize:function(o){this.camera=o,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(n,o,f,u,v,m){o===void 0&&(o=1e3),f===void 0&&(f=r.Linear),u===void 0&&(u=!1),v===void 0&&(v=null),m===void 0&&(m=this.camera.scene);var p=this.camera;return!u&&this.isRunning||(this.isRunning=!0,this.duration=o,this.progress=0,this.source=p.zoom,this.destination=n,typeof f=="string"&&r.hasOwnProperty(f)?this.ease=r[f]:typeof f=="function"&&(this.ease=f),this._elapsed=0,this._onUpdate=v,this._onUpdateScope=m,this.camera.emit
346(a.ZOOM_START,this.camera,this,o,n)),p},update:function(n,o){this.isRunning&&(this._elapsed+=o,this.progress=d(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(a.ZOOM_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});l.exports=h},53030:(l,T,e)=>{/** 347 * @author Richard Davey <[email protected]> 348 * @copyright 2013-2023 Photon Storm Ltd. 349 * @license {@link https://opensource.org/licenses/MIT|MIT License} 350 */l.exports={Fade:e(92522),Flash:e(22151),Pan:e(37551),Shake:e(3241),RotateTo:e(1771),Zoom:e(13383)}},39577:l=>{/** 351 * @author Richard Davey <[email protected]> 352 * @copyright 2013-2023 Photon Storm Ltd. 353 * @license {@link https://opensource.org/licenses/MIT|MIT License} 354 */l.exports="cameradestroy"},85373:l=>{/** 355 * @author Richard Davey <[email protected]> 356 * @copyright 2013-2023 Photon Storm Ltd. 357 * @license {@link https://opensource.org/licenses/MIT|MIT License} 358 */l.exports="camerafadeincomplete"},92057:l=>{/** 359 * @author Richard Davey <[email protected]> 360 * @copyright 2013-2023 Photon Storm Ltd. 361 * @license {@link https://opensource.org/licenses/MIT|MIT License} 362 */l.exports="camerafadeinstart"},1903:l=>{/** 363 * @author Richard Davey <[email protected]> 364 * @copyright 2013-2023 Photon Storm Ltd. 365 * @license {@link https://opensource.org/licenses/MIT|MIT License} 366 */l.exports="camerafadeoutcomplete"},96131:l=>{/** 367 * @author Richard Davey <[email protected]> 368 * @copyright 2013-2023 Photon Storm Ltd. 369 * @license {@link https://opensource.org/licenses/MIT|MIT License} 370 */l.exports="camerafadeoutstart"},85409:l=>{/** 371 * @author Richard Davey <[email protected]> 372 * @copyright 2013-2023 Photon Storm Ltd. 373 * @license {@link https://opensource.org/licenses/MIT|MIT License} 374 */l.exports="cameraflashcomplete"},25500:l=>{/** 375 * @author Richard Davey <[email protected]> 376 * @copyright 2013-2023 Photon Storm Ltd. 377 * @license {@link https://opensource.org/licenses/MIT|MIT License} 378 */l.exports="cameraflashstart"},44071:l=>{/** 379 * @author Richard Davey <[email protected]> 380 * @copyright 2013-2023 Photon Storm Ltd. 381 * @license {@link https://opensource.org/licenses/MIT|MIT License} 382 */l.exports="followupdate"},19818:l=>{/** 383 * @author Richard Davey <[email protected]> 384 * @copyright 2013-2023 Photon Storm Ltd. 385 * @license {@link https://opensource.org/licenses/MIT|MIT License} 386 */l.exports="camerapancomplete"},80002:l=>{/** 387 * @author Richard Davey <[email protected]> 388 * @copyright 2013-2023 Photon Storm Ltd. 389 * @license {@link https://opensource.org/licenses/MIT|MIT License} 390 */l.exports="camerapanstart"},87966:l=>{/** 391 * @author Richard Davey <[email protected]> 392 * @copyright 2013-2023 Photon Storm Ltd. 393 * @license {@link https://opensource.org/licenses/MIT|MIT License} 394 */l.exports="postrender"},74217:l=>{/** 395 * @author Richard Davey <[email protected]> 396 * @copyright 2013-2023 Photon Storm Ltd. 397 * @license {@link https://opensource.org/licenses/MIT|MIT License} 398 */l.exports="prerender"},34805:l=>{/** 399 * @author Richard Davey <[email protected]> 400 * @copyright 2013-2023 Photon Storm Ltd. 401 * @license {@link https://opensource.org/licenses/MIT|MIT License} 402 */l.exports="camerarotatecomplete"},30408:l=>{/** 403 * @author Richard Davey <[email protected]> 404 * @copyright 2013-2023 Photon Storm Ltd. 405 * @license {@link https://opensource.org/licenses/MIT|MIT License}
406 */l.exports="camerarotatestart"},49856:l=>{/** 407 * @author Richard Davey <[email protected]> 408 * @copyright 2013-2023 Photon Storm Ltd. 409 * @license {@link https://opensource.org/licenses/MIT|MIT License} 410 */l.exports="camerashakecomplete"},69189:l=>{/** 411 * @author Richard Davey <[email protected]> 412 * @copyright 2013-2023 Photon Storm Ltd. 413 * @license {@link https://opensource.org/licenses/MIT|MIT License} 414 */l.exports="camerashakestart"},67657:l=>{/** 415 * @author Richard Davey <[email protected]> 416 * @copyright 2013-2023 Photon Storm Ltd. 417 * @license {@link https://opensource.org/licenses/MIT|MIT License} 418 */l.exports="camerazoomcomplete"},14229:l=>{/** 419 * @author Richard Davey <[email protected]> 420 * @copyright 2013-2023 Photon Storm Ltd. 421 * @license {@link https://opensource.org/licenses/MIT|MIT License} 422 */l.exports="camerazoomstart"},89787:(l,T,e)=>{/** 423 * @author Richard Davey <[email protected]> 424 * @copyright 2013-2023 Photon Storm Ltd. 425 * @license {@link https://opensource.org/licenses/MIT|MIT License} 426 */l.exports={DESTROY:e(39577),FADE_IN_COMPLETE:e(85373),FADE_IN_START:e(92057),FADE_OUT_COMPLETE:e(1903),FADE_OUT_START:e(96131),FLASH_COMPLETE:e(85409),FLASH_START:e(25500),FOLLOW_UPDATE:e(44071),PAN_COMPLETE:e(19818),PAN_START:e(80002),POST_RENDER:e(87966),PRE_RENDER:e(74217),ROTATE_COMPLETE:e(34805),ROTATE_START:e(30408),SHAKE_COMPLETE:e(49856),SHAKE_START:e(69189),ZOOM_COMPLETE:e(67657),ZOOM_START:e(14229)}},32356:(l,T,e)=>{/** 427 * @author Richard Davey <[email protected]> 428 * @copyright 2013-2023 Photon Storm Ltd. 429 * @license {@link https://opensource.org/licenses/MIT|MIT License} 430 */l.exports={Camera:e(47751),BaseCamera:e(51052),CameraManager:e(62382),Effects:e(53030),Events:e(89787)}},84219:(l,T,e)=>{/** 431 * @author Richard Davey <[email protected]> 432 * @copyright 2013-2023 Photon Storm Ltd. 433 * @license {@link https://opensource.org/licenses/MIT|MIT License} 434 */var d=e(56694),g=e(10850),r=new d({initialize:function(h){this.camera=g(h,"camera",null),this.left=g(h,"left",null),this.right=g(h,"right",null),this.up=g(h,"up",null),this.down=g(h,"down",null),this.zoomIn=g(h,"zoomIn",null),this.zoomOut=g(h,"zoomOut",null),this.zoomSpeed=g(h,"zoomSpeed",.01),this.minZoom=g(h,"minZoom",.001),this.maxZoom=g(h,"maxZoom",1e3),this.speedX=0,this.speedY=0;var n=g(h,"speed",null);typeof n=="number"?(this.speedX=n,this.speedY=n):(this.speedX=g(h,"speed.x",0),this.speedY=g(h,"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(a){return this.camera=a,this},update:function(a){if(this.active){a===void 0&&(a=1);var h=this.camera;this.up&&this.up.isDown?h.scrollY-=this.speedY*a|0:this.down&&this.down.isDown&&(h.scrollY+=this.speedY*a|0),this.left&&this.left.isDown?h.scrollX-=this.speedX*a|0:this.right&&this.right.isDown&&(h.scrollX+=this.speedX*a|0),this.zoomIn&&this.zoomIn.isDown?(h.zoom-=this.zoomSpeed,h.zoom<this.minZoom&&(h.zoom=this.minZoom)):this.zoomOut&&this.zoomOut.isDown&&(h.zoom+=this.zoomSpeed,h.zoom>this.maxZoom&&(h.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}});l.exports=r},69370:(l,T,e)=>{/** 435 * @author Richard Davey <[email protected]> 436 * @copyright 2013-2023 Photon Storm Ltd. 437 * @license {@link https://opensource.org/licenses/MIT|MIT License} 438 */var d=e(56694),g=e(10850),r=new d({initialize:function(h){this.camera=g(h,"camera",null),this.left=g(h,"left",null),this.right=g(h,"right",null),this.up=g(h,"up",null),this.down=g(h,"down",null),this.zoomIn=g(h,"zoomIn",null),this.zoomOut=g(h,"zoomOut",null),this.zoomSpeed=g(h,"zoomSpeed",.01),this.minZoom=g(h,"minZoom",.001),this.maxZoom=g(h,"maxZoom",1e3),this.accelX=0,this.accelY=0;var n=g(h,"acceleration",null);typeof n=="number"?(this.accelX=n,this.accelY=n):(this.accelX=g(h,"acceleration.x",0),this.accelY=g(h,"acceleration.y",0)),this.dragX=0,this.dragY=0;var o=g(h,"drag",null);typeof o=="number"?(this.dragX=o,this.dragY=o):(this.dragX=g(h,"drag.x",0),this.dragY=g(h,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var f=g(h,"maxSpeed",null);typeof f=="number"?(this.maxSpeedX=f,this.maxSpeedY=f):(this.maxSpeedX=g(h,"maxSpeed.x",0),this.maxSpeedY=g(h,"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(a){return this.camera=a,this}
438,update:function(a){if(this.active){a===void 0&&(a=1);var h=this.camera;this._speedX>0?(this._speedX-=this.dragX*a,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*a,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*a,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*a,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&&(h.scrollX-=this._speedX*a|0),this._speedY!==0&&(h.scrollY-=this._speedY*a|0),this._zoom!==0&&(h.zoom+=this._zoom,h.zoom<this.minZoom?h.zoom=this.minZoom:h.zoom>this.maxZoom&&(h.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}});l.exports=r},6524:(l,T,e)=>{/** 439 * @author Richard Davey <[email protected]> 440 * @copyright 2013-2023 Photon Storm Ltd. 441 * @license {@link https://opensource.org/licenses/MIT|MIT License} 442 */l.exports={FixedKeyControl:e(84219),SmoothedKeyControl:e(69370)}},44143:(l,T,e)=>{/** 443 * @author Richard Davey <[email protected]> 444 * @copyright 2013-2023 Photon Storm Ltd. 445 * @license {@link https://opensource.org/licenses/MIT|MIT License} 446 */l.exports={Controls:e(6524),Scene2D:e(32356)}},86459:(l,T,e)=>{/** 447 * @author Richard Davey <[email protected]> 448 * @copyright 2013-2023 Photon Storm Ltd. 449 * @license {@link https://opensource.org/licenses/MIT|MIT License} 450 */var d={VERSION:"3.60.0",BlendModes:e(95723),ScaleModes:e(27394),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};l.exports=d},14033:(l,T,e)=>{/** 451 * @author Richard Davey <[email protected]> 452 * @copyright 2013-2023 Photon Storm Ltd. 453 * @license {@link https://opensource.org/licenses/MIT|MIT License} 454 */var d=e(56694),g=e(86459),r=e(18360),a=e(77290),h=e(72632),n=e(10850),o=e(42911),f=e(72283),u=e(5923),v=e(65641),m=e(93222),p=new d({initialize:function(y){y===void 0&&(y={});var P=["#ff0000","#ffff00","#00ff00","#00ffff","#000000"],b="#ffffff",E=n(y,"scale",null);this.width=n(E,"width",1024,y),this.height=n(E,"height",768,y),this.zoom=n(E,"zoom",1,y),this.parent=n(E,"parent",void 0,y),this.scaleMode=n(E,E?"mode":"scaleMode",0,y),this.expandParent=n(E,"expandParent",!0,y),this.autoRound=n(E,"autoRound",!1,y),this.autoCenter=n(E,"autoCenter",0,y),this.resizeInterval=n(E,"resizeInterval",500,y),this.fullscreenTarget=n(E,"fullscreenTarget",null,y),this.minWidth=n(E,"minWidth",0,y),this.maxWidth=n(E,"maxWidth",0,y),this.minHeight=n(E,"minHeight",0,y),this.maxHeight=n(E,"maxHeight",0,y),this.renderType=n(y,"type",g.AUTO),this.canvas=n(y,"canvas",null),this.context=n(y,"context",null),this.canvasStyle=n(y,"canvasStyle",null),this.customEnvironment=n(y,"customEnvironment",!1),this.sceneConfig=n(y,"scene",null),this.seed=n(y,"seed",[(Date.now()*Math.random()).toString()]),u.RND=new u.RandomDataGenerator(this.seed),this.gameTitle=n(y,"title",""),this.gameURL=n(y,"url","https://phaser.io"),this.gameVersion=n(y,"version",""),this.autoFocus=n(y,"autoFocus",!0),this.stableSort=n(y,"stableSort",-1),this.stableSort===-1&&(this.stableSort=a.browser.es2019?1:0),a.features.stableSort=this.stableSort,this.domCreateContainer=n(y,"dom.createContainer",!1),this.domPointerEvents=n(y,"dom.pointerEvents","none"),this.inputKeyboard=n(y,"input.keyboard",!0),this.inputKeyboardEventTarget=n(y,"input.keyboard.target",window),this.inputKeyboardCapture=n(y,"input.keyboard.capture",[]),this.inputMouse=n(y,"input.mouse",!0),this.inputMouseEventTarget=n(y,"input.mouse.target",null),this.inputMousePreventDefaultDown=n(y,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=n(y,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=n(y,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=n(y,"input.mouse.preventDefaultWheel",!0),this.inputTouch=n(y,"input.touch",a.input.touch),this.inputTouchEventTarget=n(y,"input.touch.target",null),this.inputTouchCapture=n(y,"input.touch.capture",!0),this.inputActivePointers=n(y,"input.activePointers",1),this.inputSmoothFactor=n(y,"input.smoothFactor",0),this.inputWindowEvents=n(y,"input.windowEvents",!0),this.inputGamepad=n(y,"input.gamepad",!1),this.inputGamepadEventTarget=n(y,"input.gamepad.target",window),this.disableContextMenu=n(y,"disableContextMenu",!1),this.audio=n(y,"audio",{}),this.hideBanner=n(y,"banner",null)===!1,this.hidePhaser=n(y,"banner.hidePhaser",!1),this.bannerTextColor=n(y,"banner.text",b),this.bannerBackgroun
454dColor=n(y,"banner.background",P),this.gameTitle===""&&this.hidePhaser&&(this.hideBanner=!0),this.fps=n(y,"fps",null);var M=n(y,"render",null);this.pipeline=n(M,"pipeline",null,y),this.autoMobilePipeline=n(M,"autoMobilePipeline",!0,y),this.defaultPipeline=n(M,"defaultPipeline",v.MULTI_PIPELINE,y),this.antialias=n(M,"antialias",!0,y),this.antialiasGL=n(M,"antialiasGL",!0,y),this.mipmapFilter=n(M,"mipmapFilter","",y),this.desynchronized=n(M,"desynchronized",!1,y),this.roundPixels=n(M,"roundPixels",!1,y),this.pixelArt=n(M,"pixelArt",this.zoom!==1,y),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.transparent=n(M,"transparent",!1,y),this.clearBeforeRender=n(M,"clearBeforeRender",!0,y),this.preserveDrawingBuffer=n(M,"preserveDrawingBuffer",!1,y),this.premultipliedAlpha=n(M,"premultipliedAlpha",!0,y),this.failIfMajorPerformanceCaveat=n(M,"failIfMajorPerformanceCaveat",!1,y),this.powerPreference=n(M,"powerPreference","default",y),this.batchSize=n(M,"batchSize",4096,y),this.maxTextures=n(M,"maxTextures",-1,y),this.maxLights=n(M,"maxLights",10,y);var w=n(y,"backgroundColor",0);this.backgroundColor=m(w),this.transparent&&(this.backgroundColor=m(0),this.backgroundColor.alpha=0),this.preBoot=n(y,"callbacks.preBoot",f),this.postBoot=n(y,"callbacks.postBoot",f),this.physics=n(y,"physics",{}),this.defaultPhysicsSystem=n(this.physics,"default",!1),this.loaderBaseURL=n(y,"loader.baseURL",""),this.loaderPath=n(y,"loader.path",""),this.loaderMaxParallelDownloads=n(y,"loader.maxParallelDownloads",a.os.android?6:32),this.loaderCrossOrigin=n(y,"loader.crossOrigin",void 0),this.loaderResponseType=n(y,"loader.responseType",""),this.loaderAsync=n(y,"loader.async",!0),this.loaderUser=n(y,"loader.user",""),this.loaderPassword=n(y,"loader.password",""),this.loaderTimeout=n(y,"loader.timeout",0),this.loaderWithCredentials=n(y,"loader.withCredentials",!1),this.loaderImageLoadType=n(y,"loader.imageLoadType","XHR"),this.loaderLocalScheme=n(y,"loader.localScheme",["file://","capacitor://"]),this.glowFXQuality=n(y,"fx.glow.quality",.1),this.glowFXDistance=n(y,"fx.glow.distance",10),this.installGlobalPlugins=[],this.installScenePlugins=[];var A=n(y,"plugins",null),R=r.DefaultScene;A&&(Array.isArray(A)?this.defaultPlugins=A:o(A)&&(this.installGlobalPlugins=h(A,"global",[]),this.installScenePlugins=h(A,"scene",[]),Array.isArray(A.default)?R=A.default:Array.isArray(A.defaultMerge)&&(R=R.concat(A.defaultMerge)))),this.defaultPlugins=R;var L="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=n(y,"images.default",L+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=n(y,"images.missing",L+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=n(y,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=g.WEBGL:window.FORCE_CANVAS&&(this.renderType=g.CANVAS))}});l.exports=p},50150:(l,T,e)=>{/** 455 * @author Richard Davey <[email protected]> 456 * @copyright 2013-2023 Photon Storm Ltd. 457 * @license {@link https://opensource.org/licenses/MIT|MIT License} 458 */var d=e(70616),g=e(61068),r=e(86459),a=e(90185),h=function(n){var o=n.config;if((o.customEnvironment||o.canvas)&&o.renderType===r.AUTO)throw new Error("Mu
458st set explicit renderType in custom environment");if(!o.customEnvironment&&!o.canvas&&o.renderType!==r.HEADLESS)if(o.renderType===r.AUTO&&(o.renderType=a.webGL?r.WEBGL:r.CANVAS),o.renderType===r.WEBGL){if(!a.webGL)throw new Error("Cannot create WebGL context, aborting.")}else if(o.renderType===r.CANVAS){if(!a.canvas)throw new Error("Cannot create Canvas context, aborting.")}else throw new Error("Unknown value for renderer type: "+o.renderType);o.antialias||g.disableSmoothing();var f=n.scale.baseSize,u=f.width,v=f.height;if(o.canvas?(n.canvas=o.canvas,n.canvas.width=u,n.canvas.height=v):n.canvas=g.create(n,u,v,o.renderType),o.canvasStyle&&(n.canvas.style=o.canvasStyle),o.antialias||d.setCrisp(n.canvas),o.renderType!==r.HEADLESS){var m,p;m=e(91135),p=e(11857),o.renderType===r.WEBGL?n.renderer=new p(n):(n.renderer=new m(n),n.context=n.renderer.gameContext)}};l.exports=h},77291:(l,T,e)=>{/** 459 * @author Richard Davey <[email protected]> 460 * @copyright 2013-2023 Photon Storm Ltd. 461 * @license {@link https://opensource.org/licenses/MIT|MIT License} 462 */var d=e(86459),g=function(r){var a=r.config;if(!a.hideBanner){var h="WebGL";a.renderType===d.CANVAS?h="Canvas":a.renderType===d.HEADLESS&&(h="Headless");var n=a.audio,o=r.device.audio,f;if(o.webAudio&&!n.disableWebAudio?f="Web Audio":n.noAudio||!o.webAudio&&!o.audioData?f="No Audio":f="HTML5 Audio",r.device.browser.ie)window.console&&console.log("Phaser v"+d.VERSION+" / https://phaser.io");else{var u="",v=[u];if(Array.isArray(a.bannerBackgroundColor)){var m;a.bannerBackgroundColor.forEach(function(x){u=u.concat("%c "),v.push("background: "+x),m=x}),v[v.length-1]="color: "+a.bannerTextColor+"; background: "+m}else u=u.concat("%c "),v.push("color: "+a.bannerTextColor+"; background: "+a.bannerBackgroundColor);v.push("background: transparent"),a.gameTitle&&(u=u.concat(a.gameTitle),a.gameVersion&&(u=u.concat(" v"+a.gameVersion)),a.hidePhaser||(u=u.concat(" / ")));var p="";a.hidePhaser||(u=u.concat("Phaser v"+d.VERSION+p+" ("+h+" | "+f+")")),u=u.concat(" %c "+a.gameURL),v[0]=u,console.log.apply(console,v)}}};l.exports=g},15213:(l,T,e)=>{/** 463 * @author Richard Davey <[email protected]> 464 * @copyright 2013-2023 Photon Storm Ltd. 465 * @license {@link https://opensource.org/licenses/MIT|MIT License} 466 */var d=e(99584),g=e(90249),r=e(43474),a=e(61068),h=e(56694),n=e(14033),o=e(85178),f=e(50150),u=e(81078),v=e(77291),m=e(77290),p=e(21546),x=e(6659),y=e(97081),P=e(69898),b=e(91963),E=e(49274),M=e(756),w=e(13553),A=e(38203),R=e(6237),L=e(26617),O=e(26493),I=e(84191),D=new h({initialize:function(z){this.config=new n(z),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new x,this.anims=new g(this),this.textures=new R(this),this.cache=new r(this),this.registry=new u(this,new x),this.input=new P(this,this.config),this.scene=new w(this,this.config.sceneConfig),this.device=m,this.scale=new M(this,this.config),this.sound=null,this.sound=I.create(this),this.loop=new L(this,this.config.fps),this.plugins=new E(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,this.isPaused=!1,p(this.boot.bind(this))},boot:function(){if(!b.hasCore("EventEmitter")){console.warn("Aborting. Core Plugins missing.");return}this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),f(this),o(this),v(this),d(this.canvas,this.config.parent),this.textures.once(A.READY,this.texturesReady,this),this.events.emit(y.BOOT)},texturesReady:function(){this.events.emit(y.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 B=this.events;B.on(y.HIDDEN,this.onHidden,this),B.on(y.VISIBLE,this.onVisible,this),B.on(y.BLUR,this.onBlur,this),B.on(y.FOCUS,this.onFocus,this)},step:function(B,z){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var X=this.events;X.emit(y.PRE_STEP,B,z),X.emit(y.STEP,B,z),this.scene.update(B,z),X.emit(y.POST_STEP,B,z);var W=this.renderer;W.preRender(),X.emit(y.PRE_RENDER,W,B,z),this.scene.render(W),W.postRender(),X.emit(y.POST_RENDER,W,B,z)}},headlessStep:function(B,z){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var X=this.events;X.emit(y.PRE_STEP,B,z),X.emit(y.STEP,B,z),this.scene.update(B,z),X.emit(y.POST_STEP,B,z),this.scene.isProcessing=!1,X.emit(y.PRE_RENDER,null,B,z),X.emit(y.POST_RENDER,null,B,z)}},onHidden:function(){this.loop.pause(),this.events.emit(y.PAUSE)},pause:function(){var B=this.isPaused;this.isPaused=!0,B||this.events.emit(y.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(y.RESUME)},resume:function(){var B=this.isPaused;this.isPaused=!1,B&&this.events.emit(y.RESUME)},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(B,z){z===void 0&&(z=!1),this.pendingDestroy=!0,this.removeCanvas=B,this.noReturn=z},runDestroy:function(){this.scene.destroy(),this.events.emit(y.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(a.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});l.exports=D},26617:(l,T,e)=>{/** 467 * @author Richard Davey <[email protected]> 468 * @copyright 2013-2023 Photon Storm Ltd. 469 * @license {@link https://opensource.org/licenses/MIT|MIT License} 470 */var d=e(56694),g=e(10850),r=e(72283),a=e(27385),h=new d({initialize:function(o,f){this.game=o,this.raf=new a,this.started=!1,this.running=!1,this.minFps=g(f,"min",5),this.targetFps=g(f,"target",60),this.fpsLimit=g(f,"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=r,this.forceSetTimeOut=g(f,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=g(f,"deltaHistory",10),this.panicMax=g(f,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=g(f,"smoothStep",!0)},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.startTime+=this.time-this._pauseTime},resetDelta:function(){var n=window.performance.now();this.time=n,this.lastTime=n,this.nextFpsUpdate=n+1e3,this.framesThisSecond=0;for(var o=0;o<this.deltaSmoothingMax;o++)this.deltaHistory[o]=Math.min(this._target,this.deltaHistory[o]);this.delta=0,this.deltaIndex=0,this._coolDown=this.panicMax},start:function(n){if(this.started)return this;this.started=!0,this.running=!0;for(var o=0;o<this.deltaSmoothingMax;o++)this.deltaHistory[o]=this._target;this.resetDelta(),this.startTime=window.performance.now(),this.callback=n;var f=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(f,this.forceSetTimeOut,this._target)},smoothDelta:function(n){var o=this.deltaIndex,f=this.deltaHistory,u=this.deltaSmoothingMax;(this._coolDown>0||!this.inFocus)&&(this._coolDown--,n=Math.min(n,this._target)),n>this._min&&(n=f[o],n=Math.min(n,this._min)),f[o]=n,this.deltaIndex++,this.deltaIndex>=u&&(this.deltaIndex=0);for(var v=0,m=0;m<u;m++)v+=f[m];return v/=u,v},updateFPS:function(n){this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=n+1e3,this.framesThisSecond=0},stepLimitFPS:function(n){this.now=n;var o=Math.max(0,n-this.lastTime);this.rawDelta=o,this.time+=this.rawDelta,this.smoothStep&&(o=this.smoothDelta(o)),this.delta+=o,n>=this.nextFpsUpdate&&this.updateFPS(n),this.framesThisSecond++,this.delta>=this._limitRate&&(this.callback(n,this.delta),this.delta=0),this.lastTime=n,this.frame++},step:function(n){this.now=n;var o=Math.max(0,n-this.lastTime);this.rawDelta=o,this.time+=this.rawDelta,this.smoothStep&&(o=this.smoothDelta(o)),this.delta=o,n>=this.nextFpsUpdate&&this.updateFPS(n),this.framesThisSecond++,this.callback(n,o),this.lastTime=n,this.frame++},tick:function(){var n=window.performance.now();this.hasFpsLimit?this.stepLimitFPS(n):this.step(n)},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(n){n===void 0&&(n=!1);var o=window.performance.now();if(!this.running){n&&(this.startTime+=-this.lastTime+(this.lastTime+o));var f=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(f,this.forceSetTimeOut,this._target),this.running=!0,this.nextFpsUpdate=o+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}});l.exports=h},26493:(l,T,e)=>{/** 471 * @author Richard Davey <[email protected]> 472 * @copyright 2013-2023 Photon Storm Ltd. 473 * @license {@link https://opensource.org/licenses/MIT|MIT License} 474 */var d=e(97081),g=function(r){var a,h=r.events;if(document.hidden!==void 0)a="visibilitychange";else{var n=["webkit","moz","ms"];
474n.forEach(function(f){document[f+"Hidden"]!==void 0&&(document.hidden=function(){return document[f+"Hidden"]},a=f+"visibilitychange")})}var o=function(f){document.hidden||f.type==="pause"?h.emit(d.HIDDEN):h.emit(d.VISIBLE)};a&&document.addEventListener(a,o,!1),window.onblur=function(){h.emit(d.BLUR)},window.onfocus=function(){h.emit(d.FOCUS)},window.focus&&r.config.autoFocus&&window.focus()};l.exports=g},41651:l=>{/** 475 * @author Richard Davey <[email protected]> 476 * @copyright 2013-2023 Photon Storm Ltd. 477 * @license {@link https://opensource.org/licenses/MIT|MIT License} 478 */l.exports="blur"},5520:l=>{/** 479 * @author Richard Davey <[email protected]> 480 * @copyright 2013-2023 Photon Storm Ltd. 481 * @license {@link https://opensource.org/licenses/MIT|MIT License} 482 */l.exports="boot"},51673:l=>{/** 483 * @author Richard Davey <[email protected]> 484 * @copyright 2013-2023 Photon Storm Ltd. 485 * @license {@link https://opensource.org/licenses/MIT|MIT License} 486 */l.exports="contextlost"},25055:l=>{/** 487 * @author Richard Davey <[email protected]> 488 * @copyright 2013-2023 Photon Storm Ltd. 489 * @license {@link https://opensource.org/licenses/MIT|MIT License} 490 */l.exports="destroy"},23767:l=>{/** 491 * @author Richard Davey <[email protected]> 492 * @copyright 2013-2023 Photon Storm Ltd. 493 * @license {@link https://opensource.org/licenses/MIT|MIT License} 494 */l.exports="focus"},57564:l=>{/** 495 * @author Richard Davey <[email protected]> 496 * @copyright 2013-2023 Photon Storm Ltd. 497 * @license {@link https://opensource.org/licenses/MIT|MIT License} 498 */l.exports="hidden"},38327:l=>{/** 499 * @author Richard Davey <[email protected]> 500 * @copyright 2013-2023 Photon Storm Ltd. 501 * @license {@link https://opensource.org/licenses/MIT|MIT License} 502 */l.exports="pause"},43807:l=>{/** 503 * @author Richard Davey <[email protected]> 504 * @copyright 2013-2023 Photon Storm Ltd. 505 * @license {@link https://opensource.org/licenses/MIT|MIT License} 506 */l.exports="postrender"},73652:l=>{/** 507 * @author Richard Davey <[email protected]> 508 * @copyright 2013-2023 Photon Storm Ltd. 509 * @license {@link https://opensource.org/licenses/MIT|MIT License} 510 */l.exports="poststep"},780:l=>{/** 511 * @author Richard Davey <[email protected]> 512 * @copyright 2013-2023 Photon Storm Ltd. 513 * @license {@link https://opensource.org/licenses/MIT|MIT License} 514 */l.exports="prerender"},13781:l=>{/** 515 * @author Richard Davey <[email protected]> 516 * @copyright 2013-2023 Photon Storm Ltd. 517 * @license {@link https://opensource.org/licenses/MIT|MIT License} 518 */l.exports="prestep"},38247:l=>{/** 519 * @author Richard Davey <[email protected]> 520 * @copyright 2013-2023 Photon Storm Ltd. 521 * @license {@link https://opensource.org/licenses/MIT|MIT License} 522 */l.exports="ready"},29129:l=>{/** 523 * @author Richard Davey <[email protected]> 524 * @copyright 2013-2023 Photon Storm Ltd. 525 * @license {@link https://opensource.org/licenses/MIT|MIT License} 526 */l.exports="resume"},34994:l=>{/** 527 * @author Richard Davey <[email protected]> 528 * @copyright 2013-2023 Photon Storm Ltd. 529 * @license {@link https://opensource.org/licenses/MIT|MIT License} 530 */l.exports="step"},98704:l=>{/** 531 * @author Richard Davey <[email protected]> 532 * @copyright 2013-2023 Photon Storm Ltd. 533 * @license {@link https://opensource.org/licenses/MIT|MIT License} 534 */l.exports="visible"},97081:(l,T,e)=>{/** 535 * @author Richard Davey <[email protected]> 536 * @copyright 2013-2023 Photon Storm Ltd. 537 * @license {@link https://opensource.org/licenses/MIT|MIT License} 538 */l.exports={BLUR:e(41651),BOOT:e(5520),CONTEXT_LOST:e(51673),DESTROY:e(25055),FOCUS:e(23767),HIDDEN:e(57564),PAUSE:e(38327),POST_RENDER:e(43807),POST_STEP:e(73652),PRE_RENDER:e(780),PRE_STEP:e(13781),READY:e(38247),RESUME:e(29129),STEP:e(34994),VISIBLE:e(98704)}},80293:(l,T,e)=>{/** 539 * @author Richard Davey <[email protected]> 540 * @copyright 2013-2023 Photon Storm Ltd. 541 * @license {@link https://opensource.org/licenses/MIT|MIT License}
542 */l.exports={Config:e(14033),CreateRenderer:e(50150),DebugHeader:e(77291),Events:e(97081),TimeStep:e(26617),VisibilityHandler:e(26493)}},52780:(l,T,e)=>{/** 543 * @author Richard Davey <[email protected]> 544 * @copyright 2013-2023 Photon Storm Ltd. 545 * @license {@link https://opensource.org/licenses/MIT|MIT License} 546 */var d=e(81543),g=e(61068),r=e(10850),a=function(h){var n=r(h,"data",[]),o=r(h,"canvas",null),f=r(h,"palette",d),u=r(h,"pixelWidth",1),v=r(h,"pixelHeight",u),m=r(h,"resizeCanvas",!0),p=r(h,"clearCanvas",!0),x=r(h,"preRender",null),y=r(h,"postRender",null),P=Math.floor(Math.abs(n[0].length*u)),b=Math.floor(Math.abs(n.length*v));o||(o=g.create2D(this,P,b),m=!1,p=!1),m&&(o.width=P,o.height=b);var E=o.getContext("2d",{willReadFrequently:!0});p&&E.clearRect(0,0,P,b),x&&x(o,E);for(var M=0;M<n.length;M++)for(var w=n[M],A=0;A<w.length;A++){var R=w[A];R!=="."&&R!==" "&&(E.fillStyle=f[R],E.fillRect(A*u,M*v,u,v))}return y&&y(o,E),o};l.exports=a},84106:(l,T,e)=>{/** 547 * @author Richard Davey <[email protected]> 548 * @copyright 2013-2023 Photon Storm Ltd. 549 * @license {@link https://opensource.org/licenses/MIT|MIT License} 550 */l.exports={GenerateTexture:e(52780),Palettes:e(25235)}},81543:l=>{/** 551 * @author Richard Davey <[email protected]> 552 * @copyright 2013-2023 Photon Storm Ltd. 553 * @license {@link https://opensource.org/licenses/MIT|MIT License} 554 */l.exports={0:"#000",1:"#9D9D9D",2:"#FFF",3:"#BE2633",4:"#E06F8B",5:"#493C2B",6:"#A46422",7:"#EB8931",8:"#F7E26B",9:"#2F484E",A:"#44891A",B:"#A3CE27",C:"#1B2632",D:"#005784",E:"#31A2F2",F:"#B2DCEF"}},75846:l=>{/** 555 * @author Richard Davey <[email protected]> 556 * @copyright 2013-2023 Photon Storm Ltd. 557 * @license {@link https://opensource.org/licenses/MIT|MIT License} 558 */l.exports={0:"#000",1:"#fff",2:"#8b4131",3:"#7bbdc5",4:"#8b41ac",5:"#6aac41",6:"#3931a4",7:"#d5de73",8:"#945a20",9:"#5a4100",A:"#bd736a",B:"#525252",C:"#838383",D:"#acee8b",E:"#7b73de",F:"#acacac"}},83206:l=>{/** 559 * @author Richard Davey <[email protected]> 560 * @copyright 2013-2023 Photon Storm Ltd. 561 * @license {@link https://opensource.org/licenses/MIT|MIT License} 562 */l.exports={0:"#000",1:"#2234d1",2:"#0c7e45",3:"#44aacc",4:"#8a3622",5:"#5c2e78",6:"#aa5c3d",7:"#b5b5b5",8:"#5e606e",9:"#4c81fb",A:"#6cd947",B:"#7be2f9",C:"#eb8a60",D:"#e23d69",E:"#ffd93f",F:"#fff"}},13194:l=>{/** 563 * @author Richard Davey <[email protected]> 564 * @copyright 2013-2023 Photon Storm Ltd. 565 * @license {@link https://opensource.org/licenses/MIT|MIT License} 566 */l.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#f5f4eb"}},50686:l=>{/** 567 * @author Richard Davey <[email protected]> 568 * @copyright 2013-2023 Photon Storm Ltd. 569 * @license {@link https://opensource.org/licenses/MIT|MIT License} 570 */l.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#fff"}},25235:(l,T,e)=>{/** 571 * @author Richard Davey <[email protected]> 572 * @copyright 2013-2023 Photon Storm Ltd. 573 * @license {@link https://opensource.org/licenses/MIT|MIT License} 574 */l.exports={ARNE16:e(81543),C64:e(75846),CGA:e(83206),JMP:e(13194),MSX:e(50686)}},63120:(l,T,e)=>{/** 575 * @author Richard Davey <[email protected]> 576 * @copyright 2013-2023 Photon Storm Ltd. 577 * @license {@link https://opensource.org/licenses/MIT|MIT License} 578 */var d=e(56694),g=e(34631),r=e(38517),a=e(93736),h=new d({Extends:r,initialize:function(o,f,u,v){r.call(this,"CubicBezierCurve"),Array.isArray(o)&&(v=new a(o[6],o[7]),u=new a(o[4],o[5]),f=new a(o[2],o[3]),o=new a(o[0],o[1])),this.p0=o,this.p1=f,this.p2=u,this.p3=v},getStartPoint:function(n){return n===void 0&&(n=new a),n.copy(this.p0)},getResolution:function(n){return n},getPoint:function(n,o){o===void 0&&(o=new a);var f=this.p0,u=this.p1,v=this.p2,m=this.p3;return o.set(g(n,f.x,u.x,v.x,m.x),g(n,f.y,u.y,v.y,m.y))},draw:function(n,o){o===void 0&&(o=32);var f=this.getPoints(o);n.beginPath(),n.moveTo(this.p0.x,this.p0.y);for(var u=1;u<f.length;u++)n.lineTo(f[u].x,f[u].y);return n.strokePath(),n}
578,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]}}});h.fromJSON=function(n){var o=n.points,f=new a(o[0],o[1]),u=new a(o[2],o[3]),v=new a(o[4],o[5]),m=new a(o[6],o[7]);return new h(f,u,v,m)},l.exports=h},38517:(l,T,e)=>{/** 579 * @author Richard Davey <[email protected]> 580 * @copyright 2013-2023 Photon Storm Ltd. 581 * @license {@link https://opensource.org/licenses/MIT|MIT License} 582 */var d=e(56694),g=e(80222),r=e(74118),a=e(93736),h=new d({initialize:function(o){this.type=o,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new a,this._tmpVec2B=new a},draw:function(n,o){return o===void 0&&(o=32),n.strokePoints(this.getPoints(o))},getBounds:function(n,o){n||(n=new r),o===void 0&&(o=16);var f=this.getLength();o>f&&(o=f/2);var u=Math.max(1,Math.round(f/o));return g(this.getSpacedPoints(u),n)},getDistancePoints:function(n){var o=this.getLength(),f=Math.max(1,o/n);return this.getSpacedPoints(f)},getEndPoint:function(n){return n===void 0&&(n=new a),this.getPointAt(1,n)},getLength:function(){var n=this.getLengths();return n[n.length-1]},getLengths:function(n){if(n===void 0&&(n=this.arcLengthDivisions),this.cacheArcLengths.length===n+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var o=[],f,u=this.getPoint(0,this._tmpVec2A),v=0;o.push(0);for(var m=1;m<=n;m++)f=this.getPoint(m/n,this._tmpVec2B),v+=f.distance(u),o.push(v),u.copy(f);return this.cacheArcLengths=o,o},getPointAt:function(n,o){var f=this.getUtoTmapping(n);return this.getPoint(f,o)},getPoints:function(n,o,f){f===void 0&&(f=[]),n||(o?n=this.getLength()/o:n=this.defaultDivisions);for(var u=0;u<=n;u++)f.push(this.getPoint(u/n));return f},getRandomPoint:function(n){return n===void 0&&(n=new a),this.getPoint(Math.random(),n)},getSpacedPoints:function(n,o,f){f===void 0&&(f=[]),n||(o?n=this.getLength()/o:n=this.defaultDivisions);for(var u=0;u<=n;u++){var v=this.getUtoTmapping(u/n,null,n);f.push(this.getPoint(v))}return f},getStartPoint:function(n){return n===void 0&&(n=new a),this.getPointAt(0,n)},getTangent:function(n,o){o===void 0&&(o=new a);var f=1e-4,u=n-f,v=n+f;return u<0&&(u=0),v>1&&(v=1),this.getPoint(u,this._tmpVec2A),this.getPoint(v,o),o.subtract(this._tmpVec2A).normalize()},getTangentAt:function(n,o){var f=this.getUtoTmapping(n);return this.getTangent(f,o)},getTFromDistance:function(n,o){return n<=0?0:this.getUtoTmapping(0,n,o)},getUtoTmapping:function(n,o,f){var u=this.getLengths(f),v=0,m=u.length,p;o?p=Math.min(o,u[m-1]):p=n*u[m-1];for(var x=0,y=m-1,P;x<=y;)if(v=Math.floor(x+(y-x)/2),P=u[v]-p,P<0)x=v+1;else if(P>0)y=v-1;else{y=v;break}if(v=y,u[v]===p)return v/(m-1);var b=u[v],E=u[v+1],M=E-b,w=(p-b)/M;return(v+w)/(m-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});l.exports=h},48835:(l,T,e)=>{/** 583 * @author Richard Davey <[email protected]> 584 * @copyright 2013-2023 Photon Storm Ltd. 585 * @license {@link https://opensource.org/licenses/MIT|MIT License} 586 */var d=e(56694),g=e(38517),r=e(75606),a=e(10850),h=e(23701),n=e(93736),o=new d({Extends:g,initialize:function(u,v,m,p,x,y,P,b){if(typeof u=="object"){var E=u;u=a(E,"x",0),v=a(E,"y",0),m=a(E,"xRadius",0),p=a(E,"yRadius",m),x=a(E,"startAngle",0),y=a(E,"endAngle",360),P=a(E,"clockwise",!1),b=a(E,"rotation",0)}else p===void 0&&(p=m),x===void 0&&(x=0),y===void 0&&(y=360),P===void 0&&(P=!1),b===void 0&&(b=0);g.call(this,"EllipseCurve"),this.p0=new n(u,v),this._xRadius=m,this._yRadius=p,this._startAngle=r(x),this._endAngle=r(y),this._clockwise=P,this._rotation=r(b)},getStartPoint:function(f){return f===void 0&&(f=new n),this.getPoint(0,f)},getResolution:function(f){return f*2},getPoint:function(f,u){u===void 0&&(u=new n);for(var v=Math.PI*2,m=this._endAngle-this._startAngle,p=Math.abs(m)<Number.EPSILON;m<0;)m+=v;for(;m>v;)m-=v;m<Number.EPSILON&&(p?m=0:m=v),this._clockwise&&!p&&(m===v?m=-v:m=m-v);var x=this._startAngle+f*m,y=this.p0.x+this._xRadius*Math.cos(x),P=this.p0.y+this._yRadius*Math.sin(x);if(this._rotation!==0){var b=Math.cos(this._rotation),E=Math.sin(this._rotation),M=y-this.p0.x,w=P-this.p0.y;y=M*b-w*E+this.p0.x,P=M*E+w*b+this.p0.y}return u.set(y,P)},setXRadius:function(f){return this.xRadius=f,this},setYRadius:function(f){return this.yRadius=f,this}
586,setWidth:function(f){return this.xRadius=f/2,this},setHeight:function(f){return this.yRadius=f/2,this},setStartAngle:function(f){return this.startAngle=f,this},setEndAngle:function(f){return this.endAngle=f,this},setClockwise:function(f){return this.clockwise=f,this},setRotation:function(f){return this.rotation=f,this},x:{get:function(){return this.p0.x},set:function(f){this.p0.x=f}},y:{get:function(){return this.p0.y},set:function(f){this.p0.y=f}},xRadius:{get:function(){return this._xRadius},set:function(f){this._xRadius=f}},yRadius:{get:function(){return this._yRadius},set:function(f){this._yRadius=f}},startAngle:{get:function(){return h(this._startAngle)},set:function(f){this._startAngle=r(f)}},endAngle:{get:function(){return h(this._endAngle)},set:function(f){this._endAngle=r(f)}},clockwise:{get:function(){return this._clockwise},set:function(f){this._clockwise=f}},angle:{get:function(){return h(this._rotation)},set:function(f){this._rotation=r(f)}},rotation:{get:function(){return this._rotation},set:function(f){this._rotation=f}},toJSON:function(){return{type:this.type,x:this.p0.x,y:this.p0.y,xRadius:this._xRadius,yRadius:this._yRadius,startAngle:h(this._startAngle),endAngle:h(this._endAngle),clockwise:this._clockwise,rotation:h(this._rotation)}}});o.fromJSON=function(f){return new o(f)},l.exports=o},58084:(l,T,e)=>{/** 587 * @author Richard Davey <[email protected]> 588 * @copyright 2013-2023 Photon Storm Ltd. 589 * @license {@link https://opensource.org/licenses/MIT|MIT License} 590 */var d=e(56694),g=e(38517),r=e(80222),a=e(74118),h=e(93736),n=new d({Extends:g,initialize:function(f,u){g.call(this,"LineCurve"),Array.isArray(f)&&(u=new h(f[2],f[3]),f=new h(f[0],f[1])),this.p0=f,this.p1=u,this.arcLengthDivisions=1},getBounds:function(o){return o===void 0&&(o=new a),r([this.p0,this.p1],o)},getStartPoint:function(o){return o===void 0&&(o=new h),o.copy(this.p0)},getResolution:function(o){return o===void 0&&(o=1),o},getPoint:function(o,f){return f===void 0&&(f=new h),o===1?f.copy(this.p1):(f.copy(this.p1).subtract(this.p0).scale(o).add(this.p0),f)},getPointAt:function(o,f){return this.getPoint(o,f)},getTangent:function(o,f){return f===void 0&&(f=new h),f.copy(this.p1).subtract(this.p0).normalize(),f},getUtoTmapping:function(o,f,u){var v;if(f){var m=this.getLengths(u),p=m[m.length-1],x=Math.min(f,p);v=x/p}else v=o;return v},draw:function(o){return o.lineBetween(this.p0.x,this.p0.y,this.p1.x,this.p1.y),o},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y]}}});n.fromJSON=function(o){var f=o.points,u=new h(f[0],f[1]),v=new h(f[2],f[3]);return new n(u,v)},l.exports=n},64761:(l,T,e)=>{/** 591 * @author Richard Davey <[email protected]> 592 * @copyright 2013-2023 Photon Storm Ltd. 593 * @license {@link https://opensource.org/licenses/MIT|MIT License} 594 */var d=e(56694),g=e(38517),r=e(16252),a=e(93736),h=new d({Extends:g,initialize:function(o,f,u){g.call(this,"QuadraticBezierCurve"),Array.isArray(o)&&(u=new a(o[4],o[5]),f=new a(o[2],o[3]),o=new a(o[0],o[1])),this.p0=o,this.p1=f,this.p2=u},getStartPoint:function(n){return n===void 0&&(n=new a),n.copy(this.p0)},getResolution:function(n){return n},getPoint:function(n,o){o===void 0&&(o=new a);var f=this.p0,u=this.p1,v=this.p2;return o.set(r(n,f.x,u.x,v.x),r(n,f.y,u.y,v.y))},draw:function(n,o){o===void 0&&(o=32);var f=this.getPoints(o);n.beginPath(),n.moveTo(this.p0.x,this.p0.y);for(var u=1;u<f.length;u++)n.lineTo(f[u].x,f[u].y);return n.strokePath(),n},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]}}});h.fromJSON=function(n){var o=n.points,f=new a(o[0],o[1]),u=new a(o[2],o[3]),v=new a(o[4],o[5]);return new h(f,u,v)},l.exports=h},11956:(l,T,e)=>{/** 595 * @author Richard Davey <[email protected]> 596 * @copyright 2013-2023 Photon Storm Ltd. 597 * @license {@link https://opensource.org/licenses/MIT|MIT License} 598 */var d=e(14976),g=e(56694),r=e(38517),a=e(93736),h=new g({Extends:r,initialize:function(o){o===void 0&&(o=[]),r.call(this,"SplineCurve"),this.points=[],this.addPoints(o)},addPoints:function(n){for(var o=0;o<n.length;o++){var f=new a;typeof n[o]=="number"?(f.x=n[o],f.y=n[o+1],o++):Array.isArray(n[o])?(f.x=n[o][0],f.y=n[o][1]):(f.x=n[o].x,f.y=n[o].y),this.points.push(f)}return this},addPoint:function(n,o){var f=new a(n,o);return this.points.push(f),f}
598,getStartPoint:function(n){return n===void 0&&(n=new a),n.copy(this.points[0])},getResolution:function(n){return n*this.points.length},getPoint:function(n,o){o===void 0&&(o=new a);var f=this.points,u=(f.length-1)*n,v=Math.floor(u),m=u-v,p=f[v===0?v:v-1],x=f[v],y=f[v>f.length-2?f.length-1:v+1],P=f[v>f.length-3?f.length-1:v+2];return o.set(d(m,p.x,x.x,y.x,P.x),d(m,p.y,x.y,y.y,P.y))},toJSON:function(){for(var n=[],o=0;o<this.points.length;o++)n.push(this.points[o].x),n.push(this.points[o].y);return{type:this.type,points:n}}});h.fromJSON=function(n){return new h(n.points)},l.exports=h},73962:(l,T,e)=>{/** 599 * @author Richard Davey <[email protected]> 600 * @copyright 2013-2023 Photon Storm Ltd. 601 * @license {@link https://opensource.org/licenses/MIT|MIT License} 602 */l.exports={Path:e(12822),MoveTo:e(53639),CubicBezier:e(63120),Curve:e(38517),Ellipse:e(48835),Line:e(58084),QuadraticBezier:e(64761),Spline:e(11956)}},53639:(l,T,e)=>{/** 603 * @author Richard Davey <[email protected]> 604 * @copyright 2013-2023 Photon Storm Ltd. 605 * @license {@link https://opensource.org/licenses/MIT|MIT License} 606 */var d=e(56694),g=e(93736),r=new d({initialize:function(h,n){this.active=!1,this.p0=new g(h,n)},getPoint:function(a,h){return h===void 0&&(h=new g),h.copy(this.p0)},getPointAt:function(a,h){return this.getPoint(a,h)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});l.exports=r},12822:(l,T,e)=>{/** 607 * @author Richard Davey <[email protected]> 608 * @copyright 2013-2023 Photon Storm Ltd. 609 * @license {@link https://opensource.org/licenses/MIT|MIT License} 610 */var d=e(56694),g=e(63120),r=e(48835),a=e(61286),h=e(58084),n=e(53639),o=e(64761),f=e(74118),u=e(11956),v=e(93736),m=e(83392),p=new d({initialize:function(y,P){y===void 0&&(y=0),P===void 0&&(P=0),this.name="",this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new v,this._tmpVec2A=new v,this._tmpVec2B=new v,typeof y=="object"?this.fromJSON(y):this.startPoint.set(y,P)},add:function(x){return this.curves.push(x),this},circleTo:function(x,y,P){return y===void 0&&(y=!1),this.ellipseTo(x,x,0,360,y,P)},closePath:function(){var x=this.curves[0].getPoint(0),y=this.curves[this.curves.length-1].getPoint(1);return x.equals(y)||this.curves.push(new h(y,x)),this},cubicBezierTo:function(x,y,P,b,E,M){var w=this.getEndPoint(),A,R,L;return x instanceof v?(A=x,R=y,L=P):(A=new v(P,b),R=new v(E,M),L=new v(x,y)),this.add(new g(w,A,R,L))},quadraticBezierTo:function(x,y,P,b){var E=this.getEndPoint(),M,w;return x instanceof v?(M=x,w=y):(M=new v(P,b),w=new v(x,y)),this.add(new o(E,M,w))},draw:function(x,y){for(var P=0;P<this.curves.length;P++){var b=this.curves[P];b.active&&b.draw(x,y)}return x},ellipseTo:function(x,y,P,b,E,M){var w=new r(0,0,x,y,P,b,E,M),A=this.getEndPoint(this._tmpVec2A),R=w.getStartPoint(this._tmpVec2B);return A.subtract(R),w.x=A.x,w.y=A.y,this.add(w)},fromJSON:function(x){this.curves=[],this.cacheLengths=[],this.startPoint.set(x.x,x.y),this.autoClose=x.autoClose;for(var y=0;y<x.curves.length;y++){var P=x.curves[y];switch(P.type){case"LineCurve":this.add(h.fromJSON(P));break;case"EllipseCurve":this.add(r.fromJSON(P));break;case"SplineCurve":this.add(u.fromJSON(P));break;case"CubicBezierCurve":this.add(g.fromJSON(P));break;case"QuadraticBezierCurve":this.add(o.fromJSON(P));break}}return this},getBounds:function(x,y){x===void 0&&(x=new f),y===void 0&&(y=16),x.x=Number.MAX_VALUE,x.y=Number.MAX_VALUE;for(var P=new f,b=m.MIN_SAFE_INTEGER,E=m.MIN_SAFE_INTEGER,M=0;M<this.curves.length;M++){var w=this.curves[M];w.active&&(w.getBounds(P,y),x.x=Math.min(x.x,P.x),x.y=Math.min(x.y,P.y),b=Math.max(b,P.right),E=Math.max(E,P.bottom))}return x.right=b,x.bottom=E,x},getCurveLengths:function(){if(this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var x=[],y=0,P=0;P<this.curves.length;P++)y+=this.curves[P].getLength(),x.push(y);return this.cacheLengths=x,x},getCurveAt:function(x){for(var y=x*this.getLength(),P=this.getCurveLengths(),b=0;b<P.length;){if(P[b]>=y)return this.curves[b];b++}return null},getEndPoint:function(x){return x===void 0&&(x=new v),this.curves.length>0?this.curves[this.curves.length-1].getPoint(1,x):x.copy(this.startPoint),x},getLength:function(){var x=this.getCurveLengths();return x[x.length-1]},getPoint:function(x,y){y===void 0&&(y=new v);for(var P=x*this.getLength(),b=this.getCurveLengths(),E=0;E<b.length;){if(b[E]>=P){var M=b[E]-P,w=this.curves[E],A=w.getLength(),R=A===0?0:1-M/A;return w.getPointAt(R,y)}E++}return null},getPoints:function(x){x===void 0&&(x=12);for(var y=[],P,b=0;b<this.curves.length;b++){var E=this.curves[b];if(E.active)for(var M=E.getResolution(x),w=E.getPoints(M),A=0;A<w.length;A++){var R=w[A];P&&P.equals(R)||(y.push(R),P=R)}}return this.autoClose&&y.length>1&&!y[y.length-1].equals(y[0])&&y.push(y[0]),y},getRandomPoint:function(x){return x===void 0&&(x=new v),this.getPoint(Math.random(),x)},getSpacedPoints:function(x){x===void 0&&(x=40);for(var y=[],P=0;P<=x;P++)y.push(this.getPoint(P/x));return this.autoClose&&y.push(y[0]),y},getStartPoint:function(x){return x===void 0&&(x=new v),x.copy(this.startPoint)},getTangent:function(x,y){y===void 0&&(y=new v);for(var P=x*this.getLength(),b=this.getCurveLengths(),E=0;E<b.length;){if(b[E]>=P){var M=b[E]-P,w=this.curves[E],A=w.getLength(),R=A===0?0:1-M/A;return w.getTangentAt(R,y)}E++}return null},lineTo:function(x,y){x instanceof v?this._tmpVec2B.copy(x):this._tmpVec2B.set(x,y);var P=this.getEndPoint(this._tmpVec2A);return this.add(new h([P.x,P.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(x){return x.unshift(this.getEndPoint()),this.add(new u(x))},moveTo:function(x,y){return x instanceof v?this.add(new n(x.x,x.y)):this.add(new n(x,y))},toJSON:function(){for(var x=[],y=0;y<this.curves.length;y++)x.push(this.curves[y].toJSON());return{type:"Path",x:this.startPoint.x,y:this.startPoint.y,autoClose:this.autoClose,curves:x}},updateArcLengths:function(){this.cacheLengths=[],this.getCurveLengths()},destroy:function(){this.curves.length=0,this.cacheLengths.length=0,this.startPoint=void 0}});a.register("path",function(x,y){return new p(x,y)}),l.exports=p},81078:(l,T,e)=>{/** 611 * @author Richard Davey <[email protected]> 612 * @copyright 2013-2023 Photon Storm Ltd. 613 * @license {@link https://opensource.org/licenses/MIT|MIT License} 614 */var d=e(56694),g=e(35026),r=new d({initialize:function(h,n){this.parent=h,this.events=n,n||(this.events=h.events?h.events:h),this.list={},this.values={},this._frozen=!1,!h.hasOwnProperty("sys")&&this.events&&this.events.once(g.DESTROY,this.destroy,this)},get:function(a){var h=this.list;if(Array.isArray(a)){for(var n=[],o=0;o<a.length;o++)n.push(h[a[o]]);return n}else return h[a]},getAll:function(){var a={};for(var h in this.list)this.list.hasOwnProperty(h)&&(a[h]=this.list[h]
614);return a},query:function(a){var h={};for(var n in this.list)this.list.hasOwnProperty(n)&&n.match(a)&&(h[n]=this.list[n]);return h},set:function(a,h){if(this._frozen)return this;if(typeof a=="string")return this.setValue(a,h);for(var n in a)this.setValue(n,a[n]);return this},inc:function(a,h){if(this._frozen)return this;h===void 0&&(h=1);var n=this.get(a);return n===void 0&&(n=0),this.set(a,n+h),this},toggle:function(a){return this._frozen?this:(this.set(a,!this.get(a)),this)},setValue:function(a,h){if(this._frozen)return this;if(this.has(a))this.values[a]=h;else{var n=this,o=this.list,f=this.events,u=this.parent;Object.defineProperty(this.values,a,{enumerable:!0,configurable:!0,get:function(){return o[a]},set:function(v){if(!n._frozen){var m=o[a];o[a]=v,f.emit(g.CHANGE_DATA,u,a,v,m),f.emit(g.CHANGE_DATA_KEY+a,u,v,m)}}}),o[a]=h,f.emit(g.SET_DATA,u,a,h)}return this},each:function(a,h){for(var n=[this.parent,null,void 0],o=1;o<arguments.length;o++)n.push(arguments[o]);for(var f in this.list)n[1]=f,n[2]=this.list[f],a.apply(h,n);return this},merge:function(a,h){h===void 0&&(h=!0);for(var n in a)a.hasOwnProperty(n)&&(h||!h&&!this.has(n))&&this.setValue(n,a[n]);return this},remove:function(a){if(this._frozen)return this;if(Array.isArray(a))for(var h=0;h<a.length;h++)this.removeValue(a[h]);else return this.removeValue(a);return this},removeValue:function(a){if(this.has(a)){var h=this.list[a];delete this.list[a],delete this.values[a],this.events.emit(g.REMOVE_DATA,this.parent,a,h)}return this},pop:function(a){var h=void 0;return!this._frozen&&this.has(a)&&(h=this.list[a],delete this.list[a],delete this.values[a],this.events.emit(g.REMOVE_DATA,this.parent,a,h)),h},has:function(a){return this.list.hasOwnProperty(a)},setFreeze:function(a){return this._frozen=a,this},reset:function(){for(var a in this.list)delete this.list[a],delete this.values[a];return this._frozen=!1,this},destroy:function(){this.reset(),this.events.off(g.CHANGE_DATA),this.events.off(g.SET_DATA),this.events.off(g.REMOVE_DATA),this.parent=null},freeze:{get:function(){return this._frozen},set:function(a){this._frozen=!!a}},count:{get:function(){var a=0;for(var h in this.list)this.list[h]!==void 0&&a++;return a}}});l.exports=r},76508:(l,T,e)=>{/** 615 * @author Richard Davey <[email protected]> 616 * @copyright 2013-2023 Photon Storm Ltd. 617 * @license {@link https://opensource.org/licenses/MIT|MIT License} 618 */var d=e(56694),g=e(81078),r=e(91963),a=e(7599),h=new d({Extends:g,initialize:function(o){g.call(this,o,o.sys.events),this.scene=o,this.systems=o.sys,o.sys.events.once(a.BOOT,this.boot,this),o.sys.events.on(a.START,this.start,this)},boot:function(){this.events=this.systems.events,this.events.once(a.DESTROY,this.destroy,this)},start:function(){this.events.once(a.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(a.SHUTDOWN,this.shutdown,this)},destroy:function(){g.prototype.destroy.call(this),this.events.off(a.START,this.start,this),this.scene=null,this.systems=null}});r.register("DataManagerPlugin",h,"data"),l.exports=h},73569:l=>{/** 619 * @author Richard Davey <[email protected]> 620 * @copyright 2013-2023 Photon Storm Ltd. 621 * @license {@link https://opensource.org/licenses/MIT|MIT License} 622 */l.exports="changedata"},15590:l=>{/** 623 * @author Richard Davey <[email protected]> 624 * @copyright 2013-2023 Photon Storm Ltd. 625 * @license {@link https://opensource.org/licenses/MIT|MIT License} 626 */l.exports="changedata-"},37669:l=>{/** 627 * @author Richard Davey <[email protected]> 628 * @copyright 2013-2023 Photon Storm Ltd. 629 * @license {@link https://opensource.org/licenses/MIT|MIT License} 630 */l.exports="destroy"},87090:l=>{/** 631 * @author Richard Davey <[email protected]> 632 * @copyright 2013-2023 Photon Storm Ltd. 633 * @license {@link https://opensource.org/licenses/MIT|MIT License} 634 */l.exports="removedata"},90142:l=>{/** 635 * @author Richard Davey <[email protected]> 636 * @copyright 2013-2023 Photon Storm Ltd. 637 * @license {@link https://opensource.org/licenses/MIT|MIT License}
638 */l.exports="setdata"},35026:(l,T,e)=>{/** 639 * @author Richard Davey <[email protected]> 640 * @copyright 2013-2023 Photon Storm Ltd. 641 * @license {@link https://opensource.org/licenses/MIT|MIT License} 642 */l.exports={CHANGE_DATA:e(73569),CHANGE_DATA_KEY:e(15590),DESTROY:e(37669),REMOVE_DATA:e(87090),SET_DATA:e(90142)}},1999:(l,T,e)=>{/** 643 * @author Richard Davey <[email protected]> 644 * @copyright 2013-2023 Photon Storm Ltd. 645 * @license {@link https://opensource.org/licenses/MIT|MIT License} 646 */l.exports={DataManager:e(81078),DataManagerPlugin:e(76508),Events:e(35026)}},10720:(l,T,e)=>{/** 647 * @author Richard Davey <[email protected]> 648 * @copyright 2013-2023 Photon Storm Ltd. 649 * @license {@link https://opensource.org/licenses/MIT|MIT License} 650 */var d=e(1350),g={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};function r(){if(typeof importScripts=="function")return g;g.audioData=!!window.Audio,g.webAudio=!!(window.AudioContext||window.webkitAudioContext);var a=document.createElement("audio"),h=!!a.canPlayType;try{if(h){var n=function(u,v){var m=a.canPlayType("audio/"+u).replace(/^no$/,"");return v?!!(m||a.canPlayType("audio/"+v).replace(/^no$/,"")):!!m};if(g.ogg=n('ogg; codecs="vorbis"'),g.opus=n('ogg; codecs="opus"',"opus"),g.mp3=n("mpeg"),g.wav=n("wav"),g.m4a=n("x-m4a"),g.aac=n("aac"),g.flac=n("flac","x-flac"),g.webm=n('webm; codecs="vorbis"'),a.canPlayType('audio/mp4; codecs="ec-3"')!==""){if(d.edge)g.dolby=!0;else if(d.safari&&d.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var o=parseInt(RegExp.$1,10),f=parseInt(RegExp.$2,10);(o===10&&f>=11||o>10)&&(g.dolby=!0)}}}}catch{}return g}l.exports=r()},1350:(l,T,e)=>{/** 651 * @author Richard Davey <[email protected]> 652 * @copyright 2013-2023 Photon Storm Ltd. 653 * @license {@link https://opensource.org/licenses/MIT|MIT License} 654 */var d=e(36580),g={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 r(){var a=navigator.userAgent;return/Edg\/\d+/.test(a)?(g.edge=!0,g.es2019=!0):/OPR/.test(a)?(g.opera=!0,g.es2019=!0):/Chrome\/(\d+)/.test(a)&&!d.windowsPhone?(g.chrome=!0,g.chromeVersion=parseInt(RegExp.$1,10),g.es2019=g.chromeVersion>69):/Firefox\D+(\d+)/.test(a)?(g.firefox=!0,g.firefoxVersion=parseInt(RegExp.$1,10),g.es2019=g.firefoxVersion>10):/AppleWebKit/.test(a)&&d.iOS?g.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(a)?(g.ie=!0,g.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+) Safari/.test(a)&&!d.windowsPhone?(g.safari=!0,g.safariVersion=parseInt(RegExp.$1,10),g.es2019=g.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(a)&&(g.ie=!0,g.trident=!0,g.tridentVersion=parseInt(RegExp.$1,10),g.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(a)&&(g.silk=!0),g}l.exports=r()},98581:(l,T,e)=>{/** 655 * @author Richard Davey <[email protected]> 656 * @copyright 2013-2023 Photon Storm Ltd. 657 * @license {@link https://opensource.org/licenses/MIT|MIT License} 658 */var d=e(61068),g={supportInverseAlpha:!1,supportNewBlendModes:!1};function r(){var n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",o="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",f=new Image;return f.onload=function(){var u=new Image;u.onload=function(){var v=d.create2D(u,6),m=v.getContext("2d",{willReadFrequently:!0});if(m.globalCompositeOperation="multiply",m.drawImage(f,0,0),m.drawImage(u,2,0),!m.getImageData(2,0,1,1))return!1;var p=m.getImageData(2,0,1,1).data;d.remove(u),g.supportNewBlendModes=p[0]===255&&p[1]===0&&p[2]===0},u.src=n+"/wCKxvRF"+o},f.src=n+"AP804Oa6"+o,!1}function a(){var n=d.create2D(this,2),o=n.getContext("2d",{willReadFrequently:!0});o.fillStyle="rgba(10, 20, 30, 0.5)",o.fillRect(0,0,1,1);var f=o.getImageData(0,0,1,1);if(f===null)return!1;o.putImageData(f,1,0);var u=o.getImageData(1,0,1,1),v=u.data[0]===f.data[0]&&u.data[1]===f.data[1]&&u.data[2]===f.data[2]&&u.data[3]===f.data[3];return d.remove(this),v}function h(){return typeof importScripts!="function"&&document!==void 0&&(g.supportNewBlendModes=r(),g.supportInverseAlpha=a()),g}l.exports=h()},90185:(l,T,e)=>{/** 659 * @author Richard Davey <[email protected]> 660 * @copyright 2013-2023 Photon Storm Ltd. 661 * @license {@link https://opensource.org/licenses/MIT|MIT License} 662 */var d=e(36580),g=e(1350),r=e(61068),a={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,stableSort:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};function h(){var o=new ArrayBuffer(4),f=new Uint8Array(o),u=new Uint32Array(o);return f[0]=161,f[1]=178,f[2]=195,f[3]=212,u[0]===3569595041?!0:u[0]===2712847316?!1:null}function n(){if(typeof importScripts=="function")return a;a.canvas=!!window.CanvasRenderingContext2D;try{a.localStorage=!!localStorage.getItem}catch{a.localStorage=!1}a.file=!!window.File&&!!window.FileReader&&!!window.FileList&&!!window.Blob,a.fileSystem=!!window.requestFileSystem;var o=!1,f=function(){if(window.WebGLRenderingContext)try{var u=r.createWebGL(this),v=u.getContext("webgl")||u.getContext("experimental-webgl"),m=r.create2D(this),p=m.getContext("2d",{willReadFrequently:!0}),x=p.createImageData(1,1);return o=x.data instanceof Uint8ClampedArray,r.remove(u),r.remove(m),!!v}catch{return!1}return!1};return a.webGL=f(),a.worker=!!window.Worker,a.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,a.getUserMedia=a.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,g.firefox&&g.firefoxVersion<21&&(a.getUserMedia=!1),!d.iOS&&(g.ie||g.firefox||g.chrome)&&(a.canvasBitBltShift=!0),(g.
662safari||g.mobileSafari)&&(a.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(a.vibration=!0),typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint32Array<"u"&&(a.littleEndian=h()),a.support32bit=typeof ArrayBuffer<"u"&&typeof Uint8ClampedArray<"u"&&typeof Int32Array<"u"&&a.littleEndian!==null&&o,a}l.exports=n()},33553:l=>{/** 663 * @author Richard Davey <[email protected]> 664 * @copyright 2013-2023 Photon Storm Ltd. 665 * @license {@link https://opensource.org/licenses/MIT|MIT License} 666 */var T={available:!1,cancel:"",keyboard:!1,request:""};function e(){if(typeof importScripts=="function")return T;var d,g="Fullscreen",r="FullScreen",a=["request"+g,"request"+r,"webkitRequest"+g,"webkitRequest"+r,"msRequest"+g,"msRequest"+r,"mozRequest"+r,"mozRequest"+g];for(d=0;d<a.length;d++)if(document.documentElement[a[d]]){T.available=!0,T.request=a[d];break}var h=["cancel"+r,"exit"+g,"webkitCancel"+r,"webkitExit"+g,"msCancel"+r,"msExit"+g,"mozCancel"+r,"mozExit"+g];if(T.available){for(d=0;d<h.length;d++)if(document[h[d]]){T.cancel=h[d];break}}return window.Element&&Element.ALLOW_KEYBOARD_INPUT&&!/ Version\/5\.1(?:\.\d+)? Safari\//.test(navigator.userAgent)&&(T.keyboard=!0),Object.defineProperty(T,"active",{get:function(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)}}),T}l.exports=e()},95872:(l,T,e)=>{/** 667 * @author Richard Davey <[email protected]> 668 * @copyright 2013-2023 Photon Storm Ltd. 669 * @license {@link https://opensource.org/licenses/MIT|MIT License} 670 */var d=e(1350),g={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};function r(){return typeof importScripts=="function"||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(g.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(g.mspointer=!0),navigator.getGamepads&&(g.gamepads=!0),"onwheel"in window||d.ie&&"WheelEvent"in window?g.wheelEvent="wheel":"onmousewheel"in window?g.wheelEvent="mou
670sewheel":d.firefox&&"MouseScrollEvent"in window&&(g.wheelEvent="DOMMouseScroll")),g}l.exports=r()},36580:l=>{/** 671 * @author Richard Davey <[email protected]> 672 * @copyright 2013-2023 Photon Storm Ltd. 673 * @license {@link https://opensource.org/licenses/MIT|MIT License} 674 */var T={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 e(){if(typeof importScripts=="function")return T;var d=navigator.userAgent;/Windows/.test(d)?T.windows=!0:/Mac OS/.test(d)&&!/like Mac OS/.test(d)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(T.iOS=!0,T.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),T.iOSVersion=parseInt(RegExp.$1,10)):T.macOS=!0:/Android/.test(d)?T.android=!0:/Linux/.test(d)?T.linux=!0:/iP[ao]d|iPhone/i.test(d)?(T.iOS=!0,navigator.appVersion.match(/OS (\d+)/),T.iOSVersion=parseInt(RegExp.$1,10),T.iPhone=d.toLowerCase().indexOf("iphone")!==-1,T.iPad=d.toLowerCase().indexOf("ipad")!==-1):/Kindle/.test(d)||/\bKF[A-Z][A-Z]+/.test(d)||/Silk.*Mobile Safari/.test(d)?T.kindle=!0:/CrOS/.test(d)&&(T.chromeOS=!0),(/Windows Phone/i.test(d)||/IEMobile/i.test(d))&&(T.android=!1,T.iOS=!1,T.macOS=!1,T.windows=!0,T.windowsPhone=!0);var g=/Silk/.test(d);return(T.windows||T.macOS||T.linux&&!g||T.chromeOS)&&(T.desktop=!0),(T.windowsPhone||/Windows NT/i.test(d)&&/Touch/i.test(d))&&(T.desktop=!1),navigator.standalone&&(T.webApp=!0),typeof importScripts!="function"&&(window.cordova!==void 0&&(T.cordova=!0),window.ejecta!==void 0&&(T.ejecta=!0)),typeof process<"u"&&process.versions&&process.versions.node&&(T.node=!0),T.node&&typeof process.versions=="object"&&(T.nodeWebkit=!!process.versions["node-webkit"],T.electron=!!process.versions.electron),/Crosswalk/.test(d)&&(T.crosswalk=!0),T.pixelRatio=window.devicePixelRatio||1,T}l.exports=e()},53861:(l,T,e)=>{/** 675 * @author Richard Davey <[email protected]> 676 * @copyright 2013-2023 Photon Storm Ltd. 677 * @license {@link https://opensource.org/licenses/MIT|MIT License} 678 */var d=e(72632),g={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1,hasRequestVideoFrame:!1};function r(){if(typeof importScripts=="function")return g;var a=document.createElement("video"),h=!!a.canPlayType,n=/^no$/;try{h&&(a.canPlayType('video/ogg; codecs="theora"').replace(n,"")&&(g.ogg=!0),a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(n,"")&&(g.h264=!0,g.mp4=!0),a.canPlayType("video/x-m4v").replace(n,"")&&(g.m4v=!0),a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(n,"")&&(g.webm=!0),a.canPlayType('video/webm; codecs="vp9"').replace(n,"")&&(g.vp9=!0),a.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(n,"")&&(g.hls=!0))}catch{}return a.parentNode&&a.parentNode.removeChild(a),g.getVideoURL=function(o){Array.isArray(o)||(o=[o]);for(var f=0;f<o.length;f++){var u=d(o[f],"url",o[f]);if(u.indexOf("blob:")===0)return{url:u,type:""};var v;if(u.indexOf("data:")===0?v=u.split(",")[0].match(/\/(.*?);/):v=u.match(/\.([a-zA-Z0-9]+)($|\?)/),v=d(o[f],"type",v?v[1]:"").toLowerCase(),g[v])return{url:u,type:v}}return null},g}l.exports=r()},77290:(l,T,e)=>{/** 679 * @author Richard Davey <[email protected]> 680 * @copyright 2013-2023 Photon Storm Ltd. 681 * @license {@link https://opensource.org/licenses/MIT|MIT License} 682 */l.exports={os:e(36580),browser:e(1350),features:e(90185),input:e(95872),audio:e(10720),video:e(53861),fullscreen:e(33553),canvasFeatures:e(98581)}},65246:(l,T,e)=>{/** 683 * @author Richard Davey <[email protected]> 684 * @copyright 2013-2023 Photon Storm Ltd. 685 * @license {@link https://opensource.org/licenses/MIT|MIT License} 686 */var d=e(56694),g=new Float32Array(20),r=new d({initialize:function(){this._matrix=new Float32Array(20),this.alpha=1,this._dirty=!0,this._data=new Float32Array(20),this.reset()},set:function(a){return this._matrix.set(a),this._dirty=!0,this},reset:function(){var a=this._matrix;return a.fill(0),a[0]=1,a[6]=1,a[12]=1,a[18]=1,this.alpha=1,this._dirty=!0,this},getData:function(){var a=this._data;return this._dirty&&(a.set(this._matrix),a[4]/=255,a[9]/=255,a[14]/=255,a[19]/=255,this._dirty=!1),a},brightness:function(a,h){a===void 0&&(a=0),h===void 0&&(h=!1);var n=a;return this.multiply([n,0,0,0,0,0,n,0,0,0,0,0,n,0,0,0,0,0,1,0],h)},saturate:function(a,h){a===void 0&&(a=0),h===void 0&&(h=!1);var n=a*2/3+1,o=(n-1)*-.5;return this.multiply([n,o,o,0,0,o,n,o,0,0,o,o,n,0,0,0,0,0,1,0],h)},desaturate:function(a){return a===void 0&&(a=!1),this.saturate(-1,a)},hue:function(a,h){a===void 0&&(a=0),h===void 0&&(h=!1),a=a/180*Math.PI;var n=Math.cos(a),o=Math.sin(a),f=.213,u=.715,v=.072;return this.multiply([f+n*(1-f)+o*-f,u+n*-u+o*-u,v+n*-v+o*(1-v),0,0,f+n*-f+o*.143,u+n*(1-u)+o*.14,v+n*-v+o*-.283,0,0,f+n*-f+o*-(1-f),u+n*-u+o*u,v+n*(1-v)+o*v,0,0,0,0,0,1,0],h)},grayscale:function(a,h){return a===void 0&&(a=1),h===void 0&&(h=!1),this.saturate(-a,h)},blackWhite:function(a){return a===void 0&&(a=!1),this.multiply(r.BLACK_WHITE,a)},contrast:function(a,h){a===void 0&&(a=0),h===void 0&&(h=!1);var n=a+1,o=-.5*(n-1);return this.multiply([n,0,0,0,o,0,n,0,0,o,0,0,n,0,o,0,0,0,1,0],h)},negative:function(a){return a===void 0&&(a=!1),this.multiply(r.NEGATIVE,a)},desaturateLuminance:function(a){return a===void 0&&(a=!1),this.multiply(r.DESATURATE_LUMINANCE,a)},sepia:function(a){return a===void 0&&(a=!1),this.multiply(r.SEPIA,a)},night:function(a,h){return a===void 0&&(a=.1),h===void 0&&(h=!1),this.multiply([a*-2,-a,0,0,0,-a,0,a,0,0,0,a,a*2,0,0,0,0,0,1,0],h)},lsd:function(a){return a===void 0&&(a=!1),this.multiply(r.LSD,a)},brown:function(a){return a===void 0&&(a=!1),this.multiply(r.BROWN,a)},vintagePinhole:function(a){return a===void 0&&(a=!1),this.multiply(r.VINTAGE,a)},kodachrome:function(a){return a===void 0&&(a=!1),this.multiply(r.KODACHROME,a)},technicolor:function(a){return a===void 0&&(a=!1),this.multiply(r.TECHNICOLOR,a)},polaroid:function(a){return a===void 0&&(a=!1),this.multiply(r.POLAROID,a)},shiftToBGR:function(a){return a===void 0&&(a=!1),this.multiply(r.SHIFT_BGR,a)},multiply:function(a,h){h===void 0&&(h=!1),h||this.reset();var n=this._matrix,o=g;return o.set(n),n.set([o[0]*a[0]+o[1]*a[5]+o[2]*a[10]+o[3]*a[15],o[0]*a[1]+o[1]*a[6]+o[2]*a[11]+o[3]*a[16],o[0]*a[2]+o[1]*a[7]+o[2]*a[12]+o[3]*a[17],o[0]*a[3]+o[1]
686*a[8]+o[2]*a[13]+o[3]*a[18],o[0]*a[4]+o[1]*a[9]+o[2]*a[14]+o[3]*a[19]+o[4],o[5]*a[0]+o[6]*a[5]+o[7]*a[10]+o[8]*a[15],o[5]*a[1]+o[6]*a[6]+o[7]*a[11]+o[8]*a[16],o[5]*a[2]+o[6]*a[7]+o[7]*a[12]+o[8]*a[17],o[5]*a[3]+o[6]*a[8]+o[7]*a[13]+o[8]*a[18],o[5]*a[4]+o[6]*a[9]+o[7]*a[14]+o[8]*a[19]+o[9],o[10]*a[0]+o[11]*a[5]+o[12]*a[10]+o[13]*a[15],o[10]*a[1]+o[11]*a[6]+o[12]*a[11]+o[13]*a[16],o[10]*a[2]+o[11]*a[7]+o[12]*a[12]+o[13]*a[17],o[10]*a[3]+o[11]*a[8]+o[12]*a[13]+o[13]*a[18],o[10]*a[4]+o[11]*a[9]+o[12]*a[14]+o[13]*a[19]+o[14],o[15]*a[0]+o[16]*a[5]+o[17]*a[10]+o[18]*a[15],o[15]*a[1]+o[16]*a[6]+o[17]*a[11]+o[18]*a[16],o[15]*a[2]+o[16]*a[7]+o[17]*a[12]+o[18]*a[17],o[15]*a[3]+o[16]*a[8]+o[17]*a[13]+o[18]*a[18],o[15]*a[4]+o[16]*a[9]+o[17]*a[14]+o[18]*a[19]+o[19]]),this._dirty=!0,this}});r.BLACK_WHITE=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],r.NEGATIVE=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],r.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],r.SEPIA=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],r.LSD=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],r.BROWN=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],r.VINTAGE=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],r.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],r.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],r.POLAROID=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],r.SHIFT_BGR=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],l.exports=r},39298:(l,T,e)=>{/** 687 * @author Richard Davey <[email protected]> 688 * @copyright 2013-2023 Photon Storm Ltd. 689 * @license {@link https://opensource.org/licenses/MIT|MIT License} 690 */var d=e(56694),g=e(72283),r=new d({initialize:function(h,n,o){this._rgb=[0,0,0],this.onChangeCallback=g,this.dirty=!1,this.set(h,n,o)},set:function(a,h,n){return a===void 0&&(a=0),h===void 0&&(h=0),n===void 0&&(n=0),this._rgb=[a,h,n],this.onChange(),this},equals:function(a,h,n){var o=this._rgb;return o[0]===a&&o[1]===h&&o[2]===n},onChange:function(){this.dirty=!0;var a=this._rgb;this.onChangeCallback.call(this,a[0],a[1],a[2])},r:{get:function(){return this._rgb[0]},set:function(a){this._rgb[0]=a,this.onChange()}},g:{get:function(){return this._rgb[1]},set:function(a){this._rgb[1]=a,this.onChange()}},b:{get:function(){return this._rgb[2]},set:function(a){this._rgb[2]=a,this.onChange()}},destroy:function(){this.onChangeCallback=null}});l.exports=r},84093:l=>{/** 691 * @author Richard Davey <[email protected]> 692 * @copyright 2013-2023 Photon Storm Ltd. 693 * @license {@link https://opensource.org/licenses/MIT|MIT License} 694 */var T={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};l.exports=T},32058:(l,T,e)=>{/** 695 * @author Richard Davey <[email protected]> 696 * @copyright 2013-2023 Photon Storm Ltd. 697 * @license {@link https://opensource.org/licenses/MIT|MIT License} 698 */var d=e(97328),g=e(59994),r=e(73174),a=e(28417),h=function(n,o,f,u){return f===void 0&&(f=0),u===void 0&&(u=0),a(n,g(o)+f),r(n,d(o)+u),n};l.exports=h},85535:(l,T,e)=>{/** 699 * @author Richard Davey <[email protected]> 700 * @copyright 2013-2023 Photon Storm Ltd. 701 * @license {@link https://opensource.org/licenses/MIT|MIT License} 702 */var d=e(97328),g=e(40163),r=e(73174),a=e(74465),h=function(n,o,f,u){return f===void 0&&(f=0),u===void 0&&(u=0),a(n,g(o)-f),r(n,d(o)+u),n};l.exports=h},9605:(l,T,e)=>{/** 703 * @author Richard Davey <[email protected]> 704 * @copyright 2013-2023 Photon Storm Ltd. 705 * @license {@link https://opensource.org/licenses/MIT|MIT License} 706 */var d=e(97328),g=e(70271),r=e(73174),a=e(19298),h=function(n,o,f,u){return f===void 0&&(f=0),u===void 0&&(u=0),a(n,g(o)+f),r(n,d(o)+u),n};l.exports=h},22529:(l,T,e)=>{/** 707 * @author Richard Davey <[email protected]> 708 * @copyright 2013-2023 Photon Storm Ltd. 709 * @license {@link https://opensource.org/licenses/MIT|MIT License} 710 */var d=e(21843),g=e(59994),r=e(29568),a=function(h,n,o,f){return o===void 0&&(o=0),f===void 0&&(f=0),d(h,g(n)+o,r(n)+f),h};l.exports=a},5739:(l,T,e)=>{/** 711 * @author Richard Davey <[email protected]> 712 * @copyright 2013-2023 Photon Storm Ltd. 713 * @license {@link https://opensource.org/licenses/MIT|MIT License} 714 */var d=e(29568),g=e(40163),r=e(81711),a=e(74465),h=function(n,o,f,u){return f===void 0&&(f=0),u===void 0&&(u=0),a(n,g(o)-f),r(n,d(o)+u),n};l.exports=h},40327:(l,T,e)=>{/** 715 * @author Richard Davey <[email protected]> 716 * @copyright 2013-2023 Photon Storm Ltd. 717 * @license {@link https://opensource.org/licenses/MIT|MIT License} 718 */var d=e(84093),g=[];g[d.BOTTOM_CENTER]=e(32058),g[d.BOTTOM_LEFT]=e(85535),g[d.BOTTOM_RIGHT]=e(9605),g[d.CENTER]=e(22529),g[d.LEFT_CENTER]=e(5739),g[d.RIGHT_CENTER]=e(27683),g[d.TOP_CENTER]=e(96439),g[d.TOP_LEFT]=e(81447),g[d.TOP_RIGHT]=e(47888),g[d.LEFT_BOTTOM]=g[d.BOTTOM_LEFT],g[d.LEFT_TOP]=g[d.TOP_LEFT],g[d.RIGHT_BOTTOM]=g[d.BOTTOM_RIGHT],g[d.RIGHT_TOP]=g[d.TOP_RIGHT];var r=function(a,h,n,o,f){return g[n](a,h,o,f)};l.exports=r},27683:(l,T,e)=>{/** 719 * @author Richard Davey <[email protected]> 720 * @copyright 2013-2023 Photon Storm Ltd. 721 * @license {@link https://opensource.org/licenses/MIT|MIT License} 722 */var d=e(29568),g=e(70271),r=e(81711),a=e(19298),h=function(n,o,f,u){return f===void 0&&(f=0),u===void 0&&(u=0),a(n,g(o)+f),r(n,d(o)+u),n};l.exports=h},96439:(l,T,e)=>{/** 723 * @author Richard Davey <[email protected]> 724 * @copyright 2013-2023 Photon Storm Ltd. 725 * @license {@link https://opensource.org/licenses/MIT|MIT License}
726 */var d=e(59994),g=e(47196),r=e(28417),a=e(84349),h=function(n,o,f,u){return f===void 0&&(f=0),u===void 0&&(u=0),r(n,d(o)+f),a(n,g(o)-u),n};l.exports=h},81447:(l,T,e)=>{/** 727 * @author Richard Davey <[email protected]> 728 * @copyright 2013-2023 Photon Storm Ltd. 729 * @license {@link https://opensource.org/licenses/MIT|MIT License} 730 */var d=e(40163),g=e(47196),r=e(74465),a=e(84349),h=function(n,o,f,u){return f===void 0&&(f=0),u===void 0&&(u=0),r(n,d(o)-f),a(n,g(o)-u),n};l.exports=h},47888:(l,T,e)=>{/** 731 * @author Richard Davey <[email protected]> 732 * @copyright 2013-2023 Photon Storm Ltd. 733 * @license {@link https://opensource.org/licenses/MIT|MIT License} 734 */var d=e(70271),g=e(47196),r=e(19298),a=e(84349),h=function(n,o,f,u){return f===void 0&&(f=0),u===void 0&&(u=0),r(n,d(o)+f),a(n,g(o)-u),n};l.exports=h},46997:(l,T,e)=>{/** 735 * @author Richard Davey <[email protected]> 736 * @copyright 2013-2023 Photon Storm Ltd. 737 * @license {@link https://opensource.org/licenses/MIT|MIT License} 738 */l.exports={BottomCenter:e(32058),BottomLeft:e(85535),BottomRight:e(9605),Center:e(22529),LeftCenter:e(5739),QuickSet:e(40327),RightCenter:e(27683),TopCenter:e(96439),TopLeft:e(81447),TopRight:e(47888)}},93545:(l,T,e)=>{/** 739 * @author Richard Davey <[email protected]> 740 * @copyright 2013-2023 Photon Storm Ltd. 741 * @license {@link https://opensource.org/licenses/MIT|MIT License} 742 */var d=e(84093),g=e(98611),r={In:e(46997),To:e(86639)};r=g(!1,r,d),l.exports=r},27118:(l,T,e)=>{/** 743 * @author Richard Davey <[email protected]> 744 * @copyright 2013-2023 Photon Storm Ltd. 745 * @license {@link https://opensource.org/licenses/MIT|MIT License} 746 */var d=e(97328),g=e(59994),r=e(28417),a=e(84349),h=function(n,o,f,u){return f===void 0&&(f=0),u===void 0&&(u=0),r(n,g(o)+f),a(n,d(o)+u),n};l.exports=h},84469:(l,T,e)=>{/** 747 * @author Richard Davey <[email protected]> 748 * @copyright 2013-2023 Photon Storm Ltd. 749 * @license {@link https://opensource.org/licenses/MIT|MIT License} 750 */var d=e(97328),g=e(40163),r=e(74465),a=e(84349),h=function(n,o,f,u){return f===void 0&&(f=0),u===void 0&&(u=0),r(n,g(o)-f),a(n,d(o)+u),n};l.exports=h},51577:(l,T,e)=>{/** 751 * @author Richard Davey <[email protected]> 752 * @copyright 2013-2023 Photon Storm Ltd. 753 * @license {@link https://opensource.org/licenses/MIT|MIT License} 754 */var d=e(97328),g=e(70271),r=e(19298),a=e(84349),h=function(n,o,f,u){return f===void 0&&(f=0),u===void 0&&(u=0),r(n,g(o)+f),a(n,d(o)+u),n};l.exports=h},90271:(l,T,e)=>{/** 755 * @author Richard Davey <[email protected]> 756 * @copyright 2013-2023 Photon Storm Ltd. 757 * @license {@link https://opensource.org/licenses/MIT|MIT License} 758 */var d=e(97328),g=e(40163),r=e(73174),a=e(19298),h=function(n,o,f,u){return f===void 0&&(f=0),u===void 0&&(u=0),a(n,g(o)-f),r(n,d(o)+u),n};l.exports=h},30466:(l,T,e)=>{/** 759 * @author Richard Davey <[email protected]> 760 * @copyright 2013-2023 Photon Storm Ltd. 761 * @license {@link https://opensource.org/licenses/MIT|MIT License} 762 */var d=e(29568),g=e(40163),r=e(81711),a=e(19298),h=function(n,o,f,u){return f===void 0&&(f=0),u===void 0&&(u=0),a(n,g(o)-f),r(n,d(o)+u),n};l.exports=h},50087:(l,T,e)=>{/** 763 * @author Richard Davey <[email protected]> 764 * @copyright 2013-2023 Photon Storm Ltd. 765 * @license {@link https://opensource.org/licenses/MIT|MIT License} 766 */var d=e(40163),g=e(47196),r=e(19298),a=e(84349),h=function(n,o,f,u){return f===void 0&&(f=0),u===void 0&&(u=0),r(n,d(o)-f),a(n,g(o)-u),n};l.exports=h},82590:(l,T,e)=>{/** 767 * @author samme 768 * @copyright 2013-2023 Photon Storm Ltd. 769 * @license {@link https://opensource.org/licenses/MIT|MIT License} 770 */var d=e(84093),g=[];g[d.BOTTOM_CENTER]=e(27118),g[d.BOTTOM_LEFT]=e(84469),g[d.BOTTOM_RIGHT]=e(51577),g[d.LEFT_BOTTOM]=e(90271),g[d.LEFT_CENTER]=e(30466),g[d.LEFT_TOP]=e(50087),g[d.RIGHT_BOTTOM]=e(13555),g[d.RIGHT_CENTER]=e(99049),g[d.RIGHT_TOP]=e(67788),g[d.TOP_CENTER]=e(78170),g[d.TOP_LEFT]=e(54145),g[d.TOP_RIGHT]=e(75548);var r=function(a,h,n,o,f){return g[n](a,h,o,f)};l.exports=r},13555:(l,T,e)=>{/** 771 * @author Richard Davey <[email protected]> 772 * @copyright 2013-2023 Photon Storm Ltd. 773 * @license {@link https://opensource.org/licenses/MIT|MIT License} 774 */var d=e(97328),g=e(70271),r=e(73174),a=e(74465),h=function(n,o,f,u){return f===void 0&&(f=0),u===void 0&&(u=0),a(n,g(o)+f),r(n,d(o)+u),n};l.exports=h},99049:(l,T,e)=>{/** 775 * @author Richard Davey <[email protected]> 776 * @copyright 2013-2023 Photon Storm Ltd. 777 * @license {@link https://opensource.org/licenses/MIT|MIT License} 778 */var d=e(29568),g=e(70271),r=e(81711),a=e(74465),h=function(n,o,f,u){return f===void 0&&(f=0),u===void 0&&(u=0),a(n,g(o)+f),r(n,d(o)+u),n};l.exports=h},67788:(l,T,e)=>{/** 779 * @author Richard Davey <[email protected]> 780 * @copyright 2013-2023 Photon Storm Ltd. 781 * @license {@link https://opensource.org/licenses/MIT|MIT License}
782 */var d=e(70271),g=e(47196),r=e(74465),a=e(84349),h=function(n,o,f,u){return f===void 0&&(f=0),u===void 0&&(u=0),r(n,d(o)+f),a(n,g(o)-u),n};l.exports=h},78170:(l,T,e)=>{/** 783 * @author Richard Davey <[email protected]> 784 * @copyright 2013-2023 Photon Storm Ltd. 785 * @license {@link https://opensource.org/licenses/MIT|MIT License} 786 */var d=e(59994),g=e(47196),r=e(73174),a=e(28417),h=function(n,o,f,u){return f===void 0&&(f=0),u===void 0&&(u=0),a(n,d(o)+f),r(n,g(o)-u),n};l.exports=h},54145:(l,T,e)=>{/** 787 * @author Richard Davey <[email protected]> 788 * @copyright 2013-2023 Photon Storm Ltd. 789 * @license {@link https://opensource.org/licenses/MIT|MIT License} 790 */var d=e(40163),g=e(47196),r=e(73174),a=e(74465),h=function(n,o,f,u){return f===void 0&&(f=0),u===void 0&&(u=0),a(n,d(o)-f),r(n,g(o)-u),n};l.exports=h},75548:(l,T,e)=>{/** 791 * @author Richard Davey <[email protected]> 792 * @copyright 2013-2023 Photon Storm Ltd. 793 * @license {@link https://opensource.org/licenses/MIT|MIT License} 794 */var d=e(70271),g=e(47196),r=e(73174),a=e(19298),h=function(n,o,f,u){return f===void 0&&(f=0),u===void 0&&(u=0),a(n,d(o)+f),r(n,g(o)-u),n};l.exports=h},86639:(l,T,e)=>{/** 795 * @author Richard Davey <[email protected]> 796 * @copyright 2013-2023 Photon Storm Ltd. 797 * @license {@link https://opensource.org/licenses/MIT|MIT License} 798 */l.exports={BottomCenter:e(27118),BottomLeft:e(84469),BottomRight:e(51577),LeftBottom:e(90271),LeftCenter:e(30466),LeftTop:e(50087),QuickSet:e(82590),RightBottom:e(13555),RightCenter:e(99049),RightTop:e(67788),TopCenter:e(78170),TopLeft:e(54145),TopRight:e(75548)}},21843:(l,T,e)=>{/** 799 * @author Richard Davey <[email protected]> 800 * @copyright 2013-2023 Photon Storm Ltd. 801 * @license {@link https://opensource.org/licenses/MIT|MIT License} 802 */var d=e(28417),g=e(81711),r=function(a,h,n){return d(a,h),g(a,n)};l.exports=r},97328:l=>{/** 803 * @author Richard Davey <[email protected]> 804 * @copyright 2013-2023 Photon Storm Ltd. 805 * @license {@link https://opensource.org/licenses/MIT|MIT License} 806 */var T=function(e){return e.y+e.height-e.height*e.originY};l.exports=T},7126:(l,T,e)=>{/** 807 * @author samme 808 * @copyright 2013-2023 Photon Storm Ltd. 809 * @license {@link https://opensource.org/licenses/MIT|MIT License} 810 */var d=e(97328),g=e(40163),r=e(70271),a=e(47196),h=e(74118),n=function(o,f){f===void 0&&(f=new h);var u=g(o),v=a(o);return f.x=u,f.y=v,f.width=r(o)-u,f.height=d(o)-v,f};l.exports=n},59994:l=>{/** 811 * @author Richard Davey <[email protected]> 812 * @copyright 2013-2023 Photon Storm Ltd. 813 * @license {@link https://opensource.org/licenses/MIT|MIT License} 814 */var T=function(e){return e.x-e.width*e.originX+e.width*.5};l.exports=T},29568:l=>{/** 815 * @author Richard Davey <[email protected]> 816 * @copyright 2013-2023 Photon Storm Ltd. 817 * @license {@link https://opensource.org/licenses/MIT|MIT License} 818 */var T=function(e){return e.y-e.height*e.originY+e.height*.5};l.exports=T},40163:l=>{/** 819 * @author Richard Davey <[email protected]> 820 * @copyright 2013-2023 Photon Storm Ltd. 821 * @license {@link https://opensource.org/licenses/MIT|MIT License} 822 */var T=function(e){return e.x-e.width*e.originX};l.exports=T},52088:l=>{/** 823 * @author Richard Davey <[email protected]> 824 * @copyright 2013-2023 Photon Storm Ltd. 825 * @license {@link https://opensource.org/licenses/MIT|MIT License} 826 */var T=function(e){return e.width*e.originX};l.exports=T},23379:l=>{/** 827 * @author Richard Davey <[email protected]> 828 * @copyright 2013-2023 Photon Storm Ltd. 829 * @license {@link https://opensource.org/licenses/MIT|MIT License} 830 */var T=function(e){return e.height*e.originY};l.exports=T},70271:l=>{/** 831 * @author Richard Davey <[email protected]> 832 * @copyright 2013-2023 Photon Storm Ltd. 833 * @license {@link https://opensource.org/licenses/MIT|MIT License} 834 */var T=function(e){return e.x+e.width-e.width*e.originX};l.exports=T},47196:l=>{/** 835 * @author Richard Davey <[email protected]> 836 * @copyright 2013-2023 Photon Storm Ltd. 837 * @license {@link https://opensource.org/licenses/MIT|MIT License}
838 */var T=function(e){return e.y-e.height*e.originY};l.exports=T},73174:l=>{/** 839 * @author Richard Davey <[email protected]> 840 * @copyright 2013-2023 Photon Storm Ltd. 841 * @license {@link https://opensource.org/licenses/MIT|MIT License} 842 */var T=function(e,d){return e.y=d-e.height+e.height*e.originY,e};l.exports=T},28417:l=>{/** 843 * @author Richard Davey <[email protected]> 844 * @copyright 2013-2023 Photon Storm Ltd. 845 * @license {@link https://opensource.org/licenses/MIT|MIT License} 846 */var T=function(e,d){var g=e.width*e.originX;return e.x=d+g-e.width*.5,e};l.exports=T},81711:l=>{/** 847 * @author Richard Davey <[email protected]> 848 * @copyright 2013-2023 Photon Storm Ltd. 849 * @license {@link https://opensource.org/licenses/MIT|MIT License} 850 */var T=function(e,d){var g=e.height*e.originY;return e.y=d+g-e.height*.5,e};l.exports=T},74465:l=>{/** 851 * @author Richard Davey <[email protected]> 852 * @copyright 2013-2023 Photon Storm Ltd. 853 * @license {@link https://opensource.org/licenses/MIT|MIT License} 854 */var T=function(e,d){return e.x=d+e.width*e.originX,e};l.exports=T},19298:l=>{/** 855 * @author Richard Davey <[email protected]> 856 * @copyright 2013-2023 Photon Storm Ltd. 857 * @license {@link https://opensource.org/licenses/MIT|MIT License} 858 */var T=function(e,d){return e.x=d-e.width+e.width*e.originX,e};l.exports=T},84349:l=>{/** 859 * @author Richard Davey <[email protected]> 860 * @copyright 2013-2023 Photon Storm Ltd. 861 * @license {@link https://opensource.org/licenses/MIT|MIT License} 862 */var T=function(e,d){return e.y=d+e.height*e.originY,e};l.exports=T},15252:(l,T,e)=>{/** 863 * @author Richard Davey <[email protected]> 864 * @copyright 2013-2023 Photon Storm Ltd. 865 * @license {@link https://opensource.org/licenses/MIT|MIT License} 866 */l.exports={CenterOn:e(21843),GetBottom:e(97328),GetBounds:e(7126),GetCenterX:e(59994),GetCenterY:e(29568),GetLeft:e(40163),GetOffsetX:e(52088),GetOffsetY:e(23379),GetRight:e(70271),GetTop:e(47196),SetBottom:e(73174),SetCenterX:e(28417),SetCenterY:e(81711),SetLeft:e(74465),SetRight:e(19298),SetTop:e(84349)}},70616:l=>{/** 867 * @author Richard Davey <[email protected]> 868 * @copyright 2013-2023 Photon Storm Ltd. 869 * @license {@link https://opensource.org/licenses/MIT|MIT License} 870 */var T={setCrisp:function(e){var d=["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"];return d.forEach(function(g){e.style["image-rendering"]=g}),e.style.msInterpolationMode="nearest-neighbor",e},setBicubic:function(e){return e.style["image-rendering"]="auto",e.style.msInterpolationMode="bicubic",e}};l.exports=T},61068:(l,T,e)=>{/** 871 * @author Richard Davey <[email protected]> 872 * @copyright 2013-2023 Photon Storm Ltd. 873 * @license {@link https://opensource.org/licenses/MIT|MIT License} 874 */var d=e(86459),g=e(8213),r=[],a=!1,h=function(){var n=function(P,b,E,M,w){b===void 0&&(b=1),E===void 0&&(E=1),M===void 0&&(M=d.CANVAS),w===void 0&&(w=!1);var A,R=u(M);return R===null?(R={parent:P,canvas:document.createElement("canvas"),type:M},M===d.CANVAS&&r.push(R),A=R.canvas):(R.parent=P,A=R.canvas),w&&(R.parent=A),A.width=b,A.height=E,a&&M===d.CANVAS&&g.disable(A.getContext("2d",{willReadFrequently:!1})),A},o=function(P,b,E){return n(P,b,E,d.CANVAS)},f=function(P,b,E){return n(P,b,E,d.WEBGL)},u=function(P){if(P===void 0&&(P=d.CANVAS),P===d.WEBGL)return null;for(var b=0;b<r.length;b++){var E=r[b];if(!E.parent&&E.type===P)return E}return null},v=function(P){var b=P instanceof HTMLCanvasElement;r.forEach(function(E){(b&&E.canvas===P||!b&&E.parent===P)&&(E.parent=null,E.canvas.width=1,E.canvas.height=1)})},m=function(){var P=0;return r.forEach(function(b){b.parent&&P++}),P},p=function(){return r.length-m()},x=function(){a=!0},y=function(){a=!1};return{create2D:o,create:n,createWebGL:f,disableSmoothing:x,enableSmoothing:y,first:u,free:p,pool:r,remove:v,total:m}};l.exports=h()},8213:l=>{/** 875 * @author Richard Davey <[email protected]> 876 * @copyright 2013-2023 Photon Storm Ltd. 877 * @license {@link https://opensource.org/licenses/MIT|MIT License} 878 */var T="",e=function(){var d=function(h){for(var n=["i","webkitI","msI","mozI","oI"],o=0;o<n.length;o++){var f=n[o]+"mageSmoothingEnabled";if(f in h)return f}return null},g=function(h){return T===""&&(T=d(h)),T&&(h[T]=!0),h},r=function(h){return T===""&&(T=d(h)),T&&(h[T]=!1),h},a=function(h){return T!==null?h[T]:null};return{disable:r,enable:g,getPrefix:d,isEnabled:a}};l.exports=e()},59271:l=>{/** 879 * @author Richard Davey <[email protected]> 880 * @copyright 2013-2023 Photon Storm Ltd. 881 * @license {@link https://opensource.org/licenses/MIT|MIT License} 882 */var T=function(e,d){return d===void 0&&(d="none"),e.style.msTouchAction=d,e.style["ms-touch-action"]=d,e.style["touch-action"]=d,e};l.exports=T},36505:l=>{/** 883 * @author Richard Davey <[email protected]> 884 * @copyright 2013-2023 Photon Storm Ltd. 885 * @license {@link https://opensource.org/licenses/MIT|MIT License} 886 */var T=function(e,d){d===void 0&&(d="none");var g=["-webkit-","-khtml-","-moz-","-ms-",""];return g.forEach(function(r){e.style[r+"user-select"]=d}),e.style["-webkit-touch-callout"]=d,e.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",e};l.exports=T},23514:(l,T,e)=>{/** 887 * @author Richard Davey <[email protected]> 888 * @copyright 2013-2023 Photon Storm Ltd. 889 * @license {@link https://opensource.org/licenses/MIT|MIT License}
890 */l.exports={CanvasInterpolation:e(70616),CanvasPool:e(61068),Smoothing:e(8213),TouchAction:e(59271),UserSelect:e(36505)}},27119:(l,T,e)=>{/** 891 * @author Richard Davey <[email protected]> 892 * @copyright 2013-2023 Photon Storm Ltd. 893 * @license {@link https://opensource.org/licenses/MIT|MIT License} 894 */var d=e(56694),g=e(22946),r=e(5657),a=e(24650),h=e(68033),n=new d({initialize:function(f,u,v,m){f===void 0&&(f=0),u===void 0&&(u=0),v===void 0&&(v=0),m===void 0&&(m=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(f,u,v,m)},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(o,f,u,v,m){return v===void 0&&(v=255),m===void 0&&(m=!0),this._locked=!0,this.red=o,this.green=f,this.blue=u,this.alpha=v,this._locked=!1,this.update(m)},setGLTo:function(o,f,u,v){return v===void 0&&(v=1),this._locked=!0,this.redGL=o,this.greenGL=f,this.blueGL=u,this.alphaGL=v,this._locked=!1,this.update(!0)},setFromRGB:function(o){return this._locked=!0,this.red=o.r,this.green=o.g,this.blue=o.b,o.hasOwnProperty("a")&&(this.alpha=o.a),this._locked=!1,this.update(!0)},setFromHSV:function(o,f,u){return a(o,f,u,this)},update:function(o){if(o===void 0&&(o=!1),this._locked)return this;var f=this.r,u=this.g,v=this.b,m=this.a;return this._color=g(f,u,v),this._color32=r(f,u,v,m),this._rgba="rgba("+f+","+u+","+v+","+m/255+")",o&&h(f,u,v,this),this},updateHSV:function(){var o=this.r,f=this.g,u=this.b;return h(o,f,u,this),this},clone:function(){return new n(this.r,this.g,this.b,this.a)},gray:function(o){return this.setTo(o,o,o)},random:function(o,f){o===void 0&&(o=0),f===void 0&&(f=255);var u=Math.floor(o+Math.random()*(f-o)),v=Math.floor(o+Math.random()*(f-o)),m=Math.floor(o+Math.random()*(f-o));return this.setTo(u,v,m)},randomGray:function(o,f){o===void 0&&(o=0),f===void 0&&(f=255);var u=Math.floor(o+Math.random()*(f-o));return this.setTo(u,u,u)},saturate:function(o){return this.s+=o/100,this},desaturate:function(o){return this.s-=o/100,this},lighten:function(o){return this.v+=o/100,this},darken:function(o){return this.v-=o/100,this},brighten:function(o){var f=this.r,u=this.g,v=this.b;return f=Math.max(0,Math.min(255,f-Math.round(255*-(o/100)))),u=Math.max(0,Math.min(255,u-Math.round(255*-(o/100)))),v=Math.max(0,Math.min(255,v-Math.round(255*-(o/100)))),this.setTo(f,u,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(o){this.gl[0]=Math.min(Math.abs(o),1),this.r=Math.floor(this.gl[0]*255),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(o){this.gl[1]=Math.min(Math.abs(o),1),this.g=Math.floor(this.gl[1]*255),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(o){this.gl[2]=Math.min(Math.abs(o),1),this.b=Math.floor(this.gl[2]*255),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(o){this.gl[3]=Math.min(Math.abs(o),1),this.a=Math.floor(this.gl[3]*255),this.update()}},red:{get:function(){return this.r},set:function(o){o=Math.floor(Math.abs(o)),this.r=Math.min(o,255),this.gl[0]=o/255,this.update(!0)}},green:{get:function(){return this.g},set:function(o){o=Math.floor(Math.abs(o)),this.g=Math.min(o,255),this.gl[1]=o/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(o){o=Math.floor(Math.abs(o)),this.b=Math.min(o,255),this.gl[2]=o/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(o){o=Math.floor(Math.abs(o)),this.a=Math.min(o,255),this.gl[3]=o/255,this.update()}},h:{get:function(){return this._h},set:function(o){this._h=o,a(o,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(o){this._s=o,a(this._h,o,this._v,this)}},v:{get:function(){return this._v},set:function(o){this._v=o,a(this._h,this._s,o,this)}}});l.exports=n},30245:(l,T,e)=>{/** 895 * @author Richard Davey <[email protected]> 896 * @copyright 2013-2023 Photon Storm Ltd. 897 * @license {@link https://opensource.org/licenses/MIT|MIT License} 898 */var d=e(22946),g=function(r){r===void 0&&(r=1024);var a=[],h=255,n,o=255,f=0,u=0;for(n=0;n<=h;n++)a.push({r:o,g:n,b:u,color:d(o,n,u)});for(f=255,n=h;n>=0;n--)a.push({r:n,g:f,b:u,color:d(n,f,u)});for(o=0,n=0;n<=h;n++,f--)a.push({r:o,g:f,b:n,color:d(o,f,n)});for(f=0,u=255,n=0;n<=h;n++,u--,o++)a.push({r:o,g:f,b:u,color:d(o,f,u)});if(r===1024)return a;var v=[],m=0,p=1024/r;for(n=0;n<r;
898n++)v.push(a[Math.floor(m)]),m+=p;return v};l.exports=g},86672:l=>{/** 899 * @author Richard Davey <[email protected]> 900 * @copyright 2013-2023 Photon Storm Ltd. 901 * @license {@link https://opensource.org/licenses/MIT|MIT License} 902 */var T=function(e){var d={r:e>>16&255,g:e>>8&255,b:e&255,a:255};return e>16777215&&(d.a=e>>>24),d};l.exports=T},25409:l=>{/** 903 * @author Richard Davey <[email protected]> 904 * @copyright 2013-2023 Photon Storm Ltd. 905 * @license {@link https://opensource.org/licenses/MIT|MIT License} 906 */var T=function(e){var d=e.toString(16);return d.length===1?"0"+d:d};l.exports=T},22946:l=>{/** 907 * @author Richard Davey <[email protected]> 908 * @copyright 2013-2023 Photon Storm Ltd. 909 * @license {@link https://opensource.org/licenses/MIT|MIT License} 910 */var T=function(e,d,g){return e<<16|d<<8|g};l.exports=T},5657:l=>{/** 911 * @author Richard Davey <[email protected]> 912 * @copyright 2013-2023 Photon Storm Ltd. 913 * @license {@link https://opensource.org/licenses/MIT|MIT License} 914 */var T=function(e,d,g,r){return r<<24|e<<16|d<<8|g};l.exports=T},74777:(l,T,e)=>{/** 915 * @author Richard Davey <[email protected]> 916 * @copyright 2013-2023 Photon Storm Ltd. 917 * @license {@link https://opensource.org/licenses/MIT|MIT License} 918 */var d=e(27119),g=e(59998),r=function(a,h,n){var o=n,f=n,u=n;if(h!==0){var v=n<.5?n*(1+h):n+h-n*h,m=2*n-v;o=g(m,v,a+1/3),f=g(m,v,a),u=g(m,v,a-1/3)}var p=new d;return p.setGLTo(o,f,u,1)};l.exports=r},89263:(l,T,e)=>{/** 919 * @author Richard Davey <[email protected]> 920 * @copyright 2013-2023 Photon Storm Ltd. 921 * @license {@link https://opensource.org/licenses/MIT|MIT License} 922 */var d=e(24650),g=function(r,a){r===void 0&&(r=1),a===void 0&&(a=1);for(var h=[],n=0;n<=359;n++)h.push(d(n/359,r,a));return h};l.exports=g},24650:(l,T,e)=>{/** 923 * @author Richard Davey <[email protected]> 924 * @copyright 2013-2023 Photon Storm Ltd. 925 * @license {@link https://opensource.org/licenses/MIT|MIT License} 926 */var d=e(22946);function g(a,h,n,o){var f=(a+h*6)%6,u=Math.min(f,4-f,1);return Math.round(255*(o-o*n*Math.max(0,u)))}var r=function(a,h,n,o){h===void 0&&(h=1),n===void 0&&(n=1);var f=g(5,a,h,n),u=g(3,a,h,n),v=g(1,a,h,n);return o?o.setTo?o.setTo(f,u,v,o.alpha,!0):(o.r=f,o.g=u,o.b=v,o.color=d(f,u,v),o):{r:f,g:u,b:v,color:d(f,u,v)}};l.exports=r},91487:(l,T,e)=>{/** 927 * @author Richard Davey <[email protected]> 928 * @copyright 2013-2023 Photon Storm Ltd. 929 * @license {@link https://opensource.org/licenses/MIT|MIT License} 930 */var d=e(27119),g=function(r){var a=new d;r=r.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(u,v,m,p){return v+v+m+m+p+p});var h=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(r);if(h){var n=parseInt(h[1],16),o=parseInt(h[2],16),f=parseInt(h[3],16);a.setTo(n,o,f)}return a};l.exports=g},59998:l=>{/** 931 * @author Richard Davey <[email protected]> 932 * @copyright 2013-2023 Photon Storm Ltd. 933 * @license {@link https://opensource.org/licenses/MIT|MIT License} 934 */var T=function(e,d,g){return g<0&&(g+=1),g>1&&(g-=1),g<.16666666666666666?e+(d-e)*6*g:g<.5?d:g<.6666666666666666?e+(d-e)*(.6666666666666666-g)*6:e};l.exports=T},74853:(l,T,e)=>{/** 935 * @author Richard Davey <[email protected]> 936 * @copyright 2013-2023 Photon Storm Ltd. 937 * @license {@link https://opensource.org/licenses/MIT|MIT License} 938 */var d=e(27119),g=e(15978),r=function(a){var h=g(a);return new d(h.r,h.g,h.b,h.a)};l.exports=r},15978:l=>{/** 939 * @author Richard Davey <[email protected]> 940 * @copyright 2013-2023 Photon Storm Ltd. 941 * @license {@link https://opensource.org/licenses/MIT|MIT License} 942 */var T=function(e){return e>16777215?{a:e>>>24,r:e>>16&255,g:e>>8&255,b:e&255}:{a:255,r:e>>16&255,g:e>>8&255,b:e&255}};l.exports=T},53756:(l,T,e)=>{/** 943 * @author Richard Davey <[email protected]> 944 * @copyright 2013-2023 Photon Storm Ltd. 945 * @license {@link https://opensource.org/licenses/MIT|MIT License} 946 */var d=e(42798),g=function(h,n,o,f,u,v,m,p){m===void 0&&(m=100),p===void 0&&(p=0);var x=p/m;
946return{r:d(h,f,x),g:d(n,u,x),b:d(o,v,x)}},r=function(h,n,o,f){return o===void 0&&(o=100),f===void 0&&(f=0),g(h.r,h.g,h.b,n.r,n.g,n.b,o,f)},a=function(h,n,o,f,u,v){return u===void 0&&(u=100),v===void 0&&(v=0),g(h.r,h.g,h.b,n,o,f,u,v)};l.exports={RGBWithRGB:g,ColorWithRGB:a,ColorWithColor:r}},73904:(l,T,e)=>{/** 947 * @author Richard Davey <[email protected]> 948 * @copyright 2013-2023 Photon Storm Ltd. 949 * @license {@link https://opensource.org/licenses/MIT|MIT License} 950 */var d=e(27119),g=function(r){return new d(r.r,r.g,r.b,r.a)};l.exports=g},26841:(l,T,e)=>{/** 951 * @author Richard Davey <[email protected]> 952 * @copyright 2013-2023 Photon Storm Ltd. 953 * @license {@link https://opensource.org/licenses/MIT|MIT License} 954 */var d=e(27119),g=function(r){var a=new d,h=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(r.toLowerCase());if(h){var n=parseInt(h[1],10),o=parseInt(h[2],10),f=parseInt(h[3],10),u=h[4]!==void 0?parseFloat(h[4]):1;a.setTo(n,o,f,u*255)}return a};l.exports=g},68033:l=>{/** 955 * @author Richard Davey <[email protected]> 956 * @copyright 2013-2023 Photon Storm Ltd. 957 * @license {@link https://opensource.org/licenses/MIT|MIT License} 958 */var T=function(e,d,g,r){r===void 0&&(r={h:0,s:0,v:0}),e/=255,d/=255,g/=255;var a=Math.min(e,d,g),h=Math.max(e,d,g),n=h-a,o=0,f=h===0?0:n/h,u=h;return h!==a&&(h===e?o=(d-g)/n+(d<g?6:0):h===d?o=(g-e)/n+2:h===g&&(o=(e-d)/n+4),o/=6),r.hasOwnProperty("_h")?(r._h=o,r._s=f,r._v=u):(r.h=o,r.s=f,r.v=u),r};l.exports=T},4880:(l,T,e)=>{/** 959 * @author Richard Davey <[email protected]> 960 * @copyright 2013-2023 Photon Storm Ltd. 961 * @license {@link https://opensource.org/licenses/MIT|MIT License} 962 */var d=e(25409),g=function(r,a,h,n,o){return n===void 0&&(n=255),o===void 0&&(o="#"),o==="#"?"#"+((1<<24)+(r<<16)+(a<<8)+h).toString(16).slice(1,7):"0x"+d(n)+d(r)+d(a)+d(h)};l.exports=g},37243:(l,T,e)=>{/** 963 * @author Richard Davey <[email protected]> 964 * @copyright 2013-2023 Photon Storm Ltd. 965 * @license {@link https://opensource.org/licenses/MIT|MIT License} 966 */var d=e(17489),g=e(27119),r=function(a,h){return a===void 0&&(a=0),h===void 0&&(h=255),new g(d(a,h),d(a,h),d(a,h))};l.exports=r},93222:(l,T,e)=>{/** 967 * @author Richard Davey <[email protected]> 968 * @copyright 2013-2023 Photon Storm Ltd. 969 * @license {@link https://opensource.org/licenses/MIT|MIT License} 970 */var d=e(91487),g=e(74853),r=e(73904),a=e(26841),h=function(n){var o=typeof n;switch(o){case"string":return n.substr(0,3).toLowerCase()==="rgb"?a(n):d(n);case"number":return g(n);case"object":return r(n)}};l.exports=h},95509:(l,T,e)=>{/** 971 * @author Richard Davey <[email protected]> 972 * @copyright 2013-2023 Photon Storm Ltd. 973 * @license {@link https://opensource.org/licenses/MIT|MIT License} 974 */var d=e(27119);d.ColorSpectrum=e(30245),d.ColorToRGBA=e(86672),d.ComponentToHex=e(25409),d.GetColor=e(22946),d.GetColor32=e(5657),d.HexStringToColor=e(91487),d.HSLToColor=e(74777),d.HSVColorWheel=e(89263),d.HSVToRGB=e(24650),d.HueToComponent=e(59998),d.IntegerToColor=e(74853),d.IntegerToRGB=e(15978),d.Interpolate=e(53756),d.ObjectToColor=e(73904),d.RandomRGB=e(37243),d.RGBStringToColor=e(26841),d.RGBToHSV=e(68033),d.RGBToString=e(4880),d.ValueToColor=e(93222),l.exports=d},24816:(l,T,e)=>{/** 975 * @author Richard Davey <[email protected]> 976 * @copyright 2013-2023 Photon Storm Ltd. 977 * @license {@link https://opensource.org/licenses/MIT|MIT License} 978 */l.exports={Align:e(93545),BaseShader:e(31053),Bounds:e(15252),Canvas:e(23514),Color:e(95509),ColorMatrix:e(65246),Masks:e(93310),RGB:e(39298)}},76756:(l,T,e)=>{/** 979 * @author Richard Davey <[email protected]> 980 * @copyright 2013-2023 Photon Storm Ltd. 981 * @license {@link https://opensource.org/licenses/MIT|MIT License} 982 */var d=e(56694),g=e(61286),r=new d({initialize:function(h,n,o,f,u,v){n||(n=h.sys.make.image({x:o,y:f,key:u,frame:v,add:!1})),this.bitmapMask=n,this.invertAlpha=!1,this.isStencil=!1},setBitmap:function(a){this.bitmapMask=a},preRenderWebGL:function(a,h,n){a.pipelines.BITMAPMASK_PIPELINE.beginMask(this,h,n)},postRenderWebGL:function(a,h,n){a.pipelines.BITMAPMASK_PIPELINE.endMask(this,h,n)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null}});g.register("bitmapMask",function(a,h,n,o,f){return new r(this.scene,a,h,n,o,f)}),l.exports=r},63037:(l,T,e)=>{/** 983 * @author Richard Davey <[email protected]> 984 * @copyright 2013-2023 Photon Storm Ltd. 985 * @license {@link https://opensource.org/licenses/MIT|MIT License} 986 */var d=e(56694),g=new d({initialize:function(a,h){this.geometryMask=h,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(r){return this.geometryMask=r,this},setInvertAlpha:function(r){return r===void 0&&(r=!0),this.invertAlpha=r,this},preRenderWebGL:function(r,a,h){var n=r.gl;r.flush(),r.maskStack.length===0&&(n.enable(n.STENCIL_TEST),n.clear(n.STENCIL_BUFFER_BIT),r.maskCount=0),r.currentCameraMask.mask!==this&&(r.currentMask.mask=this),r.maskStack.push({mask:this,camera:h}),this.applyStencil(r,h,!0),r.maskCount++},applyStencil:function(r,a,h){var n=r.gl,o=this.geometryMask,f=r.maskCount,u=255;n.colorMask(!1,!1,!1,!1),h?(n.stencilFunc(n.EQUAL,f,u),n.stencilOp(n.KEEP,n.KEEP,n.INCR),f++):(n.stencilFunc(n.EQUAL,f+1,u),n.stencilOp(n.KEEP,n.KEEP,n.DECR)),this.level=f,o.renderWebGL(r,o,a),r.flush(),n.colorMask(!0,!0,
986!0,!0),n.stencilOp(n.KEEP,n.KEEP,n.KEEP),this.invertAlpha?n.stencilFunc(n.NOTEQUAL,f,u):n.stencilFunc(n.EQUAL,f,u)},postRenderWebGL:function(r){var a=r.gl;r.maskStack.pop(),r.maskCount--,r.flush();var h=r.currentMask;if(r.maskStack.length===0)h.mask=null,a.disable(a.STENCIL_TEST);else{var n=r.maskStack[r.maskStack.length-1];n.mask.applyStencil(r,n.camera,!1),r.currentCameraMask.mask!==n.mask?(h.mask=n.mask,h.camera=n.camera):h.mask=null}},preRenderCanvas:function(r,a,h){var n=this.geometryMask;r.currentContext.save(),n.renderCanvas(r,n,h,null,null,!0),r.currentContext.clip()},postRenderCanvas:function(r){r.currentContext.restore()},destroy:function(){this.geometryMask=null}});l.exports=g},93310:(l,T,e)=>{/** 987 * @author Richard Davey <[email protected]> 988 * @copyright 2013-2023 Photon Storm Ltd. 989 * @license {@link https://opensource.org/licenses/MIT|MIT License} 990 */l.exports={BitmapMask:e(76756),GeometryMask:e(63037)}},31053:(l,T,e)=>{/** 991 * @author Richard Davey <[email protected]> 992 * @copyright 2013-2023 Photon Storm Ltd. 993 * @license {@link https://opensource.org/licenses/MIT|MIT License} 994 */var d=e(56694),g=new d({initialize:function(a,h,n,o){(!h||h==="")&&(h=["precision mediump float;","uniform vec2 resolution;","varying vec2 fragCoord;","void main () {"," vec2 uv = fragCoord / resolution.xy;"," gl_FragColor = vec4(uv.xyx, 1.0);","}"].join(` 995`)),(!n||n==="")&&(n=["precision mediump float;","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","varying vec2 fragCoord;","varying vec2 outTexCoord;","void main () {"," gl_Position = uProjectionMatrix * uViewMatrix * vec4(inPosition, 1.0, 1.0);"," fragCoord = vec2(inPosition.x, uResolution.y - inPosition.y);"," outTexCoord = vec2(inPosition.x / uResolution.x, fragCoord.y / uResolution.y);","}"].join(` 996`)),o===void 0&&(o=null),this.key=a,this.fragmentSrc=h,this.vertexSrc=n,this.uniforms=o}});l.exports=g},99584:l=>{/** 997 * @author Richard Davey <[email protected]> 998 * @copyright 2013-2023 Photon Storm Ltd. 999 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1000 */var T=function(e,d){var g;if(d)typeof d=="string"?g=document.getElementById(d):typeof d=="object"&&d.nodeType===1&&(g=d);else if(e.parentElement||d===null)return e;return g||(g=document.body),g.appendChild(e),e};l.exports=T},85178:(l,T,e)=>{/** 1001 * @author Richard Davey <[email protected]> 1002 * @copyright 2013-2023 Photon Storm Ltd. 1003 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1004 */var d=e(99584),g=function(r){var a=r.config;if(!(!a.parent||!a.domCreateContainer)){var h=document.createElement("div");h.style.cssText=["display: block;","width: "+r.scale.width+"px;","height: "+r.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+a.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),r.domContainer=h,d(h,a.parent)}};l.exports=g},21546:(l,T,e)=>{/** 1005 * @author Richard Davey <[email protected]> 1006 * @copyright 2013-2023 Photon Storm Ltd. 1007 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1008 */var d=e(36580),g=function(r){if(document.readyState==="complete"||document.readyState==="interactive"){r();return}var a=function(){document.removeEventListener("deviceready",a,!0),document.removeEventListener("DOMContentLoaded",a,!0),window.removeEventListener("load",a,!0),r()};document.body?d.cordova?document.addEventListener("deviceready",a,!1):(document.addEventListener("DOMContentLoaded",a,!0),window.addEventListener("load",a,!0)):window.setTimeout(a,20)};l.exports=g},74181:l=>{/** 1009 * @author Richard Davey <[email protected]> 1010 * @copyright 2013-2023 Photon Storm Ltd. 1011 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1012 */var T=function(e){if(!e)return window.innerHeight;var d=Math.abs(window.orientation),g={w:0,h:0},r=document.createElement("div");return r.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(r),g.w=d===90?r.offsetHeight:window.innerWidth,g.h=d===90?window.innerWidth:r.offsetHeight,document.documentElement.removeChild(r),r=null,Math.abs(window.orientation)!==90?g.h:g.w};l.exports=T},9229:(l,T,e)=>{/** 1013 * @author Richard Davey <[email protected]> 1014 * @copyright 2013-2023 Photon Storm Ltd. 1015 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1016 */var d=e(55301),g=function(r,a){var h=window.screen,n=h?h.orientation||h.mozOrientation||h.msOrientation:!1;if(n&&typeof n.type=="string")return n.type;if(typeof n=="string")return n;if(typeof window.orientation=="number")return window.orientation===0||window.orientation===180?d.ORIENTATION.PORTRAIT:d.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return d.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return d.ORIENTATION.LANDSCAPE}else return a>r?d.ORIENTATION.PORTRAIT:d.ORIENTATION.LANDSCAPE};l.exports=g},2893:l=>{/** 1017 * @author Richard Davey <[email protected]> 1018 * @copyright 2013-2023 Photon Storm Ltd. 1019 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1020 */var T=function(e){var d;return e!==""&&(typeof e=="string"?d=document.getElementById(e):e&&e.nodeType===1&&(d=e)),d||(d=document.body),d};l.exports=T},89200:l=>{/** 1021 * @author Richard Davey <[email protected]> 1022 * @copyright 2013-2023 Photon Storm Ltd. 1023 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1024 */var T=function(e){var d="";try{if(window.DOMParser){var g=new DOMParser;d=g.parseFromString(e,"text/xml")}else d=new ActiveXObject("Microsoft.XMLDOM"),d.loadXML(e)}catch{d=null}
1024return!d||!d.documentElement||d.getElementsByTagName("parsererror").length?null:d};l.exports=T},55638:l=>{/** 1025 * @author Richard Davey <[email protected]> 1026 * @copyright 2013-2023 Photon Storm Ltd. 1027 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1028 */var T=function(e){e.parentNode&&e.parentNode.removeChild(e)};l.exports=T},27385:(l,T,e)=>{/** 1029 * @author Richard Davey <[email protected]> 1030 * @copyright 2013-2023 Photon Storm Ltd. 1031 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1032 */var d=e(56694),g=e(72283),r=new d({initialize:function(){this.isRunning=!1,this.callback=g,this.isSetTimeOut=!1,this.timeOutID=null,this.delay=0;var h=this;this.step=function n(o){h.callback(o),h.isRunning&&(h.timeOutID=window.requestAnimationFrame(n))},this.stepTimeout=function n(){h.isRunning&&(h.timeOutID=window.setTimeout(n,h.delay)),h.callback(window.performance.now())}},start:function(a,h,n){this.isRunning||(this.callback=a,this.isSetTimeOut=h,this.delay=n,this.isRunning=!0,this.timeOutID=h?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=g}});l.exports=r},3590:(l,T,e)=>{/** 1033 * @author Richard Davey <[email protected]> 1034 * @copyright 2013-2023 Photon Storm Ltd. 1035 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1036 */var d={AddToDOM:e(99584),DOMContentLoaded:e(21546),GetInnerHeight:e(74181),GetScreenOrientation:e(9229),GetTarget:e(2893),ParseXML:e(89200),RemoveFromDOM:e(55638),RequestAnimationFrame:e(27385)};l.exports=d},78491:(l,T,e)=>{/** 1037 * @author Richard Davey <[email protected]> 1038 * @copyright 2013-2023 Photon Storm Ltd. 1039 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1040 */var d=e(56694),g=e(6659),r=e(91963),a=new d({Extends:g,initialize:function(){g.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",a,"events"),l.exports=a},95146:(l,T,e)=>{/** 1041 * @author Richard Davey <[email protected]> 1042 * @copyright 2013-2023 Photon Storm Ltd. 1043 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1044 */l.exports={EventEmitter:e(78491)}},20170:(l,T,e)=>{/** 1045 * @author Richard Davey <[email protected]> 1046 * @copyright 2013-2023 Photon Storm Ltd. 1047 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1048 */var d=e(56694),g=e(47551),r=e(47406),a=new d({Extends:g,initialize:function(n,o){o===void 0&&(o=1),g.call(this,r.BARREL,n),this.amount=o}});l.exports=a},51182:(l,T,e)=>{/** 1049 * @author Richard Davey <[email protected]> 1050 * @copyright 2013-2023 Photon Storm Ltd. 1051 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1052 */var d=e(56694),g=e(47551),r=e(47406),a=new d({Extends:g,initialize:function(n,o,f,u,v,m,p){f===void 0&&(f=1),u===void 0&&(u=1),v===void 0&&(v=1),m===void 0&&(m=1),p===void 0&&(p=4),g.call(this,r.BLOOM,n),this.steps=p,this.offsetX=f,this.offsetY=u,this.blurStrength=v,this.strength=m,this.glcolor=[1,1,1],o!=null&&(this.color=o)},color:{get:function(){var h=this.glcolor;return(h[0]*255<<16)+(h[1]*255<<8)+(h[2]*255|0)},set:function(h){var n=this.glcolor;n[0]=(h>>16&255)/255,n[1]=(h>>8&255)/255,n[2]=(h&255)/255}}});l.exports=a},51498:(l,T,e)=>{/** 1053 * @author Richard Davey <[email protected]> 1054 * @copyright 2013-2023 Photon Storm Ltd. 1055 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1056 */var d=e(56694),g=e(47551),r=e(47406),a=new d({Extends:g,initialize:function(n,o,f,u,v,m,p){f===void 0&&(f=2),u===void 0&&(u=2),v===void 0&&(v=1),p===void 0&&(p=4),g.call(this,r.BLUR,n),this.quality=0,this.x=f,this.y=u,this.steps=p,this.strength=v,this.glcolor=[1,1,1],m!=null&&(this.color=m)},color:{get:function(){var h=this.glcolor;return(h[0]*255<<16)+(h[1]*255<<8)+(h[2]*255|0)},set:function(h){var n=this.glcolor;n[0]=(h>>16&255)/255,n[1]=(h>>8&255)/255,n[2]=(h&255)/255}}});l.exports=a},12042:(l,T,e)=>{/** 1057 * @author Richard Davey <[email protected]> 1058 * @copyright 2013-2023 Photon Storm Ltd. 1059 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1060 */var d=e(56694),g=e(47551),r=e(47406),a=new d({Extends:g,initialize:function(n,o,f,u,v,m,p,x){o===void 0&&(o=.5),f===void 0&&(f=1),u===void 0&&(u=.2),v===void 0&&(v=!1),m===void 0&&(m=1),p===void 0&&(p=1),x===void 0&&(x=1),g.call(this,r.BOKEH,n),this.radius=o,this.amount=f,this.contrast=u,this.isTiltShift=v,this.strength=x,this.blurX=m,this.blurY=p}});l.exports=a},69900:(l,T,e)=>{/** 1061 * @author Richard Davey <[email protected]> 1062 * @copyright 2013-2023 Photon Storm Ltd. 1063 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1064 */var d=e(56694),g=e(47551),r=e(47406),a=new d({Extends:g,initialize:function(n,o,f,u,v,m){o===void 0&&(o=8),v===void 0&&(v=1),m===void 0&&(m=.005),g.call(this,r.CIRCLE,n),this.scale=v,this.feather=m,this.thickness=o,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4],f!=null&&(this.color=f),u!=null&&(this.backgroundColor=u)}
1064,color:{get:function(){var h=this.glcolor;return(h[0]*255<<16)+(h[1]*255<<8)+(h[2]*255|0)},set:function(h){var n=this.glcolor;n[0]=(h>>16&255)/255,n[1]=(h>>8&255)/255,n[2]=(h&255)/255}},backgroundColor:{get:function(){var h=this.glcolor2;return(h[0]*255<<16)+(h[1]*255<<8)+(h[2]*255|0)},set:function(h){var n=this.glcolor2;n[0]=(h>>16&255)/255,n[1]=(h>>8&255)/255,n[2]=(h&255)/255}}});l.exports=a},48991:(l,T,e)=>{/** 1065 * @author Richard Davey <[email protected]> 1066 * @copyright 2013-2023 Photon Storm Ltd. 1067 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1068 */var d=e(56694),g=e(65246),r=e(47406),a=new d({Extends:g,initialize:function(n){g.call(this),this.type=r.COLOR_MATRIX,this.gameObject=n,this.active=!0},destroy:function(){this.gameObject=null,this._matrix=null,this._data=null}});l.exports=a},47551:(l,T,e)=>{/** 1069 * @author Richard Davey <[email protected]> 1070 * @copyright 2013-2023 Photon Storm Ltd. 1071 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1072 */var d=e(56694),g=new d({initialize:function(a,h){this.type=a,this.gameObject=h,this.active=!0},setActive:function(r){return this.active=r,this},destroy:function(){this.gameObject=null,this.active=!1}});l.exports=g},47909:(l,T,e)=>{/** 1073 * @author Richard Davey <[email protected]> 1074 * @copyright 2013-2023 Photon Storm Ltd. 1075 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1076 */var d=e(56694),g=e(47551),r=e(47406),a=new d({Extends:g,initialize:function(n,o,f,u){o===void 0&&(o="__WHITE"),f===void 0&&(f=.005),u===void 0&&(u=.005),g.call(this,r.DISPLACEMENT,n),this.x=f,this.y=u,this.glTexture,this.setTexture(o)},setTexture:function(h){var n=this.gameObject.scene.sys.textures.getFrame(h);return n&&(this.glTexture=n.glTexture),this}});l.exports=a},18919:(l,T,e)=>{/** 1077 * @author Richard Davey <[email protected]> 1078 * @copyright 2013-2023 Photon Storm Ltd. 1079 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1080 */var d=e(56694),g=e(47551),r=e(47406),a=new d({Extends:g,initialize:function(n,o,f,u,v){f===void 0&&(f=4),u===void 0&&(u=0),v===void 0&&(v=!1),g.call(this,r.GLOW,n),this.outerStrength=f,this.innerStrength=u,this.knockout=v,this.glcolor=[1,1,1,1],o!==void 0&&(this.color=o)},color:{get:function(){var h=this.glcolor;return(h[0]*255<<16)+(h[1]*255<<8)+(h[2]*255|0)},set:function(h){var n=this.glcolor;n[0]=(h>>16&255)/255,n[1]=(h>>8&255)/255,n[2]=(h&255)/255}}});l.exports=a},62494:(l,T,e)=>{/** 1081 * @author Richard Davey <[email protected]> 1082 * @copyright 2013-2023 Photon Storm Ltd. 1083 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1084 */var d=e(56694),g=e(47551),r=e(47406),a=new d({Extends:g,initialize:function(n,o,f,u,v,m,p,x,y){u===void 0&&(u=.2),v===void 0&&(v=0),m===void 0&&(m=0),p===void 0&&(p=0),x===void 0&&(x=1),y===void 0&&(y=0),g.call(this,r.GRADIENT,n),this.alpha=u,this.size=y,this.fromX=v,this.fromY=m,this.toX=p,this.toY=x,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0],o!=null&&(this.color1=o),f!=null&&(this.color2=f)},color1:{get:function(){var h=this.glcolor1;
1084return(h[0]<<16)+(h[1]<<8)+(h[2]|0)},set:function(h){var n=this.glcolor1;n[0]=h>>16&255,n[1]=h>>8&255,n[2]=h&255}},color2:{get:function(){var h=this.glcolor2;return(h[0]<<16)+(h[1]<<8)+(h[2]|0)},set:function(h){var n=this.glcolor2;n[0]=h>>16&255,n[1]=h>>8&255,n[2]=h&255}}});l.exports=a},68897:(l,T,e)=>{/** 1085 * @author Richard Davey <[email protected]> 1086 * @copyright 2013-2023 Photon Storm Ltd. 1087 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1088 */var d=e(56694),g=e(47551),r=e(47406),a=new d({Extends:g,initialize:function(n,o){o===void 0&&(o=1),g.call(this,r.PIXELATE,n),this.amount=o}});l.exports=a},58575:(l,T,e)=>{/** 1089 * @author Richard Davey <[email protected]> 1090 * @copyright 2013-2023 Photon Storm Ltd. 1091 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1092 */var d=e(56694),g=e(47551),r=e(47406),a=new d({Extends:g,initialize:function(n,o,f,u,v,m,p,x){o===void 0&&(o=0),f===void 0&&(f=0),u===void 0&&(u=.1),v===void 0&&(v=1),p===void 0&&(p=6),x===void 0&&(x=1),g.call(this,r.SHADOW,n),this.x=o,this.y=f,this.decay=u,this.power=v,this.glcolor=[0,0,0,1],this.samples=p,this.intensity=x,m!==void 0&&(this.color=m)},color:{get:function(){var h=this.glcolor;return(h[0]*255<<16)+(h[1]*255<<8)+(h[2]*255|0)},set:function(h){var n=this.glcolor;n[0]=(h>>16&255)/255,n[1]=(h>>8&255)/255,n[2]=(h&255)/255}}});l.exports=a},33755:(l,T,e)=>{/** 1093 * @author Richard Davey <[email protected]> 1094 * @copyright 2013-2023 Photon Storm Ltd. 1095 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1096 */var d=e(56694),g=e(47551),r=e(47406),a=new d({Extends:g,initialize:function(n,o,f,u,v){o===void 0&&(o=.5),f===void 0&&(f=.5),u===void 0&&(u=3),v===void 0&&(v=!1),g.call(this,r.SHINE,n),this.speed=o,this.lineWidth=f,this.gradient=u,this.reveal=v}});l.exports=a},24949:(l,T,e)=>{/** 1097 * @author Richard Davey <[email protected]> 1098 * @copyright 2013-2023 Photon Storm Ltd. 1099 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1100 */var d=e(56694),g=e(47551),r=e(47406),a=new d({Extends:g,initialize:function(n,o,f,u,v){o===void 0&&(o=.5),f===void 0&&(f=.5),u===void 0&&(u=.5),v===void 0&&(v=.5),g.call(this,r.VIGNETTE,n),this.x=o,this.y=f,this.radius=u,this.strength=v}});l.exports=a},66241:(l,T,e)=>{/** 1101 * @author Richard Davey <[email protected]> 1102 * @copyright 2013-2023 Photon Storm Ltd. 1103 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1104 */var d=e(56694),g=e(47551),r=e(47406),a=new d({Extends:g,initialize:function(n,o,f,u,v){o===void 0&&(o=.1),f===void 0&&(f=0),u===void 0&&(u=0),v===void 0&&(v=!1),g.call(this,r.WIPE,n),this.progress=0,this.wipeWidth=o,this.direction=f,this.axis=u,this.reveal=v}});l.exports=a},47406:l=>{/** 1105 * @author Richard Davey <[email protected]> 1106 * @copyright 2013-2023 Photon Storm Ltd. 1107 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1108 */var T={GLOW:4,SHADOW:5,PIXELATE:6,VIGNETTE:7,SHINE:8,BLUR:9,GRADIENT:12,BLOOM:13,COLOR_MATRIX:14,CIRCLE:15,BARREL:16,DISPLACEMENT:17,WIPE:18,BOKEH:19};l.exports=T},96910:(l,T,e)=>{/** 1109 * @author Richard Davey <[email protected]> 1110 * @copyright 2013-2023 Photon Storm Ltd. 1111 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1112 */var d=e(98611),g=e(47406),r={Barrel:e(20170),Controller:e(47551),Bloom:e(51182),Blur:e(51498),Bokeh:e(12042),Circle:e(69900),ColorMatrix:e(48991),Displacement:e(47909),Glow:e(18919),Gradient:e(62494),Pixelate:e(68897),Shadow:e(58575),Shine:e(33755),Vignette:e(24949),Wipe:e(66241)};r=d(!1,r,g),l.exports=r},88933:(l,T,e)=>{/** 1113 * @author Richard Davey <[email protected]> 1114 * @copyright 2013-2023 Photon Storm Ltd. 1115 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1116 */var d=e(95723),g=e(20494),r=function(a,h,n){h.x=g(n,"x",0),h.y=g(n,"y",0),h.depth=g(n,"depth",0),h.flipX=g(n,"flipX",!1),h.flipY=g(n,"flipY",!1);var o=g(n,"scale",null);typeof o=="number"?h.setScale(o):o!==null&&(h.scaleX=g(o,"x",1),h.scaleY=g(o,"y",1));var f=g(n,"scrollFactor",null);typeof f=="number"?h.setScrollFactor(f):f!==null&&(h.scrollFactorX=g(f,"x",1),h.scrollFactorY=g(f,"y",1)),h.rotation=g(n,"rotation",0);var u=g(n,"angle",null);u!==null&&(h.angle=u),h.alpha=g(n,"alpha",1);var v=g(n,"origin",null);if(typeof v=="number")h.setOrigin(v);else if(v!==null){var m=g(v,"x",.5),p=g(v,"y",.5);h.setOrigin(m,p)}h.blendMode=g(n,"blendMode",d.NORMAL),h.visible=g(n,"visible",!0);var x=g(n,"add",!0);return x&&a.sys.displayList.add(h),h.preUpdate&&a.sys.updateList.add(h),h};l.exports=r},32291:(l,T,e)=>{/** 1117 * @author Richard Davey <[email protected]> 1118 * @copyright 2013-2023 Photon Storm Ltd. 1119 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1120 */var d=e(20494),g=function(r,a){var h=d(a,"anims",null);if(h===null)return r;if(typeof h=="string")r.anims.play(h);else if(typeof h=="object"){var n=r.anims,o=d(h,"key",void 0);if(o){var f=d(h,"startFrame",void 0),u=d(h,"delay",0),v=d(h,"repeat",0),m=d(h,"repeatDelay",0),p=d(h,"yoyo",!1),x=d(h,"play",!1),y=d(h,"delayedPlay",0),P={key:o,delay:u,repeat:v,repeatDelay:m,yoyo:p,startFrame:f};x?n.play(P):y>0?n.playAfterDelay(P,y):n.load(P)}}return r};l.exports=g},91713:(l,T,e)=>{/** 1121 * @author Richard Davey <[email protected]> 1122 * @copyright 2013-2023 Photon Storm Ltd. 1123 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1124 */var d=e(56694),g=e(71207),r=e(91963),a=e(56631),h=e(7599),n=e(17922),o=new d({Extends:g,initialize:function(u){g.call(this,u),this.sortChildrenFlag=!1,this.scene=u,this.systems=u.sys,this.events=u.sys.events,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.events.once(h.BOOT,this.boot,this),this.events.on(h.START,this.start,this)},boot:function(){this.events.once(h.DESTROY,this.destroy,this)},addChildCallback:function(f){f.displayList&&f.displayList!==this&&f.removeFromDisplayList(),f.parentContainer&&f.parentContainer.remove(f),f.dis
1124playList||(this.queueDepthSort(),f.displayList=this,f.emit(a.ADDED_TO_SCENE,f,this.scene),this.events.emit(h.ADDED_TO_SCENE,f,this.scene))},removeChildCallback:function(f){this.queueDepthSort(),f.displayList=null,f.emit(a.REMOVED_FROM_SCENE,f,this.scene),this.events.emit(h.REMOVED_FROM_SCENE,f,this.scene)},start:function(){this.events.once(h.SHUTDOWN,this.shutdown,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(n(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(f,u){return f._depth-u._depth},getChildren:function(){return this.list},shutdown:function(){for(var f=this.list;f.length;)f[0].destroy(!0);this.events.off(h.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(h.START,this.start,this),this.scene=null,this.systems=null,this.events=null}});r.register("DisplayList",o,"displayList"),l.exports=o},89980:(l,T,e)=>{/** 1125 * @author Richard Davey <[email protected]> 1126 * @copyright 2013-2023 Photon Storm Ltd. 1127 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1128 */var d=e(56694),g=e(48129),r=e(81078),a=e(6659),h=e(56631),n=e(7599),o=new d({Extends:a,initialize:function(u,v){a.call(this),this.scene=u,this.displayList=null,this.type=v,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(h.ADDED_TO_SCENE,this.addedToScene,this),this.on(h.REMOVED_FROM_SCENE,this.removedFromScene,this),u.sys.queueDepthSort()},setActive:function(f){return this.active=f,this},setName:function(f){return this.name=f,this},setState:function(f){return this.state=f,this},setDataEnabled:function(){return this.data||(this.data=new r(this)),this},setData:function(f,u){return this.data||(this.data=new r(this)),this.data.set(f,u),this},incData:function(f,u){return this.data||(this.data=new r(this)),this.data.inc(f,u),this},toggleData:function(f){return this.data||(this.data=new r(this)),this.data.toggle(f),this},getData:function(f){return this.data||(this.data=new r(this)),this.data.get(f)},setInteractive:function(f,u,v){return this.scene.sys.input.enable(this,f,u,v),this},disableInteractive:function(){return this.scene.sys.input.disable(this),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return g(this)},willRender:function(f){var u=this.displayList&&this.displayList.active?this.displayList.willRender(f):!0;return!(!u||o.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&f.id)},getIndexList:function(){for(var f=this,u=this.parentContainer,v=[];u&&(v.unshift(u.getIndex(f)),f=u,u.parentContainer);)u=u.parentContainer;return this.displayList?v.unshift(this.displayList.getIndex(f)):v.unshift(this.scene.sys.displayList.getIndex(f)),v},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(h.ADDED_TO_SCENE,this,this.scene),f.events.emit(n.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(h.REMOVED_FROM_SCENE,this,this.scene),f.events.emit(n.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},destroy:function(f){!this.scene||this.ignoreDestroy||(f===void 0&&(f=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(h.DESTROY,this,f),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.preFX&&(this.preFX.destroy(),this.preFX=void 0),this.postFX&&(this.postFX.destroy(),this.postFX=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});o.RENDER_MASK=15,l.exports=o},99325:(l,T,e)=>{/** 1129 * @author Richard Davey <[email protected]> 1130 * @copyright 2013-2023 Photon Storm Ltd. 1131 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1132 */var d=e(56694),g=e(91963),r=e(7599),a=new d({initialize:function(n){this.scene=n,this.systems=n.sys,this.events=n.sys.events,this.displayList,this.updateList,this.events.once(r.BOOT,this.boot,this),this.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(r.DESTROY,this.destroy,this)},start:function(){this.events.once(r.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});a.register=function(h,n){a.prototype.hasOwnProperty(h)||(a.prototype[h]=n)},a.remove=function(h){a.prototype.hasOwnProperty(h)&&delete a.prototype[h]},g.register("GameObjectCreator",a,"make"),l.exports=a},61286:(l,T,e)=>{/** 1133 * @author Richard Davey <[email protected]> 1134 * @copyright 2013-2023 Photon Storm Ltd. 1135 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1136 */var d=e(56694),g=e(91963),r=e(7599),a=new d({initialize:function(n){this.scene=n,this.systems=n.sys,this.events=n.sys.events,this.displayList,this.updateList,this.events.once(r.BOOT,this.boot,this),this.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(r.DESTROY,this.destroy,this)},start:function(){this.events.once(r.SHUTDOWN,this.shutdown,this)}
1136,existing:function(h){return(h.renderCanvas||h.renderWebGL)&&this.displayList.add(h),h.preUpdate&&this.updateList.add(h),h},shutdown:function(){this.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});a.register=function(h,n){a.prototype.hasOwnProperty(h)||(a.prototype[h]=n)},a.remove=function(h){a.prototype.hasOwnProperty(h)&&delete a.prototype[h]},g.register("GameObjectFactory",a,"add"),l.exports=a},73329:(l,T,e)=>{/** 1137 * @author Richard Davey <[email protected]> 1138 * @copyright 2013-2023 Photon Storm Ltd. 1139 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1140 */var d=e(69360),g=new d,r=new d,a=new d,h={camera:g,sprite:r,calc:a},n=function(o,f,u){var v=g,m=r,p=a;return m.applyITRS(o.x,o.y,o.rotation,o.scaleX,o.scaleY),v.copyFrom(f.matrix),u?(v.multiplyWithOffset(u,-f.scrollX*o.scrollFactorX,-f.scrollY*o.scrollFactorY),m.e=o.x,m.f=o.y):(m.e-=f.scrollX*o.scrollFactorX,m.f-=f.scrollY*o.scrollFactorY),v.multiply(m,p),h};l.exports=n},92034:(l,T,e)=>{/** 1141 * @author Richard Davey <[email protected]> 1142 * @copyright 2013-2023 Photon Storm Ltd. 1143 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1144 */var d=e(56694),g=e(74623),r=e(91963),a=e(7599),h=new d({Extends:g,initialize:function(o){g.call(this),this.checkQueue=!0,this.scene=o,this.systems=o.sys,o.sys.events.once(a.BOOT,this.boot,this),o.sys.events.on(a.START,this.start,this)},boot:function(){this.systems.events.once(a.DESTROY,this.destroy,this)},start:function(){var n=this.systems.events;n.on(a.PRE_UPDATE,this.update,this),n.on(a.UPDATE,this.sceneUpdate,this),n.once(a.SHUTDOWN,this.shutdown,this)},sceneUpdate:function(n,o){for(var f=this._active,u=f.length,v=0;v<u;v++){var m=f[v];m.active&&m.preUpdate.call(m,n,o)}},shutdown:function(){for(var n=this._active.length;n--;)this._active[n].destroy(!0);for(n=this._pending.length;n--;)this._pending[n].destroy(!0);for(n=this._destroy.length;n--;)this._destroy[n].destroy(!0);this._toProcess=0,this._pending=[],this._active=[],this._destroy=[],this.removeAllListeners();var o=this.systems.events;o.off(a.PRE_UPDATE,this.update,this),o.off(a.UPDATE,this.sceneUpdate,this),o.off(a.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.systems.events.off(a.START,this.start,this),this.scene=null,this.systems=null}});r.register("UpdateList",h,"updateList"),l.exports=h},8810:l=>{/** 1145 * @author Richard Davey <[email protected]> 1146 * @copyright 2013-2023 Photon Storm Ltd. 1147 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1148 */var T=function(e,d,g,r,a,h,n,o,f,u,v,m,p,x,y){var P=g.x-d.displayOriginX+a,b=g.y-d.displayOriginY+h,E=P+g.w,M=b+g.h,w=n.getXRound(P,b,o),A=n.getYRound(P,b,o),R=n.getXRound(P,M,o),L=n.getYRound(P,M,o),O=n.getXRound(E,M,o),I=n.getYRound(E,M,o),D=n.getXRound(E,b,o),B=n.getYRound(E,b,o);e.batchQuad(d,w,A,R,L,O,I,D,B,r.u0,r.v0,r.u1,r.v1,f,u,v,m,p,x,y)};l.exports=T},82173:l=>{/** 1149 * @author Richard Davey <[email protected]> 1150 * @copyright 2013-2023 Photon Storm Ltd. 1151 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1152 */var T=function(e,d,g,r){if(g===void 0&&(g=!1),r===void 0)return r={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},r;var a=e.text,h=a.length,n=e.maxWidth,o=e.wordWrapCharCode,f=Number.MAX_VALUE,u=Number.MAX_VALUE,v=0,m=0,p=e.fontData.chars,x=e.fontData.lineHeight,y=e.letterSpacing,P=e.lineSpacing,b=0,E=0,M=0,w=null,A=e._align,R=0,L=0,O=e.fontSize/e.fontData.size,I=O*e.scaleX,D=O*e.scaleY,B=null,z=0,X=[],W=Number.MAX_VALUE,j=0,N=0,Y=0,F,G=[],k=[],V=null;if(n>0){for(F=0;F<h;F++){if(M=a.charCodeAt(F),M===10){V!==null&&(G.push({word:V.word,i:V.i,x:V.x*I,y:V.y*D,w:V.w*I,h:V.h*D,cr:!0}),V=null),b=0,E+=x+P,B=null;continue}if(w=p[M],!!w){if(B!==null)var U=w.kerning[z];
1152M===o?V!==null&&(G.push({word:V.word,i:V.i,x:V.x*I,y:V.y*D,w:V.w*I,h:V.h*D,cr:!1}),V=null):(V===null&&(V={word:"",i:F,x:b,y:E,w:0,h:x,cr:!1}),V.word=V.word.concat(a[F]),V.w+=w.xOffset+w.xAdvance+(U!==void 0?U:0)),b+=w.xAdvance+y,B=w,z=M}}V!==null&&G.push({word:V.word,i:V.i,x:V.x*I,y:V.y*D,w:V.w*I,h:V.h*D,cr:!1}),b=0,E=0,B=null,z=0;var $,K=0,J=[];for(F=0;F<G.length;F++){var _=G[F],tt=_.x,st=_.x+_.w;if($){var ht=tt-($.x+$.w);K=tt-(ht+$.w),$=null}var lt=tt-K,nt=st-K;lt>n||nt>n?(J.push(_.i-1),_.cr?(J.push(_.i+_.word.length),K=0,$=null):$=_):_.cr&&(J.push(_.i+_.word.length),K=0,$=null)}var gt=function(ze,Ke,ei){return ze.substr(0,Ke)+ei+ze.substr(Ke+1)};for(F=J.length-1;F>=0;F--)a=gt(a,J[F],` 1153`);r.wrappedText=a,h=a.length,G=[],V=null}var bt=0;for(F=0;F<h;F++){if(M=a.charCodeAt(F),M===10){V!==null&&(G.push({word:V.word,i:V.i,x:V.x*I,y:V.y*D,w:V.w*I,h:V.h*D}),V=null),b=0,E+=x+P,B=null,X[N]=Y,Y>j&&(j=Y),Y<W&&(W=Y),N++,Y=0;continue}if(w=p[M],!!w){if(R=b,L=E,B!==null){var Pt=w.kerning[z];R+=Pt!==void 0?Pt:0}f>R&&(f=R),u>L&&(u=L);var dt=R+w.xAdvance,St=L+x;v<dt&&(v=dt),m<St&&(m=St);var Tt=w.xOffset+w.xAdvance+(Pt!==void 0?Pt:0);M===o?V!==null&&(G.push({word:V.word,i:V.i,x:V.x*I,y:V.y*D,w:V.w*I,h:V.h*D}),V=null):(V===null&&(V={word:"",i:bt,x:b,y:E,w:0,h:x}),V.word=V.word.concat(a[F]),V.w+=Tt),k.push({i:bt,idx:F,char:a[F],code:M,x:(w.xOffset+R)*O,y:(w.yOffset+E)*O,w:w.width*O,h:w.height*O,t:E*O,r:dt*O,b:x*O,line:N,glyph:w}),b+=w.xAdvance+y+(Pt!==void 0?Pt:0),B=w,z=M,Y=dt*O,bt++}}if(V!==null&&G.push({word:V.word,i:V.i,x:V.x*I,y:V.y*D,w:V.w*I,h:V.h*D}),X[N]=Y,Y>j&&(j=Y),Y<W&&(W=Y),A>0)for(var Vt=0;Vt<k.length;Vt++){var zt=k[Vt];if(A===1){var be=(j-X[zt.line])/2;zt.x+=be,zt.r+=be}else if(A===2){var pe=j-X[zt.line];zt.x+=pe,zt.r+=pe}}var Qt=r.local,Wt=r.global,me=r.lines;return Qt.x=f*O,Qt.y=u*O,Qt.width=v*O,Qt.height=m*O,Wt.x=e.x-e._displayOriginX+f*I,Wt.y=e.y-e._displayOriginY+u*D,Wt.width=v*I,Wt.height=m*D,me.shortest=W,me.longest=j,me.lengths=X,d&&(Qt.x=Math.ceil(Qt.x),Qt.y=Math.ceil(Qt.y),Qt.width=Math.ceil(Qt.width),Qt.height=Math.ceil(Qt.height),Wt.x=Math.ceil(Wt.x),Wt.y=Math.ceil(Wt.y),Wt.width=Math.ceil(Wt.width),Wt.height=Math.ceil(Wt.height),me.shortest=Math.ceil(W),me.longest=Math.ceil(j)),g&&(e._displayOriginX=e.originX*Qt.width,e._displayOriginY=e.originY*Qt.height,Wt.x=e.x-e._displayOriginX*e.scaleX,Wt.y=e.y-e._displayOriginY*e.scaleY,d&&(Wt.x=Math.ceil(Wt.x),Wt.y=Math.ceil(Wt.y))),r.words=G,r.characters=k,r.lines.height=x,r.scale=O,r.scaleX=e.scaleX,r.scaleY=e.scaleY,r};l.exports=T},68298:(l,T,e)=>{/** 1154 * @author Richard Davey <[email protected]> 1155 * @copyright 2013-2023 Photon Storm Ltd. 1156 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1157 */var d=e(31476),g=function(r,a,h,n,o,f,u){var v=r.sys.textures.get(h),m=v.get(n),p=r.sys.cache.xml.get(o);if(m&&p){var x=d(p,m,f,u,v);return r.sys.cache.bitmapFont.add(a,{data:x,texture:h,frame:n,fromAtlas:!0}),!0}else return!1};l.exports=g},39860:(l,T,e)=>{/** 1158 * @author Richard Davey <[email protected]> 1159 * @copyright 2013-2023 Photon Storm Ltd. 1160 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1161 */var d=e(10850),g=function(r,a){var h=a.width,n=a.height,o=Math.floor(h/2),f=Math.floor(n/2),u=d(a,"chars","");if(u!==""){var v=d(a,"image",""),m=r.sys.textures.getFrame(v),p=m.cutX,x=m.cutY,y=m.source.width,P=m.source.height,b=d(a,"offset.x",0),E=d(a,"offset.y",0),M=d(a,"spacing.x",0),w=d(a,"spacing.y",0),A=d(a,"lineSpacing",0),R=d(a,"charsPerRow",null);R===null&&(R=y/h,R>u.length&&(R=u.length));for(var L=b,O=E,I={retroFont:!0,font:v,size:h,lineHeight:n+A,chars:{}},D=0,B=0;B<u.length;B++){var z=u.charCodeAt(B),X=(p+L)/y,W=(x+O)/P,j=(p+L+h)/y,N=(x+O+n)/P;I.chars[z]={x:L,y:O,width:h,height:n,centerX:o,centerY:f,xOffset:0,yOffset:0,xAdvance:h,data:{},kerning:{},u0:X,v0:W,u1:j,v1:N},D++,D===R?(D=0,L=b,O+=n+w):L+=h+M}var Y={data:I,frame:null,texture:v};return Y}};l.exports=g},31476:l=>{/** 1162 * @author Richard Davey <[email protected]> 1163 * @copyright 2013-2023 Photon Storm Ltd. 1164 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1165 */function T(d,g){return parseInt(d.getAttribute(g),10)}var e=function(d,g,r,a,h){r===void 0&&(r=0),a===void 0&&(a=0);var n=g.cutX,o=g.cutY,f=g.source.width,u=g.source.height,v=g.sourceIndex,m={},p=d.getElementsByTagName("info")[0],x=d.getElementsByTagName("common")[0];m.font=p.getAttribute("face"),m.size=T(p,"size"),m.lineHeight=T(x,"lineHeight")+a,m.chars={};var y=d.getElementsByTagName("char"),P=g!==void 0&&g.trimmed;if(P)var b=g.height,E=g.width;for(var M=0;M<y.length;M++){var w=y[M],A=T(w,"id"),R=String.fromCharCode(A),L=T(w,"x"),O=T(w,"y"),I=T(w,"width"),D=T(w,"height");P&&(L<E&&(E=L),O<b&&(b=O)),P&&b!==0&&E!==0&&(L-=g.x,O-=g.y);var B=(n+L)/f,z=(o+O)/u,X=(n+L+I)/f,W=(o+O+D)/u;if(m.chars[A]={x:L,y:O,width:I,height:D,centerX:Math.floor(I/2),centerY:Math.floor(D/2),xOffset:T(w,"xoffset"),yOffset:T(w,"yoffset"),xAdvance:T(w,"xadvance")+r,data:{},kerning:{},u0:B,v0:z,u1:X,v1:W},h&&I!==0&&D!==0){var j=h.add(R,v,L,O,I,D);j&&j.setUVs(I,D,B,z,X,W)}}var N=d.getElementsByTagName("kerning");for(M=0;M<N.length;M++){var Y=N[M],F=T(Y,"first"),G=T(Y,"second"),k=T(Y,"amount");m.chars[G].kerning[F]=k}return m};l.exports=e},55873:(l,T,e)=>{/** 1166 * @author Richard Davey <[email protected]> 1167 * @copyright 2013-2023 Photon Storm Ltd. 1168 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1169 */var d=e(66863),g=e(98611),r={Parse:e(39860)};r=g(!1,r,d),l.exports=r},66863:l=>{/** 1170 * @author Richard Davey <[email protected]> 1171 * @copyright 2013-2023 Photon Storm Ltd. 1172 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1173 */var T={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.:,'"?
1173!`,TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:`ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()':;0123456789`};l.exports=T},13468:(l,T,e)=>{/** 1174 * @author Richard Davey <[email protected]> 1175 * @copyright 2013-2023 Photon Storm Ltd. 1176 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1177 */var d=e(44616),g=e(56694),r=e(88899),a=new g({Extends:d,Mixins:[r],initialize:function(n,o,f,u,v,m,p){d.call(this,n,o,f,u,v,m,p),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(h,n){return this.cropWidth=h,this.cropHeight=n,this},setDisplayCallback:function(h){return this.displayCallback=h,this},setScrollX:function(h){return this.scrollX=h,this},setScrollY:function(h){return this.scrollY=h,this}});l.exports=a},93438:(l,T,e)=>{/** 1178 * @author Richard Davey <[email protected]> 1179 * @copyright 2013-2023 Photon Storm Ltd. 1180 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1181 */var d=e(49584),g=function(r,a,h,n){var o=a._text,f=o.length,u=r.currentContext;if(!(f===0||!d(r,u,a,h,n))){h.addToRenderList(a);var v=a.fromAtlas?a.frame:a.texture.frames.__BASE,m=a.displayCallback,p=a.callbackData,x=a.fontData.chars,y=a.fontData.lineHeight,P=a._letterSpacing,b=0,E=0,M=0,w=null,A=0,R=0,L=0,O=0,I=0,D=0,B=null,z=0,X=a.frame.source.image,W=v.cutX,j=v.cutY,N=0,Y=0,F=a._fontSize/a.fontData.size,G=a._align,k=0,V=0;a.getTextBounds(!1);var U=a._bounds.lines;G===1?V=(U.longest-U.lengths[0])/2:G===2&&(V=U.longest-U.lengths[0]),u.translate(-a.displayOriginX,-a.displayOriginY);var $=h.roundPixels;a.cropWidth>0&&a.cropHeight>0&&(u.beginPath(),u.rect(0,0,a.cropWidth,a.cropHeight),u.clip());for(var K=0;K<f;K++){if(Y=F,N=0,M=o.charCodeAt(K),M===10){k++,G===1?V=(U.longest-U.lengths[k])/2:G===2&&(V=U.longest-U.lengths[k]),b=0,E+=y,B=null;continue}if(w=x[M],!!w){if(A=W+w.x,R=j+w.y,L=w.width,O=w.height,I=w.xOffset+b-a.scrollX,D=w.yOffset+E-a.scrollY,B!==null){var J=w.kerning[z];I+=J!==void 0?J:0}if(m){p.index=K,p.charCode=M,p.x=I,p.y=D,p.scale=Y,p.rotation=N,p.data=w.data;var _=m(p);I=_.x,D=_.y,Y=_.scale,N=_.rotation}I*=Y,D*=Y,I+=V,b+=w.xAdvance+P+(J!==void 0?J:0),B=w,z=M,!(L===0||O===0||M===32)&&($&&(I=Math.round(I),D=Math.round(D)),u.save(),u.translate(I,D),u.rotate(N),u.scale(Y,Y),u.drawImage(X,A,R,L,O,0,0,L,O),u.restore())}}u.restore()}};l.exports=g},67513:(l,T,e)=>{/** 1182 * @author Richard Davey <[email protected]> 1183 * @copyright 2013-2023 Photon Storm Ltd. 1184 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1185 */var d=e(13468),g=e(88933),r=e(99325),a=e(20494);r.register("dynamicBitmapText",function(h,n){h===void 0&&(h={});var o=a(h,"font",""),f=a(h,"text",""),u=a(h,"size",!1),v=new d(this.scene,0,0,o,f,u);return n!==void 0&&(h.add=n),g(this.scene,v,h),v})},94145:(l,T,e)=>{/** 1186 * @author Richard Davey <[email protected]> 1187 * @copyright 2013-2023 Photon Storm Ltd. 1188 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1189 */var d=e(13468),g=e(61286);g.register("dynamicBitmapText",function(r,a,h,n,o){return this.displayList.add(new d(this.scene,r,a,h,n,o))})},88899:(l,T,e)=>{/** 1190 * @author Richard Davey <[email protected]> 1191 * @copyright 2013-2023 Photon Storm Ltd. 1192 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1193 */var d=e(72283),g=d,r=d;g=e(16873),r=e(93438),l.exports={renderWebGL:g,renderCanvas:r}},16873:(l,T,e)=>{/** 1194 * @author Richard Davey <[email protected]> 1195 * @copyright 2013-2023 Photon Storm Ltd. 1196 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1197 */var d=e(73329),g=e(69360),r=e(75512),a=new g,h=function(n,o,f,u){var v=o.text,m=v.length;if(m!==0){f.addToRenderList(o);var p=n.pipelines.set(o.pipeline,o),x=d(o,f,u);n.pipelines.preBatch(o);var y=x.sprite,P=x.calc,b=a,E=o.cropWidth>0||o.cropHeight>0;E&&(p.flush(),n.pushScissor(P.tx,P.ty,o.cropWidth*P.scaleX,o.cropHeight*P.scaleY));
1197var M=o.frame,w=M.glTexture,A=o.tintFill,R=r.getTintAppendFloatAlpha(o.tintTopLeft,f.alpha*o._alphaTL),L=r.getTintAppendFloatAlpha(o.tintTopRight,f.alpha*o._alphaTR),O=r.getTintAppendFloatAlpha(o.tintBottomLeft,f.alpha*o._alphaBL),I=r.getTintAppendFloatAlpha(o.tintBottomRight,f.alpha*o._alphaBR),D=p.setGameObject(o),B=0,z=0,X=0,W=0,j=o.letterSpacing,N,Y=0,F=0,G,k=o.scrollX,V=o.scrollY,U=o.fontData,$=U.chars,K=U.lineHeight,J=o.fontSize/U.size,_=0,tt=o._align,st=0,ht=0,lt=o.getTextBounds(!1);o.maxWidth>0&&(v=lt.wrappedText,m=v.length);var nt=o._bounds.lines;tt===1?ht=(nt.longest-nt.lengths[0])/2:tt===2&&(ht=nt.longest-nt.lengths[0]);for(var gt=f.roundPixels,bt=o.displayCallback,Pt=o.callbackData,dt=0;dt<m;dt++){if(X=v.charCodeAt(dt),X===10){st++,tt===1?ht=(nt.longest-nt.lengths[st])/2:tt===2&&(ht=nt.longest-nt.lengths[st]),B=0,z+=K,G=null;continue}if(N=$[X],!!N){Y=N.width,F=N.height;var St=N.xOffset+B-k,Tt=N.yOffset+z-V;if(G!==null){var Vt=N.kerning[W];St+=Vt!==void 0?Vt:0}if(B+=N.xAdvance+j,G=N,W=X,!(Y===0||F===0||X===32)){if(J=o.fontSize/o.fontData.size,_=0,bt){Pt.color=0,Pt.tint.topLeft=R,Pt.tint.topRight=L,Pt.tint.bottomLeft=O,Pt.tint.bottomRight=I,Pt.index=dt,Pt.charCode=X,Pt.x=St,Pt.y=Tt,Pt.scale=J,Pt.rotation=_,Pt.data=N.data;var zt=bt(Pt);St=zt.x,Tt=zt.y,J=zt.scale,_=zt.rotation,zt.color?(R=zt.color,L=zt.color,O=zt.color,I=zt.color):(R=zt.tint.topLeft,L=zt.tint.topRight,O=zt.tint.bottomLeft,I=zt.tint.bottomRight),R=r.getTintAppendFloatAlpha(R,f.alpha*o._alphaTL),L=r.getTintAppendFloatAlpha(L,f.alpha*o._alphaTR),O=r.getTintAppendFloatAlpha(O,f.alpha*o._alphaBL),I=r.getTintAppendFloatAlpha(I,f.alpha*o._alphaBR)}St*=J,Tt*=J,St-=o.displayOriginX,Tt-=o.displayOriginY,St+=ht,b.applyITRS(St,Tt,_,J,J),P.multiply(b,y);var be=N.u0,pe=N.v0,Qt=N.u1,Wt=N.v1,me=Y,ze=F,Ke=y.e,ei=y.f,Oi=ze*y.c+y.e,or=ze*y.d+y.f,lr=me*y.a+ze*y.c+y.e,hr=me*y.b+ze*y.d+y.f,ur=me*y.a+y.e,dr=me*y.b+y.f;gt&&(Ke=Math.round(Ke),ei=Math.round(ei),Oi=Math.round(Oi),or=Math.round(or),lr=Math.round(lr),hr=Math.round(hr),ur=Math.round(ur),dr=Math.round(dr)),p.batchQuad(o,Ke,ei,Oi,or,lr,hr,ur,dr,be,pe,Qt,Wt,R,L,O,I,A,w,D)}}}E&&(p.flush(),n.popScissor()),n.pipelines.postBatch(o)}};l.exports=h},44616:(l,T,e)=>{/** 1198 * @author Richard Davey <[email protected]> 1199 * @copyright 2013-2023 Photon Storm Ltd. 1200 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1201 */var d=e(56694),g=e(82897),r=e(64937),a=e(89980),h=e(82173),n=e(68298),o=e(31476),f=e(74118),u=e(84557),v=new d({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.PostPipeline,r.ScrollFactor,r.Texture,r.Tint,r.Transform,r.Visible,u],initialize:function(p,x,y,P,b,E,M){b===void 0&&(b=""),M===void 0&&(M=0),a.call(this,p,"BitmapText"),this.font=P;var w=this.scene.sys.cache.bitmapFont.get(P);w||console.warn("Invalid BitmapText key: "+P),this.fontData=w.data,this._text="",this._fontSize=E||this.fontData.size,this._letterSpacing=0,this._lineSpacing=0,this._align=M,this._bounds=h(),this._dirty=!0,this._maxWidth=0,this.wordWrapCharCode=32,this.charColors=[],this.dropShadowX=0,this.dropShadowY=0,this.dropShadowColor=0,this.dropShadowAlpha=.5,this.fromAtlas=w.fromAtlas,this.setTexture(w.texture,w.frame),this.setPosition(x,y),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(),this.setText(b)},setLeftAlign:function(){return this._align=v.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=v.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=v.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(m){return this._fontSize=m,this._dirty=!0,this},setLetterSpacing:function(m){return m===void 0&&(m=0),this._letterSpacing=m,this._dirty=!0,this},setLineSpacing:function(m){return m===void 0&&(m=0),this.lineSpacing=m,this},setText:function(m){return!m&&m!==0&&(m=""),Array.isArray(m)&&(m=m.join(` 1202`)),m!==this.text&&(this._text=m.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},setDropShadow:function(m,p,x,y){return m===void 0&&(m=0),p===void 0&&(p=0),x===void 0&&(x=0),y===void 0&&(y=.5),this.dropShadowX=m,this.dropShadowY=p,this.dropShadowColor=x,this.dropShadowAlpha=y,this},setCharacterTint:function(m,p,x,y,P,b,E){m===void 0&&(m=0),p===void 0&&(p=1),x===void 0&&(x=!1),y===void 0&&(y=-1),P===void 0&&(P=y,b=y,E=y);var M=this.text.length;p===-1&&(p=M),m<0&&(m=M+m),m=g(m,0,M-1);for(var w=g(m+p,m,M),A=this.charColors,R=m;R<w;R++){var L=A[R];if(y===-1)A[R]=null;else{var O=x?1:0;L?(L.tintEffect=O,L.tintTL=y,L.tintTR=P,L.tintBL=b,L.tintBR=E):A[R]={tintEffect:O,tintTL:y,tintTR:P,tintBL:b,tintBR:E}}}return this},setWordTint:function(m,p,x,y,P,b,E){p===void 0&&(p=1);for(var M=this.getTextBounds(),w=M.words,A=typeof m=="number",R=0,L=0;L<w.length;L++){var O=w[L];if((A&&L===m||!A&&O.word===m)&&(this.setCharacterTint(O.i,O.word.length,x,y,P,b,E),R++,R===p))return this}return this},getTextBounds:function(m){var p=this._bounds;return(this._dirty||m||this.scaleX!==p.scaleX||this.scaleY!==p.scaleY)&&(h(this,m,!0,p),this._dirty=!1),p},getCharacterAt:function(m,p,x){for(var y=this.getLocalPoint(m,p,null,x),P=this.getTextBounds(),b=P.characters,E=new f,M=0;M<b.length;M++){var w=b[M];if(E.setTo(w.x,w.t,w.r-w.x,w.b),E.contains(y.x,y.y))return w}return null},updateDisplayOrigin:function(){return this._dirty=!0,this.getTextBounds(!1),this},setFont:function(m,p,x){if(p===void 0&&(p=this._fontSize),x===void 0&&(x=this._align),m!==this.font){var y=this.scene.sys.cache.bitmapFont.get(m);y&&(this.font=m,this.fontData=y.data,this._fontSize=p,this._align=x,this.fromAtlas=y.fromAtlas===!0,this.setTexture(y.texture,y.frame),h(this,!1,
1202!0,this._bounds))}return this},setMaxWidth:function(m,p){return this._maxWidth=m,this._dirty=!0,p!==void 0&&(this.wordWrapCharCode=p),this},align:{set:function(m){this._align=m,this._dirty=!0},get:function(){return this._align}},text:{set:function(m){this.setText(m)},get:function(){return this._text}},fontSize:{set:function(m){this._fontSize=m,this._dirty=!0},get:function(){return this._fontSize}},letterSpacing:{set:function(m){this._letterSpacing=m,this._dirty=!0},get:function(){return this._letterSpacing}},lineSpacing:{set:function(m){this._lineSpacing=m,this._dirty=!0},get:function(){return this._lineSpacing}},maxWidth:{set:function(m){this._maxWidth=m,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 m=r.ToJSON(this),p={font:this.font,text:this.text,fontSize:this.fontSize,letterSpacing:this.letterSpacing,lineSpacing:this.lineSpacing,align:this.align};return m.data=p,m},preDestroy:function(){this.charColors.length=0,this._bounds=null,this.fontData=null}});v.ALIGN_LEFT=0,v.ALIGN_CENTER=1,v.ALIGN_RIGHT=2,v.ParseFromAtlas=n,v.ParseXMLBitmapFont=o,l.exports=v},97545:(l,T,e)=>{/** 1203 * @author Richard Davey <[email protected]> 1204 * @copyright 2013-2023 Photon Storm Ltd. 1205 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1206 */var d=e(49584),g=function(r,a,h,n){var o=a._text,f=o.length,u=r.currentContext;if(!(f===0||!d(r,u,a,h,n))){h.addToRenderList(a);var v=a.fromAtlas?a.frame:a.texture.frames.__BASE,m=a.fontData.chars,p=a.fontData.lineHeight,x=a._letterSpacing,y=a._lineSpacing,P=0,b=0,E=0,M=null,w=0,A=0,R=0,L=0,O=0,I=0,D=null,B=0,z=v.source.image,X=v.cutX,W=v.cutY,j=a._fontSize/a.fontData.size,N=a._align,Y=0,F=0,G=a.getTextBounds(!1);a.maxWidth>0&&(o=G.wrappedText,f=o.length);var k=a._bounds.lines;N===1?F=(k.longest-k.lengths[0])/2:N===2&&(F=k.longest-k.lengths[0]),u.translate(-a.displayOriginX,-a.displayOriginY);for(var V=h.roundPixels,U=0;U<f;U++){if(E=o.charCodeAt(U),E===10){Y++,N===1?F=(k.longest-k.lengths[Y])/2:N===2&&(F=k.longest-k.lengths[Y]),P=0,b+=p+y,D=null;continue}if(M=m[E],!!M){if(w=X+M.x,A=W+M.y,R=M.width,L=M.height,O=M.xOffset+P,I=M.yOffset+b,D!==null){var $=M.kerning[B];O+=$!==void 0?$:0}O*=j,I*=j,O+=F,P+=M.xAdvance+x+($!==void 0?$:0),D=M,B=E,!(R===0||L===0||E===32)&&(V&&(O=Math.round(O),I=Math.round(I)),u.save(),u.translate(O,I),u.scale(j,j),u.drawImage(z,w,A,R,L,0,0,R,L),u.restore())}}u.restore()}};l.exports=g},95499:(l,T,e)=>{/** 1207 * @author Richard Davey <[email protected]> 1208 * @copyright 2013-2023 Photon Storm Ltd. 1209 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1210 */var d=e(44616),g=e(88933),r=e(99325),a=e(20494),h=e(10850);r.register("bitmapText",function(n,o){n===void 0&&(n={});var f=h(n,"font",""),u=a(n,"text",""),v=a(n,"size",!1),m=h(n,"align",0),p=new d(this.scene,0,0,f,u,v,m);return o!==void 0&&(n.add=o),g(this.scene,p,n),p})},21797:(l,T,e)=>{/** 1211 * @author Richard Davey <[email protected]> 1212 * @copyright 2013-2023 Photon Storm Ltd. 1213 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1214 */var d=e(44616),g=e(61286);g.register("bitmapText",function(r,a,h,n,o,f){return this.displayList.add(new d(this.scene,r,a,h,n,o,f))})},84557:(l,T,e)=>{/** 1215 * @author Richard Davey <[email protected]> 1216 * @copyright 2013-2023 Photon Storm Ltd. 1217 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1218 */var d=e(72283),g=d,r=d;g=e(26372),r=e(97545),l.exports={renderWebGL:g,renderCanvas:r}},26372:(l,T,e)=>{/** 1219 * @author Richard Davey <[email protected]> 1220 * @copyright 2013-2023 Photon Storm Ltd. 1221 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1222 */var d=e(8810),g=e(73329),r=e(75512),a=function(h,n,o,f){var u=n._text,v=u.length;if(v!==0){o.addToRenderList(n);var m=h.pipelines.set(n.pipeline,n),p=g(n,o,f).calc;h.pipelines.preBatch(n);var x=o.roundPixels,y=o.alpha,P=n.charColors,b=n.tintFill,E=r.getTintAppendFloatAlpha,M=E(n.tintTopLeft,y*n._alphaTL),w=E(n.tintTopRight,y*n._alphaTR),A=E(n.tintBottomLeft,y*n._alphaBL),R=E(n.tintBottomRight,y*n._alphaBR),L=n.frame.glTexture,O=m.setGameObject(n),I=n.getTextBounds(!1),D,B,z,X=I.characters,W=n.dropShadowX,j=n.dropShadowY,N=W!==0||j!==0;if(N){var Y=n.dropShadowColor,F=n.dropShadowAlpha,G=E(Y,y*F*n._alphaTL),k=E(Y,y*F*n._alphaTR),V=E(Y,y*F*n._alphaBL),U=E(Y,y*F*n._alphaBR);for(D=0;D<X.length;D++)B=X[D],z=B.glyph,!(B.code===32||z.width===0||z.height===0)&&d(m,n,B,z,W,j,p,x,G,k,V,U,1,L,O)}for(D=0;D<X.length;D++)if(B=X[D],z=B.glyph,!(B.code===32||z.width===0||z.height===0))if(P[B.i]){var $=P[B.i],K=$.tintEffect,J=E($.tintTL,y*n._alphaTL),_=E($.tintTR,y*n._alphaTR),tt=E($.tintBL,y*n._alphaBL),st=E($.tintBR,y*n._alphaBR);d(m,n,B,z,0,0,p,x,J,_,tt,st,K,L,O)}else d(m,n,B,z,0,0,p,x,M,w,A,R,b,L,O);h.pipelines.postBatch(n)}};l.exports=a},52816:(l,T,e)=>{/** 1223 * @author Richard Davey <[email protected]> 1224 * @copyright 2013-2023 Photon Storm Ltd. 1225 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1226 */var d=e(92246),g=e(41664),r=e(56694),a=e(64937),h=e(82047),n=e(89980),o=e(71207),f=new r({Extends:n,Mixins:[a.Alpha,a.BlendMode,a.Depth,a.Mask,a.Pipeline,a.PostPipeline,a.ScrollFactor,a.Size,a.Texture,a.Transform,a.Visible,d],initialize:function(v,m,p,x,y){n.call(this,v,"Blitter"),this.setTexture(x,y),this.setPosition(m,p),this.initPipeline(),this.initPostPipeline(),this.children=new o,this.renderList=[],this.dirty=!1},create:function(u,v,m,p,x){p===void 0&&(p=!0),x===void 0&&(x=this.children.length),m===void 0?m=this.frame:m instanceof h||(m=this.texture.get(m));var y=new g(this,u,v,m,p);return this.children.addAt(y,x,!1),this.dirty=!0,y},createFromCallback:function(u,v,m,p){for(var x=this.createMultiple(v,m,p),y=0;y<x.length;y++){var P=x[y];u.call(this,P,y)}return x},createMultiple:function(u,v,m){v===void 0&&(v=this.frame.name),m===void 0&&(m=!0),Array.isArray(v)||(v=[v]);var p=[],x=this;return v.forEach(function(y){for(var P=0;P<u;P++)p.push(x.create(0,0,y,m))}),p},childCanRender:function(u){return u.visible&&u.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=[]}});l.exports=f},33177:l=>{/** 1227 * @author Richard Davey <[email protected]> 1228 * @copyright 2013-2023 Photon Storm Ltd. 1229 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1230 */var T=function(e,d,g,r){var a=d.getRenderList();if(a.length!==0){var h=e.currentContext,n=g.alpha*d.alpha;if(n!==0){g.addToRenderList(d),h.globalCompositeOperation=e.blendModes[d.blendMode],h.imageSmoothingEnabled=!d.frame.source.scaleMode;var o=d.x-g.scrollX*d.scrollFactorX,f=d.y-g.scrollY*d.scrollFactorY;h.save(),r&&r.copyToContext(h);for(var u=g.roundPixels,v=0;v<a.length;v++){var m=a[v],p=m.flipX||m.flipY,x=m.frame,y=x.canvasData,P=x.x,b=x.y,E=1,M=1,w=m.alpha*n;w!==0&&(h.globalAlpha=w,p?(m.flipX&&(E=-1,P-=y.width),m.flipY&&(M=-1,b-=y.height),y.width>0&&y.height>0&&(h.save(),h.translate(m.x+o,m.y+f),h.scale(E,M),h.drawImage(x.source.image,y.x,y.y,y.width,y.height,P,b,y.width,y.height),h.restore(
1230))):(u&&(P=Math.round(P),b=Math.round(b)),y.width>0&&y.height>0&&h.drawImage(x.source.image,y.x,y.y,y.width,y.height,P+m.x+o,b+m.y+f,y.width,y.height)))}h.restore()}}};l.exports=T},68452:(l,T,e)=>{/** 1231 * @author Richard Davey <[email protected]> 1232 * @copyright 2013-2023 Photon Storm Ltd. 1233 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1234 */var d=e(52816),g=e(88933),r=e(99325),a=e(20494);r.register("blitter",function(h,n){h===void 0&&(h={});var o=a(h,"key",null),f=a(h,"frame",null),u=new d(this.scene,0,0,o,f);return n!==void 0&&(h.add=n),g(this.scene,u,h),u})},38906:(l,T,e)=>{/** 1235 * @author Richard Davey <[email protected]> 1236 * @copyright 2013-2023 Photon Storm Ltd. 1237 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1238 */var d=e(52816),g=e(61286);g.register("blitter",function(r,a,h,n){return this.displayList.add(new d(this.scene,r,a,h,n))})},92246:(l,T,e)=>{/** 1239 * @author Richard Davey <[email protected]> 1240 * @copyright 2013-2023 Photon Storm Ltd. 1241 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1242 */var d=e(72283),g=d,r=d;g=e(89165),r=e(33177),l.exports={renderWebGL:g,renderCanvas:r}},89165:(l,T,e)=>{/** 1243 * @author Richard Davey <[email protected]> 1244 * @copyright 2013-2023 Photon Storm Ltd. 1245 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1246 */var d=e(69360),g=e(75512),r=new d,a=function(h,n,o,f){var u=n.getRenderList(),v=o.alpha*n.alpha;if(!(u.length===0||v===0)){o.addToRenderList(n);var m=h.pipelines.set(this.pipeline,n),p=o.scrollX*n.scrollFactorX,x=o.scrollY*n.scrollFactorY,y=r.copyFrom(o.matrix);f&&(y.multiplyWithOffset(f,-p,-x),p=0,x=0);var P=n.x-p,b=n.y-x,E=-1,M=!1,w=o.roundPixels;h.pipelines.preBatch(n);for(var A=0;A<u.length;A++){var R=u[A],L=R.frame,O=R.alpha*v;if(O!==0){var I=L.width,D=L.height,B=P+R.x+L.x,z=b+R.y+L.y;R.flipX&&(I*=-1,B+=L.width),R.flipY&&(D*=-1,z+=L.height);var X=y.setQuad(B,z,B+I,z+D,w),W=g.getTintAppendFloatAlpha(R.tint,O);if(L.sourceIndex!==E){var j=m.setGameObject(n,L);E=L.sourceIndex}m.batchQuad(n,X[0],X[1],X[2],X[3],X[4],X[5],X[6],X[7],L.u0,L.v0,L.u1,L.v1,W,W,W,W,M,L.glTexture,j)&&(E=-1)}}h.pipelines.postBatch(n)}};l.exports=a},41664:(l,T,e)=>{/** 1247 * @author Richard Davey <[email protected]> 1248 * @copyright 2013-2023 Photon Storm Ltd. 1249 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1250 */var d=e(56694),g=e(82047),r=new d({initialize:function(h,n,o,f,u){this.parent=h,this.x=n,this.y=o,this.frame=f,this.data={},this.tint=16777215,this._visible=u,this._alpha=1,this.flipX=!1,this.flipY=!1,this.hasTransformComponent=!0},setFrame:function(a){return a===void 0?this.frame=this.parent.frame:a instanceof g&&a.texture===this.parent.texture?this.frame=a:this.frame=this.parent.texture.get(a),this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this},reset:function(a,h,n){return this.x=a,this.y=h,this.flipX=!1,this.flipY=!1,this._alpha=1,this._visible=!0,this.parent.dirty=!0,n&&this.setFrame
1250(n),this},setPosition:function(a,h){return this.x=a,this.y=h,this},setFlipX:function(a){return this.flipX=a,this},setFlipY:function(a){return this.flipY=a,this},setFlip:function(a,h){return this.flipX=a,this.flipY=h,this},setVisible:function(a){return this.visible=a,this},setAlpha:function(a){return this.alpha=a,this},setTint:function(a){return this.tint=a,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(a){this.parent.dirty|=this._visible!==a,this._visible=a}},alpha:{get:function(){return this._alpha},set:function(a){this.parent.dirty|=this._alpha>0!=a>0,this._alpha=a}}});l.exports=r},97123:(l,T,e)=>{/** 1251 * @author Richard Davey <[email protected]> 1252 * @copyright 2013-2023 Photon Storm Ltd. 1253 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1254 */var d=e(82897),g=2,r={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(a,h,n,o){return a===void 0&&(a=1),h===void 0?this.alpha=a:(this._alphaTL=d(a,0,1),this._alphaTR=d(h,0,1),this._alphaBL=d(n,0,1),this._alphaBR=d(o,0,1)),this},alpha:{get:function(){return this._alpha},set:function(a){var h=d(a,0,1);this._alpha=h,this._alphaTL=h,this._alphaTR=h,this._alphaBL=h,this._alphaBR=h,h===0?this.renderFlags&=~g:this.renderFlags|=g}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(a){var h=d(a,0,1);this._alphaTL=h,h!==0&&(this.renderFlags|=g)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(a){var h=d(a,0,1);this._alphaTR=h,h!==0&&(this.renderFlags|=g)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(a){var h=d(a,0,1);this._alphaBL=h,h!==0&&(this.renderFlags|=g)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(a){var h=d(a,0,1);this._alphaBR=h,h!==0&&(this.renderFlags|=g)}}};l.exports=r},15720:(l,T,e)=>{/** 1255 * @author Richard Davey <[email protected]> 1256 * @copyright 2013-2023 Photon Storm Ltd. 1257 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1258 */var d=e(82897),g=2,r={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(a){return a===void 0&&(a=1),this.alpha=a,this},alpha:{get:function(){return this._alpha},set:function(a){var h=d(a,0,1);this._alpha=h,h===0?this.renderFlags&=~g:this.renderFlags|=g}}};l.exports=r},69732:(l,T,e)=>{/** 1259 * @author Richard Davey <[email protected]> 1260 * @copyright 2013-2023 Photon Storm Ltd. 1261 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1262 */var d=e(95723),g={_blendMode:d.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(r){typeof r=="string"&&(r=d[r]),r|=0,r>=-1&&(this._blendMode=r)}},setBlendMode:function(r){return this.blendMode=r,this}};l.exports=g},28284:l=>{/** 1263 * @author Richard Davey <[email protected]> 1264 * @copyright 2013-2023 Photon Storm Ltd. 1265 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1266 */var T={width:0,height:0,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}},setSize:function(e,d){return this.width=e,this.height=d,this},setDisplaySize:function(e,d){return this.displayWidth=e,this.displayHeight=d,this}};l.exports=T},85293:l=>{/** 1267 * @author Richard Davey <[email protected]> 1268 * @copyright 2013-2023 Photon Storm Ltd. 1269 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1270 */var T={texture:null,frame:null,isCropped:!1,setCrop:function(e,d,g,r){if(e===void 0)this.isCropped=!1;else if(this.frame){if(typeof e=="number")this.frame.setCropUVs(this._crop,e,d,g,r,this.flipX,this.flipY);else{var a=e;this.frame.setCropUVs(this._crop,a.x,a.y,a.width,a.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,
1270ch:0}}};l.exports=T},14975:l=>{/** 1271 * @author Richard Davey <[email protected]> 1272 * @copyright 2013-2023 Photon Storm Ltd. 1273 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1274 */var T={_depth:0,depth:{get:function(){return this._depth},set:function(e){this.displayList&&this.displayList.queueDepthSort(),this._depth=e}},setDepth:function(e){return e===void 0&&(e=0),this.depth=e,this}};l.exports=T},88677:(l,T,e)=>{/** 1275 * @author Richard Davey <[email protected]> 1276 * @copyright 2013-2023 Photon Storm Ltd. 1277 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1278 */var d=e(56694),g=e(96910),r=e(72677),a=new d({initialize:function(n,o){this.gameObject=n,this.isPost=o,this.enabled=!1,this.list=[],this.padding=0},setPadding:function(h){return h===void 0&&(h=0),this.padding=h,this.gameObject},onFXCopy:function(){},onFX:function(){},enable:function(h){if(!this.isPost){var n=this.gameObject.scene.sys.renderer;n&&n.pipelines?(this.gameObject.pipeline=n.pipelines.FX_PIPELINE,h!==void 0&&(this.padding=h),this.enabled=!0):this.enabled=!1}},clear:function(){if(this.isPost)this.gameObject.resetPostPipeline(!0);else{for(var h=this.list,n=0;n<h.length;n++)h[n].destroy();this.list=[]}return this.enabled=!1,this.gameObject},remove:function(h){var n;if(this.isPost){var o=this.gameObject.getPostPipeline(String(h.type));for(Array.isArray(o)||(o=[o]),n=0;n<o.length;n++){var f=o[n];if(f.controller===h){this.gameObject.removePostPipeline(f),h.destroy();break}}}else{var u=this.list;for(n=0;n<u.length;n++)u[n]===h&&(r(u,n),h.destroy())}return this.gameObject},disable:function(h){return h===void 0&&(h=!1),this.isPost||this.gameObject.resetPipeline(),this.enabled=!1,h&&this.clear(),this.gameObject},add:function(h,n){if(this.isPost){var o=String(h.type);this.gameObject.setPostPipeline(o,n);var f=this.gameObject.getPostPipeline(o);if(f)return Array.isArray(f)&&(f=f.pop()),f.controller=h,h}else return this.enabled||this.enable(),this.list.push(h),h},addGlow:function(h,n,o,f,u,v){return this.add(new g.Glow(this.gameObject,h,n,o,f),{quality:u,distance:v})},addShadow:function(h,n,o,f,u,v,m){return this.add(new g.Shadow(this.gameObject,h,n,o,f,u,v,m))},addPixelate:function(h){return this.add(new g.Pixelate(this.gameObject,h))},addVignette:function(h,n,o,f){return this.add(new g.Vignette(this.gameObject,h,n,o,f))},addShine:function(h,n,o,f){return this.add(new g.Shine(this.gameObject,h,n,o,f))},addBlur:function(h,n,o,f,u,v){return this.add(new g.Blur(this.gameObject,h,n,o,f,u,v))},addGradient:function(h,n,o,f,u,v,m,p){return this.add(new g.Gradient(this.gameObject,h,n,o,f,u,v,m,p))},addBloom:function(h,n,o,f,u,v){return this.add(new g.Bloom(this.gameObject,h,n,o,f,u,v))},addColorMatrix:function(){return this.add(new g.ColorMatrix(this.gameObject))},addCircle:function(h,n,o,f,u){return this.add(new g.Circle(this.gameObject,h,n,o,f,u))},addBarrel:function(h){return this.add(new g.Barrel(this.gameObject,h))},addDisplacement:function(h,n,o){return this.add(new g.Displacement(this.gameObject,h,n,o))},addWipe:function(h,n,o){return this.add(new g.Wipe(this.gameObject,h,n,o))},addReveal:function(h,n,o){return this.add(new g.Wipe(this.gameObject,h,n,o,!0))},addBokeh:function(h,n,o){return this.add(new g.Bokeh(this.gameObject,h,n,o))},addTiltShift:function(h,n,o,f,u,v){return this.add(new g.Bokeh(this.gameObject,h,n,o,!0,f,u,v))},destroy:function(){this.clear(),this.gameObject=null}});l.exports=a},92972:l=>{/** 1279 * @author Richard Davey <[email protected]> 1280 * @copyright 2013-2023 Photon Storm Ltd. 1281 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1282 */var T={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(e){return this.flipX=e,this},setFlipY:function(e){return this.flipY=e,this},setFlip:function(e,d){return this.flipX=e,this.flipY=d,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}};l.exports=T},80693:(l,T,e)=>{/** 1283 * @author Richard Davey <[email protected]> 1284 * @copyright 2013-2023 Photon Storm Ltd. 1285 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1286 */var d=e(74118),g=e(2386),r=e(93736),a={prepareBoundsOutput:function(h,n){if(n===void 0&&(n=!1),this.rotation!==0&&g(h,this.x,this.y,this.rotation),n&&this.parentContainer){var o=this.parentContainer.getBoundsTransformMatrix();o.transformPoint(h.x,h.y,h)}return h},getCenter:function(h,n){return h===void 0&&(h=new r),h.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,h.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(h,n)},getTopLeft:function(h,n){return h||(h=new r),h.x=this.x-this.displayWidth*this.originX,h.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(h,n)},getTopCenter:function(h,n){return h||(h=new r),h.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,h.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(h,n)},getTopRight:function(h,n){return h||(h=new r),h.x=this.x-this.displayWidth*this.originX+this.displayWidth,h.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(h,n)},getLeftCenter:function(h,n){return h||(h=new r),h.x=this.x-this.displayWidth*this.originX,h.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(h,n)},getRightCenter:function(h,n){return h||(h=new r),h.x=this.x-this.displayWidth*this.originX+this.displayWidth,h.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(h,n)},getBottomLeft:function(h,n){return h||(h=new r),h.x=this.x-this.displayWidth*this.originX,h.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(h,n)},getBottomCenter:function(h,n){return h||(h=new r),h.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,h.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(h,n)},getBottomRight:function(h,n){return h||(h=new r),h.x=this.x-this.displayWidth*this.originX+this.displayWidth,h.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(h,n)},getBounds:function(h){h===void 0&&(h=new d);var n,o,f,u,v,m,p,x;if(this.parentContainer){var y=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(h),y.transformPoint(h.x,h.y,h),n=h.x,o=h.y,this.getTopRight(h),y.transformPoint(h.x,h.y,h),f=h.x,u=h.y,this.getBottomLeft(h),y.transformPoint(h.x,h.y,h),v=h.x,m=h.y,this.getBottomRight(h),y.transformPoint(h.x,h.y,h),p=h.x,x=h.y}else this.getTopLeft(h),n=h.x,o=h.y,this.getTopRight(h),f=h.x,u=h.y,this.getBottomLeft(h),v=h.x,m=h.y,this.getBottomRight(h),p=h.x,x=h.y;return h.x=Math.min(n,f,v,p),h.y=Math.min(o,u,m,x),h.width=Math.max(n,f,v,p)-h.x,h.height=Math.max(o,u,m,x)-h.y,h}};l.exports=a},39171:(l,T,e)=>{/** 1287 * @author Richard Davey <[email protected]> 1288 * @copyright 2013-2023 Photon Storm Ltd. 1289 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1290 */var d=e(76756),g=e(63037),r={mask:null,setMask:function(a){return this.mask=a,this},clearMask:function(a){return a===void 0&&(a=!1),a&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(a,h,n,o,f){return a===void 0&&(this.texture||this.shader||this.geom)&&(a=this),new d(this.scene,a,h,n,o,f)}
1290,createGeometryMask:function(a){return a===void 0&&(this.type==="Graphics"||this.geom)&&(a=this),new g(this.scene,a)}};l.exports=r},28072:l=>{/** 1291 * @author Richard Davey <[email protected]> 1292 * @copyright 2013-2023 Photon Storm Ltd. 1293 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1294 */var T={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(e){this._displayOriginX=e,this.originX=e/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(e){this._displayOriginY=e,this.originY=e/this.height}},setOrigin:function(e,d){return e===void 0&&(e=.5),d===void 0&&(d=e),this.originX=e,this.originY=d,this.updateDisplayOrigin()},setOriginFromFrame:function(){return!this.frame||!this.frame.customPivot?this.setOrigin():(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin())},setDisplayOrigin:function(e,d){return e===void 0&&(e=0),d===void 0&&(d=e),this.displayOriginX=e,this.displayOriginY=d,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};l.exports=T},54211:(l,T,e)=>{/** 1295 * @author Richard Davey <[email protected]> 1296 * @copyright 2013-2023 Photon Storm Ltd. 1297 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1298 */var d=e(75606),g=e(63130),r=e(10850),a=e(55303),h=e(93736),n={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:a.PLAYING_FORWARD,setPath:function(o,f){f===void 0&&(f=this.pathConfig);var u=this.pathTween;return u&&u.isPlaying()&&u.stop(),this.path=o,f&&this.startFollow(f),this},setRotateToPath:function(o,f){return f===void 0&&(f=0),this.rotateToPath=o,this.pathRotationOffset=f,this},isFollowing:function(){var o=this.pathTween;return o&&o.isPlaying()},startFollow:function(o,f){o===void 0&&(o={}),f===void 0&&(f=0);var u=this.pathTween;u&&u.isPlaying()&&u.stop(),typeof o=="number"&&(o={duration:o}),o.from=r(o,"from",0),o.to=r(o,"to",1);var v=g(o,"positionOnPath",!1);this.rotateToPath=g(o,"rotateToPath",!1),this.pathRotationOffset=r(o,"rotationOffset",0);var m=r(o,"startAt",f);if(m&&(o.onStart=function(x){var y=x.data[0];y.progress=m,y.elapsed=y.duration*m;var P=y.ease(y.progress);y.current=y.start+(y.end-y.start)*P,y.setTargetValue()}),this.pathOffset||(this.pathOffset=new h(this.x,this.y)),this.pathVector||(this.pathVector=new h),this.pathDelta||(this.pathDelta=new h),this.pathDelta.reset(),o.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(o),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=a.PLAYING_FORWARD,this.rotateToPath){var p=this.path.getPoint(.1);this.rotation=Math.atan2(p.y-this.y,p.x-this.x)+d(this.pathRotationOffset)}return this.pathConfig=o,this},pauseFollow:function(){var o=this.pathTween;return o&&o.isPlaying()&&o.pause(),this},resumeFollow:function(){var o=this.pathTween;return o&&o.isPaused()&&o.resume(),this},stopFollow:function(){var o=this.pathTween;return o&&o.isPlaying()&&o.stop(),this},pathUpdate:function(){var o=this.pathTween;if(o){var f=o.data[0],u=this.pathDelta,v=this.pathVector;if(u.copy(v).negate(),f.state===a.COMPLETE){this.path.getPoint(f.end,v),u.add(v),v.add(this.pathOffset),this.setPosition(v.x,v.y);return}else if(f.state!==a.PLAYING_FORWARD&&f.state!==a.PLAYING_BACKWARD)return;this.path.getPoint(o.getValue(),v),u.add(v),v.add(this.pathOffset);var m=this.x,p=this.y;this.setPosition(v.x,v.y);var x=this.x-m,y=this.y-p;if(x===0&&y===0)return;if(f.state!==this._prevDirection){this._prevDirection=f.state;return}this.rotateToPath&&(this.rotation=Math.atan2(y,x)+d(this.pathRotationOffset))}}};l.exports=n},58210:(l,T,e)=>{/** 1299 * @author Richard Davey <[email protected]> 1300 * @copyright 2013-2023 Photon Storm Ltd. 1301 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1302 */var d=e(28699),g={defaultPipeline:null,pipeline:null,pipelineData:null,initPipeline:function(r){this.pipelineData={};var a=this.scene.sys.renderer;if(!a)return!1;var h=a.pipelines;if(h){r===void 0&&(r=h.default);var n=h.get(r);if(n)return this.defaultPipeline=n,this.pipeline=n,!0}return!1},setPipeline:function(r,a,h){var n=this.scene.sys.renderer;if(!n)return this;var o=n.pipelines;if(o){var f=o.get(r);f&&(this.pipeline=f),a&&(this.pipelineData=h?d(a):a)}return this},setPipelineData:function(r,a){var h=this.pipelineData;return a===void 0?delete h[r]:h[r]=a,this},resetPipeline:function(r){return r===void 0&&(r=!1),this.pipeline=this.defaultPipeline,r&&(this.pipelineData={}),this.pipeline!==null},getPipelineName:function(){return this.pipeline.name}};l.exports=g},44086:(l,T,e)=>{/** 1303 * @author Richard Davey <[email protected]> 1304 * @copyright 2013-2023 Photon Storm Ltd. 1305 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1306 */var d=e(28699),g=e(88677),r=e(72677),a={hasPostPipeline:!1,postPipelines:null,postPipelineData:null,preFX:null,postFX:null,initPostPipeline:function(h){this.postPipelines=[],this.postPipelineData={},this.postFX=new g(this,!0),h&&(this.preFX=new g(this,!1))},setPostPipeline:function(h,n,o){var f=this.scene.sys.renderer;if(!f)return this;var u=f.pipelines;if(u){Array.isArray(h)||(h=[h]);for(var v=0;v<h.length;v++){var m=u.getPostPipeline(h[v],this,n);m&&this.postPipelines.push(m)}n&&(this.postPipelineData=o?d(n):n)}return this.hasPostPipeline=this.postPipelines.length>0,this},setPostPipelineData:function(h,n){var o=this.postPipelineData;return n===void 0?delete o[h]:o[h]=n,this},getPostPipeline:function(h){for(var n=typeof h=="string",o=this.postPipelines,f=[],u=0;u<o.length;u++){var v=o[u];(n&&v.name===h||!n&&v instanceof h)&&f.push(v)}return f.length===1?f[0]:f},resetPostPipeline:function(h){h===void 0&&(h=!1);for(var n=this.postPipelines,o=0;o<n.length;o++)n[o].destroy();this.postPipelines=[],this.hasPostPipeline=!1,h&&(this.postPipelineData={})},removePostPipeline:function(h){for(var n=typeof h=="string",o=this.postPipelines,f=o.length-1;f>=0;f--){var u=o[f];(n&&u.name===h||!n&&u===h)&&(u.destroy(),r(o,f))}return this.hasPostPipeline=this.postPipelines.length>0,this},clearFX:function(){return this.preFX&&this.preFX.clear(),this.postFX&&this.postFX.clear(),this}};l.exports=a},45900:l=>{/** 1307 * @author Richard Davey <[email protected]> 1308 * @copyright 2013-2023 Photon Storm Ltd. 1309 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1310 */var T={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(e,d){return d===void 0&&(d=e),this.scrollFactorX=e,this.scrollFactorY=d,this}};l.exports=T},31654:l=>{/** 1311 * @author Richard Davey <[email protected]> 1312 * @copyright 2013-2023 Photon Storm Ltd. 1313 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1314 */var T={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(e){this.scaleX=e/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(e){this.scaleY=e/this.frame.realHeight}},setSizeToFrame:function(e){e||(e=this.frame),this.width=e.realWidth,this.height=e.realHeight;var d=this.input;return d&&!d.customHitArea&&(d.hitArea.width=this.width,d.hitArea.height=this.height),this},setSize:function(e,d){return this.width=e,this.height=d,this},setDisplaySize:function(e,d){return this.displayWidth=e,this.displayHeight=d,this}};l.exports=T},82081:(l,T,e)=>{/** 1315 * @author Richard Davey <[email protected]> 1316 * @copyright 2013-2023 Photon Storm Ltd. 1317 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1318 */var d=e(82047),g=8,r={texture:null,frame:null,isCropped:!1,setTexture:function(a,h){return this.texture=this.scene.sys.textures.get(a),this.setFrame
1318(h)},setFrame:function(a,h,n){return h===void 0&&(h=!0),n===void 0&&(n=!0),a instanceof d?(this.texture=this.scene.sys.textures.get(a.texture.key),this.frame=a):this.frame=this.texture.get(a),!this.frame.cutWidth||!this.frame.cutHeight?this.renderFlags&=~g:this.renderFlags|=g,this._sizeComponent&&h&&this.setSizeToFrame(),this._originComponent&&n&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};l.exports=r},21850:(l,T,e)=>{/** 1319 * @author Richard Davey <[email protected]> 1320 * @copyright 2013-2023 Photon Storm Ltd. 1321 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1322 */var d=e(82047),g=8,r={texture:null,frame:null,isCropped:!1,setCrop:function(a,h,n,o){if(a===void 0)this.isCropped=!1;else if(this.frame){if(typeof a=="number")this.frame.setCropUVs(this._crop,a,h,n,o,this.flipX,this.flipY);else{var f=a;this.frame.setCropUVs(this._crop,f.x,f.y,f.width,f.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(a,h){return this.texture=this.scene.sys.textures.get(a),this.setFrame
1322(h)},setFrame:function(a,h,n){return h===void 0&&(h=!0),n===void 0&&(n=!0),a instanceof d?(this.texture=this.scene.sys.textures.get(a.texture.key),this.frame=a):this.frame=this.texture.get(a),!this.frame.cutWidth||!this.frame.cutHeight?this.renderFlags&=~g:this.renderFlags|=g,this._sizeComponent&&h&&this.setSizeToFrame(),this._originComponent&&n&&(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}}};l.exports=r},58072:l=>{/** 1323 * @author Richard Davey <[email protected]> 1324 * @copyright 2013-2023 Photon Storm Ltd. 1325 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1326 */var T={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(e,d,g,r){return e===void 0&&(e=16777215),d===void 0&&(d=e,g=e,r=e),this.tintTopLeft=e,this.tintTopRight=d,this.tintBottomLeft=g,this.tintBottomRight=r,this.tintFill=!1,this},setTintFill:function(e,d,g,r){return this.setTint(e,d,g,r),this.tintFill=!0,this},tint:{set:function(e){this.setTint(e,e,e,e)}},isTinted:{get:function(){var e=16777215;return this.tintFill||this.tintTopLeft!==e||this.tintTopRight!==e||this.tintBottomLeft!==e||this.tintBottomRight!==e}}};l.exports=T},48129:l=>{/** 1327 * @author Richard Davey <[email protected]> 1328 * @copyright 2013-2023 Photon Storm Ltd. 1329 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1330 */var T=function(e){var d={name:e.name,type:e.type,x:e.x,y:e.y,depth:e.depth,scale:{x:e.scaleX,y:e.scaleY},origin:{x:e.originX,y:e.originY},flipX:e.flipX,flipY:e.flipY,rotation:e.rotation,alpha:e.alpha,visible:e.visible,blendMode:e.blendMode,textureKey:"",frameKey:"",data:{}};return e.texture&&(d.textureKey=e.texture.key,d.frameKey=e.frame.name),d};l.exports=T},56584:(l,T,e)=>{/** 1331 * @author Richard Davey <[email protected]> 1332 * @copyright 2013-2023 Photon Storm Ltd. 1333 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1334 */var d=e(83392),g=e(69360),r=e(64462),a=e(35786),h=e(62138),n=e(93736),o=4,f={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(u){this._scaleX=u,this._scaleY=u,u===0?this.renderFlags&=~o:this.renderFlags|=o}},scaleX:{get:function(){return this._scaleX},set:function(u){this._scaleX=u,u===0?this.renderFlags&=~o:this._scaleY!==0&&(this.renderFlags|=o)}},scaleY:{get:function(){return this._scaleY},set:function(u){this._scaleY=u,u===0?this.renderFlags&=~o:this._scaleX!==0&&(this.renderFlags|=o)}},angle:{get:function(){return h(this._rotation*d.RAD_TO_DEG)},set:function(u){this.rotation=h(u)*d.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(u){this._rotation=a(u)}},setPosition:function(u,v,m,p){return u===void 0&&(u=0),v===void 0&&(v=u),m===void 0&&(m=0),p===void 0&&(p=0),this.x=u,this.y=v,this.z=m,this.w=p,this},copyPosition:function(u){return u.x!==void 0&&(this.x=u.x),u.y!==void 0&&(this.y=u.y),u.z!==void 0&&(this.z=u.z),u.w!==void 0&&(this.w=u.w),this},setRandomPosition:function(u,v,m,p){return u===void 0&&(u=0),v===void 0&&(v=0),m===void 0&&(m=this.scene.sys.scale.width),p===void 0&&(p=this.scene.sys.scale.height),this.x=u+Math.random()*m,this.y=v+Math.random()*p,this},setRotation:function(u){return u===void 0&&(u=0),this.rotation=u,this},setAngle:function(u){return u===void 0&&(u=0),this.angle=u,this},setScale:function(u,v){return u===void 0&&(u=1),v===void 0&&(v=u),this.scaleX=u,this.scaleY=v,this},setX:function(u){return u===void 0&&(u=0),this.x=u,this},setY:function(u){return u===void 0&&(u=0),this.y=u,this},setZ:function(u){return u===void 0&&(u=0),this.z=u,this},setW:function(u){return u===void 0&&(u=0),this.w=u,this},getLocalTransformMatrix:function(u){return u===void 0&&(u=new g),u.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(u,v){u===void 0&&(u=new g);var m=this.parentContainer;if(!m)return this.getLocalTransformMatrix(u);for(v||(v=new g),u.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);m;)v.applyITRS(m.x,m.y,m._rotation,m._scaleX,m._scaleY),v.multiply(u,u),m=m.parentContainer;return u},getLocalPoint:function(u,v,m,p){m||(m=new n),p||(p=this.scene.sys.cameras.main);var x=p.scrollX,y=p.scrollY,P=u+x*this.scrollFactorX-x,b=v+y*this.scrollFactorY-y;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(P,b,m):r(P,b,this.x,this.y,this.rotation,this.scaleX,this.scaleY,m),this._originComponent&&(m.x+=this._displayOriginX,m.y+=this._displayOriginY),m},getParentRotation:function(){for(var u=0,v=this.parentContainer;v;)u+=v.rotation,v=v.parentContainer;return u}};l.exports=f},69360:(l,T,e)=>{/** 1335 * @author Richard Davey <[email protected]> 1336 * @copyright 2013-2023 Photon Storm Ltd. 1337 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1338 */var d=e(56694),g=e(83392),r=e(93736),a=new d({initialize:function(n,o,f,u,v,m){n===void 0&&(n=1),o===void 0&&(o=0),f===void 0&&(f=0),u===void 0&&(u=1),v===void 0&&(v=0),m===void 0&&(m=0),this.matrix=new Float32Array([n,o,f,u,v,m,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(h){this.matrix[0]=h}}
vendor: 4,120 bytes, line 1338
1338,b:{get:function(){return this.matrix[1]},set:function(h){this.matrix[1]=h}},c:{get:function(){return this.matrix[2]},set:function(h){this.matrix[2]=h}},d:{get:function(){return this.matrix[3]},set:function(h){this.matrix[3]=h}},e:{get:function(){return this.matrix[4]},set:function(h){this.matrix[4]=h}},f:{get:function(){return this.matrix[5]},set:function(h){this.matrix[5]=h}},tx:{get:function(){return this.matrix[4]},set:function(h){this.matrix[4]=h}},ty:{get:function(){return this.matrix[5]},set:function(h){this.matrix[5]=h}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var h=this.matrix,n=h[0],o=h[1],f=h[2],u=h[3];return n||o?o>0?Math.acos(n/this.scaleX):-Math.acos(n/this.scaleX):f||u?g.TAU-(u>0?Math.acos(-f/this.scaleY):-Math.acos(f/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 h=this.matrix;return h[0]=1,h[1]=0,h[2]=0,h[3]=1,h[4]=0,h[5]=0,this},translate:function(h,n){var o=this.matrix;return o[4]=o[0]*h+o[2]*n+o[4],o[5]=o[1]*h+o[3]*n+o[5],this},scale:function(h,n){var o=this.matrix;return o[0]*=h,o[1]*=h,o[2]*=n,o[3]*=n,this},rotate:function(h){var n=Math.sin(h),o=Math.cos(h),f=this.matrix,u=f[0],v=f[1],m=f[2],p=f[3];return f[0]=u*o+m*n,f[1]=v*o+p*n,f[2]=u*-n+m*o,f[3]=v*-n+p*o,this},multiply:function(h,n){var o=this.matrix,f=h.matrix,u=o[0],v=o[1],m=o[2],p=o[3],x=o[4],y=o[5],P=f[0],b=f[1],E=f[2],M=f[3],w=f[4],A=f[5],R=n===void 0?o:n.matrix;return R[0]=P*u+b*m,R[1]=P*v+b*p,R[2]=E*u+M*m,R[3]=E*v+M*p,R[4]=w*u+A*m+x,R[5]=w*v+A*p+y,R},multiplyWithOffset:function(h,n,o){var f=this.matrix,u=h.matrix,v=f[0],m=f[1],p=f[2],x=f[3],y=f[4],P=f[5],b=n*v+o*p+y,E=n*m+o*x+P,M=u[0],w=u[1],A=u[2],R=u[3],L=u[4],O=u[5];return f[0]=M*v+w*p,f[1]=M*m+w*x,f[2]=A*v+R*p,f[3]=A*m+R*x,f[4]=L*v+O*p+b,f[5]=L*m+O*x+E,this},transform:function(h,n,o,f,u,v){var m=this.matrix,p=m[0],x=m[1],y=m[2],P=m[3],b=m[4],E=m[5];return m[0]=h*p+n*y,m[1]=h*x+n*P,m[2]=o*p+f*y,m[3]=o*x+f*P,m[4]=u*p+v*y+b,m[5]=u*x+v*P+E,this},transformPoint:function(h,n,o){o===void 0&&(o={x:0,y:0});var f=this.matrix,u=f[0],v=f[1],m=f[2],p=f[3],x=f[4],y=f[5];return o.x=h*u+n*m+x,o.y=h*v+n*p+y,o},invert:function(){var h=this.matrix,n=h[0],o=h[1],f=h[2],u=h[3],v=h[4],m=h[5],p=n*u-o*f;return h[0]=u/p,h[1]=-o/p,h[2]=-f/p,h[3]=n/p,h[4]=(f*m-u*v)/p,h[5]=-(n*m-o*v)/p,this},copyFrom:function(h){var n=this.matrix;return n[0]=h.a,n[1]=h.b,n[2]=h.c,n[3]=h.d,n[4]=h.e,n[5]=h.f,this},copyFromArray:function(h){var n=this.matrix;return n[0]=h[0],n[1]=h[1],n[2]=h[2],n[3]=h[3],n[4]=h[4],n[5]=h[5],this},copyToContext:function(h){var n=this.matrix;return h.transform(n[0],n[1],n[2],n[3],n[4],n[5]),h},setToContext:function(h){var n=this.matrix;return h.setTransform(n[0],n[1],n[2],n[3],n[4],n[5]),h},copyToArray:function(h){var n=this.matrix;return h===void 0?h=[n[0],n[1],n[2],n[3],n[4],n[5]]:(h[0]=n[0],h[1]=n[1],h[2]=n[2],h[3]=n[3],h[4]=n[4],h[5]=n[5]),h},setTransform:function(h,n,o,f,u,v){var m=this.matrix;return m[0]=h,m[1]=n,m[2]=o,m[3]=f,m[4]=u,m[5]=v,this},decomposeMatrix:function(){var h=this.decomposedMatrix,n=this.matrix,o=n[0],f=n[1],u=n[2],v=n[3],m=o*v-f*u;if(h.translateX=n[4],h.translateY=n[5],o||f){var p=Math.sqrt(o*o+f*f);h.rotation=f>0?Math.acos(o/p):-Math.acos(o/p),h.scaleX=p,h.scaleY=m/p}else if(u||v){var x=Math.sqrt(u*u+v*v);h.rotation=Math.PI*.5-(v>0?Math.acos(-u/x):-Math.acos(u/x)),h.scaleX=m/x,h.scaleY=x}else h.rotation=0,h.scaleX=0,h.scaleY=0;return h},applyITRS:function(h,n,o,f,u){var v=this.matrix,m=Math.sin(o),p=Math.cos(o);return v[4]=h,v[5]=n,v[0]=p*f,v[1]=m*f,v[2]=-m*u,v[3]=p*u,this},applyInverse:function(h,n,o){o===void 0&&(o=new r);var f=this.matrix,u=f[0],v=f[1],m=f[2],p=f[3],x=f[4],y=f[5],P=1/(u*p+m*-v);return o.x=p*P*h+-m*P*n+(y*m-x*p)*P,o.y=u*P*n+-v*P*h+(-y*u+x*v)*P,o},setQuad:function(h,n,o,f,u,v){v===void 0&&(v=this.quad);var m=this.matrix,p=m[0],x=m[1],y=m[2],P=m[3],b=m[4],E=m[5];return v[0]=h*p+n*y+b,v[1]=h*x+n*P+E,v[2]=h*p+f*y+b,v[3]=h*x+f*P+E,v[4]=o*p+f*y+b,v[5]=o
1338*x+f*P+E,v[6]=o*p+n*y+b,v[7]=o*x+n*P+E,u&&v.forEach(function(M,w){v[w]=Math.round(M)}),v},getX:function(h,n){return h*this.a+n*this.c+this.e},getY:function(h,n){return h*this.b+n*this.d+this.f},getXRound:function(h,n,o){var f=this.getX(h,n);return o&&(f=Math.round(f)),f},getYRound:function(h,n,o){var f=this.getY(h,n);return o&&(f=Math.round(f)),f},getCSSMatrix:function(){var h=this.matrix;return"matrix("+h[0]+","+h[1]+","+h[2]+","+h[3]+","+h[4]+","+h[5]+")"},destroy:function(){this.matrix=null,this.quad=null,this.decomposedMatrix=null}});l.exports=a},59694:l=>{/** 1339 * @author Richard Davey <[email protected]> 1340 * @copyright 2013-2023 Photon Storm Ltd. 1341 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1342 */var T=1,e={_visible:!0,visible:{get:function(){return this._visible},set:function(d){d?(this._visible=!0,this.renderFlags|=T):(this._visible=!1,this.renderFlags&=~T)}},setVisible:function(d){return this.visible=d,this}};l.exports=e},64937:(l,T,e)=>{/** 1343 * @author Richard Davey <[email protected]> 1344 * @copyright 2013-2023 Photon Storm Ltd. 1345 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1346 */l.exports={Alpha:e(97123),AlphaSingle:e(15720),BlendMode:e(69732),ComputedSize:e(28284),Crop:e(85293),Depth:e(14975),Flip:e(92972),FX:e(88677),GetBounds:e(80693),Mask:e(39171),Origin:e(28072),PathFollower:e(54211),Pipeline:e(58210),PostPipeline:e(44086),ScrollFactor:e(45900),Size:e(31654),Texture:e(82081),TextureCrop:e(21850),Tint:e(58072),ToJSON:e(48129),Transform:e(56584),TransformMatrix:e(69360),Visible:e(59694)}},70339:(l,T,e)=>{/** 1347 * @author Richard Davey <[email protected]> 1348 * @author Felipe Alfonso <@bitnenfer> 1349 * @copyright 2013-2023 Photon Storm Ltd. 1350 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1351 */var d=e(59959),g=e(95723),r=e(56694),a=e(64937),h=e(56631),n=e(89980),o=e(74118),f=e(98524),u=e(58795),v=e(93736),m=new r({Extends:n,Mixins:[a.AlphaSingle,a.BlendMode,a.ComputedSize,a.Depth,a.Mask,a.PostPipeline,a.Transform,a.Visible,f],initialize:function(x,y,P,b){n.call(this,x,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new a.TransformMatrix,this.tempTransformMatrix=new a.TransformMatrix,this._sortKey="",this._sysEvents=x.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPostPipeline(),this.setPosition(y,P),this.setBlendMode(g.SKIP_CHECK),b&&this.add(b)},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 o),p.setTo(this.x,this.y,0,0),this.parentContainer){var x=this.parentContainer.getBoundsTransformMatrix(),y=x.transformPoint(this.x,this.y);p.setTo(y.x,y.y,0,0)}if(this.list.length>0){var P=this.list,b=new o,E=!1;p.setEmpty();for(var M=0;M<P.length;M++){var w=P[M];w.getBounds&&(w.getBounds(b),E?u(b,p,p):(p.setTo(b.x,b.y,b.width,b.height),E=!0))}}return p},addHandler:function(p){p.once(h.DESTROY,this.remove,this),this.exclusive&&(p.parentContainer&&p.parentContainer.remove(p),p.parentContainer=this,p.removeFromDisplayList(),p.addedToScene())},removeHandler:function(p){p.off(h.DESTROY,this.remove,this),this.exclusive&&(p.parentContainer=null,p.removedFromScene(),p.addToDisplayList())},pointToContainer:function(p,x){x===void 0&&(x=new v),this.parentContainer?this.parentContainer.pointToContainer(p,x):(x.x=p.x,x.y=p.y);var y=this.tempTransformMatrix;return y.applyITRS(this.x,this.y,this.rotation,this.scaleX,this.scaleY),y.invert(),y.transformPoint(p.x,p.y,x),x},getBoundsTransformMatrix:function(){return this.getWorldTransformMatrix(this.tempTransformMatrix,this.localTransform)},add:function(p){return d.Add(this.list,p,this.maxSize,this.addHandler,this),this},addAt:function(p,x){return d.AddAt(this.list,p,x,this.maxSize,this.addHandler,this),this},getAt:function(p){return this.list[p]},getIndex:function(p){return this.list.indexOf(p)},sort:function(p,x){return p?(x===void 0&&(x=function(y,P){return y[p]-P[p]}),d.StableSort(this.list,x),this):this}
1351,getByName:function(p){return d.GetFirst(this.list,"name",p)},getRandom:function(p,x){return d.GetRandom(this.list,p,x)},getFirst:function(p,x,y,P){return d.GetFirst(this.list,p,x,y,P)},getAll:function(p,x,y,P){return d.GetAll(this.list,p,x,y,P)},count:function(p,x,y,P){return d.CountAllMatching(this.list,p,x,y,P)},swap:function(p,x){return d.Swap(this.list,p,x),this},moveTo:function(p,x){return d.MoveTo(this.list,p,x),this},moveAbove:function(p,x){return d.MoveAbove(this.list,p,x),this},moveBelow:function(p,x){return d.MoveBelow(this.list,p,x),this},remove:function(p,x){var y=d.Remove(this.list,p,this.removeHandler,this);if(x&&y){Array.isArray(y)||(y=[y]);for(var P=0;P<y.length;P++)y[P].destroy()}return this},removeAt:function(p,x){var y=d.RemoveAt(this.list,p,this.removeHandler,this);return x&&y&&y.destroy(),this},removeBetween:function(p,x,y){var P=d.RemoveBetween(this.list,p,x,this.removeHandler,this);if(y)for(var b=0;b<P.length;b++)P[b].destroy();return this},removeAll:function(p){var x=this.list;if(p){for(var y=0;y<x.length;y++)x[y]&&x[y].scene&&(x[y].off(h.DESTROY,this.remove,this),x[y].destroy());this.list=[]}else d.RemoveBetween(x,0,x.length,this.removeHandler,this);return this},bringToTop:function(p){return d.BringToTop(this.list,p),this},sendToBack:function(p){return d.SendToBack(this.list,p),this},moveUp:function(p){return d.MoveUp(this.list,p),this},moveDown:function(p){return d.MoveDown(this.list,p),this},reverse:function(){return this.list.reverse(),this},shuffle:function(){return d.Shuffle(this.list),this},replace:function(p,x,y){var P=d.Replace(this.list,p,x);return P&&(this.addHandler(x),this.removeHandler(p),y&&p.destroy()),this},exists:function(p){return this.list.indexOf(p)>-1},setAll:function(p,x,y,P){return d.SetAll(this.list,p,x,y,P),this},each:function(p,x){var y=[null],P,b=this.list.slice(),E=b.length;for(P=2;P<arguments.length;P++)y.push(arguments[P]);for(P=0;P<E;P++)y[0]=b[P],p.apply(x,y);return this},iterate:function(p,x){var y=[null],P;for(P=2;P<arguments.length;P++)y.push(arguments[P]);for(P=0;P<this.list.length;P++)y[0]=this.list[P],p.apply(x,y);return this},setScrollFactor:function(p,x,y){return x===void 0&&(x=p),y===void 0&&(y=!1),this.scrollFactorX=p,this.scrollFactorY=x,y&&(d.SetAll(this.list,"scrollFactorX",p),d.SetAll(this.list,"scrollFactorY",x)),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.tempTransformMatrix.destroy(),this.list=[]}});l.exports=m},13916:l=>{/** 1352 * @author Richard Davey <[email protected]> 1353 * @author Felipe Alfonso <@bitnenfer> 1354 * @copyright 2013-2023 Photon Storm Ltd. 1355 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1356 */var T=function(e,d,g,r){g.addToRenderList(d);var a=d.list;if(a.length!==0){var h=d.localTransform;r?(h.loadIdentity(),h.multiply(r),h.translate(d.x,d.y),h.rotate(d.rotation),h.scale(d.scaleX,d.scaleY)):h.applyITRS(d.x,d.y,d.rotation,d.scaleX,d.scaleY);var n=d.blendMode!==-1;n||e.setBlendMode(0);var o=d._alpha,f=d.scrollFactorX,u=d.scrollFactorY;d.mask&&d.mask.preRenderCanvas(e,null,g);for(var v=0;v<a.length;v++){var m=a[v];if(m.willRender(g)){var p=m.alpha,x=m.scrollFactorX,y=m.scrollFactorY;!n&&m.blendMode!==e.currentBlendMode&&e.setBlendMode(m.blendMode),m.setScrollFactor(x*f,y*u),m.setAlpha(p*o),m.renderCanvas(e,m,g,h),m.setAlpha(p),m.setScrollFactor(x,y)}}d.mask&&d.mask.postRenderCanvas(e)}};l.exports=T},44516:(l,T,e)=>{/** 1357 * @author Richard Davey <[email protected]> 1358 * @author Felipe Alfonso <@bitnenfer> 1359 * @copyright 2013-2023 Photon Storm Ltd. 1360 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1361 */var d=e(88933),g=e(70339),r=e(99325),a=e(20494);r.register("container",function(h,n){h===void 0&&(h={});var o=a(h,"x",0),f=a(h,"y",0),u=a(h,"children",null),v=new g(this.scene,o,f,u);return n!==void 0&&(h.add=n),d(this.scene,v,h),v})},23400:(l,T,e)=>{/** 1362 * @author Richard Davey <[email protected]> 1363 * @author Felipe Alfonso <@bitnenfer> 1364 * @copyright 2013-2023 Photon Storm Ltd. 1365 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1366 */var d=e(70339),g=e(61286);g.register("container",function(r,a,h){return this.displayList.add(new d(this.scene,r,a,h))})},98524:(l,T,e)=>{/** 1367 * @author Richard Davey <[email protected]> 1368 * @author Felipe Alfonso <@bitnenfer> 1369 * @copyright 2013-2023 Photon Storm Ltd. 1370 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1371 */var d=e(72283),g=d,r=d;g=e(36934),r=e(13916),l.exports={renderWebGL:g,renderCanvas:r}},36934:l=>{/** 1372 * @author Richard Davey <[email protected]> 1373 * @author Felipe Alfonso <@bitnenfer> 1374 * @copyright 2013-2023 Photon Storm Ltd. 1375 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1376 */var T=function(e,d,g,r){g.addToRenderList(d);var a=d.list,h=a.length;if(h!==0){var n=d.localTransform;r?(n.loadIdentity(),n.multiply(r),n.translate(d.x,d.y),n.rotate(d.rotation),n.scale(d.scaleX,d.scaleY)):n.applyITRS(d.x,d.y,d.rotation,d.scaleX,d.scaleY),e.pipelines.preBatch(d);var o=d.blendMode!==-1;o||e.setBlendMode(0);for(var f=d.alpha,u=d.scrollFactorX,v=d.scrollFactorY,m=0;m<h;m++){var p=a[m];if(p.willRender(g)){var x,y,P,b;
1376if(p.alphaTopLeft!==void 0)x=p.alphaTopLeft,y=p.alphaTopRight,P=p.alphaBottomLeft,b=p.alphaBottomRight;else{var E=p.alpha;x=E,y=E,P=E,b=E}var M=p.scrollFactorX,w=p.scrollFactorY;!o&&p.blendMode!==e.currentBlendMode&&e.setBlendMode(p.blendMode);var A=p.mask;A&&A.preRenderWebGL(e,p,g);var R=p.type;R!==e.currentType&&(e.newType=!0,e.currentType=R),e.nextTypeMatch=m<h-1?a[m+1].type===e.currentType:!1,p.setScrollFactor(M*u,w*v),p.setAlpha(x*f,y*f,P*f,b*f),p.renderWebGL(e,p,g,n,d),p.setAlpha(x,y,P,b),p.setScrollFactor(M,w),A&&A.postRenderWebGL(e,g),e.newType=!1}}e.pipelines.postBatch(d)}};l.exports=T},2452:l=>{/** 1377 * @author Richard Davey <[email protected]> 1378 * @copyright 2013-2023 Photon Storm Ltd. 1379 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1380 */l.exports=["normal","multiply","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},38943:(l,T,e)=>{/** 1381 * @author Richard Davey <[email protected]> 1382 * @copyright 2013-2023 Photon Storm Ltd. 1383 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1384 */var d=e(56694),g=e(64937),r=e(11603),a=e(89980),h=e(42911),n=e(55638),o=e(7599),f=e(51729),u=new d({Extends:a,Mixins:[g.AlphaSingle,g.BlendMode,g.Depth,g.Origin,g.ScrollFactor,g.Transform,g.Visible,r],initialize:function(m,p,x,y,P,b){a.call(this,m,"DOMElement"),this.parent=m.sys.game.domContainer,this.cache=m.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new f,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(p,x),typeof y=="string"?y[0]==="#"?this.setElement(y.substr(1),P,b):this.createElement(y,P,b):y&&this.setElement(y,P,b),m.sys.events.on(o.SLEEP,this.handleSceneEvent,this),m.sys.events.on(o.WAKE,this.handleSceneEvent,this),m.sys.events.on(o.PRE_RENDER,this.preRender,this)},handleSceneEvent:function(v){var m=this.node,p=m.style;m&&(p.display=v.settings.visible?"block":"none")},setSkew:function(v,m){return v===void 0&&(v=0),m===void 0&&(m=v),this.skewX=v,this.skewY=m,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 m=0;m<v.length;m++)this.node.addEventListener(v[m],this.handler,!1)}return this},removeListener:function(v){if(this.node){v=v.split(" ");for(var m=0;m<v.length;m++)this.node.removeEventListener(v[m],this.handler)}return this},dispatchNativeEvent:function(v){this.emit(v.type,v)},createElement:function(v,m,p){return this.setElement(document.createElement(v),m,p)},setElement:function(v,m,p){this.removeElement();var x;if(typeof v=="string"?(v[0]==="#"&&(v=v.substr(1)),x=document.getElementById(v)):typeof v=="object"&&v.nodeType===1&&(x=v),!x)return this;if(this.node=x,m&&h(m))for(var y in m)x.style[y]=m[y];else typeof m=="string"&&(x.style=m);return x.style.zIndex="0",x.style.display="inline",x.style.position="absolute",x.phaser=this,this.parent&&this.parent.appendChild(x),p&&(x.innerText=p),this.updateSize()},createFromCache:function(v,m){var p=this.cache.get(v);return p&&this.createFromHTML(p,m),this},createFromHTML:function(v,m){m===void 0&&(m="div"),this.removeElement();var p=document.createElement(m);return this.node=p,p.style.zIndex="0",p.style.display="inline",p.style.position="absolute",p.phaser=this,this.parent&&this.parent.appendChild(p),p.innerHTML=v,this.updateSize()},removeElement:function(){return this.node&&(n(this.node),this.node=null),this},updateSize:function(){var v=this.node,m=v.getBoundingClientRect();return this.width=v.clientWidth,this.height=v.clientHeight,this.displayWidth=m.width||0,this.displayHeight=m.height||0,this},getChildByProperty:function(v,m){if(this.node){for(var p=this.node.querySelectorAll("*"),x=0;x<p.length;x++)if(p[x][v]===m)return p[x]}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,m=this.node;m&&v&&!v.willRender()&&(m.style.display="none")},willRender:function(){return!0},preDestroy:function(){this.removeElement(),this.scene.sys.events.off(o.SLEEP,this.handleSceneEvent,this),this.scene.sys.events.off(o.WAKE,this.handleSceneEvent,this),this.scene.sys.events.off(o.PRE_RENDER,this.preRender,this)}});l.exports=u},66070:(l,T,e)=>{/** 1385 * @author Richard Davey <[email protected]> 1386 * @copyright 2013-2023 Photon Storm Ltd. 1387 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1388 */var d=e(2452),g=e(89980),r=e(69360),a=new r,h=new r,n=new r,o=function(f,u,v,m){if(u.node){var p=u.node.style,x=u.scene.sys.settings;if(!p||!x.visible||g.RENDER_MASK!==u.renderFlags||u.cameraFilter!==0&&u.cameraFilter&v.id||u.parentContainer&&!u.parentContainer.willRender()){p.display="none";return}var y=u.parentContainer,P=v.alpha*u.alpha;y&&(P*=y.alpha);var b=a,E=h,M=n,w=0,A=0,R="0%",L="0%";m?(w=u.width*u.scaleX*u.originX,A=u.height*u.scaleY*u.originY,E.applyITRS(u.x-w,u.y-A,u.rotation,u.scaleX,u.scaleY),b.copyFrom(v.matrix),b.multiplyWithOffset(m,-v.scrollX*u.scrollFactorX,-v.scrollY*u.scrollFactorY),E.e=u.x-w,E.f=u.y-A,b.multiply(E,M)):(w=u.width*u.originX,A=u.height*u.originY,E.applyITRS(u.x-w,u.y-A,u.rotation,u.scaleX,u.scaleY),b.copyFrom(v.matrix),R=100*u.originX+"%",L=100*u.originY+"%",E.e-=v.scrollX*u.scrollFactorX,E.f-=v.scrollY*u.scrollFactorY,b.multiply(E,M)),u.transformOnly||(p.display="block",p.op
1388acity=P,p.zIndex=u._depth,p.pointerEvents=u.pointerEvents,p.mixBlendMode=d[u._blendMode]),p.transform=M.getCSSMatrix()+" skew("+u.skewX+"rad, "+u.skewY+"rad) rotate3d("+u.rotate3d.x+","+u.rotate3d.y+","+u.rotate3d.z+","+u.rotate3d.w+u.rotate3dAngle+")",p.transformOrigin=R+" "+L}};l.exports=o},66788:(l,T,e)=>{/** 1389 * @author Richard Davey <[email protected]> 1390 * @copyright 2013-2023 Photon Storm Ltd. 1391 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1392 */var d=e(38943),g=e(61286);g.register("dom",function(r,a,h,n,o){var f=new d(this.scene,r,a,h,n,o);return this.displayList.add(f),f})},11603:(l,T,e)=>{/** 1393 * @author Richard Davey <[email protected]> 1394 * @copyright 2013-2023 Photon Storm Ltd. 1395 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1396 */var d=e(72283),g=d,r=d;g=e(66070),r=e(66070),l.exports={renderWebGL:g,renderCanvas:r}},65492:l=>{/** 1397 * @author Richard Davey <[email protected]> 1398 * @copyright 2013-2023 Photon Storm Ltd. 1399 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1400 */l.exports="addedtoscene"},98398:l=>{/** 1401 * @author Richard Davey <[email protected]> 1402 * @copyright 2013-2023 Photon Storm Ltd. 1403 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1404 */l.exports="destroy"},40239:l=>{/** 1405 * @author Richard Davey <[email protected]> 1406 * @copyright 2013-2023 Photon Storm Ltd. 1407 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1408 */l.exports="removedfromscene"},17286:l=>{/** 1409 * @author Richard Davey <[email protected]> 1410 * @copyright 2013-2023 Photon Storm Ltd. 1411 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1412 */l.exports="complete"},31496:l=>{/** 1413 * @author Richard Davey <[email protected]> 1414 * @copyright 2013-2023 Photon Storm Ltd. 1415 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1416 */l.exports="created"},89587:l=>{/** 1417 * @author Richard Davey <[email protected]> 1418 * @copyright 2013-2023 Photon Storm Ltd. 1419 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1420 */l.exports="error"},59792:l=>{/** 1421 * @author Richard Davey <[email protected]> 1422 * @copyright 2013-2023 Photon Storm Ltd. 1423 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1424 */l.exports="locked"},96342:l=>{/** 1425 * @author Richard Davey <[email protected]> 1426 * @copyright 2013-2023 Photon Storm Ltd. 1427 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1428 */l.exports="loop"},6017:l=>{/** 1429 * @author Richard Davey <[email protected]> 1430 * @copyright 2013-2023 Photon Storm Ltd. 1431 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1432 */l.exports="playing"},49614:l=>{/** 1433 * @author Richard Davey <[email protected]> 1434 * @copyright 2013-2023 Photon Storm Ltd. 1435 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1436 */l.exports="play"},24418:l=>{/** 1437 * @author Richard Davey <[email protected]> 1438 * @copyright 2013-2023 Photon Storm Ltd. 1439 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1440 */l.exports="seeked"},87318:l=>{/** 1441 * @author Richard Davey <[email protected]> 1442 * @copyright 2013-2023 Photon Storm Ltd. 1443 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1444 */l.exports="seeking"},50009:l=>{/** 1445 * @author Richard Davey <[email protected]> 1446 * @copyright 2013-2023 Photon Storm Ltd. 1447 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1448 */l.exports="stalled"},61922:l=>{/** 1449 * @author Richard Davey <[email protected]> 1450 * @copyright 2013-2023 Photon Storm Ltd. 1451 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1452 */l.exports="stop"},79501:l=>{/** 1453 * @author Richard Davey <[email protected]> 1454 * @copyright 2013-2023 Photon Storm Ltd. 1455 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1456 */l.exports="textureready"},4052:l=>{/** 1457 * @author Richard Davey <[email protected]> 1458 * @copyright 2013-2023 Photon Storm Ltd. 1459 * @license {@link https://opensource.org/licenses/MIT|MIT License}
1460 */l.exports="unlocked"},54857:l=>{/** 1461 * @author Richard Davey <[email protected]> 1462 * @copyright 2013-2023 Photon Storm Ltd. 1463 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1464 */l.exports="unsupported"},56631:(l,T,e)=>{/** 1465 * @author Richard Davey <[email protected]> 1466 * @copyright 2013-2023 Photon Storm Ltd. 1467 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1468 */l.exports={ADDED_TO_SCENE:e(65492),DESTROY:e(98398),REMOVED_FROM_SCENE:e(40239),VIDEO_COMPLETE:e(17286),VIDEO_CREATED:e(31496),VIDEO_ERROR:e(89587),VIDEO_LOCKED:e(59792),VIDEO_LOOP:e(96342),VIDEO_PLAY:e(49614),VIDEO_PLAYING:e(6017),VIDEO_SEEKED:e(24418),VIDEO_SEEKING:e(87318),VIDEO_STALLED:e(50009),VIDEO_STOP:e(61922),VIDEO_TEXTURE:e(79501),VIDEO_UNLOCKED:e(4052),VIDEO_UNSUPPORTED:e(54857)}},39419:(l,T,e)=>{/** 1469 * @author Richard Davey <[email protected]> 1470 * @copyright 2013-2023 Photon Storm Ltd. 1471 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1472 */var d=e(56694),g=e(64937),r=e(89980),a=e(79394),h=new d({Extends:r,Mixins:[g.Alpha,g.BlendMode,g.Depth,g.Flip,g.Origin,g.ScrollFactor,g.Size,g.Texture,g.Tint,g.Transform,g.Visible,a],initialize:function(o){r.call(this,o,"Extern")},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(){},render:function(){}});l.exports=h},96699:()=>{},41155:(l,T,e)=>{/** 1473 * @author Richard Davey <[email protected]> 1474 * @copyright 2013-2023 Photon Storm Ltd. 1475 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1476 */var d=e(39419),g=e(61286);g.register("extern",function(){var r=new d(this.scene);return this.displayList.add(r),r})},79394:(l,T,e)=>{/** 1477 * @author Richard Davey <[email protected]> 1478 * @copyright 2013-2023 Photon Storm Ltd. 1479 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1480 */var d=e(72283),g=d,r=d;g=e(81410),r=e(96699),l.exports={renderWebGL:g,renderCanvas:r}},81410:(l,T,e)=>{/** 1481 * @author Richard Davey <[email protected]> 1482 * @copyright 2013-2023 Photon Storm Ltd. 1483 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1484 */var d=e(73329),g=function(r,a,h,n){r.pipelines.clear();var o=d(a,h,n).calc;a.render.call(a,r,h,o),r.pipelines.rebind()};l.exports=g},36266:l=>{/** 1485 * @author Richard Davey <[email protected]> 1486 * @copyright 2013-2023 Photon Storm Ltd. 1487 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1488 */l.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}},33182:(l,T,e)=>{/** 1489 * @author Richard Davey <[email protected]> 1490 * @copyright 2013-2023 Photon Storm Ltd. 1491 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1492 */var d=e(51052),g=e(56694),r=e(36266),a=e(64937),h=e(95669),n=e(89980),o=e(72632),f=e(10850),u=e(83392),v=e(60898),m=new g({Extends:n,Mixins:[a.AlphaSingle,a.BlendMode,a.Depth,a.Mask,a.Pipeline,a.PostPipeline,a.Transform,a.Visible,a.ScrollFactor,v],initialize:function(x,y){var P=f(y,"x",0),b=f(y,"y",0);n.call(this,x,"Graphics"),this.setPosition(P,b),this.initPipeline(),this.initPostPipeline(),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.setDefaultStyles(y)},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,x,y){return y===void 0&&(y=1),this.commandBuffer.push(r.LINE_STYLE,p,x,y),this._lineWidth=p,this},fillStyle:function(p,x){return x===void 0&&(x=1),this.commandBuffer.push(r.FILL_STYLE,p,x),this},fillGradientStyle:function(p,x,y,P,b,E,M,w){return b===void 0&&(b=1),E===void 0&&(E=b),M===void 0&&(M=b),w===void 0&&(w=b),this.commandBuffer.push(r.GRADIENT_FILL_STYLE,b,E,M,w,p,x,y,P),this},lineGradientStyle:function(p,x,y,P,b,E){return E===void 0&&(E=1),this.commandBuffer.push(r.GRADIENT_LINE_STYLE,p,E,x,y,P,b),this},beginPath:function(){return this.commandBuffer.push(r.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(r.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(r.FILL_PATH),this},fill:function(){return this.commandBuffer.push(r.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(r.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(r.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)}
1492,fillCircle:function(p,x,y){return this.beginPath(),this.arc(p,x,y,0,u.PI2),this.fillPath(),this},strokeCircle:function(p,x,y){return this.beginPath(),this.arc(p,x,y,0,u.PI2),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,x,y,P){return this.commandBuffer.push(r.FILL_RECT,p,x,y,P),this},strokeRect:function(p,x,y,P){var b=this._lineWidth/2,E=p-b,M=p+b;return this.beginPath(),this.moveTo(p,x),this.lineTo(p,x+P),this.strokePath(),this.beginPath(),this.moveTo(p+y,x),this.lineTo(p+y,x+P),this.strokePath(),this.beginPath(),this.moveTo(E,x),this.lineTo(M+y,x),this.strokePath(),this.beginPath(),this.moveTo(E,x+P),this.lineTo(M+y,x+P),this.strokePath(),this},fillRoundedRect:function(p,x,y,P,b){b===void 0&&(b=20);var E=b,M=b,w=b,A=b;typeof b!="number"&&(E=o(b,"tl",20),M=o(b,"tr",20),w=o(b,"bl",20),A=o(b,"br",20));var R=E>=0,L=M>=0,O=w>=0,I=A>=0;return E=Math.abs(E),M=Math.abs(M),w=Math.abs(w),A=Math.abs(A),this.beginPath(),this.moveTo(p+E,x),this.lineTo(p+y-M,x),L?this.arc(
vendor: 1,090 bytes, line 1492
1492p+y-M,x+M,M,-u.TAU,0):this.arc(p+y,x,M,Math.PI,u.TAU,!0),this.lineTo(p+y,x+P-A),I?this.arc(p+y-A,x+P-A,A,0,u.TAU):this.arc(p+y,x+P,A,-u.TAU,Math.PI,!0),this.lineTo(p+w,x+P),O?this.arc(p+w,x+P-w,w,u.TAU,Math.PI):this.arc(p,x+P,w,0,-u.TAU,!0),this.lineTo(p,x+E),R?this.arc(p+E,x+E,E,-Math.PI,-u.TAU):this.arc(p,x,E,u.TAU,0,!0),this.fillPath(),this},strokeRoundedRect:function(p,x,y,P,b){b===void 0&&(b=20);var E=b,M=b,w=b,A=b,R=Math.min(y,P)/2;typeof b!="number"&&(E=o(b,"tl",20),M=o(b,"tr",20),w=o(b,"bl",20),A=o(b,"br",20));var L=E>=0,O=M>=0,I=w>=0,D=A>=0;return E=Math.min(Math.abs(E),R),M=Math.min(Math.abs(M),R),w=Math.min(Math.abs(w),R),A=Math.min(Math.abs(A),R),this.beginPath(),this.moveTo(p+E,x),this.lineTo(p+y-M,x),this.moveTo(p+y-M,x),O?this.arc(p+y-M,x+M,M,-u.TAU,0):this.arc(p+y,x,M,Math.PI,u.TAU,!0),this.lineTo(p+y,x+P-A),this.moveTo(p+y,x+P-A),D?this.arc(p+y-A,x+P-A,A,0,u.TAU):this.arc(p+y,x+P,A,-u.TAU,Math.PI,!0),this.lineTo(p+w,x+P),this.moveTo(p+w,x+P),I?this.arc(p+w,x+P-w,w,u.TAU,Math.PI):this.arc(p,x+P,w,0,-u.TAU,!0),this.lineTo(p,x+E),this.moveTo(p,x+E),L?this.arc(
1492p+E,x+E,E,-Math.PI,-u.TAU):this.arc(p,x,E,u.TAU,0,!0),this.strokePath(),this},fillPointShape:function(p,x){return this.fillPoint(p.x,p.y,x)},fillPoint:function(p,x,y){return!y||y<1?y=1:(p-=y/2,x-=y/2),this.commandBuffer.push(r.FILL_RECT,p,x,y,y),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,x,y,P,b,E){return this.commandBuffer.push(r.FILL_TRIANGLE,p,x,y,P,b,E),this},strokeTriangle:function(p,x,y,P,b,E){return this.commandBuffer.push(r.STROKE_TRIANGLE,p,x,y,P,b,E),this},strokeLineShape:function(p){return this.lineBetween(p.x1,p.y1,p.x2,p.y2)},lineBetween:function(p,x,y,P){return this.beginPath(),this.moveTo(p,x),this.lineTo(y,P),this.strokePath(),this},lineTo:function(p,x){return this.commandBuffer.push(r.LINE_TO,p,x),this},moveTo:function(p,x){return this.commandBuffer.push(r.MOVE_TO,p,x),this},strokePoints:function(p,x,y,P){x===void 0&&(x=!1),y===void 0&&(y=!1),P===void 0&&(P=p.length),this.beginPath(),this.moveTo(p[0].x,p[0].y);for(var b=1;b<P;b++)this.lineTo(p[b].x,p[b].y);return x&&this.lineTo(p[0].x,p[0].y),y&&this.closePath(),this.strokePath(),this},fillPoints:function(p,x,y,P){x===void 0&&(x=!1),y===void 0&&(y=!1),P===void 0&&(P=p.length),this.beginPath(),this.moveTo(p[0].x,p[0].y);for(var b=1;b<P;b++)this.lineTo(p[b].x,p[b].y);return x&&this.lineTo(p[0].x,p[0].y),y&&this.closePath(),this.fillPath(),this},strokeEllipseShape:function(p,x){x===void 0&&(x=32);var y=p.getPoints(x);return this.strokePoints(y,!0)},strokeEllipse:function(p,x,y,P,b){b===void 0&&(b=32);var E=new h(p,x,y,P),M=E.getPoints(b);return this.strokePoints(M,!0)},fillEllipseShape:function(p,x){x===void 0&&(x=32);var y=p.getPoints(x);return this.fillPoints(y,!0)},fillEllipse:function(p,x,y,P,b){b===void 0&&(b=32);var E=new h(p,x,y,P),M=E.getPoints(b);return this.fillPoints(M,!0)},arc:function(p,x,y,P,b,E,M){return E===void 0&&(E=!1),M===void 0&&(M=0),this.commandBuffer.push(r.ARC,p,x,y,P,b,E,M),this},slice:function(p,x,y,P,b,E,M){return E===void 0&&(E=!1),M===void 0&&(M=0),this.commandBuffer.push(r.BEGIN_PATH),this.commandBuffer.push(r.MOVE_TO,p,x),this.commandBuffer.push(r.ARC,p,x,y,P,b,E,M),this.commandBuffer.push(r.CLOSE_PATH),this},save:function(){return this.commandBuffer.push(r.SAVE),this},restore:function(){return this.commandBuffer.push(r.RESTORE),this},translateCanvas:function(p,x){return this.commandBuffer.push(r.TRANSLATE,p,x),this},scaleCanvas:function(p,x){return this.commandBuffer.push(r.SCALE,p,x),this},rotateCanvas:function(p){return this.commandBuffer.push(r.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,x,y){var P=this.scene.sys,b=P.game.renderer;x===void 0&&(x=P.scale.width),y===void 0&&(y=P.scale.height),m.TargetCamera.setScene(this.scene),m.TargetCamera.setViewport(0,0,x,y),m.TargetCamera.scrollX=this.x,m.TargetCamera.scrollY=this.y;var E,M,w={willReadFrequently:!0};if(typeof p=="string")if(P.textures.exists(p)){E=P.textures.get(p);var A=E.getSourceImage();A instanceof HTMLCanvasElement&&(M=A.getContext("2d",w))}else E=P.textures.createCanvas(p,x,y),M=E.getSourceImage().getContext("2d",w);else p instanceof HTMLCanvasElement&&(M=p.getContext("2d",w));return M&&(this.renderCanvas(b,this,m.TargetCamera,null,M,!1),E&&E.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});m.TargetCamera=new d,l.exports=m},91543:(l,T,e)=>{/** 1493 * @author Richard Davey <[email protected]> 1494 * @copyright 2013-2023 Photon Storm Ltd. 1495 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1496 */var d=e(36266),g=e(49584),r=function(a,h,n,o,f,u){var v=h.commandBuffer,m=v.length,p=f||a.currentContext;if(!(m===0||!g(a,p,h,n,o))){n.addToRenderList(h);var x=1,y=1,P=0,b=0,E=1,M=0,w=0,A=0;p.beginPath();for(var R=0;R<m;++R){var L=v[R];switch(L){case d.ARC:p.arc(v[R+1],v[R+2],v[R+3],v[R+4],v[R+5],v[R+6]),R+=7;break;case d.LINE_STYLE:E=v[R+1],P=v[R+2],x=v[R+3],M=(P&16711680)>>>16,w=(P&65280)>>>8,A=P&255,p.strokeStyle="rgba("+M+","+w+","+A+","+x+")",p.lineWidth=E,R+=3;break;case d.FILL_STYLE:b=v[R+1],y=v[R+2],M=(b&16711680)>>>16,w=(b&65280)>>>8,A=b&255,p.fillStyle="rgba("+M+","+w+","+A+","+y+")",R+=2;break;case d.BEGIN_PATH:p.beginPath();break;case d.CLOSE_PATH:p.closePath();break;case d.FILL_PATH:u||p.fill();break;case d.STROKE_PATH:u||p.stroke();break;case d.FILL_RECT:u?p.rect(v[R+1],v[R+2],v[R+3],v[R+4]):p.fillRect(v[R+1],v[R+2],v[R+3],v[R+4]),R+=4;break;case d.FILL_TRIANGLE:p.beginPath(),p.moveTo(v[R+1],v[R+2]),p.lineTo(v[R+3],v[R+4]),p.lineTo(v[R+5],v[R+6]),p.closePath(),u||p.fill(),R+=6;break;case d.STROKE_TRIANGLE:p.beginPath(),p.moveTo(v[R+1],v[R+2]),p.lineTo(v[R+3],v[R+4]),p.lineTo(v[R+5],v[R+6]),p.closePath(),u||p.stroke(),R+=6;break;case d.LINE_TO:p.lineTo(v[R+1],v[R+2]),R+=2;break;case d.MOVE_TO:p.moveTo(v[R+1],v[R+2]),R+=2;break;case d.LINE_FX_TO:p.lineTo(v[R+1],v[R+2]),R+=5;break;case d.MOVE_FX_TO:p.moveTo(v[R+1],v[R+2]),R+=5;break;case d.SAVE:p.save();break;
1496case d.RESTORE:p.restore();break;case d.TRANSLATE:p.translate(v[R+1],v[R+2]),R+=2;break;case d.SCALE:p.scale(v[R+1],v[R+2]),R+=2;break;case d.ROTATE:p.rotate(v[R+1]),R+=1;break;case d.GRADIENT_FILL_STYLE:R+=5;break;case d.GRADIENT_LINE_STYLE:R+=6;break}}p.restore()}};l.exports=r},41286:(l,T,e)=>{/** 1497 * @author Richard Davey <[email protected]> 1498 * @copyright 2013-2023 Photon Storm Ltd. 1499 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1500 */var d=e(99325),g=e(33182);d.register("graphics",function(r,a){r===void 0&&(r={}),a!==void 0&&(r.add=a);var h=new g(this.scene,r);return r.add&&this.scene.sys.displayList.add(h),h})},13122:(l,T,e)=>{/** 1501 * @author Richard Davey <[email protected]> 1502 * @copyright 2013-2023 Photon Storm Ltd. 1503 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1504 */var d=e(33182),g=e(61286);g.register("graphics",function(r){return this.displayList.add(new d(this.scene,r))})},60898:(l,T,e)=>{/** 1505 * @author Richard Davey <[email protected]> 1506 * @copyright 2013-2023 Photon Storm Ltd. 1507 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1508 */var d=e(72283),g=d,r=d;g=e(34429),r=e(91543),r=e(91543),l.exports={renderWebGL:g,renderCanvas:r}},34429:(l,T,e)=>{/** 1509 * @author Richard Davey <[email protected]> 1510 * @copyright 2013-2023 Photon Storm Ltd. 1511 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1512 */var d=e(36266),g=e(73329),r=e(69360),a=e(75512),h=function(v,m,p){this.x=v,this.y=m,this.width=p},n=function(v,m,p){this.points=[],this.pointsLength=1,this.points[0]=new h(v,m,p)},o=[],f=new r,u=function(v,m,p,x){if(m.commandBuffer.length!==0){p.addToRenderList(m);var y=v.pipelines.set(m.pipeline,m);v.pipelines.preBatch(m);for(var P=g(m,p,x).calc,b=f.loadIdentity(),E=m.commandBuffer,M=p.alpha*m.alpha,w=1,A=y.fillTint,R=y.strokeTint,L=0,O=0,I=0,D=.01,B=Math.PI*2,z,X=[],W=0,j=!0,N=null,Y=a.getTintAppendFloatAlpha,F=0;F<E.length;F++)switch(z=E[F],z){case d.BEGIN_PATH:{X.length=0,N=null,j=!0;break}case d.CLOSE_PATH:{j=!1,N&&N.points.length&&N.points.push(N.points[0]);break}case d.FILL_PATH:{for(W=0;W<X.length;W++)y.batchFillPath(X[W].points,b,P);break}case d.STROKE_PATH:{for(W=0;W<X.length;W++)y.batchStrokePath(X[W].points,w,j,b,P);break}case d.LINE_STYLE:{w=E[++F];var G=E[++F],k=E[++F]*M,V=Y(G,k);R.TL=V,R.TR=V,R.BL=V,R.BR=V;break}case d.FILL_STYLE:{var U=E[++F],$=E[++F]*M,K=Y(U,$);A.TL=K,A.TR=K,A.BL=K,A.BR=K;break}case d.GRADIENT_FILL_STYLE:{var J=E[++F]*M,_=E[++F]*M,tt=E[++F]*M,st=E[++F]*M;A.TL=Y(E[++F],J),A.TR=Y(E[++F],_),A.BL=Y(E[++F],tt),A.BR=Y(E[++F],st);break}case d.GRADIENT_LINE_STYLE:{w=E[++F];var ht=E[++F]*M;R.TL=Y(E[++F],ht),R.TR=Y(E[++F],ht),R.BL=Y(E[++F],ht),R.BR=Y(E[++F],ht);break}case d.ARC:{var lt=0,nt=E[++F],gt=E[++F],bt=E[++F],Pt=E[++F],dt=E[++F],St=E[++F],Tt=E[++F];for(dt-=Pt,St?dt<-B?dt=-B:dt>0&&(dt=-B+dt%B):dt>B?dt=B:dt<0&&(dt=B+dt%B),N===null&&(N=new n(nt+Math.cos(Pt)*bt,gt+Math.sin(Pt)*bt,w),X.push(N),lt+=D);lt<1+Tt;)I=dt*lt+Pt,L=nt+Math.cos(I)*bt,O=gt+Math.sin(I)*bt,N.points.push(new h(L,O,w)),lt+=D;I=dt+Pt,L=nt+Math.cos(I)*bt,O=gt+Math.sin(I)*bt,N.points.push(new h(L,O,w));break}case d.FILL_RECT:{y.batchFillRect(E[++F],E[++F],E[++F],E[++F],b,P);break}case d.FILL_TRIANGLE:{y.batchFillTriangle(E[++F],E[++F],E[++F],E[++F],E[++F],E[++F],b,P);break}case d.STROKE_TRIANGLE:{y.batchStrokeTriangle(E[++F],E[++F],E[++F],E[++F],E[++F],E[++F],w,b,P);break}case d.LINE_TO:{N!==null?N.points.push(new h(E[++F],E[++F],w)):(N=new n(E[++F],E[++F],w),X.push(N));break}case d.MOVE_TO:{N=new n(E[++F],E[++F],w),X.push(N);break}case d.SAVE:{o.push(b.copyToArray());break}case d.RESTORE:{b.copyFromArray(o.pop());break}case d.TRANSLATE:{nt=E[++F],gt=E[++F],b.translate(nt,gt);break}case d.SCALE:{nt=E[++F],gt=E[++F],b.scale(nt,gt);break}case d.ROTATE:{b.rotate(E[++F]);break}}v.pipelines.postBatch(m)}};l.exports=u},59192:(l,T,e)=>{/** 1513 * @author Richard Davey <[email protected]> 1514 * @copyright 2013-2023 Photon Storm Ltd. 1515 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1516 */var d=e(83979),g=e(56694),r=e(56631),a=e(6659),h=e(71608),n=e(72632),o=e(10850),f=e(19256),u=e(42911),v=e(75757),m=e(58403),p=e(13747),x=new g({Extends:a,initialize:function(P,b,E){a.call(this),E?b&&!Array.isArray(b)&&(b=[b]):Array.isArray(b)?u(b[0])&&(E=b,b=null):u(b)&&(E=b,b=null),this.scene=P,this.children=new m,this.isParent=!0,this.type="Group",this.classType=n(E,"classType",p),this.name=n(E,"name",""),this.active=n(E,"active",!0),this.maxSize=n(E,"maxSize",-1),this.defaultKey=n(E,"defaultKey",null),this.defaultFrame=n(E,"defaultFrame",null),this.runChildUpdate=n(E,"runC
1516hildUpdate",!1),this.createCallback=n(E,"createCallback",null),this.removeCallback=n(E,"removeCallback",null),this.createMultipleCallback=n(E,"createMultipleCallback",null),this.internalCreateCallback=n(E,"internalCreateCallback",null),this.internalRemoveCallback=n(E,"internalRemoveCallback",null),b&&this.addMultiple(b),E&&this.createMultiple(E),this.on(r.ADDED_TO_SCENE,this.addedToScene,this),this.on(r.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},create:function(y,P,b,E,M,w){if(y===void 0&&(y=0),P===void 0&&(P=0),b===void 0&&(b=this.defaultKey),E===void 0&&(E=this.defaultFrame),M===void 0&&(M=!0),w===void 0&&(w=!0),this.isFull())return null;var A=new this.classType(this.scene,y,P,b,E);return A.addToDisplayList(this.scene.sys.displayList),A.addToUpdateList(),A.visible=M,A.setActive(w),this.add(A),A},createMultiple:function(y){if(this.isFull())return[];Array.isArray(y)||(y=[y]);var P=[];if(y[0].key)for(var b=0;b<y.length;b++){var E=this.createFromConfig(y[b]);P=P.concat(E)}return P},createFromConfig:function(y){if(this.isFull())return[];this.classType=n(y,"classType",this.classType);var P=n(y,"key",void 0),b=n(y,"frame",null),E=n(y,"visible",!0),M=n(y,"active",!0),w=[];if(P===void 0)return w;Array.isArray(P)||(P=[P]),Array.isArray(b)||(b=[b]);var A=n(y,"repeat",0),R=n(y,"randomKey",!1),L=n(y,"randomFrame",!1),O=n(y,"yoyo",!1),I=n(y,"quantity",!1),D=n(y,"frameQuantity",1),B=n(y,"max",0),z=v(P,b,{max:B,qty:I||D,random:R,randomB:L,repeat:A,yoyo:O});y.createCallback&&(this.createCallback=y.createCallback),y.removeCallback&&(this.removeCallback=y.removeCallback);for(var X=0;X<z.length;X++){var W=this.create(0,0,z[X].a,z[X].b,E,M);if(!W)break;w.push(W)}if(f(y,"setXY")){var j=o(y,"setXY.x",0),N=o(y,"setXY.y",0),Y=o(y,"setXY.stepX",0),F=o(y,"setXY.stepY",0);d.SetXY(w,j,N,Y,F)}if(f(y,"setRotation")){var G=o(y,"setRotation.value",0),k=o(y,"setRotation.step",0);d.SetRotation(w,G,k)}if(f(y,"setScale")){var V=o(y,"setScale.x",1),U=o(y,"setScale.y",V),$=o(y,"setScale.stepX",0),K=o(y,"setScale.stepY",0);d.SetScale(w,V,U,$,K)}if(f(y,"setOrigin")){var J=o(y,"setOrigin.x",.5),_=o(y,"setOrigin.y",J),tt=o(y,"setOrigin.stepX",0),st=o(y,"setOrigin.stepY",0);d.SetOrigin(w,J,_,tt,st)}if(f(y,"setAlpha")){var ht=o(y,"setAlpha.value",1),lt=o(y,"setAlpha.step",0);d.SetAlpha(w,ht,lt)}if(f(y,"setDepth")){var nt=o(y,"setDepth.value",0),gt=o(y,"setDepth.step",0);d.SetDepth(w,nt,gt)}if(f(y,"setScrollFactor")){var bt=o(y,"setScrollFactor.x",1),Pt=o(y,"setScrollFactor.y",bt),dt=o(y,"setScrollFactor.stepX",0),St=o(y,"setScrollFactor.stepY",0);d.SetScrollFactor(w,bt,Pt,dt,St)}var Tt=n(y,"hitArea",null),Vt=n(y,"hitAreaCallback",null);Tt&&d.SetHitArea(w,Tt,Vt);var zt=n(y,"gridAlign",!1);return zt&&d.GridAlign(w,zt),this.createMultipleCallback&&this.createMultipleCallback.call(this,w),w},preUpdate:function(y,P){if(!(!this.runChildUpdate||this.children.size===0))for(var b=this.children.entries.slice(),E=0;E<b.length;E++){var M=b[E];M.active&&M.update(y,P)}},add:function(y,P){return P===void 0&&(P=!1),this.isFull()?this:(this.children.set(y),this.internalCreateCallback&&this.internalCreateCallback.call(this,y),this.createCallback&&this.createCallback.call(this,y),P&&(y.addToDisplayList(this.scene.sys.displayList),y.addToUpdateList()),y.on(r.DESTROY,this.remove,this),this)},addMultiple:function(y,P){if(P===void 0&&(P=!1),Array.isArray(y))for(var b=0;b<y.length;b++)this.add(y[b],P);return this},remove:function(y,P,b){return P===void 0&&(P=!1),b===void 0&&(b=!1),this.children.contains(y)?(this.children.delete(y),this.internalRemoveCallback&&this.internalRemoveCallback.call(this,y),this.removeCallback&&this.removeCallback.call(this,y),y.off(r.DESTROY,this.remove,this),b?y.destroy():P&&(y.removeFromDisplayList(),y.removeFromUpdateList()),this):this},clear:function(y,P){y===void 0&&(y=!1),P===void 0&&(P=!1);for(var b=this.children,E=0;E<b.size;E++){var M=b.entries[E];M.off(r.DESTROY,this.remove,this),P?M.destroy():y&&(M.removeFromDisplayList(),M.removeFromUpdateList())}return this.children.clear(),this},contains:function(y){return this.children.contains(y)},getChildren:function(){return this.children.entries},getLength:function(){return this.children.size},getMatching:function(y,P,b,E){return h(this.children.entries,y,P,b,E)},getFirst:function(y,P,b,E,M,w,A){return this.getHandler(!0,1,y,P,b,E,M,w,A)},getFirstNth:function(y,P,b,E,M,w,A,R){return this.getHandler(!0,y,P,b,E,M,w,A,R)},getLast:function(y,P,b,E,M,w,A){return this.getHandler(!1,1,y,P,b,E,M,w,A)},getLastNth:function(y,P,b,E,M,w,A,R){return this.getHandler(!1,y,P,b,E,M,w,A,R)},getHandler:function(y,P,b,E,M,w,A,R,L){b===void 0&&(b=!1),E===void 0&&(E=!1);var O,I,D=0,B=this.children.entries;if(y)for(I=0;I<B.length;I++)if(O=B[I],O.active===b){if(D++,D===P)break}else O=null;else for(I=B.length-1;I>=0;I--)if(O=B[I],O.active===b){if(D++,D===P)break}else O=null;return O?(typeof M=="number"&&(O.x=M),typeof w=="number"&&(O.y=w),O):E?this.create(M,w,A,R,L):null},get:function(y,P,b,E,M){return this.getFirst(!1,!0,y,P,b,E,M)},getFirstAlive:function(y,P,b,E,M,w){return this.getFirst(!0,y,P,b,E,M,w)},getFirstDead:function(y,P,b,E,M,w){return this.getFirst(!1,y,P,b,E,M,w)},playAnimation:function(y,P){return d.PlayAnimation(this.children.entries,y,P),this},isFull:function(){return this.maxSize===-1?!1:this.children.size>=this.maxSize},countActive:function(y){y===void 0&&(y=!0);for(var P=0,b=0;b<this.children.size;b++)this.children.entries[b].active===y&&P++;return P},getTotalUsed:function(){return this.countActive()},getTotalFree:function(){var y=this.getTotalUsed(),P=this.maxSize===-1?999999999999:this.maxSize;return P-y},setActive:function(y){return this.active=y,this},setName:function(y){return this.name=y,this},propertyValueSet:function(y,P,b,E,M){return d.PropertyValueSet(this.children.entries,y,P,b,E,M),this},propertyValueInc:function(y,P,b,E,M){return d.PropertyValueInc(this.children.entries,y,P,b,E,M),this},setX:function(y,P){return d.SetX(this.children.entries,y,P),this},setY:function(y,P){return d.SetY(this.children.entries,y,P),this},setXY:function(y,P,b,E){return d.SetXY(this.children.entries,y,P,b,E),this},incX:function(y,P){return d.IncX(this.children.entries,y,P),this},incY:function(y,P){return d.IncY(this.children.entries,y,P),this},incXY:function(y,P,b,E){return d.IncXY(this.children.entries,y,P,b,E),this},shiftPosition:function(y,P,b){return d.ShiftPosition(this.children.entries,y,P,b),this},angle:function(y,P){return d.Angle(this.children.entries,y,P),this},rotate:function(y,P){return d.Rotate(this.children.entries,y,P),this}
1516,rotateAround:function(y,P){return d.RotateAround(this.children.entries,y,P),this},rotateAroundDistance:function(y,P,b){return d.RotateAroundDistance(this.children.entries,y,P,b),this},setAlpha:function(y,P){return d.SetAlpha(this.children.entries,y,P),this},setTint:function(y,P,b,E){return d.SetTint(this.children.entries,y,P,b,E),this},setOrigin:function(y,P,b,E){return d.SetOrigin(this.children.entries,y,P,b,E),this},scaleX:function(y,P){return d.ScaleX(this.children.entries,y,P),this},scaleY:function(y,P){return d.ScaleY(this.children.entries,y,P),this},scaleXY:function(y,P,b,E){return d.ScaleXY(this.children.entries,y,P,b,E),this},setDepth:function(y,P){return d.SetDepth(this.children.entries,y,P),this},setBlendMode:function(y){return d.SetBlendMode(this.children.entries,y),this},setHitArea:function(y,P){return d.SetHitArea(this.children.entries,y,P),this},shuffle:function(){return d.Shuffle(this.children.entries),this},kill:function(y){this.children.contains(y)&&y.setActive(!1)},killAndHide:function(y){this.children.contains(y)&&(y.setActive(!1),y.setVisible(!1))},setVisible:function(y,P,b){return d.SetVisible(this.children.entries,y,P,b),this},toggleVisible:function(){return d.ToggleVisible(this.children.entries),this},destroy:function(y,P){y===void 0&&(y=!1),P===void 0&&(P=!1),!(!this.scene||this.ignoreDestroy)&&(this.emit(r.DESTROY,this),this.removeAllListeners(),this.scene.sys.updateList.remove(this),this.clear(P,y),this.scene=void 0,this.children=void 0)}});l.exports=x},61295:(l,T,e)=>{/** 1517 * @author Richard Davey <[email protected]> 1518 * @copyright 2013-2023 Photon Storm Ltd. 1519 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1520 */var d=e(99325),g=e(59192);d.register("group",function(r){return new g(this.scene,null,r)})},62598:(l,T,e)=>{/** 1521 * @author Richard Davey <[email protected]> 1522 * @copyright 2013-2023 Photon Storm Ltd. 1523 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1524 */var d=e(59192),g=e(61286);g.register("group",function(r,a){return this.updateList.add(new d(this.scene,r,a))})},1539:(l,T,e)=>{/** 1525 * @author Richard Davey <[email protected]> 1526 * @copyright 2013-2023 Photon Storm Ltd. 1527 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1528 */var d=e(56694),g=e(64937),r=e(89980),a=e(57322),h=new d({Extends:r,Mixins:[g.Alpha,g.BlendMode,g.Depth,g.Flip,g.GetBounds,g.Mask,g.Origin,g.Pipeline,g.PostPipeline,g.ScrollFactor,g.Size,g.TextureCrop,g.Tint,g.Transform,g.Visible,a],initialize:function(o,f,u,v,m){r.call(this,o,"Image"),this._crop=this.resetCropObject(),this.setTexture(v,m),this.setPosition(f,u),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)}});l.exports=h},57786:l=>{/** 1529 * @author Richard Davey <[email protected]> 1530 * @copyright 2013-2023 Photon Storm Ltd. 1531 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1532 */var T=function(e,d,g,r){g.addToRenderList(d),e.batchSprite(d,d.frame,g,r)};l.exports=T},83556:(l,T,e)=>{/** 1533 * @author Richard Davey <[email protected]> 1534 * @copyright 2013-2023 Photon Storm Ltd. 1535 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1536 */var d=e(88933),g=e(99325),r=e(20494),a=e(1539);g.register("image",function(h,n){h===void 0&&(h={});var o=r(h,"key",null),f=r(h,"frame",null),u=new a(this.scene,0,0,o,f);return n!==void 0&&(h.add=n),d(this.scene,u,h),u})},20927:(l,T,e)=>{/** 1537 * @author Richard Davey <[email protected]> 1538 * @copyright 2013-2023 Photon Storm Ltd. 1539 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1540 */var d=e(1539),g=e(61286);g.register("image",function(r,a,h,n){return this.displayList.add(new d(this.scene,r,a,h,n))})},57322:(l,T,e)=>{/** 1541 * @author Richard Davey <[email protected]> 1542 * @copyright 2013-2023 Photon Storm Ltd. 1543 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1544 */var d=e(72283),g=d,r=d;g=e(59390),r=e(57786),l.exports={renderWebGL:g,renderCanvas:r}},59390:l=>{/** 1545 * @author Richard Davey <[email protected]> 1546 * @copyright 2013-2023 Photon Storm Ltd. 1547 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1548 */var T=function(e,d,g,r){g.addToRenderList(d),this.pipeline.batchSprite(d,g,r)};l.exports=T},48013:(l,T,e)=>{/** 1549 * @author Richard Davey <[email protected]> 1550 * @copyright 2013-2023 Photon Storm Ltd. 1551 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1552 */var d={Events:e(56631),DisplayList:e(91713),GameObjectCreator:e(99325),GameObjectFactory:e(61286),UpdateList:e(92034),Components:e(64937),GetCalcMatrix:e(73329),BuildGameObject:e(88933),BuildGameObjectAnimation:e(32291),GameObject:e(89980),BitmapText:e(44616),Blitter:e(52816),Bob:e(41664),Container:e(70339),DOMElement:e(38943),DynamicBitmapText:e(13468),Extern:e(39419),Graphics:e(33182),Group:e(59192),Image:e(1539),Layer:e(85305),Particles:e(27684),PathFollower:e(29598),RenderTexture:e(15996),RetroFont:e(55873),Rope:e(79968),Sprite:e(13747),Text:e(76555),GetTextSize:e(32979),MeasureText:e(27030),TextStyle:e(74744),TileSprite:e(35856),Zone:e(71030),Video:e(8630),Shape:e(91461),Arc:e(28593),Curve:e(15220),Ellipse:e(28591),Grid:e(39169),IsoBox:e(4415),IsoTriangle:e(65159),Line:e(579),Polygon:e(91249),Rectangle:e(517),Star:e(77843),Triangle:e(21873),Factories:{Blitter:e(38906),Container:e(23400),DOMElement:e(66788),DynamicBitmapText:e(94145),Extern:e(41155),Graphics:e(13122),Group:e(62598),Image:e(20927),Layer:e(17676),Particles:e(81212),PathFollower:e(19626),RenderTexture:e(29599),Rope:e(31982),Sprite:e(66135),StaticBitmapText:e(21797),Text:e(94627),TileSprite:e(20509),Zone:e(34546),Video:e(215),Arc:e(10369),Curve:e(10147),Ellipse:e(99869),Grid:e(9326),IsoBox:e(88154),IsoTriangle:e(67765),Line:e(85665),Polygon:e(88203),Rectangle:e(94355),Star:e(23962),Triangle:e(79296)},Creators:{Blitter:e(68452),Container:e(44516),DynamicBitmapText:e(67513),Graphics:e(41286),Group:e(61295),Image:e(83556),Layer:e(56378),Particles:e(765),RenderTexture:e(85692),Rope:e(96027),Sprite:e(89219),StaticBitmapText:e(95499),Text:e(75397),TileSprite:e(63950),Zone:e(24067),Video:e(65601)}};d.Shader=e(27902),d.Mesh=e(83321),d.NineSlice=e(44139),d.PointLight=e(13171),d.Plane=e(33412),d.Factories.Shader=e(51979),d.Factories.Mesh=e(8767
1552),d.Factories.NineSlice=e(53778),d.Factories.PointLight=e(91201),d.Factories.Plane=e(58322),d.Creators.Shader=e(13908),d.Creators.Mesh=e(41839),d.Creators.NineSlice=e(40964),d.Creators.PointLight=e(162),d.Creators.Plane=e(10912),d.Light=e(14455),d.LightsManager=e(26193),d.LightsPlugin=e(50296),l.exports=d},85305:(l,T,e)=>{/** 1553 * @author Richard Davey <[email protected]> 1554 * @copyright 2013-2023 Photon Storm Ltd. 1555 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1556 */var d=e(95723),g=e(56694),r=e(64937),a=e(48129),h=e(81078),n=e(6659),o=e(56631),f=e(71207),u=e(58010),v=e(7599),m=e(17922),p=new g({Extends:f,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Mask,r.PostPipeline,r.Visible,n,u],initialize:function(y,P){f.call(this,y),n.call(this),this.scene=y,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=y.sys,this.events=y.sys.events,this.sortChildrenFlag=!1,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.initPostPipeline(),this.clearAlpha(),this.setBlendMode(d.SKIP_CHECK),P&&this.add(P),y.sys.queueDepthSort()},setActive:function(x){return this.active=x,this},setName:function(x){return this.name=x,this},setState:function(x){return this.state=x,this},setDataEnabled:function(){return this.data||(this.data=new h(this)),this},setData:function(x,y){return this.data||(this.data=new h(this)),this.data.set(x,y),this},incData:function(x,y){return this.data||(this.data=new h(this)),this.data.inc(x,y),this},toggleData:function(x){return this.data||(this.data=new h(this)),this.data.toggle(x),this},getData:function(x){return this.data||(this.data=new h(this)),this.data.get(x)},setInteractive:function(){return this},disableInteractive:function(){return this},removeInteractive:function(){return this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return a(this)},willRender:function(x){return!(this.renderFlags!==15||this.list.length===0||this.cameraFilter!==0&&this.cameraFilter&x.id)},getIndexList:function(){for(var x=this,y=this.parentContainer,P=[];y&&(P.unshift(y.getIndex(x)),x=y,y.parentContainer);)y=y.parentContainer;return P.unshift(this.displayList.getIndex(x)),P},addChildCallback:function(x){x.displayList&&x.displayList!==this&&x.removeFromDisplayList(),x.displayList||(this.queueDepthSort(),x.displayList=this,x.emit(o.ADDED_TO_SCENE,x,this.scene),this.events.emit(v.ADDED_TO_SCENE,x,this.scene))},removeChildCallback:function(x){this.queueDepthSort(),x.displayList=null,x.emit(o.REMOVED_FROM_SCENE,x,this.scene),this.events.emit(v.REMOVED_FROM_SCENE,x,this.scene)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(m(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(x,y){return x._depth-y._depth},getChildren:function(){return this.list},addToDisplayList:function(x){return x===void 0&&(x=this.scene.sys.displayList),this.displayList&&this.displayList!==x&&this.removeFromDisplayList(),x.exists(this)||(this.displayList=x,x.add(this,!0),x.queueDepthSort(),this.emit(o.ADDED_TO_SCENE,this,this.scene),x.events.emit(v.ADDED_TO_SCENE,this,this.scene)),this},removeFromDisplayList:function(){var x=this.displayList||this.scene.sys.displayList;return x.exists(this)&&(x.remove(this,!0),x.queueDepthSort(),this.displayList=null,this.emit(o.REMOVED_FROM_SCENE,this,this.scene),x.events.emit(v.REMOVED_FROM_SCENE,this,this.scene)),this},destroy:function(x){if(!(!this.scene||this.ignoreDestroy)){this.emit(o.DESTROY,this);for(var y=this.list;y.length;)y[0].destroy(x);this.removeAllListeners(),this.resetPostPipeline(!0),this.displayList&&(this.displayList.remove(this,!0),this.displayList.queueDepthSort()),this.data&&(this.data.destroy(),this.data=void 0),this.active=!1,this.visible=!1,this.list=void 0,this.scene=void 0,this.displayList=void 0,this.systems=void 0,this.events=void 0}}});l.exports=p},834:l=>{/** 1557 * @author Richard Davey <[email protected]> 1558 * @copyright 2013-2023 Photon Storm Ltd. 1559 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1560 */var T=function(e,d,g){var r=d.list;if(r.length!==0){d.depthSort();var a=d.blendMode!==-1;a||e.setBlendMode(0);
1560var h=d._alpha;d.mask&&d.mask.preRenderCanvas(e,null,g);for(var n=0;n<r.length;n++){var o=r[n];if(o.willRender(g)){var f=o.alpha;!a&&o.blendMode!==e.currentBlendMode&&e.setBlendMode(o.blendMode),o.setAlpha(f*h),o.renderCanvas(e,o,g),o.setAlpha(f)}}d.mask&&d.mask.postRenderCanvas(e)}};l.exports=T},56378:(l,T,e)=>{/** 1561 * @author Richard Davey <[email protected]> 1562 * @copyright 2013-2023 Photon Storm Ltd. 1563 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1564 */var d=e(88933),g=e(85305),r=e(99325),a=e(20494);r.register("layer",function(h,n){h===void 0&&(h={});var o=a(h,"children",null),f=new g(this.scene,o);return n!==void 0&&(h.add=n),d(this.scene,f,h),f})},17676:(l,T,e)=>{/** 1565 * @author Richard Davey <[email protected]> 1566 * @copyright 2013-2023 Photon Storm Ltd. 1567 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1568 */var d=e(85305),g=e(61286);g.register("layer",function(r){return this.displayList.add(new d(this.scene,r))})},58010:(l,T,e)=>{/** 1569 * @author Richard Davey <[email protected]> 1570 * @copyright 2013-2023 Photon Storm Ltd. 1571 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1572 */var d=e(72283),g=d,r=d;g=e(17576),r=e(834),l.exports={renderWebGL:g,renderCanvas:r}},17576:l=>{/** 1573 * @author Richard Davey <[email protected]> 1574 * @copyright 2013-2023 Photon Storm Ltd. 1575 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1576 */var T=function(e,d,g){var r=d.list,a=r.length;if(a!==0){d.depthSort(),e.pipelines.preBatch(d);var h=d.blendMode!==-1;h||e.setBlendMode(0);for(var n=d.alpha,o=0;o<a;o++){var f=r[o];if(f.willRender(g)){var u,v,m,p;if(f.alphaTopLeft!==void 0)u=f.alphaTopLeft,v=f.alphaTopRight,m=f.alphaBottomLeft,p=f.alphaBottomRight;else{var x=f.alpha;u=x,v=x,m=x,p=x}!h&&f.blendMode!==e.currentBlendMode&&e.setBlendMode(f.blendMode);var y=f.mask;y&&y.preRenderWebGL(e,f,g);var P=f.type;P!==e.currentType&&(e.newType=!0,e.currentType=P),e.nextTypeMatch=o<a-1?r[o+1].type===e.currentType:!1,f.setAlpha(u*n,v*n,m*n,p*n),f.renderWebGL(e,f,g),f.setAlpha(u,v,m,p),y&&y.postRenderWebGL(e,g),e.newType=!1}}e.pipelines.postBatch(d)}};l.exports=T},14455:(l,T,e)=>{/** 1577 * @author Richard Davey <[email protected]> 1578 * @copyright 2013-2023 Photon Storm Ltd. 1579 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1580 */var d=e(26673),g=e(56694),r=e(64937),a=e(39298),h=e(75512),n=new g({Extends:d,Mixins:[r.Origin,r.ScrollFactor,r.Transform,r.Visible],initialize:function(f,u,v,m,p,x,y){d.call(this,f,u,v),this.color=new a(m,p,x),this.intensity=y,this.renderFlags=15,this.cameraFilter=0,this.setScrollFactor(1,1),this.setOrigin(),this.setDisplayOrigin(v)},displayWidth:{get:function(){return this.diameter},set:function(o){this.diameter=o}},displayHeight:{get:function(){return this.diameter},set:function(o){this.diameter=o}},width:{get:function(){return this.diameter},set:function(o){this.diameter=o}},height:{get:function(){return this.diameter},set:function(o){this.diameter=o}},willRender:function(o){return!(n.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&o.id)},setColor:function(o){var f=h.getFloatsFromUintRGB(o);return this.color.set(f[0],f[1],f[2]),this},setIntensity:function(o){return this.intensity=o,this},setRadius:function(o){return this.radius=o,this}});n.RENDER_MASK=15,l.exports=n},26193:(l,T,e)=>{/** 1581 * @author Richard Davey <[email protected]> 1582 * @copyright 2013-2023 Photon Storm Ltd. 1583 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1584 */var d=e(26535),g=e(56694),r=e(53996),a=e(14455),h=e(13171),n=e(39298),o=e(72677),f=e(17922),u=e(75512),v=new g({initialize:function(){this.lights=[],this.ambientColor=new n(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(m,p,x,y,P,b){return this.systems.displayList.add(new h(this.scene,m,p,x,y,P,b))},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(m){for(var p=this.lights,x=m.worldView,y=[],P=0;P<p.length;P++){var b=p[P];b.willRender(m)&&d(b,x)&&y.push({light:b,distance:r(b.x,b.y,x.centerX,x.centerY)})}return y.length>this.maxLights&&(f(y,this.sortByDistance),y=y.slice(0,this.maxLights)),this.visibleLights=y.length,y},sortByDistance:function(m,p){return m.distance>=p.distance},setAmbientColor:function(m){var p=u.getFloatsFromUintRGB(m);return this.ambientColor.set(p[0],p[1],p[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(m,p,x,y,P){m===void 0&&(m=0),p===void 0&&(p=0),x===void 0&&(x=128),y===void 0&&(y=16777215),P===void 0&&(P=1);var b=u.getFloatsFromUintRGB(y),E=new a(m,p,x,b[0],b[1],b[2],P);return this.lights.push(E),E},removeLight:function(m){var p=this.lights.indexOf(m);return p>=0&&o(this.lights,p),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});l.exports=v},50296:(l,T,e)=>{/** 1585 * @author Richard Davey <[email protected]> 1586 * @copyright 2013-2023 Photon Storm Ltd. 1587 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1588 */var d=e(56694),g=e(26193),r=e(91963),a=e(7599),h=new d({Extends:g,initialize:function(o){this.scene=o,this.systems=o.sys,o.sys.settings.isBooted||o.sys.events.once(a.BOOT,this.boot,this),g.call(this)},boot:function(){var n=this.systems.events;n.on(a.SHUTDOWN,this.shutdown,this),n.on(a.DESTROY,this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});r.register("LightsPlugin",h,"lights"),l.exports=h},83321:(l,T,e)=>{/** 1589 * @author Richard Davey <[email protected]> 1590 * @copyright 2013-2023 Photon Storm Ltd. 1591 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1592 */var d=e(56694),g=e(64937),r=e(75606),a=e(18693),h=e(89980),n=e(53267),o=e(67623),f=e(73329),u=e(16650),v=e(23464),m=e(23701),p=e(17922),x=e(70015),y=e(85769),P=new d({Extends:h,Mixins:[g.AlphaSingle,g.BlendM
1592ode,g.Depth,g.Mask,g.Pipeline,g.PostPipeline,g.ScrollFactor,g.Size,g.Texture,g.Transform,g.Visible,v],initialize:function(E,M,w,A,R,L,O,I,D,B,z,X){M===void 0&&(M=0),w===void 0&&(w=0),A===void 0&&(A="__WHITE"),h.call(this,E,"Mesh"),this.faces=[],this.vertices=[],this.tintFill=!1,this.debugCallback=null,this.debugGraphic=null,this.hideCCW=!0,this.modelPosition=new x,this.modelScale=new x(1,1,1),this.modelRotation=new x,this.dirtyCache=[0,0,0,0,0,0,0,0,0,0,0,0],this.transformMatrix=new u,this.viewPosition=new x,this.viewMatrix=new u,this.projectionMatrix=new u,this.totalRendered=0,this.totalFrame=0,this.ignoreDirtyCache=!1,this.fov,this.displayOriginX=0,this.displayOriginY=0;var W=E.sys.renderer;this.setPosition(M,w),this.setTexture(A,R),this.setSize(W.width,W.height),this.initPipeline(),this.initPostPipeline(),this.setPerspective(W.width,W.height),L&&this.addVertices(L,O,I,D,B,z,X)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},panX:function(b){return this.viewPosition.addScale(x.LEFT,b),this.dirtyCache[10]=1,this},panY:function(b){return this.viewPosition.y+=x.DOWN.y*b,this.dirtyCache[10]=1,this},panZ:function(b){return this.viewPosition.z+=b,this.dirtyCache[10]=1,this},setPerspective:function(b,E,M,w,A){return M===void 0&&(M=45),w===void 0&&(w=.01),A===void 0&&(A=1e3),this.fov=M,this.projectionMatrix.perspective(r(M),b/E,w,A),this.dirtyCache[10]=1,this.dirtyCache[11]=0,this},setOrtho:function(b,E,M,w){return b===void 0&&(b=this.scene.sys.renderer.getAspectRatio()),E===void 0&&(E=1),M===void 0&&(M=-1e3),w===void 0&&(w=1e3),this.fov=0,this.projectionMatrix.ortho(-b,b,-E,E,M,w),this.dirtyCache[10]=1,this.dirtyCache[11]=1,this},clear:function(){return this.faces.forEach(function(b){b.destroy()}),this.faces=[],this.vertices=[],this},addVerticesFromObj:function(b,E,M,w,A,R,L,O,I){var D=this.scene.sys.cache.obj.get(b),B;return D&&(B=n(D,this,E,M,w,A,R,L,O,I)),(!B||B.verts.length===0)&&console.warn("Mesh.addVerticesFromObj data empty:",b),this},sortByDepth:function(b,E){return b.depth-E.depth},depthSort:function(){return p(this.faces,this.sortByDepth),this},addVertex:function(b,E,M,w,A,R,L){var O=new y(b,E,M,w,A,R,L);return this.vertices.push(O),O},addFace:function(b,E,M){var w=new a(b,E,M);return this.faces.push(w),this.dirtyCache[9]=-1,w},addVertices:function(b,E,M,w,A,R,L){var O=o(b,E,M,w,A,R,L);return O?(this.faces=this.faces.concat(O.faces),this.vertices=this.vertices.concat(O.vertices)):console.warn("Mesh.addVertices data empty or invalid"),this.dirtyCache[9]=-1,this},getFaceCount:function(){return this.faces.length},getVertexCount:function(){return this.vertices.length},getFace:function(b){return this.faces[b]},hasFaceAt:function(b,E,M){M===void 0&&(M=this.scene.sys.cameras.main);for(var w=f(this,M).calc,A=this.faces,R=0;R<A.length;R++){var L=A[R];if(L.contains(b,E,w))return!0}return!1},getFaceAt:function(b,E,M){M===void 0&&(M=this.scene.sys.cameras.main);for(var w=f(this,M).calc,A=this.faces,R=[],L=0;L<A.length;L++){var O=A[L];O.contains(b,E,w)&&R.push(O)}return p(R,this.sortByDepth)},setDebug:function(b,E){return this.debugGraphic=b,!b&&!E?this.debugCallback=null:E?this.debugCallback=E:this.debugCallback=this.renderDebug,this},isDirty:function(){var b=this.modelPosition,E=this.modelRotation,M=this.modelScale,w=this.dirtyCache,A=b.x,R=b.y,L=b.z,O=E.x,I=E.y,D=E.z,B=M.x,z=M.y,X=M.z,W=this.getFaceCount(),j=w[0],N=w[1],Y=w[2],F=w[3],G=w[4],k=w[5],V=w[6],U=w[7],$=w[8],K=w[9];return w[0]=A,w[1]=R,w[2]=L,w[3]=O,w[4]=I,w[5]=D,w[6]=B,w[7]=z,w[8]=X,w[9]=W,j!==A||N!==R||Y!==L||F!==O||G!==I||k!==D||V!==B||U!==z||$!==X||K!==W},preUpdate:function(){this.totalRendered=this.totalFrame,this.totalFrame=0;var b=this.dirtyCache;if(!(!this.ignoreDirtyCache&&!b[10]&&!this.isDirty())){var E=this.width,M=this.height,w=this.viewMatrix,A=this.viewPosition;b[10]&&(w.identity(),w.translate(A),w.invert(),b[10]=0);var R=this.transformMatrix;R.setWorldMatrix(this.modelRotation,this.modelPosition,this.modelScale,this.viewMatrix,this.projectionMatrix);for(var L=A.z,O=this.faces,I=0;I<O.length;I++)O[I].transformCoordinatesLocal(R,E,M,L);this.depthSort()}},renderDebug:function(b,E){for(var M=b.debugGraphic,w=0;w<E.length;w++){var A=E[w],R=A.vertex1.tx,L=A.vertex1.ty,O=A.vertex2.tx,I=A.vertex2.ty,D=A.vertex3.tx,B=A.vertex3.ty;M.strokeTriangle(R,L,O,I,D,B)}},preDestroy:function(){this.clear(),this.debugCallback=null,this.debugGraphic=null},clearTint:function(){return this.setTint()},setInteractive:function(){var b=this.faces,E=function(M,w,A){for(var R=0;R<b.length;R++){var L=b[R];if(L.contains(w,A))return!0}return!1};return this.scene.sys.input.enable(this,E),this},setTint:function(b){b===void 0&&(b=16777215);for(var E=this.vertices,M=0;M<E.length;M++)E[M].color=b;return this},uvScroll:function(b,E){for(var M=this.faces,w=0;w<M.length;w++)M[w].scrollUV(b,E);return this},uvScale:function(b,E){for(var M=this.faces,w=0;w<M.length;w++)M[w].scaleUV(b,E);return this},tint:{set:function(b){this.setTint(b)}},rotateX:{get:function(){return m(this.modelRotation.x)},set:function(b){this.modelRotation.x=r(b)}},rotateY:{get:function(){return m(this.modelRotation.y)},set:function(b){this.modelRotation.y=r(b)}},rotateZ:{get:function(){return m(this.modelRotation.z)}
1592,set:function(b){this.modelRotation.z=r(b)}}});l.exports=P},6317:l=>{/** 1593 * @author Richard Davey <[email protected]> 1594 * @copyright 2013-2023 Photon Storm Ltd. 1595 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1596 */var T=function(){};l.exports=T},41839:(l,T,e)=>{/** 1597 * @author Richard Davey <[email protected]> 1598 * @copyright 2013-2023 Photon Storm Ltd. 1599 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1600 */var d=e(88933),g=e(99325),r=e(20494),a=e(10850),h=e(83321);g.register("mesh",function(n,o){n===void 0&&(n={});var f=r(n,"key",null),u=r(n,"frame",null),v=a(n,"vertices",[]),m=a(n,"uvs",[]),p=a(n,"indicies",[]),x=a(n,"containsZ",!1),y=a(n,"normals",[]),P=a(n,"colors",16777215),b=a(n,"alphas",1),E=new h(this.scene,0,0,f,u,v,m,p,x,y,P,b);return o!==void 0&&(n.add=o),d(this.scene,E,n),E})},8767:(l,T,e)=>{/** 1601 * @author Richard Davey <[email protected]> 1602 * @copyright 2013-2023 Photon Storm Ltd. 1603 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1604 */var d=e(83321),g=e(61286);g.register("mesh",function(r,a,h,n,o,f,u,v,m,p,x){return this.displayList.add(new d(this.scene,r,a,h,n,o,f,u,v,m,p,x))})},23464:(l,T,e)=>{/** 1605 * @author Richard Davey <[email protected]> 1606 * @copyright 2013-2023 Photon Storm Ltd. 1607 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1608 */var d=e(72283),g=d,r=d;g=e(57410),r=e(6317),l.exports={renderWebGL:g,renderCanvas:r}},57410:(l,T,e)=>{/** 1609 * @author Richard Davey <[email protected]> 1610 * @copyright 2013-2023 Photon Storm Ltd. 1611 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1612 */var d=e(73329),g=function(r,a,h,n){var o=a.faces,f=o.length;if(f!==0){h.addToRenderList(a);var u=r.pipelines.set(a.pipeline,a),v=d(a,h,n).calc;r.pipelines.preBatch(a);for(var m=u.setGameObject(a),p=u.vertexViewF32,x=u.vertexViewU32,y=u.vertexCount*u.currentShader.vertexComponentCount-1,P=a.tintFill,b=[],E=a.debugCallback,M=v.a,w=v.b,A=v.c,R=v.d,L=v.e,O=v.f,I=a.viewPosition.z,D=a.hideCCW,B=h.roundPixels,z=h.alpha*a.alpha,X=0,W=0;W<f;W++){var j=o[W];j.isInView(h,D,I,z,M,w,A,R,L,O,B)&&(u.shouldFlush(3)&&(u.flush(),m=u.setGameObject(a),y=0),y=j.load(p,x,y,m,P),X++,u.vertexCount+=3,u.currentBatch.count=u.vertexCount-u.currentBatch.start,E&&b.push(j))}a.totalFrame+=X,E&&E.call(a,a,b),r.pipelines.postBatch(a)}};l.exports=g},44139:(l,T,e)=>{/** 1613 * @author Richard Davey <[email protected]> 1614 * @copyright 2013-2023 Photon Storm Ltd. 1615 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1616 */var d=e(56694),g=e(64937),r=e(89980),a=e(94456),h=e(85769),n=new d({Extends:r,Mixins:[g.AlphaSingle,g.BlendMode,g.Depth,g.GetBounds,g.Mask,g.Origin,g.Pipeline,g.PostPipeline,g.ScrollFactor,g.Texture,g.Transform,g.Visible,a],initialize:function(f,u,v,m,p,x,y,P,b,E,M){x===void 0&&(x=256),y===void 0&&(y=256),P===void 0&&(P=10),b===void 0&&(b=10),E===void 0&&(E=0),M===void 0&&(M=0),r.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,this.is3Slice=E===0&&M===0;for(var w=this.is3Slice?18:54,A=0;A<w;A++)this.vertices.push(new h);this.setPosition(u,v),this.setTexture(m,p),this.setSlices(x,y,P,b,E,M),this.setOrigin(.5,.5),this.initPipeline(),this.initPostPipeline()},setSlices:function(o,f,u,v,m,p){o===void 0&&(o=256),f===void 0&&(f=256),u===void 0&&(u=10),v===void 0&&(v=10),m===void 0&&(m=0),p===void 0&&(p=0);var x=m===0&&p===0;return this.is3Slice!==x?console.warn("Cannot change 9 slice to 3 slice"):(this._width=o,this._height=f,this.leftWidth=u,this.rightWidth=v,this.topHeight=m,this.bottomHeight=p,this.is3Slice&&(f=this.frame.height,this._height=f,this.topHeight=f,this.bottomHeight=0),this.updateVertices(),this.updateUVs()),this},updateUVs:function(){var o=this.leftWidth,f=this.rightWidth,u=this.topHeight,v=this.bottomHeight,m=this.frame.width,p=this.frame.height;this.updateQuadUVs(0,0,0,o/m,u/p),this.updateQuadUVs(6,o/m,0,1-f/m,u/p),this.updateQuadUVs(12,1-f/m,0,1,u/p),this.is3Slice||(this.updateQuadUVs(18,0,u/p,o/m,1-v/p),this.updateQuadUVs(24,o/m,u/p,1-f/m,1-v/p),this.updateQuadUVs(30,1-f/m,u/p,1,1-v/p),this.updateQuadUVs(36,0,1-v/p,o/m,1),this.updateQuadUVs(42,o/m,1-v/p,1-f/m,1),this.updateQuadUVs(48,1-f/m,1-v/p,1,1))},updateVertices:function(){var o=this.leftWidth,f=this.rightWidth,u=this.topHeight,v=this.bottomHeight,m=this.width,p=this.height;this.updateQuad(0,-.5,.5,-.5+o/m,.5-u/p),this.updateQuad(6,-.5+o/m,.5,.5-f/m,.5-u/p),this.updateQuad(12,.5-f/m,.5,.5,.5-u/p),this.is3Slice||(this.updateQuad(18,-.5,.5-u/p,-.5+o/m,-.5+v/p),this.updateQuad(24,-.5+o/m,.5-u/p,.5-f/m,-.5+v/p),this.updateQuad(30,.5-f/m,.5-u/p,.5,-.5+v/p),this.updateQuad(36,-.5,-.5+v/p,-.5+o/m,-.5),this.updateQuad(42,-.5+o/m,-.5+v/p,.5-f/m,-.5),this.updateQuad(48,.5-f/m,-.5+v/p,.5,-.5))},updateQuad:function(o,f,u,v,m){var p=this.width,x=this.height,y=this.originX,P=this.originY,b=this.vertices;b[o+0].resize(f,u,p,x,y,P),b[o+1].resize(f,m,p,x,y,P),b[o+2].resize(v,u,p,x,y,P),b[o+3].resize(f,m,p,x,y,P),b[o+4].resize(v,m,p,x,y,P),b[o+5].resize(v,u,p,x,y,P)},updateQuadUVs:function(o,f,u,v,m){var p=this.vertices,x=this.frame,y=x.u0,P=x.v0,b=x.u1,E=x.v1;if(y!==0||b!==1){var M=b-y;f=y+f*M,v=y+v*M}if(P!==0||E!==1){var w=E-P;u=P+u*w,m=P+m*w}p[o+0].setUVs(f,u),p[o+1].setUVs(f,m),p[o+2].setUVs(v,u),p[o+3].setUVs(f,m),p[o+4].setUVs(v,m),p[o+
16165].setUVs(v,u)},clearTint:function(){return this.setTint(16777215),this},setTint:function(o){return o===void 0&&(o=16777215),this.tint=o,this.tintFill=!1,this},setTintFill:function(o){return this.setTint(o),this.tintFill=!0,this},isTinted:{get:function(){return this.tint!==16777215}},width:{get:function(){return this._width},set:function(o){this._width=Math.max(o,this.leftWidth+this.rightWidth),this.updateVertices()}},height:{get:function(){return this._height},set:function(o){this.is3Slice||(this._height=Math.max(o,this.topHeight+this.bottomHeight),this.updateVertices())}},displayWidth:{get:function(){return this.scaleX*this.width},set:function(o){this.scaleX=o/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(o){this.scaleY=o/this.height}},setSize:function(o,f){this.width=o,this.height=f;var u=this.input;return u&&!u.customHitArea&&(u.hitArea.width=this.width,u.hitArea.height=this.height),this},setDisplaySize:function(o,f){return this.displayWidth=o,this.displayHeight=f,this},originX:{get:function(){return this._originX},set:function(o){this._originX=o,this.updateVertices()}},originY:{get:function(){return this._originY},set:function(o){this._originY=o,this.updateVertices()}},setOrigin:function(o,f){return o===void 0&&(o=.5),f===void 0&&(f=o),this._originX=o,this._originY=f,this.updateVertices(),this.updateDisplayOrigin()},setSizeToFrame:function(){if(this.is3Slice){var o=this.frame.height;this._height=o,this.topHeight=o,this.bottomHeight=0}return this.updateUVs(),this},preDestroy:function(){this.vertices=[]}});l.exports=n},40964:(l,T,e)=>{/** 1617 * @author Richard Davey <[email protected]> 1618 * @copyright 2013-2023 Photon Storm Ltd. 1619 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1620 */var d=e(88933),g=e(99325),r=e(20494),a=e(10850),h=e(44139);g.register("nineslice",function(n,o){n===void 0&&(n={});var f=r(n,"key",null),u=r(n,"frame",null),v=a(n,"width",256),m=a(n,"height",256),p=a(n,"leftWidth",10),x=a(n,"rightWidth",10),y=a(n,"topHeight",0),P=a(n,"bottomHeight",0),b=new h(this.scene,0,0,f,u,v,m,p,x,y,P);return o!==void 0&&(n.add=o),d(this.scene,b,n),b})},53778:(l,T,e)=>{/** 1621 * @author Richard Davey <[email protected]> 1622 * @copyright 2013-2023 Photon Storm Ltd. 1623 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1624 */var d=e(44139),g=e(61286);g.register("nineslice",function(r,a,h,n,o,f,u,v,m,p){return this.displayList.add(new d(this.scene,r,a,h,n,o,f,u,v,m,p))})},94456:(l,T,e)=>{/** 1625 * @author Richard Davey <[email protected]> 1626 * @copyright 2013-2023 Photon Storm Ltd. 1627 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1628 */var d=e(72283),g=d,r=d;g=e(27420),l.exports={renderWebGL:g,renderCanvas:r}},27420:(l,T,e)=>{/** 1629 * @author Richard Davey <[email protected]> 1630 * @copyright 2013-2023 Photon Storm Ltd. 1631 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1632 */var d=e(73329),g=e(75512),r=function(a,h,n,o){var f=h.vertices,u=f.length;if(u!==0){n.addToRenderList(h);var v=a.pipelines.set(h.pipeline,h),m=d(h,n,o,!1).calc;a.pipelines.preBatch(h);var p=v.setGameObject(h),x=v.vertexViewF32,y=v.vertexViewU32,P=v.vertexCount*v.currentShader.vertexComponentCount-1,b=n.roundPixels,E=h.tintFill,M=n.alpha*h.alpha,w=g.getTintAppendFloatAlpha(h.tint,M),A=v.vertexAvailable(),R=-1;A<u&&(R=A);for(var L=0;L<u;L++){var O=f[L];L===R&&(v.flush(),p=v.setGameObject(h),P=0),x[++P]=m.getXRound(O.vx,O.vy,b),x[++P]=m.getYRound(O.vx,O.vy,b),x[++P]=O.u,x[++P]=O.v,x[++P]=p,x[++P]=E,y[++P]=w,v.vertexCount++,v.currentBatch.count=v.vertexCount-v.currentBatch.start}a.pipelines.postBatch(h)}};l.exports=r},19737:(l,T,e)=>{/** 1633 * @author Richard Davey <[email protected]> 1634 * @copyright 2013-2023 Photon Storm Ltd. 1635 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1636 */var d=e(56694),g=e(93025),r=e(22946),a=e(21902),h=e(4840),n=e(15978),o=new d({Extends:g,initialize:function(u){g.call(this,u,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 f=this.propertyValue,u=f,v=this.defaultEmit,m=this.defaultUpdate;if(this.method===9){this.start=f[0],this.ease=a("Linear"),this.interpolation=h("linear"),v=this.easedValueEmit,m=this.easeValueUpdate,u=f[0],this.active=!0;for(var p=0;p<f.length;p++){var x=n(f[p]);this.r.push(x.r),this.g.push(x.g),this.b.push(x.b)}}return this.onEmit=v,this.onUpdate=m,this.current=u,this},setEase:function(f){this.easeName=f,this.ease=a(f)},easedValueEmit:function(){return this.current=this.start,this.start},easeValueUpdate:function(f,u,v){var m=this.ease(v),p=this.interpolation(this.r,m),x=this.interpolation(this.g,m),y=this.interpolation(this.b,m),P=r(p,x,y);return this.current=P,P}});l.exports=o},93025:(l,T,e)=>{/** 1637 * @author Richard Davey <[email protected]> 1638 * @copyright 2013-2023 Photon Storm Ltd. 1639 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1640 */var d=e(17489),g=e(82897),r=e(56694),a=e(61616),h=e(21902),n=e(72632),o=e(4840),f=e(88462),u=e(1071),v=new r({initialize:function(p,x,y){y===void 0&&(y=!1),this.propertyKey=p,this.propertyValue=x,this.defaultValue=x,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=y,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.active=!0,this.method=0,this._onEmit,this._onUpdate},loadConfig:function(m,p){m===void 0&&(m={}),p&&(this.propertyKey=p),this.propertyValue=n(m,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(m){var p;switch(this.method){case 1:case 3:case 8:p=m;break;case 2:this.propertyValue.indexOf(m)>=0&&(p=m);break;case 4:var x=(this.end-this.start)/this.steps;p=f(m,x),this.counter=p;break;
1640case 5:case 6:case 7:p=g(m,this.start,this.end);break;case 9:p=this.start[0];break}return this.current=p,this},getMethod:function(){var m=this.propertyValue;if(m===null)return 0;var p=typeof m;if(p==="number")return 1;if(Array.isArray(m))return 2;if(p==="function")return 3;if(p==="object"){if(this.hasBoth(m,"start","end"))return this.has(m,"steps")?4:5;if(this.hasBoth(m,"min","max"))return 6;if(this.has(m,"random"))return 7;if(this.hasEither(m,"onEmit","onUpdate"))return 8;if(this.has(m,"interpolation"))return 9}return 0},setMethods:function(){var m=this.propertyValue,p=m,x=this.defaultEmit,y=this.defaultUpdate;switch(this.method){case 1:x=this.staticValueEmit;break;case 2:x=this.randomStaticValueEmit,p=m[0];break;case 3:this._onEmit=m,x=this.proxyEmit;break;case 4:this.start=m.start,this.end=m.end,this.steps=m.steps,this.counter=this.start,this.yoyo=this.has(m,"yoyo")?m.yoyo:!1,this.direction=0,x=this.steppedEmit,p=this.start;break;case 5:this.start=m.start,this.end=m.end;var P=this.has(m,"ease")?m.ease:"Linear";this.ease=h(P,m.easeParams),x=this.has(m,"random")&&m.random?this.randomRangedValueEmit:this.easedValueEmit,y=this.easeValueUpdate,p=this.start;break;case 6:this.start=m.min,this.end=m.max,x=this.has(m,"int")&&m.int?this.randomRangedIntEmit:this.randomRangedValueEmit,p=this.start;break;case 7:var b=m.random;Array.isArray(b)&&(this.start=b[0],this.end=b[1]),x=this.randomRangedIntEmit,p=this.start;break;case 8:this._onEmit=this.has(m,"onEmit")?m.onEmit:this.defaultEmit,this._onUpdate=this.has(m,"onUpdate")?m.onUpdate:this.defaultUpdate,x=this.proxyEmit,y=this.proxyUpdate;break;case 9:this.start=m.values;var E=this.has(m,"ease")?m.ease:"Linear";this.ease=h(E,m.easeParams),this.interpolation=o(m.interpolation),x=this.easedValueEmit,y=this.easeValueUpdate,p=this.start[0];break}return this.onEmit=x,this.onUpdate=y,this.current=p,this},has:function(m,p){return m.hasOwnProperty(p)},hasBoth:function(m,p,x){return m.hasOwnProperty(p)&&m.hasOwnProperty(x)},hasEither:function(m,p,x){return m.hasOwnProperty(p)||m.hasOwnProperty(x)},defaultEmit:function(m,p,x){return x},defaultUpdate:function(m,p,x,y){return y},proxyEmit:function(m,p,x){var y=this._onEmit(m,p,x);return this.current=y,y},proxyUpdate:function(m,p,x,y){var P=this._onUpdate(m,p,x,y);return this.current=P,P},staticValueEmit:function(){return this.current},staticValueUpdate:function(){return this.current},randomStaticValueEmit:function(){var m=Math.floor(Math.random()*this.propertyValue.length);return this.current=this.propertyValue[m],this.current},randomRangedValueEmit:function(m,p){var x=a(this.start,this.end);return m&&m.data[p]&&(m.data[p].min=x,m.data[p].max=this.end),this.current=x,x},randomRangedIntEmit:function(m,p){var x=d(this.start,this.end);return m&&m.data[p]&&(m.data[p].min=x,m.data[p].max=this.end),this.current=x,x},steppedEmit:function(){var m=this.counter,p=m,x=(this.end-this.start)/this.steps;if(this.yoyo){var y;this.direction===0?(p+=x,p>=this.end&&(y=p-this.end,p=this.end-y,this.direction=1)):(p-=x,p<=this.start&&(y=this.start-p,p=this.start+y,this.direction=0)),this.counter=p}else this.counter=u(p+x,this.start,this.end);return this.current=m,m},easedValueEmit:function(m,p){if(m&&m.data[p]){var x=m.data[p];x.min=this.start,x.max=this.end}return this.current=this.start,this.start},easeValueUpdate:function(m,p,x){var y=m.data[p],P,b=this.ease(x);return this.interpolation?P=this.interpolation(this.start,b):P=(y.max-y.min)*b+y.min,this.current=P,P},destroy:function(){this.propertyValue=null,this.defaultValue=null,this.ease=null,this.interpolation=null,this._onEmit=null,this._onUpdate=null}});l.exports=v},87811:(l,T,e)=>{/** 1641 * @author Richard Davey <[email protected]> 1642 * @copyright 2013-2023 Photon Storm Ltd. 1643 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1644 */var d=e(56694),g=e(72632),r=e(30891),a=new d({Extends:r,initialize:function(n,o,f,u,v){if(typeof n=="object"){var m=n;n=g(m,"x",0),o=g(m,"y",0),f=g(m,"power",0),u=g(m,"epsilon",100),v=g(m,"gravity",50)}else n===void 0&&(n=0),o===void 0&&(o=0),f===void 0&&(f=0),u===void 0&&(u=100),v===void 0&&(v=50);r.call(this,n,o,!0),this._gravity=v,this._power=f*v,this._epsilon=u*u},update:function(h,n){var o=this.x-h.x,f=this.y-h.y,u=o*o+f*f;if(u!==0){var v=Math.sqrt(u);u<this._epsilon&&(u=this._epsilon);var m=this._power*n/(u*v)*100;h.velocityX+=o*m,h.velocityY+=f*m}},epsilon:{get:function(){return Math.sqrt(this._epsilon)},set:function(h){this._epsilon=h*h}},power:{get:function(){return this._power/this._gravity},set:function(h){this._power=h*this._gravity}},gravity:{get:function(){return this._gravity},set:function(h){var n=this.power;this._gravity=h,this.power=n}}});l.exports=a},14909:(l,T,e)=>{/** 1645 * @author Richard Davey <[email protected]> 1646 * @copyright 2013-2023 Photon Storm Ltd. 1647 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1648 */var d=e(16569),g=e(82897),r=e(56694),a=e(75606),h=e(74118),n=e(2386
1648),o=e(93736),f=new r({initialize:function(v){this.emitter=v,this.texture=null,this.frame=null,this.x=0,this.y=0,this.worldPosition=new o,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=new d(this),this.bounds=new h},emit:function(u,v,m,p,x,y){return this.emitter.emit(u,v,m,p,x,y)},isAlive:function(){return this.lifeCurrent>0},kill:function(){this.lifeCurrent=0},setPosition:function(u,v){u===void 0&&(u=0),v===void 0&&(v=0),this.x=u,this.y=v},fire:function(u,v){var m=this.emitter,p=m.ops,x=m.getAnim();if(x?this.anims.play(x):(this.frame=m.getFrame(),this.texture=this.frame.texture),!this.frame)throw new Error("Particle has no texture frame");if(m.getEmitZone(this),u===void 0?this.x+=p.x.onEmit(this,"x"):p.x.steps>0?this.x+=u+p.x.onEmit(this,"x"):this.x+=u,v===void 0?this.y+=p.y.onEmit(this,"y"):p.y.steps>0?this.y+=v+p.y.onEmit(this,"y"):this.y+=v,this.life=p.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0,this.delayCurrent=p.delay.onEmit(this,"delay"),this.holdCurrent=p.hold.onEmit(this,"hold"),this.scaleX=p.scaleX.onEmit(this,"scaleX"),this.scaleY=p.scaleY.active?p.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=p.rotate.onEmit(this,"rotate"),this.rotation=a(this.angle),m.worldMatrix.transformPoint(this.x,this.y,this.worldPosition),this.delayCurrent===0&&m.getDeathZone(this))return this.lifeCurrent=0,!1;var y=p.speedX.onEmit(this,"speedX"),P=p.speedY.active?p.speedY.onEmit(this,"speedY"):y;if(m.radial){var b=a(p.angle.onEmit(this,"angle"));this.velocityX=Math.cos(b)*Math.abs(y),this.velocityY=Math.sin(b)*Math.abs(P)}else if(m.moveTo){var E=p.moveToX.onEmit(this,"moveToX"),M=p.moveToY.onEmit(this,"moveToY"),w=this.life/1e3;this.velocityX=(E-this.x)/w,this.velocityY=(M-this.y)/w}else this.velocityX=y,this.velocityY=P;return m.acceleration&&(this.accelerationX=p.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=p.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=p.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=p.maxVelocityY.onEmit(this,"maxVelocityY"),this.bounce=p.bounce.onEmit(this,"bounce"),this.alpha=p.alpha.onEmit(this,"alpha"),p.color.active?this.tint=p.color.onEmit(this,"tint"):this.tint=p.tint.onEmit(this,"tint"),!0},update:function(u,v,m){if(this.lifeCurrent<=0)return this.holdCurrent>0?(this.holdCurrent-=u,this.holdCurrent<=0):!0;if(this.delayCurrent>0)return this.delayCurrent-=u,!1;this.anims.update(0,u);var p=this.emitter,x=p.ops,y=1-this.lifeCurrent/this.life;if(this.lifeT=y,this.x=x.x.onUpdate(this,"x",y,this.x),this.y=x.y.onUpdate(this,"y",y,this.y),p.moveTo){var P=x.moveToX.onUpdate(this,"moveToX",y,p.moveToX),b=x.moveToY.onUpdate(this,"moveToY",y,p.moveToY),E=this.lifeCurrent/1e3;this.velocityX=(P-this.x)/E,this.velocityY=(b-this.y)/E}return this.computeVelocity(p,u,v,m,y),this.scaleX=x.scaleX.onUpdate(this,"scaleX",y,this.scaleX),this.scaleY=this.scaleX,x.scaleY.active&&(this.scaleY=x.scaleY.onUpdate(this,"scaleY",y,this.scaleY)),this.angle=x.rotate.onUpdate(this,"rotate",y,this.angle),this.rotation=a(this.angle),p.getDeathZone(this)?(this.lifeCurrent=0,!0):(this.alpha=x.alpha.onUpdate(this,"alpha",y,this.alpha),x.color.active?this.tint=x.color.onUpdate(this,"color",y,this.tint):this.tint=x.tint.onUpdate(this,"tint",y,this.tint),this.lifeCurrent-=u,this.lifeCurrent<=0&&this.holdCurrent<=0)},computeVelocity:function(u,v,m,p,x){var y=u.ops,P=this.velocityX,b=this.velocityY,E=y.accelerationX.onUpdate(this,"accelerationX",x,this.accelerationX),M=y.accelerationY.onUpdate(this,"accelerationY",x,this.accelerationY),w=y.maxVelocityX.onUpdate(this,"maxVelocityX",x,this.maxVelocityX),A=y.maxVelocityY.onUpdate(this,"maxVelocityY",x,this.maxVelocityY);this.bounce=y.bounce.onUpdate(this,"bounce",x,this.bounce),P+=u.gravityX*m+E*m,b+=u.gravityY*m+M*m,P=g(P,-w,w),b=g(b,-A,A),this.velocityX=P,this.velocityY=b,this.x+=P*m,this.y+=b*m,u.worldMatrix.transformPoint(this.x,this.y,this.worldPosition);for(var R=0;R<p.length;R++){var L=p[R];L.active&&L.update(this,v,m,x)}},setSizeToFrame:function(){},getBounds:function(u){u===void 0&&(u=this.emitter.getWorldTransformMatrix());var v=Math.abs(u.scaleX)*this.scaleX,m=Math.abs(u.scaleY)*this.scaleY,p=this.x,x=this.y,y=this.rotation,P=this.frame.width*v/2,b=this.frame.height*m/2,E=this.bounds,M=new o(p-P,x-b),w=new o(p+P,x-b),A=new o(p-P,x+b),R=new o(p+P,x+b);return y!==0&&(n(M,p,x,y),n(w,p,x,y),n(A,p,x,y),n(R,p,x,y)),u.transformPoint(M.x,M.y,M),u.transformPoint(w.x,w.y,w),u.transformPoint(A.x,A.y,A),u.transformPoint(R.x,R.y,R),E.x=Math.min(M.x,w.x,A.x,R.x),E.y=Math.min(M.y,w.y,A.y,R.y),E.width=Math.max(M.x,w.x,A.x,R.x)-E.x,E.height=Math.max(M.y,w.y,A.y,R.y)-E.y,E},destroy:function(){this.anims.destroy(),this.anims=null,this.emitter=null,this.texture=null,this.frame=null,this.scene=null}});l.exports=f},73106:(l,T,e)=>{/** 1649 * @author Richard Davey <[email protected]> 1650 * @copyright 2013-2023 Photon Storm Ltd. 1651 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1652 */var d=e(56694),g=e(30891),r=e(74118),a=new d({Extends:g,initialize:function(n,o,f,u,v,m,p,x){v===void 0&&(v=!0),m===void 0&&(m=!0),p===void 0&&(p=!0),x===void 0&&(x=!0),g.call(this,n,o,!0),this.bounds=new r(n,o,f,u),this.collideLeft=v,this.collideRight=m,this.collideTop=p,this.collideBottom=x},update:function(h){var n=this.bounds,o=-h.bounce,f=h.worldPosition;f.x<n.x&&this.collideLeft?(h.x+=n.x-f.x,h.velocityX*=o):f.x>n.right&&this.collideRight&&(h.x-=f.x-n.right,h.velocityX*=o),f.y<n.y&&this.collideTop?(h.y+=n.y-f.y,h.velocityY*=o):f.y>n.bottom&&this.collideBottom&&(h.y-=f.y-n.bottom,h.velocityY*=o)}});l.exports=a},9216:(l,T,e)=>{/** 1653 * @author Richard Davey <[email protected]> 1654 * @copyright 2013-2023 Photon Storm Ltd. 1655 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1656 */var d=e(56694),g=e(64937),r=e(48129),a=e(29538),h=e(69361),n=e(54213),o=e(19737),f=e(93025),u=e(40629),v=e(89980),m=e(72632),p=e(72861),x=e(87811),y=e(53523),P=e(19256),b=e(7782),E=e(71207),M=e(14655),w=e(14909),A=e(68433),R=e(74118),L=e(90205),O=e(66458),I=e(69116),D=e(17922),B=e(69360),z=e(93736),X=e(1071),W=e(73106),j=["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"],N=["accelerationX","accelerationY","alpha","angle","bounce","color","delay","hold","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],Y=new d({Extends:v,Mixins:[g.AlphaSingle,g.BlendM
1656ode,g.Depth,g.Mask,g.Pipeline,g.PostPipeline,g.ScrollFactor,g.Texture,g.Transform,g.Visible,I],initialize:function(G,k,V,U,$){v.call(this,G,"ParticleEmitter"),this.particleClass=w,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 o("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 z,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 E(this),this.tintFill=!1,this.initPipeline(),this.initPostPipeline(),this.setPosition(k,V),this.setTexture(U),$&&this.setConfig($)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},setConfig:function(F){if(!F)return this;var G=0,k="",V=this.ops;for(G=0;G<N.length;G++)k=N[G],V[k].loadConfig(F);for(G=0;G<j.length;G++)k=j[G],P(F,k)&&(this[k]=m(F,k));if(this.acceleration=this.accelerationX!==0||this.accelerationY!==0,this.moveTo=this.moveToX!==0&&this.moveToY!==0,P(F,"speed")&&(V.speedX.loadConfig(F,"speed"),V.speedY.active=!1),(y(F,["speedX","speedY"])||this.moveTo)&&(this.radial=!1),P(F,"scale")&&(V.scaleX.loadConfig(F,"scale"),V.scaleY.active=!1),P(F,"callbackScope")){var U=m(F,"callbackScope",null);this.emitCallbackScope=U,this.deathCallbackScope=U}if(P(F,"emitZone")&&this.addEmitZone(F.emitZone),P(F,"deathZone")&&this.addDeathZone(F.deathZone),P(F,"bounds")){var $=this.addParticleBounds(F.bounds);$.collideLeft=m(F,"collideLeft",!0),$.collideRight=m(F,"collideRight",!0),$.collideTop=m(F,"collideTop",!0),$.collideBottom=m(F,"collideBottom",!0)}return P(F,"followOffset")&&this.followOffset.setFromObject(m(F,"followOffset",0)),P(F,"texture")&&this.setTexture(F.texture),P(F,"frame")?this.setEmitterFrame(F.frame):P(F,"anim")&&this.setAnim(F.anim),P(F,"reserve")&&this.reserve(F.reserve),P(F,"advance")&&this.fastForward(F.advance),this.resetCounters(this.frequency,this.emitting),this.emitting&&this.emit(u.START,this),this},toJSON:function(){var F=r(this),G=0,k="";for(G=0;G<j.length;G++)k=j[G],F[k]=this[k];var V=this.ops;for(G=0;G<N.length;G++)k=N[G],V[k]&&(F[k]=V[k].toJSON());return V.speedY.active||(delete F.speedX,F.speed=V.speedX.toJSON()),this.scaleX===this.scaleY&&(delete F.scaleX,delete F.scaleY,F.scale=V.scaleX.toJSON()),F},resetCounters:function(F,G){var k=this.counters;k.fill(0),k[0]=F,G&&(k[5]=1)},startFollow:function(F,G,k,V){return G===void 0&&(G=0),k===void 0&&(k=0),V===void 0&&(V=!1),this.follow=F,this.followOffset.set(G,k),this.trackVisible=V,this},stopFollow:function(){return this.follow=null,this.followOffset.set(0,0),this.trackVisible=!1,this},getFrame:function(){var F=this.frames,G=F.length,k;return G===1?k=F[0]:this.randomFrame?k=p(F):(k=F[this.currentFrame],this.frameCounter++,this.frameCounter===this.frameQuantity&&(this.frameCounter=0,this.currentFrame++,this.currentFrame===G&&(this.currentFrame=0))),this.texture.get(k)},setEmitterFrame:function(F,G,k){G===void 0&&(G=!0),k===void 0&&(k=1),this.randomFrame=G,this.frameQuantity=k,this.currentFrame=0;var V=typeof F;
1656if(this.frames.length=0,Array.isArray(F))this.frames=this.frames.concat(F);else if(V==="string"||V==="number")this.frames.push(F);else if(V==="object"){var U=F;F=m(U,"frames",null),F&&(this.frames=this.frames.concat(F));var $=m(U,"cycle",!1);this.randomFrame=!$,this.frameQuantity=m(U,"quantity",k)}return this.frames.length===1&&(this.frameQuantity=1,this.randomFrame=!1),this},getAnim:function(){var F=this.anims,G=F.length;if(G===0)return null;if(G===1)return F[0];if(this.randomAnim)return p(F);var k=F[this.currentAnim];return this.animCounter++,this.animCounter>=this.animQuantity&&(this.animCounter=0,this.currentAnim=X(this.currentAnim+1,0,G-1)),k},setAnim:function(F,G,k){G===void 0&&(G=!0),k===void 0&&(k=1),this.randomAnim=G,this.animQuantity=k,this.currentAnim=0;var V=typeof F;if(this.anims.length=0,Array.isArray(F))this.anims=this.anims.concat(F);else if(V==="string")this.anims.push(F);else if(V==="object"){var U=F;F=m(U,"anims",null),F&&(this.anims=this.anims.concat(F));var $=m(U,"cycle",!1);this.randomAnim=!$,this.animQuantity=m(U,"quantity",k)}return this.anims.length===1&&(this.animQuantity=1,this.randomAnim=!1),this},setRadial:function(F){return F===void 0&&(F=!0),this.radial=F,this},addParticleBounds:function(F,G,k,V,U,$,K,J){if(typeof F=="object"){var _=F;F=_.x,G=_.y,k=P(_,"w")?_.w:_.width,V=P(_,"h")?_.h:_.height}return this.addParticleProcessor(new W(F,G,k,V,U,$,K,J))},setParticleSpeed:function(F,G){return G===void 0&&(G=F),this.ops.speedX.onChange(F),F===G?this.ops.speedY.active=!1:this.ops.speedY.onChange(G),this.radial=!0,this},setParticleScale:function(F,G){return F===void 0&&(F=1),G===void 0&&(G=F),this.ops.scaleX.onChange(F),this.ops.scaleY.onChange(G),this},setParticleGravity:function(F,G){return this.gravityX=F,this.gravityY=G,this},setParticleAlpha:function(F){return this.ops.alpha.onChange(F),this},setParticleTint:function(F){return this.ops.tint.onChange(F),this},setEmitterAngle:function(F){return this.ops.angle.onChange(F),this},setParticleLifespan:function(F){return this.ops.lifespan.onChange(F),this},setQuantity:function(F){return this.quantity=F,this},setFrequency:function(F,G){return this.frequency=F,this.flowCounter=F>0?F:0,G&&(this.quantity=G),this},addDeathZone:function(F){Array.isArray(F)||(F=[F]);for(var G,k=this.deathZones,V=0;V<F.length;V++)if(G=F[V],G instanceof h)k.push(G);else if(typeof G.contains=="function")G=new h(G,!0),k.push(G);else{var U=m(G,"type","onEnter"),$=m(G,"source",null);if($&&typeof $.contains=="function"){var K=U==="onEnter";G=new h($,K),k.push(G)}}return G},removeDeathZone:function(F){return O(this.deathZones,F),this},addEmitZone:function(F){Array.isArray(F)||(F=[F]);for(var G,k=this.emitZones,V=[],U=0;U<F.length;U++){if(G=F[U],G instanceof A||G instanceof n)k.push(G);else{var $=m(G,"type","random"),K=m(G,"source",null);if($==="random")G=new A(K);else if($==="edge"){var J=m(G,"quantity",1),_=m(G,"stepRate",0),tt=m(G,"yoyo",!1),st=m(G,"seamless",!0),ht=m(G,"total",-1);G=new n(K,J,_,tt,st,ht)}G&&k.push(G)}V.push(G)}return V},removeEmitZone:function(F){return O(this.emitZones,F),this.zoneIndex=0,this},getEmitZone:function(F){var G=this.emitZones,k=G.length;if(k!==0){var V=G[this.zoneIndex];V.getPoint(F),V.total>-1&&(this.zoneTotal++,this.zoneTotal===V.total&&(this.zoneTotal=0,this.zoneIndex++,this.zoneIndex===k&&(this.zoneIndex=0)))}},getDeathZone:function(F){for(var G=this.deathZones,k=0;k<G.length;k++){var V=G[k];if(V.willKill(F))return this.emit(u.DEATH_ZONE,this,F,V),!0}return!1},setEmitZone:function(F){var G;return isFinite(F)?G=F:G=this.emitZones.indexOf(F),G>=0&&(this.zoneIndex=G),this},addParticleProcessor:function(F){return this.processors.exists(F)||(F.emitter&&F.emitter.removeParticleProcessor(F),this.processors.add(F),F.emitter=this),F},removeParticleProcessor:function(F){return this.processors.exists(F)&&(this.processors.remove(F,!0),F.emitter=null),F},getProcessors:function(){return this.processors.getAll("active",!0)},createGravityWell:function(F){return this.addParticleProcessor(new x(F))},reserve:function(F){var G=this.dead;if(this.maxParticles>0){var k=this.getParticleCount();k+F>this.maxParticles&&(F=this.maxParticles-(k+F))}for(var V=0;V<F;V++)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(F,G){return F===void 0?(this.emitCallback=null,this.emitCallbackScope=null):typeof F=="function"&&(this.emitCallback=F,G&&(this.emitCallbackScope=G)),this},onParticleDeath:function(F,G){return F===void 0?(this.deathCallback=null,this.deathCallbackScope=null):typeof F=="function"&&(this.deathCallback=F,G&&(this.deathCallbackScope=G)),this},killAll:function(){for(var F=this.dead,G=this.alive;G.length>0;)F.push(G.pop());return this}
1656,forEachAlive:function(F,G){for(var k=this.alive,V=k.length,U=0;U<V;U++)F.call(G,k[U],this);return this},forEachDead:function(F,G){for(var k=this.dead,V=k.length,U=0;U<V;U++)F.call(G,k[U],this);return this},start:function(F,G){return F===void 0&&(F=0),this.emitting||(F>0&&this.fastForward(F),this.emitting=!0,this.resetCounters(this.frequency,!0),G!==void 0&&(this.duration=Math.abs(G)),this.emit(u.START,this)),this},stop:function(F){return F===void 0&&(F=!1),this.emitting&&(this.emitting=!1,F&&this.killAll(),this.emit(u.STOP,this)),this},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},setSortProperty:function(F,G){return F===void 0&&(F=""),G===void 0&&(G=this.true),this.sortProperty=F,this.sortOrderAsc=G,this.sortCallback=this.depthSortCallback,this},setSortCallback:function(F){return this.sortProperty!==""?F=this.depthSortCallback:F=null,this.sortCallback=F,this},depthSort:function(){return D(this.alive,this.sortCallback.bind(this)),this},depthSortCallback:function(F,G){var k=this.sortProperty;return this.sortOrderAsc?F[k]-G[k]:G[k]-F[k]},flow:function(F,G,k){return G===void 0&&(G=1),this.emitting=!1,this.frequency=F,this.quantity=G,k!==void 0&&(this.stopAfter=k),this.start()},explode:function(F,G,k){this.frequency=-1,this.resetCounters(-1,!0);var V=this.emitParticle(F,G,k);return this.emit(u.EXPLODE,this,V),V},emitParticleAt:function(F,G,k){return this.emitParticle(k,F,G)},emitParticle:function(F,G,k){if(!this.atLimit()){F===void 0&&(F=this.ops.quantity.onEmit());for(var V=this.dead,U=this.stopAfter,$=this.follow?this.follow.x+this.followOffset.x:G,K=this.follow?this.follow.y+this.followOffset.y:k,J=0;J<F;J++){var _=V.pop();if(_||(_=new this.particleClass(this)),_.fire($,K)?(this.particleBringToTop?this.alive.push(_):this.alive.unshift(_),this.emitCallback&&this.emitCallback.call(this.emitCallbackScope,_,this)):this.dead.push(_),U>0&&(this.stopCounter++,this.stopCounter>=U)||this.atLimit())break}return _}},fastForward:function(F,G){G===void 0&&(G=1e3/60);var k=0;for(this.skipping=!0;k<Math.abs(F);)this.preUpdate(0,G),k+=G;return this.skipping=!1,this},preUpdate:function(F,G){G*=this.timeScale;var k=G/1e3;this.trackVisible&&(this.visible=this.follow.visible),this.getWorldTransformMatrix(this.worldMatrix);var V=this.getProcessors(),U=this.alive,$=this.dead,K=0,J=[],_=U.length;for(K=0;K<_;K++){var tt=U[K];tt.update(G,k,V)&&J.push({index:K,particle:tt})}if(_=J.length,_>0){var st=this.deathCallback,ht=this.deathCallbackScope;for(K=_-1;K>=0;K--){var lt=J[K];U.splice(lt.index,1),$.push(lt.particle),st&&st.call(ht,lt.particle),lt.particle.setPosition()}}if(!this.emitting&&!this.skipping){this.completeFlag===1&&U.length===0&&(this.completeFlag=0,this.emit(u.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(F){for(var G=this.getWorldTransformMatrix(),k=this.alive,V=k.length,U=[],$=0;$<V;$++){var K=k[$];L(F,K.getBounds(G))&&U.push(K)}return U},getBounds:function(F,G,k,V){F===void 0&&(F=0),G===void 0&&(G=0),k===void 0&&(k=1e3/60),V===void 0&&(V=new R);var U=this.getWorldTransformMatrix(),$,K,J=this.alive,_=!1;if(V.setTo(0,0,0,0),G>0){var tt=0;for(this.skipping=!0;tt<Math.abs(G);){for(this.preUpdate(0,k),$=0;$<J.length;$++)K=J[$].getBounds(U),_?M(V,K):(_=!0,a(K,V));tt+=k}this.skipping=!1}else for($=0;$<J.length;$++)K=J[$].getBounds(U),_?M(V,K):(_=!0,a(K,V));return F>0&&b(V,F,F),V},createEmitter:function(){throw new Error("createEmitter removed. See ParticleEmitter docs for info")},particleX:{get:function(){return this.ops.x.current},set:function(F){this.ops.x.onChange(F)}},particleY:{get:function(){return this.ops.y.current},set:function(F){this.ops.y.onChange(F)}},accelerationX:{get:function(){return this.ops.accelerationX.current},set:function(F){this.ops.accelerationX.onChange(F)}},accelerationY:{get:function(){return this.ops.accelerationY.current},set:function(F){this.ops.accelerationY.onChange(F)}},maxVelocityX:{get:function(){return this.ops.maxVelocityX.current},set:function(F){this.ops.maxVelocityX.onChange(F)}},maxVelocityY:{get:function(){return this.ops.maxVelocityY.current},set:function(F){this.ops.maxVelocityY.onChange(F)}},speed:{get:function(){return this.ops.speedX.current},set:function(F){this.ops.speedX.onChange(F),this.ops.speedY.onChange(F)}},speedX:{get:function(){return this.ops.speedX.current},set:function(F){this.ops.speedX.onChange(F)}},speedY:{get:function(){return this.ops.speedY.current},set:function(F){this.ops.speedY.onChange(F)}},moveToX:{get:function(){return this.ops.moveToX.current},set:function(F){this.ops.moveToX.onChange(F)}},moveToY:{get:function(){return this.ops.moveToY.current},set:function(F){this.ops.moveToY.onChange(F)}},bounce:{get:function(){return this.ops.bounce.current},set:function(F){this.ops.bounce.onChange(F)}},particleScaleX:{get:function(){return this.ops.scaleX.current},set:function(F){this.ops.scaleX.onChange(F)}},particleScaleY:{get:function(){return this.ops.scaleY.current},set:function(F){this.ops.scaleY.onChange(F)}},particleColor:{get:function(){return this.ops.color.current},set:function(F){this.ops.color.onChange(F)}},colorEase:{get:function(){return this.ops.color.easeName},set:function(F){this.ops.color.setEase(F)}},particleTint:{get:function(){return this.ops.tint.current},set:function(F){this.ops.tint.onChange(F)}},particleAlpha:{get:function(){return this.ops.alpha.current},set:function(F){this.ops.alpha.onChange(F)}},lifespan:{get:function(){return this.ops.lifespan.current},set:function(F){this.ops.lifespan.onChange(F)}},particleAngle:{get:function(){return this.ops.angle.current},set:function(F){this.ops.angle.onChange(F)}},particleRotate:{get:function(){return this.ops.rotate.current},set:function(F){this.ops.rotate.onChange(F)}},quantity:{get:function(){return this.ops.quantity.current},set:function(F){this.ops.quantity.onChange(F)}},delay:{get:function(){return this.ops.delay.current},set:function(F){this.ops.delay.onChange(F)}},hold:{get:function(){return this.ops.hold.current},set:function(F){this.ops.hold.onChange(F)}},flowCounter:{get:function(){return this.counters[0]},set:function(F){this.counters[0]=F}},frameCounter:{get:function(){return this.counters[1]},set:function(F){this.counters[1]=F}},animCounter:{get:function(){return this.counters[2]},set:function(F){this.counters[2]=F}},elapsed:{get:function(){return this.counters[3]},set:function(F){this.counters[3]=F}},stopCounter:{get:function(){return this.counters[4]},set:function(F){this.counters[4]=F}},completeFlag:{get:function(){return this.counters[5]},set:function(F){this.counters[5]=F}},zoneIndex:{get:function(){return this.counters[6]},set:function(F){this.counters[6]=F}},zoneTotal:{get:function(){return this.counters[7]},set:function(F){this.counters[7]=F}},currentFrame:{get:function(){return this.counters[8]},set:function(F){this.counters[8]=F}},currentAnim:{get:function(){return this.counters[9]}
1656,set:function(F){this.counters[9]=F}},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 F,G=this.ops;for(F=0;F<N.length;F++){var k=N[F];G[k].destroy()}for(F=0;F<this.alive.length;F++)this.alive[F].destroy();for(F=0;F<this.dead.length;F++)this.dead[F].destroy();this.ops=null,this.alive=[],this.dead=[],this.worldMatrix.destroy()}});l.exports=Y},10456:(l,T,e)=>{/** 1657 * @author Richard Davey <[email protected]> 1658 * @copyright 2013-2023 Photon Storm Ltd. 1659 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1660 */var d=e(90205),g=e(69360),r=new g,a=new g,h=new g,n=new g,o=function(f,u,v,m){var p=r,x=a,y=h,P=n;m?(P.loadIdentity(),P.multiply(m),P.translate(u.x,u.y),P.rotate(u.rotation),P.scale(u.scaleX,u.scaleY)):P.applyITRS(u.x,u.y,u.rotation,u.scaleX,u.scaleY);var b=f.currentContext,E=v.roundPixels,M=v.alpha,w=u.alpha,A=u.alive,R=A.length,L=u.viewBounds;if(!(!u.visible||R===0||L&&!d(L,v.worldView))){u.sortCallback&&u.depthSort(),v.addToRenderList(u);var O=u.scrollFactorX,I=u.scrollFactorY;b.save(),b.globalCompositeOperation=f.blendModes[u.blendMode];for(var D=0;D<R;D++){var B=A[D],z=B.alpha*w*M;if(!(z<=0||B.scaleX===0||B.scaleY===0)){y.applyITRS(B.x,B.y,B.rotation,B.scaleX,B.scaleY),p.copyFrom(v.matrix),p.multiplyWithOffset(P,-v.scrollX*O,-v.scrollY*I),y.e=B.x,y.f=B.y,p.multiply(y,x);var X=B.frame,W=X.canvasData;if(W.width>0&&W.height>0){var j=-X.halfWidth,N=-X.halfHeight;b.globalAlpha=z,b.save(),x.setToContext(b),E&&(j=Math.round(j),N=Math.round(N)),b.imageSmoothingEnabled=!X.source.scaleMode,b.drawImage(X.source.image,W.x,W.y,W.width,W.height,j,N,W.width,W.height),b.restore()}}}b.restore()}};l.exports=o},765:(l,T,e)=>{/** 1661 * @author Richard Davey <[email protected]> 1662 * @copyright 2013-2023 Photon Storm Ltd. 1663 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1664 */var d=e(88933),g=e(99325),r=e(20494),a=e(72632),h=e(9216);g.register("particles",function(n,o){n===void 0&&(n={});var f=r(n,"key",null),u=a(n,"config",null),v=new h(this.scene,0,0,f);return o!==void 0&&(n.add=o),d(this.scene,v,n),u&&v.setConfig(u),v})},81212:(l,T,e)=>{/** 1665 * @author Richard Davey <[email protected]> 1666 * @copyright 2013-2023 Photon Storm Ltd. 1667 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1668 */var d=e(61286),g=e(9216);d.register("particles",function(r,a,h,n){return r!==void 0&&typeof r=="string"&&console.warn("ParticleEmitterManager was removed in Phaser 3.60. See documentation for details"),this.displayList.add(new g(this.scene,r,a,h,n))})},69116:(l,T,e)=>{/** 1669 * @author Richard Davey <[email protected]> 1670 * @copyright 2013-2023 Photon Storm Ltd. 1671 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1672 */var d=e(72283),g=d,r=d;g=e(10275),r=e(10456),l.exports={renderWebGL:g,renderCanvas:r}},10275:(l,T,e)=>{/** 1673 * @author Richard Davey <[email protected]> 1674 * @copyright 2013-2023 Photon Storm Ltd. 1675 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1676 */var d=e(90205),g=e(69360),r=e(75512),a=new g,h=new g,n=new g,o=new g,f=function(u,v,m,p){var x=u.pipelines.set(v.pipeline),y=a,P=h,b=n,E=o;
1676p?(E.loadIdentity(),E.multiply(p),E.translate(v.x,v.y),E.rotate(v.rotation),E.scale(v.scaleX,v.scaleY)):E.applyITRS(v.x,v.y,v.rotation,v.scaleX,v.scaleY);var M=m.roundPixels,w=r.getTintAppendFloatAlpha,A=m.alpha,R=v.alpha,L=v.frame.glTexture;u.pipelines.preBatch(v);var O=v.alive,I=O.length,D=v.viewBounds;if(!(I===0||D&&!d(D,m.worldView))){v.sortCallback&&v.depthSort();var B=x.setGameObject(v,v.frame);m.addToRenderList(v),y.copyFrom(m.matrix),y.multiplyWithOffset(E,-m.scrollX*v.scrollFactorX,-m.scrollY*v.scrollFactorY),u.setBlendMode(v.blendMode),v.mask&&(v.mask.preRenderWebGL(u,v,m),u.pipelines.set(v.pipeline));for(var z=v.tintFill,X=0;X<I;X++){var W=O[X],j=W.alpha*R*A;if(!(j<=0||W.scaleX===0||W.scaleY===0)){b.applyITRS(W.x,W.y,W.rotation,W.scaleX,W.scaleY),b.e=W.x,b.f=W.y,y.multiply(b,P);var N=W.frame,Y=-N.halfWidth,F=-N.halfHeight,G=P.setQuad(Y,F,Y+N.width,F+N.height,M),k=w(W.tint,j);x.shouldFlush(6)&&(x.flush(),B=x.setGameObject(v,v.frame)),x.batchQuad(v,G[0],G[1],G[2],G[3],G[4],G[5],G[6],G[7],N.u0,N.v0,N.u1,N.v1,k,k,k,k,z,L,B)}}v.mask&&v.mask.postRenderWebGL(u,m),u.pipelines.postBatch(v)}};l.exports=f},30891:(l,T,e)=>{/** 1677 * @author Richard Davey <[email protected]> 1678 * @copyright 2013-2023 Photon Storm Ltd. 1679 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1680 */var d=e(56694),g=new d({initialize:function(a,h,n){a===void 0&&(a=0),h===void 0&&(h=0),n===void 0&&(n=!0),this.emitter,this.x=a,this.y=h,this.active=n},update:function(){},destroy:function(){this.emitter=null}});l.exports=g},76100:l=>{/** 1681 * @author Richard Davey <[email protected]> 1682 * @copyright 2013-2023 Photon Storm Ltd. 1683 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1684 */l.exports="complete"},26677:l=>{/** 1685 * @author Richard Davey <[email protected]> 1686 * @copyright 2013-2023 Photon Storm Ltd. 1687 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1688 */l.exports="deathzone"},62736:l=>{/** 1689 * @author Richard Davey <[email protected]> 1690 * @copyright 2013-2023 Photon Storm Ltd. 1691 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1692 */l.exports="explode"},56490:l=>{/** 1693 * @author Richard Davey <[email protected]> 1694 * @copyright 2013-2023 Photon Storm Ltd. 1695 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1696 */l.exports="start"},85715:l=>{/** 1697 * @author Richard Davey <[email protected]> 1698 * @copyright 2013-2023 Photon Storm Ltd. 1699 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1700 */l.exports="stop"},40629:(l,T,e)=>{/** 1701 * @author Richard Davey <[email protected]> 1702 * @copyright 2013-2023 Photon Storm Ltd. 1703 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1704 */l.exports={COMPLETE:e(76100),DEATH_ZONE:e(26677),EXPLODE:e(62736),START:e(56490),STOP:e(85715)}},27684:(l,T,e)=>{/** 1705 * @author Richard Davey <[email protected]> 1706 * @copyright 2013-2023 Photon Storm Ltd. 1707 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1708 */l.exports={EmitterColorOp:e(19737),EmitterOp:e(93025),Events:e(40629),GravityWell:e(87811),Particle:e(14909),ParticleBounds:e(73106),ParticleEmitter:e(9216),ParticleProcessor:e(30891),Zones:e(25962)}},69361:(l,T,e)=>{/** 1709 * @author Richard Davey <[email protected]> 1710 * @copyright 2013-2023 Photon Storm Ltd. 1711 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1712 */var d=e(56694),g=new d({initialize:function(a,h){this.source=a,this.killOnEnter=h},willKill:function(r){var a=r.worldPosition,h=this.source.contains(a.x,a.y);return h&&this.killOnEnter||!h&&!this.killOnEnter}});l.exports=g},54213:(l,T,e)=>{/** 1713 * @author Richard Davey <[email protected]> 1714 * @copyright 2013-2023 Photon Storm Ltd. 1715 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1716 */var d=e(56694),g=new d({initialize:function(a,h,n,o,f,u){o===void 0&&(o=!1),f===void 0&&(f=!0),u===void 0&&(u=-1),this.source=a,this.points=[],this.quantity=h,this.stepRate=n,this.yoyo=o,this.counter=-1,this.seamless=f,this._length=0,this._direction=0,this.total=u,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var r=this.points[0],a=this.points[this.points.length-1];r.x===a.x&&r.y===a.y&&this.points.pop()}var h=this._length;return this._length=this.points.length,this._length<h&&this.counter>this._length&&(this.counter=this._length-1),this},changeSource:function(r){return this.source=r,this.updateSource()},getPoint:function(r){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 a=this.points[this.counter];a&&(r.x=a.x,r.y=a.y)}});l.exports=g},68433:(l,T,e)=>{/** 1717 * @author Richard Davey <[email protected]> 1718 * @copyright 2013-2023 Photon Storm Ltd. 1719 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1720 */var d=e(56694),g=e(93736),r=new d({initialize:function(h){this.source=h,this._tempVec=new g,this.total=-1},getPoint:function(a){var h=this._tempVec;this.source.getRandomPoint(h),a.x=h.x,a.y=h.y}});l.exports=r},25962:(l,T,e)=>{/** 1721 * @author Richard Davey <[email protected]> 1722 * @copyright 2013-2023 Photon Storm Ltd. 1723 * @license {@link https://opensource.org/licenses/MIT|MIT License}
1724 */l.exports={DeathZone:e(69361),EdgeZone:e(54213),RandomZone:e(68433)}},29598:(l,T,e)=>{/** 1725 * @author Richard Davey <[email protected]> 1726 * @copyright 2013-2023 Photon Storm Ltd. 1727 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1728 */var d=e(56694),g=e(64937),r=e(13747),a=new d({Extends:r,Mixins:[g.PathFollower],initialize:function(n,o,f,u,v,m){r.call(this,n,f,u,v,m),this.path=o},preUpdate:function(h,n){this.anims.update(h,n),this.pathUpdate(h)}});l.exports=a},19626:(l,T,e)=>{/** 1729 * @author Richard Davey <[email protected]> 1730 * @copyright 2013-2023 Photon Storm Ltd. 1731 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1732 */var d=e(61286),g=e(29598);d.register("follower",function(r,a,h,n,o){var f=new g(this.scene,r,a,h,n,o);return this.displayList.add(f),this.updateList.add(f),f})},33412:(l,T,e)=>{/** 1733 * @author Richard Davey <[email protected]> 1734 * @copyright 2013-2023 Photon Storm Ltd. 1735 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1736 */var d=e(16569),g=e(56694),r=e(99425),a=e(15978),h=e(83321),n=e(76583),o=new g({Extends:h,initialize:function(u,v,m,p,x,y,P,b){p||(p="__DEFAULT"),h.call(this,u,v,m,p,x),this.type="Plane",this.anims=new d(this),this.gridWidth,this.gridHeight,this.isTiled,this._checkerboard=null,this.hideCCW=!1,this.setGridSize(y,P,b),this.setSizeToFrame(!1),this.setViewHeight()},setGridSize:function(f,u,v){f===void 0&&(f=8),u===void 0&&(u=8),v===void 0&&(v=!1);var m=!1;return v&&(m=!0),this.gridWidth=f,this.gridHeight=u,this.isTiled=v,this.clear(),r({mesh:this,widthSegments:f,heightSegments:u,isOrtho:!1,tile:v,flipY:m}),this},setSizeToFrame:function(f){f===void 0&&(f=!0);var u=this.frame;if(this.setPerspective(this.width/u.width,this.height/u.height),this._checkerboard&&this._checkerboard!==this.texture&&this.removeCheckerboard(),!f)return this;var v=this.gridWidth,m=this.gridHeight,p=this.vertices,x=u.u0,y=u.u1,P=u.v0,b=u.v1,E,M,w=0;if(this.isTiled)for(P=u.v1,b=u.v0,M=0;M<m;M++)for(E=0;E<v;E++)p[w++].setUVs(x,b),p[w++].setUVs(x,P),p[w++].setUVs(y,b),p[w++].setUVs(x,P),p[w++].setUVs(y,P),p[w++].setUVs(y,b);else{var A=v+1,R=m+1,L=y-x,O=b-P,I=[];for(M=0;M<R;M++)for(E=0;E<A;E++){var D=x+L*(E/v),B=P+O*(M/m);I.push(D,B)}for(M=0;M<m;M++)for(E=0;E<v;E++){var z=(E+A*M)*2,X=(E+A*(M+1))*2,W=(E+1+A*(M+1))*2,j=(E+1+A*M)*2;p[w++].setUVs(I[z],I[z+1]),p[w++].setUVs(I[X],I[X+1]),p[w++].setUVs(I[j],I[j+1]),p[w++].setUVs(I[X],I[X+1]),p[w++].setUVs(I[W],I[W+1]),p[w++].setUVs(I[j],I[j+1])}}return this},setViewHeight:function(f){f===void 0&&(f=this.frame.height);var u=this.fov*(Math.PI/180);this.viewPosition.z=this.height/f/Math.tan(u/2),this.dirtyCache[10]=1},createCheckerboard:function(f,u,v,m,p){f===void 0&&(f=16777215),u===void 0&&(u=255),v===void 0&&(v=255),m===void 0&&(m=255),p===void 0&&(p=128);var x=this.scene.sys.renderer.gl,y=x.createTexture();x.activeTexture(x.TEXTURE0),x.bindTexture(x.TEXTURE_2D,y),x.texParameteri(x.TEXTURE_2D,x.TEXTURE_MIN_FILTER,x.NEAREST),x.texParameteri(x.TEXTURE_2D,x.TEXTURE_MAG_FILTER,x.NEAREST);for(var P=a(f),b=a(u),E=[],M=0;M<16;M++)for(var w=0;w<16;w++)M<8&&w<8||M>7&&w>7?E.push(P.r,P.g,P.b,v):E.push(b.r,b.g,b.b,m);x.texImage2D(x.TEXTURE_2D,0,x.RGBA,16,16,0,x.RGBA,x.UNSIGNED_BYTE,new Uint8Array(E)),y.isAlphaPremultiplied=!0,y.isRenderTexture=!1,y.width=16,y.height=16;var A=this.scene.sys.textures.addGLTexture(n(),y,16,16);return this.removeCheckerboard(),this._checkerboard=A,x.bindTexture(x.TEXTURE_2D,null),this.setTexture(A),this.setSizeToFrame(),this.setViewHeight(p),this},removeCheckerboard:function(){this._checkerboard&&(this._checkerboard.destroy(),this._checkerboard=null)},play:function(f,u){return this.anims.play(f,u)},playReverse:function(f,u){return this.anims.playReverse(f,u)},playAfterDelay:function(f,u){return this.anims.playAfterDelay(f,u)},playAfterRepeat:function(f,u){return this.anims.playAfterRepeat(f,u)},stop:function(){return this.anims.stop()},stopAfterDelay:function(f){return this.anims.stopAfterDelay(f)},stopAfterRepeat:function(f){return this.anims.stopAfterRepeat(f)},stopOnFrame:function(f){return this.anims.stopOnFrame(f)},preUpdate:function(f,u){h.prototype.preUpdate.call(this,f,u),this.anims.update(f,u)},preDestroy:function(){this.clear(),this.removeCheckerboard(),this.anims.destroy(),this.anims=void 0,this.debugCallback=null,this.debugGraphic=null}});l.exports=o},10912:(l,T,e)=>{/** 1737 * @author Richard Davey <[email protected]> 1738 * @copyright 2013-2023 Photon Storm Ltd. 1739 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1740 */var d=e(88933),g=e(32291),r=e(99325),a=e(20494),h=e(10850),n=e(33412);r.register("plane",function(o,f){o===void 0&&(o={});
1740var u=a(o,"key",null),v=a(o,"frame",null),m=h(o,"width",8),p=h(o,"height",8),x=h(o,"tile",!1),y=new n(this.scene,0,0,u,v,m,p,x);f!==void 0&&(o.add=f);var P=h(o,"checkerboard",null);if(P){var b=h(P,"color1",16777215),E=h(P,"color2",255),M=h(P,"alpha1",255),w=h(P,"alpha2",255),A=h(P,"height",128);y.createCheckerboard(b,E,M,w,A)}return d(this.scene,y,o),g(y,o),y})},58322:(l,T,e)=>{/** 1741 * @author Richard Davey <[email protected]> 1742 * @copyright 2013-2023 Photon Storm Ltd. 1743 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1744 */var d=e(33412),g=e(61286);g.register("plane",function(r,a,h,n,o,f,u){return this.displayList.add(new d(this.scene,r,a,h,n,o,f,u))})},13171:(l,T,e)=>{/** 1745 * @author Richard Davey <[email protected]> 1746 * @copyright 2013-2023 Photon Storm Ltd. 1747 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1748 */var d=e(56694),g=e(64937),r=e(89980),a=e(74853),h=e(65641),n=e(71606),o=new d({Extends:r,Mixins:[g.AlphaSingle,g.BlendMode,g.Depth,g.Mask,g.Pipeline,g.PostPipeline,g.ScrollFactor,g.Transform,g.Visible,n],initialize:function(u,v,m,p,x,y,P){p===void 0&&(p=16777215),x===void 0&&(x=128),y===void 0&&(y=1),P===void 0&&(P=.1),r.call(this,u,"PointLight"),this.initPipeline(h.POINTLIGHT_PIPELINE),this.initPostPipeline(),this.setPosition(v,m),this.color=a(p),this.intensity=y,this.attenuation=P,this.width=x*2,this.height=x*2,this._radius=x},radius:{get:function(){return this._radius},set:function(f){this._radius=f,this.width=f*2,this.height=f*2}},originX:{get:function(){return .5}},originY:{get:function(){return .5}},displayOriginX:{get:function(){return this._radius}},displayOriginY:{get:function(){return this._radius}}});l.exports=o},162:(l,T,e)=>{/** 1749 * @author Richard Davey <[email protected]> 1750 * @copyright 2013-2023 Photon Storm Ltd. 1751 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1752 */var d=e(88933),g=e(99325),r=e(20494),a=e(13171);g.register("pointlight",function(h,n){h===void 0&&(h={});var o=r(h,"color",16777215),f=r(h,"radius",128),u=r(h,"intensity",1),v=r(h,"attenuation",.1),m=new a(this.scene,0,0,o,f,u,v);return n!==void 0&&(h.add=n),d(this.scene,m,h),m})},91201:(l,T,e)=>{/** 1753 * @author Richard Davey <[email protected]> 1754 * @copyright 2013-2023 Photon Storm Ltd. 1755 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1756 */var d=e(61286),g=e(13171);d.register("pointlight",function(r,a,h,n,o,f){return this.displayList.add(new g(this.scene,r,a,h,n,o,f))})},71606:(l,T,e)=>{/** 1757 * @author Richard Davey <[email protected]> 1758 * @copyright 2013-2023 Photon Storm Ltd. 1759 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1760 */var d=e(72283),g=d,r=d;g=e(80590),l.exports={renderWebGL:g,renderCanvas:r}},80590:(l,T,e)=>{/** 1761 * @author Richard Davey <[email protected]> 1762 * @copyright 2013-2023 Photon Storm Ltd. 1763 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1764 */var d=e(73329),g=function(r,a,h,n){h.addToRenderList(a);var o=r.pipelines.set(a.pipeline),f=d(a,h,n).calc,u=a.width,v=a.height,m=-a._radius,p=-a._radius,x=m+u,y=p+v,P=f.getX(0,0),b=f.getY(0,0),E=f.getX(m,p),M=f.getY(m,p),w=f.getX(m,y),A=f.getY(m,y),R=f.getX(x,y),L=f.getY(x,y),O=f.getX(x,p),I=f.getY(x,p);r.pipelines.preBatch(a),o.batchPointLight(a,h,E,M,w,A,R,L,O,I,P,b),r.pipelines.postBatch(a)};l.exports=g},15996:(l,T,e)=>{/** 1765 * @author Richard Davey <[email protected]> 1766 * @copyright 2013-2023 Photon Storm Ltd. 1767 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1768 */var d=e(56694),g=e(845),r=e(1539),a=new d({Extends:r,initialize:function(n,o,f,u,v){o===void 0&&(o=0),f===void 0&&(f=0),u===void 0&&(u=32),v===void 0&&(v=32);var m=new g(n.sys.textures,"",u,v);r.call(this,n,o,f,m),this.type="RenderTexture",this.camera=this.texture.camera,this._saved=!1},setSize:function(h,n){this.width=h,this.height=n,this.texture.setSize(h,n),this.updateDisplayOrigin();var o=this.input;return o&&!o.customHitArea&&(o.hitArea.width=h,o.hitArea.height=n),this},resize:function(h,n){return this.setSize(h,n),this},saveTexture:function(h){var n=this.texture;return n.key=h,n.manager.addDynamicTexture(n)&&(this._saved=!0),n},fill:function(h,n,o,f,u,v){return this.texture.fill(h,n,o,f,u,v),this},clear:function(){return this.texture.clear(),this},stamp:function(h,n,o,f,u){return this.texture.stamp(h,n,o,f,u),this},erase:function(h,n,o){return this.texture.erase(h,n,o),this},draw:function(h,n,o,f,u){return this.texture.draw(h,n,o,f,u),this},drawFrame:function(h,n,o,f,u,v){return this.texture.drawFrame(h,n,o,f,u,v),this},repeat:function(h,n,o,f,u,v,m,p,x){return this.texture.repeat(h,n,o,f,u,v,m,p,x),this},beginDraw:function(){return this.texture.beginDraw(),this},batchDraw:function(h,n,o,f,u){return this.texture.batchDraw(h,n,o,f,u),this},batchDrawFrame:function(h,n,o,f,u,v){return this.texture.batchDrawFrame(h,n,o,f,u,v),this},endDraw:function(h){return this.texture.endDraw(h),this},snapshotArea:function(h,n,o,f,u,v,m){return this.texture.snapshotArea(h,n,o,f,u,v,m),this},snapshot:function(h,n,o){return this.snapshotArea(0,0,this.width,this.height,h,n,o)},snapshotPixel:function(h,n,o){return this.snapshotArea(h,n,1,1,o,"pixel")},preDestroy:function(){this._saved||this.texture.destroy()}});l.exports=a},85692:(l,T,e)=>{/** 1769 * @author Richard Davey <[email protected]> 1770 * @copyright 2013-2023 Photon Storm Ltd. 1771 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1772 */var d=e(88933),g=e(99325),r=e(20494),a=e(15996);g.register("renderTexture",function(h,n){h===void 0&&(h={});var o=r(h,"x",0),f=r(h,"y",0),u=r(h,"width",32),v=r(h,"height",32),m=new a(this.scene,o,f,u,v);return n!==void 0&&(h.add=n),d(this.scene,m,h),m})},29599:(l,T,e)=>{/** 1773 * @author Richard Davey <[email protected]> 1774 * @copyright 2013-2023 Photon Storm Ltd. 1775 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1776 */var d=e(61286),g=e(15996);d.register("renderTexture",function(r,a,h,n){return this.displayList.add(new g(this.scene,r,a,h,n))})},79968:(l,T,e)=>{/** 1777 * @author Richard Davey <[email protected]> 1778 * @copyright 2013-2023 Photon Storm Ltd. 1779 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1780 */var d=e(16569),g=e(56694),r=e(64937),a=e(89980),h=e(65641),n=e(58912),o=e(93736),f=new g({Extends:a,Mixins:[r.AlphaSingle,r.BlendM
1780ode,r.Depth,r.Flip,r.Mask,r.Pipeline,r.PostPipeline,r.Size,r.Texture,r.Transform,r.Visible,r.ScrollFactor,n],initialize:function(v,m,p,x,y,P,b,E,M){x===void 0&&(x="__DEFAULT"),P===void 0&&(P=2),b===void 0&&(b=!0),a.call(this,v,"Rope"),this.anims=new d(this),this.points=P,this.vertices,this.uv,this.colors,this.alphas,this.tintFill=x==="__DEFAULT",this.dirty=!1,this.horizontal=b,this._flipX=!1,this._flipY=!1,this._perp=new o,this.debugCallback=null,this.debugGraphic=null,this.setTexture(x,y),this.setPosition(m,p),this.setSizeToFrame(),this.initPipeline(h.ROPE_PIPELINE),Array.isArray(P)&&this.resizeArrays(P.length),this.setPoints(P,E,M),this.updateVertices()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(u,v){var m=this.anims.currentFrame;this.anims.update(u,v),this.anims.currentFrame!==m&&(this.updateUVs(),this.updateVertices())},play:function(u,v,m){return this.anims.play(u,v,m),this},setDirty:function(){return this.dirty=!0,this},setHorizontal:function(u,v,m){return u===void 0&&(u=this.points.length),this.horizontal?this:(this.horizontal=!0,this.setPoints(u,v,m))},setVertical:function(u,v,m){return u===void 0&&(u=this.points.length),this.horizontal?(this.horizontal=!1,this.setPoints(u,v,m)):this},setTintFill:function(u){return u===void 0&&(u=!1),this.tintFill=u,this},setAlphas:function(u,v){var m=this.points.length;if(m<1)return this;var p=this.alphas;u===void 0?u=[1]:!Array.isArray(u)&&v===void 0&&(u=[u]);var x,y=0;if(v!==void 0)for(x=0;x<m;x++)y=x*2,p[y]=u,p[y+1]=v;else if(u.length===m)for(x=0;x<m;x++)y=x*2,p[y]=u[x],p[y+1]=u[x];else{var P=u[0];for(x=0;x<m;x++)y=x*2,u.length>y&&(P=u[y]),p[y]=P,u.length>y+1&&(P=u[y+1]),p[y+1]=P}return this},setColors:function(u){var v=this.points.length;if(v<1)return this;var m=this.colors;u===void 0?u=[16777215]:Array.isArray(u)||(u=[u]);var p,x=0;if(u.length===v)for(p=0;p<v;p++)x=p*2,m[x]=u[p],m[x+1]=u[p];else{var y=u[0];for(p=0;p<v;p++)x=p*2,u.length>x&&(y=u[x]),m[x]=y,u.length>x+1&&(y=u[x+1]),m[x+1]=y}return this},setPoints:function(u,v,m){if(u===void 0&&(u=2),typeof u=="number"){var p=u;p<2&&(p=2),u=[];var x,y,P;if(this.horizontal)for(P=-this.frame.halfWidth,y=this.frame.width/(p-1),x=0;x<p;x++)u.push({x:P+x*y,y:0});else for(P=-this.frame.halfHeight,y=this.frame.height/(p-1),x=0;x<p;x++)u.push({x:0,y:P+x*y})}var b=u.length,E=this.points.length;return b<1?(console.warn("Rope: Not enough points given"),this):(b===1&&(u.unshift({x:0,y:0}),b++),E!==b&&this.resizeArrays(b),this.dirty=!0,this.points=u,this.updateUVs(),v!=null&&this.setColors(v),m!=null&&this.setAlphas(m),this)},updateUVs:function(){for(var u=this.uv,v=this.points.length,m=this.frame.u0,p=this.frame.v0,x=this.frame.u1,y=this.frame.v1,P=(x-m)/(v-1),b=(y-p)/(v-1),E=0;E<v;E++){var M=E*4,w,A,R,L;this.horizontal?(this._flipX?(w=x-E*P,R=x-E*P):(w=m+E*P,R=m+E*P),this._flipY?(A=y,L=p):(A=p,L=y)):(this._flipX?(w=m,R=x):(w=x,R=m),this._flipY?(A=y-E*b,L=y-E*b):(A=p+E*b,L=p+E*b)),u[M+0]=w,u[M+1]=A,u[M+2]=R,u[M+3]=L}return this},resizeArrays:function(u){var v=this.colors,m=this.alphas;this.vertices=new Float32Array(u*4),this.uv=new Float32Array(u*4),v=new Uint32Array(u*2),m=new Float32Array(u*2);for(var p=0;p<u*2;p++)v[p]=16777215,m[p]=1;return this.colors=v,this.alphas=m,this.dirty=!0,this},updateVertices:function(){var u=this._perp,v=this.points,m=this.vertices,p=v.length;if(this.dirty=!1,!(p<1)){for(var x,y=v[0],P=this.horizontal?this.frame.halfHeight:this.frame.halfWidth,b=0;b<p;b++){var E=v[b],M=b*4;b<p-1?x=v[b+1]:x=E,u.x=x.y-y.y,u.y=-(x.x-y.x);var w=u.length();u.x/=w,u.y/=w,u.x*=P,u.y*=P,m[M]=E.x+u.x,m[M+1]=E.y+u.y,m[M+2]=E.x-u.x,m[M+3]=E.y-u.y,y=E}return this}},setDebug:function(u,v){return this.debugGraphic=u,!u&&!v?this.debugCallback=null:v?this.debugCallback=v:this.debugCallback=this.renderDebugVerts,this},renderDebugVerts:function(u,v,m){var p=u.debugGraphic,x=m[0],y=m[1],P=m[2],b=m[3];p.lineBetween(x,y,P,b);for(var E=4;E<v;E+=4){var M=m[E+0],w=m[E+1],A=m[E+2],R=m[E+3];p.lineBetween(x,y,M,w),p.lineBetween(P,b,A,R),p.lineBetween(P,b,M,w),p.lineBetween(M,w,A,R),x=M,y=w,P=A,b=R}},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}
1780,set:function(u){return this._flipX=u,this.updateUVs()}},flipY:{get:function(){return this._flipY},set:function(u){return this._flipY=u,this.updateUVs()}}});l.exports=f},44598:l=>{/** 1781 * @author Richard Davey <[email protected]> 1782 * @copyright 2013-2023 Photon Storm Ltd. 1783 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1784 */var T=function(){};l.exports=T},96027:(l,T,e)=>{/** 1785 * @author Richard Davey <[email protected]> 1786 * @copyright 2013-2023 Photon Storm Ltd. 1787 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1788 */var d=e(88933),g=e(99325),r=e(20494),a=e(10850),h=e(79968);g.register("rope",function(n,o){n===void 0&&(n={});var f=r(n,"key",null),u=r(n,"frame",null),v=r(n,"horizontal",!0),m=a(n,"points",void 0),p=a(n,"colors",void 0),x=a(n,"alphas",void 0),y=new h(this.scene,0,0,f,u,m,v,p,x);return o!==void 0&&(n.add=o),d(this.scene,y,n),y})},31982:(l,T,e)=>{/** 1789 * @author Richard Davey <[email protected]> 1790 * @copyright 2013-2023 Photon Storm Ltd. 1791 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1792 */var d=e(79968),g=e(61286);g.register("rope",function(r,a,h,n,o,f,u,v){return this.displayList.add(new d(this.scene,r,a,h,n,o,f,u,v))})},58912:(l,T,e)=>{/** 1793 * @author Richard Davey <[email protected]> 1794 * @copyright 2013-2023 Photon Storm Ltd. 1795 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1796 */var d=e(72283),g=d,r=d;g=e(49489),r=e(44598),l.exports={renderWebGL:g,renderCanvas:r}},49489:(l,T,e)=>{/** 1797 * @author Richard Davey <[email protected]> 1798 * @copyright 2013-2023 Photon Storm Ltd. 1799 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1800 */var d=e(73329),g=e(75512),r=function(a,h,n,o){n.addToRenderList(h);var f=a.pipelines.set(h.pipeline,h),u=d(h,n,o).calc,v=h.vertices,m=h.uv,p=h.colors,x=h.alphas,y=h.alpha,P=g.getTintAppendFloatAlpha,b=n.roundPixels,E=v.length,M=Math.floor(E*.5);f.flush(),a.pipelines.preBatch(h);var w=f.setGameObject(h),A=f.vertexViewF32,R=f.vertexViewU32,L=f.vertexCount*f.currentShader.vertexComponentCount-1,O=0,I=h.tintFill;h.dirty&&h.updateVertices();for(var D=h.debugCallback,B=[],z=0;z<E;z+=2){var X=v[z+0],W=v[z+1],j=X*u.a+W*u.c+u.e,N=X*u.b+W*u.d+u.f;b&&(j=Math.round(j),N=Math.round(N)),A[++L]=j,A[++L]=N,A[++L]=m[z+0],A[++L]=m[z+1],A[++L]=w,A[++L]=I,R[++L]=P(p[O],n.alpha*(x[O]*y)),O++,D&&(B[z+0]=j,B[z+1]=N)}D&&D.call(h,h,E,B),f.vertexCount+=M,f.currentBatch.count=f.vertexCount-f.currentBatch.start,a.pipelines.postBatch(h)};l.exports=r},27902:(l,T,e)=>{/** 1801 * @author Richard Davey <[email protected]> 1802 * @copyright 2013-2023 Photon Storm Ltd. 1803 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1804 */var d=e(56694),g=e(64937),r=e(89980),a=e(72632),h=e(98611),n=e(22440),o=e(24252),f=e(69360),u=new d({Extends:r,Mixins:[g.ComputedSize,g.Depth,g.GetBounds,g.Mask,g.Origin,g.ScrollFactor,g.Transform,g.Visible,o],initialize:function(m,p,x,y,P,b,E,M){x===void 0&&(x=0),y===void 0&&(y=0),P===void 0&&(P=128),b===void 0&&(b=128),r.call(this,m,"Shader"),this.blendMode=-1,this.shader;var w=m.sys.renderer;this.renderer=w,this.gl=w.gl,this.vertexData=new ArrayBuffer(6*(Float32Array.BYTES_PER_ELEMENT*2)),this.vertexBuffer=w.createVertexBuffer(this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=null,this.bytes=new Uint8Array(this.vertexData),this.vertexViewF32=new Float32Array(this.vertexData),this._tempMatrix1=new f,this._tempMatrix2=new f,this._tempMatrix3=new f,this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.uniforms={},this.pointer=null,this._rendererWidth=w.width,this._rendererHeight=w.height,this._textureCount=0,this.framebuffer=null,this.glTexture=null,this.renderToTexture=!1,this.texture=null,this.setPosition(x,y),this.setSize(P,b),this.setOrigin(.5,.5),this.setShader(p,E,M)},willRender:function(v){return this.renderToTexture?!0:!(r.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&v.id)},setRenderToTexture:function(v,m){if(m===void 0&&(m=!1),!this.renderToTexture){var p=this.width,x=this.height,y=this.renderer;this.glTexture=y.createTextureFromSource(null,p,x,0),this.glTexture.flipY=m,this.framebuffer=y.createFramebuffer(p,x,this.glTexture,!1),this._rendererWidth=p,this._rendererHeight=x,this.renderToTexture=!0,this.projOrtho(0,this.width,this.height,0),v&&(this.texture=this.scene.sys.textures.addGLTexture(v,this.glTexture,p,x))}return this.shader&&(y.pipelines.clear(),this.load(),this.flush(),y.pipelines.rebind()),this},setShader:function(v,m,p){if(m===void 0&&(m=[]),typeof v=="string"){var x=this.scene.sys.cache.shader;if(!x.has(v))return console.warn("Shader missing: "+v),this;this.shader=x.get(v)}else this.shader=v;var y=this.gl,P=this.renderer;this.program&&y.deleteProgram(this.program);var b=P.createProgram(this.shader.vertexSrc,this.shader.fragmentSrc);y.uniformMatrix4fv(y.getUniformLocation(b,"uViewMatrix"),!1,this.viewMatrix),y.uniformMatrix4fv(y.getUniformLocation(b,"uProjectionMatrix"),!1,this.projectionMatrix),y.uniform2f(y.getUniformLocation(b,"uResolution"),this.width,this.height),this.program=b;var E=new Date,M={resolution:{type:"2f",value:{x:this.width,y:this.height}},time:{type:"1f",value:0},mouse:{type:"2f",value:{x:this.width/2,y:this.height/2}},date:{type:"4fv",value:[E.getFullYear(),E.getMonth(),E.getDate(),E.getHours()*60*60+E.getMinutes()*60+E.getSeconds()]},sampleRate:{type:"1f",value:44100},iChannel0:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel1:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel2:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel3:{type:"sampler2D",value:null,textureData:{repeat:!0}}};this.shader.uniforms?this.uniforms=h(!0,{},this.shader.uniforms,M):this.uniforms=M;for(var w=0;w<4;w++)m[w]&&this.setSampler2D("iChannel"+w,m[w],w,p);return this.initUniforms(),this.projOrtho(0,this._rendererWidth,this._rendererHeight,0),this},setPointer:function(v){return this.pointer=v,this},projOrtho:function(v,m,p,x){var y=-1e3,P=1e3,b=1/(v-m),E=1/(p-x),M=1/(y-P),w=this.projectionMatrix;w[0]=-2*b,w[5]=-2*E,w[10]=2*M,w[12]=(v+m)*b,w[13]=(x+p)*E,w[14]=(P+y)*M;var A=this.program,R=this.gl,L=this.renderer;L.setProgram(A),R.uniformMatrix4fv(R.getUniformLocation(A,"uProjectionMatrix"),!1,this.projectionMatrix),this._rendererWidth=m,this._rendererHeight=p},initUniforms:function(){var v=this.gl,m=this.renderer.glFuncMap,p=this.program;this._textureCount=0;for(var x in this.uniforms){var y=this.uniforms[x],P=y.type,b=m[P];y.uniformLocation=v.getUniformLocation(p,x),P!=="sampler2D"&&(y.glMatrix=b.matrix,y.glValueLength=b.length,y.glFunc=b.func)}},setSampler2DBuffer:function(v,m,p,x,y,P){y===void 0&&(y=0),P===void 0&&(P={});var b=this.uniforms[v];return b.value=m,P.width=p,P.height=x,b.textureData=P,this._textureCount=y,this.initSampler2D(b),this},setSampler2D:function(v,m,p,x){p===void 0&&(p=0);var y=this.scene.sys.textures;if(y.exists(m)){var P=y.getFrame(m);if(P.glTexture&&P.glTexture.isRenderTexture)return this.setSampler2DBuffer(v,P.glTexture,P.width,P.height,p,x);var b=this.uniforms[v],E=P.source;b.textureKey=m,b.source=E.image,b.value=P.glTexture,E.isGLTexture&&(x||
1804(x={}),x.width=E.width,x.height=E.height),x&&(b.textureData=x),this._textureCount=p,this.initSampler2D(b)}return this},setUniform:function(v,m){return n(this.uniforms,v,m),this},getUniform:function(v){return a(this.uniforms,v,null)},setChannel0:function(v,m){return this.setSampler2D("iChannel0",v,0,m)},setChannel1:function(v,m){return this.setSampler2D("iChannel1",v,1,m)},setChannel2:function(v,m){return this.setSampler2D("iChannel2",v,2,m)},setChannel3:function(v,m){return this.setSampler2D("iChannel3",v,3,m)},initSampler2D:function(v){if(v.value){var m=this.gl;m.activeTexture(m.TEXTURE0+this._textureCount),m.bindTexture(m.TEXTURE_2D,v.value);var p=v.textureData;if(p&&!v.value.isRenderTexture){var x=m[a(p,"magFilter","linear").toUpperCase()],y=m[a(p,"minFilter","linear").toUpperCase()],P=m[a(p,"wrapS","repeat").toUpperCase()],b=m[a(p,"wrapT","repeat").toUpperCase()],E=m[a(p,"format","rgba").toUpperCase()];if(p.repeat&&(P=m.REPEAT,b=m.REPEAT),m.pixelStorei(m.UNPACK_FLIP_Y_WEBGL,!!p.flipY),p.width){var M=a(p,"width",512),w=a(p,"height",2),A=a(p,"border",0);m.texImage2D(m.TEXTURE_2D,0,E,M,w,A,E,m.UNSIGNED_BYTE,null)}else m.texImage2D(m.TEXTURE_2D,0,E,m.RGBA,m.UNSIGNED_BYTE,v.source);m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,x),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,y),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_S,P),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_T,b)}this.renderer.setProgram(this.program),m.uniform1i(v.uniformLocation,this._textureCount),this._textureCount++}},syncUniforms:function(){var v=this.gl,m=this.uniforms,p,x,y,P,b,E=0;for(var M in m)p=m[M],y=p.glFunc,x=p.glValueLength,P=p.uniformLocation,b=p.value,b!==null&&(x===1?p.glMatrix?y.call(v,P,p.transpose,b):y.call(v,P,b):x===2?y.call(v,P,b.x,b.y):x===3?y.call(v,P,b.x,b.y,b.z):x===4?y.call(v,P,b.x,b.y,b.z,b.w):p.type==="sampler2D"&&(v.activeTexture(v.TEXTURE0+E),v.bindTexture(v.TEXTURE_2D,b),v.uniform1i(P,E),E++))},load:function(v){var m=this.gl,p=this.width,x=this.height,y=this.renderer,P=this.program,b=this.viewMatrix;if(!this.renderToTexture){var E=-this._displayOriginX,M=-this._displayOriginY;b[0]=v[0],b[1]=v[1],b[4]=v[2],b[5]=v[3],b[8]=v[4],b[9]=v[5],b[12]=b[0]*E+b[4]*M,b[13]=b[1]*E+b[5]*M}m.useProgram(P),m.uniformMatrix4fv(m.getUniformLocation(P,"uViewMatrix"),!1,b),m.uniform2f(m.getUniformLocation(P,"uResolution"),this.width,this.height);var w=this.uniforms,A=w.resolution;A.value.x=p,A.value.y=x,w.time.value=y.game.loop.getDuration();var R=this.pointer;if(R){var L=w.mouse,O=R.x/p,I=1-R.y/x;L.value.x=O.toFixed(2),L.value.y=I.toFixed(2)}this.syncUniforms()},flush:function(){var v=this.width,m=this.height,p=this.program,x=this.gl,y=this.vertexBuffer,P=this.renderer,b=Float32Array.BYTES_PER_ELEMENT*2;this.renderToTexture&&(P.setFramebuffer(this.framebuffer),x.clearColor(0,0,0,0),x.clear(x.COLOR_BUFFER_BIT)),x.bindBuffer(x.ARRAY_BUFFER,y);var E=x.getAttribLocation(p,"inPosition");E!==-1&&(x.enableVertexAttribArray(E),x.vertexAttribPointer(E,2,x.FLOAT,!1,b,0));var M=this.vertexViewF32;M[3]=m,M[4]=v,M[5]=m,M[8]=v,M[9]=m,M[10]=v;var w=6;x.bufferSubData(x.ARRAY_BUFFER,0,this.bytes.subarray(0,w*b)),x.drawArrays(x.TRIANGLES,0,w),this.renderToTexture&&P.setFramebuffer(null,!1)},setAlpha:function(){},setBlendMode:function(){},preDestroy:function(){var v=this.gl;v.deleteProgram(this.program),v.deleteBuffer(this.vertexBuffer),this.renderToTexture&&(this.renderer.deleteFramebuffer(this.framebuffer),this.texture.destroy(),this.framebuffer=null,this.glTexture=null,this.texture=null)}});l.exports=u},10612:l=>{/** 1805 * @author Richard Davey <[email protected]> 1806 * @copyright 2013-2023 Photon Storm Ltd. 1807 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1808 */var T=function(){};l.exports=T},13908:(l,T,e)=>{/** 1809 * @author Richard Davey <[email protected]> 1810 * @copyright 2013-2023 Photon Storm Ltd. 1811 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1812 */var d=e(88933),g=e(99325),r=e(20494),a=e(27902);g.register("shader",function(h,n){h===void 0&&(h={});var o=r(h,"key",null),f=r(h,"x",0),u=r(h,"y",0),v=r(h,"width",128),m=r(h,"height",128),p=new a(this.scene,o,f,u,v,m);return n!==void 0&&(h.add=n),d(this.scene,p,h),p})},51979:(l,T,e)=>{/** 1813 * @author Richard Davey <[email protected]> 1814 * @copyright 2013-2023 Photon Storm Ltd. 1815 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1816 */var d=e(27902),g=e(61286);g.register("shader",function(r,a,h,n,o,f,u){return this.displayList.add(new d(this.scene,r,a,h,n,o,f,u))})},24252:(l,T,e)=>{/** 1817 * @author Richard Davey <[email protected]> 1818 * @copyright 2013-2023 Photon Storm Ltd. 1819 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1820 */var d=e(72283),g=d,r=d;g=e(19782),r=e(10612),l.exports={renderWebGL:g,renderCanvas:r}},19782:(l,T,e)=>{/** 1821 * @author Richard Davey <[email protected]> 1822 * @copyright 2013-2023 Photon Storm Ltd. 1823 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1824 */var d=e(73329),g=function(r,a,h,n){if(a.shader){if(h.addToRenderList(a),r.pipelines.clear(),a.renderToTexture)a.load(),a.flush();else{var o=d(a,h,n).calc;(r.width!==a._rendererWidth||r.height!==a._rendererHeight)&&a.projOrtho(0,r.width,r.height,0),a.load(o.matrix),a.flush()}r.pipelines.rebind()}};l.exports=g},19543:(l,T,e)=>{/** 1825 * @author Richard Davey <[email protected]> 1826 * @copyright 2013-2023 Photon Storm Ltd. 1827 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1828 */var d=e(75512),g=function(r,a,h,n,o,f){for(var u=d.getTintAppendFloatAlpha(
1828h.fillColor,h.fillAlpha*n),v=h.pathData,m=h.pathIndexes,p=0;p<m.length;p+=3){var x=m[p]*2,y=m[p+1]*2,P=m[p+2]*2,b=v[x+0]-o,E=v[x+1]-f,M=v[y+0]-o,w=v[y+1]-f,A=v[P+0]-o,R=v[P+1]-f,L=a.getX(b,E),O=a.getY(b,E),I=a.getX(M,w),D=a.getY(M,w),B=a.getX(A,R),z=a.getY(A,R);r.batchTri(h,L,O,I,D,B,z,0,0,1,1,u,u,u,2)}};l.exports=g},15608:l=>{/** 1829 * @author Richard Davey <[email protected]> 1830 * @copyright 2013-2023 Photon Storm Ltd. 1831 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1832 */var T=function(e,d,g,r){var a=g||d.fillColor,h=r||d.fillAlpha,n=(a&16711680)>>>16,o=(a&65280)>>>8,f=a&255;e.fillStyle="rgba("+n+","+o+","+f+","+h+")"};l.exports=T},17876:l=>{/** 1833 * @author Richard Davey <[email protected]> 1834 * @copyright 2013-2023 Photon Storm Ltd. 1835 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1836 */var T=function(e,d,g,r){var a=g||d.strokeColor,h=r||d.strokeAlpha,n=(a&16711680)>>>16,o=(a&65280)>>>8,f=a&255;e.strokeStyle="rgba("+n+","+o+","+f+","+h+")",e.lineWidth=d.lineWidth};l.exports=T},91461:(l,T,e)=>{/** 1837 * @author Richard Davey <[email protected]> 1838 * @copyright 2013-2023 Photon Storm Ltd. 1839 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1840 */var d=e(56694),g=e(64937),r=e(89980),a=e(88829),h=new d({Extends:r,Mixins:[g.AlphaSingle,g.BlendMode,g.Depth,g.GetBounds,g.Mask,g.Origin,g.Pipeline,g.PostPipeline,g.ScrollFactor,g.Transform,g.Visible],initialize:function(o,f,u){f===void 0&&(f="Shape"),r.call(this,o,f),this.geom=u,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 a,this.width=0,this.height=0,this.initPipeline(),this.initPostPipeline()},setFillStyle:function(n,o){return o===void 0&&(o=1),n===void 0?this.isFilled=!1:(this.fillColor=n,this.fillAlpha=o,this.isFilled=!0),this},setStrokeStyle:function(n,o,f){return f===void 0&&(f=1),n===void 0?this.isStroked=!1:(this.lineWidth=n,this.strokeColor=o,this.strokeAlpha=f,this.isStroked=!0),this},setClosePath:function(n){return this.closePath=n,this},setSize:function(n,o){return this.width=n,this.height=o,this},setDisplaySize:function(n,o){return this.displayWidth=n,this.displayHeight=o,this},preDestroy:function(){this.geom=null,this._tempLine=null,this.pathData=[],this.pathIndexes=[]},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}}});l.exports=h},50262:(l,T,e)=>{/** 1841 * @author Richard Davey <[email protected]> 1842 * @copyright 2013-2023 Photon Storm Ltd. 1843 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1844 */var d=e(75512),g=function(r,a,h,n,o){var f=r.strokeTint,u=d.getTintAppendFloatAlpha(a.strokeColor,a.strokeAlpha*h);f.TL=u,f.TR=u,f.BL=u,f.BR=u;var v=a.pathData,m=v.length-1,p=a.lineWidth,x=p/2,y=v[0]-n,P=v[1]-o;a.closePath||(m-=2);for(var b=2;b<m;b+=2){var E=v[b]-n,M=v[b+1]-o;r.batchLine(y,P,E,M,x,x,p,b-2,a.closePath?b===m-1:!1),y=E,P=M}};l.exports=g},28593:(l,T,e)=>{/** 1845 * @author Richard Davey <[email protected]> 1846 * @copyright 2013-2023 Photon Storm Ltd. 1847 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1848 */var d=e(2213),g=e(56694),r=e(75606),a=e(11117),h=e(26673),n=e(83392),o=e(91461),f=new g({Extends:o,Mixins:[d],initialize:function(v,m,p,x,y,P,b,E,M){m===void 0&&(m=0),p===void 0&&(p=0),x===void 0&&(x=128),y===void 0&&(y=0),P===void 0&&(P=360),b===void 0&&(b=!1),o.call(this,v,"Arc",new h(0,0,x)),this._startAngle=y,this._endAngle=P,this._anticlockwise=b,this._iterations=.01,this.setPosition(m,p);var w=this.geom.radius*2;this.setSize(w,w),E!==void 0&&this.setFillStyle(E,M),this.updateDisplayOrigin(),this.updateData()},iterations:{get:function(){return this._iterations},set:function(u){this._iterations=u,this.updateData()}},radius:{get:function(){return this.geom.radius},set:function(u){this.geom.radius=u;var v=u*2;this.setSize(v,v),this.updateDisplayOrigin(),this.updateData()}},startAngle:{get:function(){return this._startAngle},set:function(u){this._startAngle=u,this.updateData()}},endAngle:{get:function(){return this._endAngle},set:function(u){this._endAngle=u,this.updateData()}},anticlockwise:{get:function(){return this._anticlockwise},set:function(u){this._anticlockwise=u,this.updateData()}},setRadius:function(u){return this.radius=u,this},setIterations:function(u){return u===void 0&&(u=.01),this.iterations=u,this},setStartAngle:function(u,v){return this._startAngle=u,v!==void 0&&(this._anticlockwise=v),this.updateData()},setEndAngle:function(u,v){return this._endAngle=u,v!==void 0&&(this._anticlockwise=v),this.updateData()},updateData:function(){var u=this._iterations,v=u,m=this.geom.radius,p=r(this._startAngle),x=r(this._endAngle),y=this._anticlockwise,P
1848=m,b=m;x-=p,y?x<-n.PI2?x=-n.PI2:x>0&&(x=-n.PI2+x%n.PI2):x>n.PI2?x=n.PI2:x<0&&(x=n.PI2+x%n.PI2);for(var E=[P+Math.cos(p)*m,b+Math.sin(p)*m],M;v<1;)M=x*v+p,E.push(P+Math.cos(M)*m,b+Math.sin(M)*m),v+=u;return M=x+p,E.push(P+Math.cos(M)*m,b+Math.sin(M)*m),E.push(P+Math.cos(p)*m,b+Math.sin(p)*m),this.pathIndexes=a(E),this.pathData=E,this}});l.exports=f},23560:(l,T,e)=>{/** 1849 * @author Richard Davey <[email protected]> 1850 * @copyright 2013-2023 Photon Storm Ltd. 1851 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1852 */var d=e(75606),g=e(15608),r=e(17876),a=e(49584),h=function(n,o,f,u){f.addToRenderList(o);var v=n.currentContext;if(a(n,v,o,f,u)){var m=o.radius;v.beginPath(),v.arc(m-o.originX*(m*2),m-o.originY*(m*2),m,d(o._startAngle),d(o._endAngle),o.anticlockwise),o.closePath&&v.closePath(),o.isFilled&&(g(v,o),v.fill()),o.isStroked&&(r(v,o),v.stroke()),v.restore()}};l.exports=h},10369:(l,T,e)=>{/** 1853 * @author Richard Davey <[email protected]> 1854 * @copyright 2013-2023 Photon Storm Ltd. 1855 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1856 */var d=e(28593),g=e(61286);g.register("arc",function(r,a,h,n,o,f,u,v){return this.displayList.add(new d(this.scene,r,a,h,n,o,f,u,v))}),g.register("circle",function(r,a,h,n,o){return this.displayList.add(new d(this.scene,r,a,h,0,360,!1,n,o))})},2213:(l,T,e)=>{/** 1857 * @author Richard Davey <[email protected]> 1858 * @copyright 2013-2023 Photon Storm Ltd. 1859 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1860 */var d=e(72283),g=d,r=d;g=e(58356),r=e(23560),l.exports={renderWebGL:g,renderCanvas:r}},58356:(l,T,e)=>{/** 1861 * @author Richard Davey <[email protected]> 1862 * @copyright 2013-2023 Photon Storm Ltd. 1863 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1864 */var d=e(73329),g=e(19543),r=e(50262),a=function(h,n,o,f){o.addToRenderList(n);var u=h.pipelines.set(n.pipeline),v=d(n,o,f),m=u.calcMatrix.copyFrom(v.calc),p=n._displayOriginX,x=n._displayOriginY,y=o.alpha*n.alpha;h.pipelines.preBatch(n),n.isFilled&&g(u,m,n,y,p,x),n.isStroked&&r(u,n,y,p,x),h.pipelines.postBatch(n)};l.exports=a},15220:(l,T,e)=>{/** 1865 * @author Richard Davey <[email protected]> 1866 * @copyright 2013-2023 Photon Storm Ltd. 1867 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1868 */var d=e(56694),g=e(87203),r=e(11117),a=e(74118),h=e(91461),n=new d({Extends:h,Mixins:[g],initialize:function(f,u,v,m,p,x){u===void 0&&(u=0),v===void 0&&(v=0),h.call(this,f,"Curve",m),this._smoothness=32,this._curveBounds=new a,this.closePath=!1,this.setPosition(u,v),p!==void 0&&this.setFillStyle(p,x),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(o){this._smoothness=o,this.updateData()}},setSmoothness:function(o){return this._smoothness=o,this.updateData()},updateData:function(){var o=this._curveBounds,f=this._smoothness;this.geom.getBounds(o,f),this.setSize(o.width,o.height),this.updateDisplayOrigin();for(var u=[],v=this.geom.getPoints(f),m=0;m<v.length;m++)u.push(v[m].x,v[m].y);return u.push(v[0].x,v[0].y),this.pathIndexes=r(u),this.pathData=u,this}});l.exports=n},4024:(l,T,e)=>{/** 1869 * @author Richard Davey <[email protected]> 1870 * @copyright 2013-2023 Photon Storm Ltd. 1871 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1872 */var d=e(15608),g=e(17876),r=e(49584),a=function(h,n,o,f){o.addToRenderList(n);var u=h.currentContext;if(r(h,u,n,o,f)){var v=n._displayOriginX+n._curveBounds.x,m=n._displayOriginY+n._curveBounds.y,p=n.pathData,x=p.length-1,y=p[0]-v,P=p[1]-m;u.beginPath(),u.moveTo(y,P),n.closePath||(x-=2);for(var b=2;b<x;b+=2){var E=p[b]-v,M=p[b+1]-m;u.lineTo(E,M)}n.closePath&&u.closePath(),n.isFilled&&(d(u,n),u.fill()),n.isStroked&&(g(u,n),u.stroke()),u.restore()}};l.exports=a},10147:(l,T,e)=>{/** 1873 * @author Richard Davey <[email protected]> 1874 * @copyright 2013-2023 Photon Storm Ltd. 1875 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1876 */var d=e(61286),g=e(15220);d.register("curve",function(r,a,h,n,o){return this.displayList.add(new g(this.scene,r,a,h,n,o))})},87203:(l,T,e)=>{/** 1877 * @author Richard Davey <[email protected]> 1878 * @copyright 2013-2023 Photon Storm Ltd. 1879 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1880 */var d=e(72283),g=d,r=d;g=e(82958),r=e(4024),l.exports={renderWebGL:g,renderCanvas:r}},82958:(l,T,e)=>{/** 1881 * @author Richard Davey <[email protected]> 1882 * @copyright 2013-2023 Photon Storm Ltd. 1883 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1884 */var d=e(19543),g=e(73329),r=e(50262),a=function(h,n,o,f){o.addToRenderList(n);var u=h.pipelines.set(n.pipeline),v=g(n,o,f),m=u.calcMatrix.copyFrom(v.calc),p=n._displayOriginX+n._curveBounds.x,x=n._displayOriginY+n._curveBounds.y,y=o.alpha*n.alpha;h.pipelines.preBatch(n),n.isFilled&&d(u,m,n,y,p,x),n.isStroked&&r(u,n,y,p,x),h.pipelines.postBatch(n)};l.exports=a},28591:(l,T,e)=>{/** 1885 * @author Richard Davey <[email protected]> 1886 * @copyright 2013-2023 Photon Storm Ltd. 1887 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1888 */var d=e(56694),g=e(11117),r=e(84171),a=e(95669),h=e(91461),n=new d({Extends:h,Mixins:[r],initialize:function(f,u,v,m,p,x,y){u===void 0&&(u=0),v===void 0&&(v=0),m===void 0&&(m=128),p===void 0&&(p=128),h.call(this,f,"Ellipse",new a(m/2,p/2,m,p)),this._smoothness=64,this.setPosition(u,v),this.width=m,this.height=p,x!==void 0&&this.setFillStyle(x,y),this.updateDisplayOrigin(),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(o){this._smoothness=o,this.updateData()}},setSize:function(o,f){return this.width=o,this.height=f,this.geom.setPosition(o/2,f/2),this.geom.setSize(o,f),this.updateData()},setSmoothness:function(o){return this._smoothness=o,this.updateData()},updateData:function(){for(var o=[],f=this.geom.getPoints(this._smoothness),u=0;u<f.length;u++)o.push(f[u].x,f[u].y);return o.push(f[0].x,f[0].y),this.pathIndexes=g(o),this.pathData=o,this}});l.exports=n},55881:(l,T,e)=>{/** 1889 * @author Richard Davey <[email protected]> 1890 * @copyright 2013-2023 Photon Storm Ltd. 1891 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1892 */var d=e(15608),g=e(17876),r=e(49584),a=function(h,n,o,f){o.addToRenderList(n);var u=h.currentContext;if(r(h,u,n,o,f)){var v=n._displayOriginX,m=n._displayOriginY,p=n.pathData,x=p.length-1,y=p[0]-v,P=p[1]-m;u.beginPath(),u.moveTo(y,P),n.closePath||(x-=2);for(var b=2;b<x;b+=2){var E=p[b]-v,M=p[b+1]-m;u.lineTo(E,M)}u.closePath(),n.isFilled&&(d(u,n),u.fill()),n.isStroked&&(g(u,n),u.stroke()),u.restore(
1892)}};l.exports=a},99869:(l,T,e)=>{/** 1893 * @author Richard Davey <[email protected]> 1894 * @copyright 2013-2023 Photon Storm Ltd. 1895 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1896 */var d=e(28591),g=e(61286);g.register("ellipse",function(r,a,h,n,o,f){return this.displayList.add(new d(this.scene,r,a,h,n,o,f))})},84171:(l,T,e)=>{/** 1897 * @author Richard Davey <[email protected]> 1898 * @copyright 2013-2023 Photon Storm Ltd. 1899 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1900 */var d=e(72283),g=d,r=d;g=e(17554),r=e(55881),l.exports={renderWebGL:g,renderCanvas:r}},17554:(l,T,e)=>{/** 1901 * @author Richard Davey <[email protected]> 1902 * @copyright 2013-2023 Photon Storm Ltd. 1903 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1904 */var d=e(19543),g=e(73329),r=e(50262),a=function(h,n,o,f){o.addToRenderList(n);var u=h.pipelines.set(n.pipeline),v=g(n,o,f),m=u.calcMatrix.copyFrom(v.calc),p=n._displayOriginX,x=n._displayOriginY,y=o.alpha*n.alpha;h.pipelines.preBatch(n),n.isFilled&&d(u,m,n,y,p,x),n.isStroked&&r(u,n,y,p,x),h.pipelines.postBatch(n)};l.exports=a},39169:(l,T,e)=>{/** 1905 * @author Richard Davey <[email protected]> 1906 * @copyright 2013-2023 Photon Storm Ltd. 1907 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1908 */var d=e(56694),g=e(91461),r=e(88059),a=new d({Extends:g,Mixins:[r],initialize:function(n,o,f,u,v,m,p,x,y,P,b){o===void 0&&(o=0),f===void 0&&(f=0),u===void 0&&(u=128),v===void 0&&(v=128),m===void 0&&(m=32),p===void 0&&(p=32),g.call(this,n,"Grid",null),this.cellWidth=m,this.cellHeight=p,this.showCells=!0,this.outlineFillColor=0,this.outlineFillAlpha=0,this.showOutline=!0,this.showAltCells=!1,this.altFillColor,this.altFillAlpha,this.setPosition(o,f),this.setSize(u,v),this.setFillStyle(x,y),P!==void 0&&this.setOutlineStyle(P,b),this.updateDisplayOrigin()},setFillStyle:function(h,n){return n===void 0&&(n=1),h===void 0?this.showCells=!1:(this.fillColor=h,this.fillAlpha=n,this.showCells=!0),this},setAltFillStyle:function(h,n){return n===void 0&&(n=1),h===void 0?this.showAltCells=!1:(this.altFillColor=h,this.altFillAlpha=n,this.showAltCells=!0),this},setOutlineStyle:function(h,n){return n===void 0&&(n=1),h===void 0?this.showOutline=!1:(this.outlineFillColor=h,this.outlineFillAlpha=n,this.showOutline=!0),this}});l.exports=a},95525:(l,T,e)=>{/** 1909 * @author Richard Davey <[email protected]> 1910 * @copyright 2013-2023 Photon Storm Ltd. 1911 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1912 */var d=e(15608),g=e(17876),r=e(49584),a=function(h,n,o,f){o.addToRenderList(n);var u=h.currentContext;if(r(h,u,n,o,f)){var v=-n._displayOriginX,m=-n._displayOriginY,p=o.alpha*n.alpha,x=n.width,y=n.height,P=n.cellWidth,b=n.cellHeight,E=Math.ceil(x/P),M=Math.ceil(y/b),w=P,A=b,R=P-(E*P-x),L=b-(M*b-y),O=n.showCells,I=n.showAltCells,D=n.showOutline,B=0,z=0,X=0,W=0,j=0;if(D&&(w--,A--,R===P&&R--,L===b&&L--),O&&n.fillAlpha>0)for(d(u,n),z=0;z<M;z++)for(I&&(X=z%2),B=0;B<E;B++){if(I&&X){X=0;continue}X++,W=B<E-1?w:R,j=z<M-1?A:L,u.fillRect(v+B*P,m+z*b,W,j)}if(I&&n.altFillAlpha>0)for(d(u,n,n.altFillColor,n.altFillAlpha*p),z=0;z<M;z++)for(I&&(X=z%2),B=0;B<E;B++){if(I&&!X){X=1;continue}X=0,W=B<E-1?w:R,j=z<M-1?A:L,u.fillRect(v+B*P,m+z*b,W,j)}if(D&&n.outlineFillAlpha>0){for(g(u,n,n.outlineFillColor,n.outlineFillAlpha*p),B=1;B<E;B++){var N=B*P;u.beginPath(),u.moveTo(N+v,m),u.lineTo(N+v,y+m),u.stroke()}for(z=1;z<M;z++){var Y=z*b;u.beginPath(),u.moveTo(v,Y+m),u.lineTo(v+x,Y+m),u.stroke()}}u.restore()}};l.exports=a},9326:(l,T,e)=>{/** 1913 * @author Richard Davey <[email protected]> 1914 * @copyright 2013-2023 Photon Storm Ltd. 1915 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1916 */var d=e(61286),g=e(39169);d.register("grid",function(r,a,h,n,o,f,u,v,m,p){return this.displayList.add(new g(this.scene,r,a,h,n,o,f,u,v,m,p))})},88059:(l,T,e)=>{/** 1917 * @author Richard Davey <[email protected]> 1918 * @copyright 2013-2023 Photon Storm Ltd. 1919 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1920 */var d=e(72283),g=d,r=d;g=e(50639),r=e(95525),l.exports={renderWebGL:g,renderCanvas:r}},50639:(l,T,e)=>{/** 1921 * @author Richard Davey <[email protected]> 1922 * @copyright 2013-2023 Photon Storm Ltd. 1923 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1924 */var d=e(73329),g=e(75512),r=function(a,h,n,o){n.addToRenderList(h);var f=a.pipelines.set(h.pipeline),u=d(h,n,o),v=f.calcMatrix.copyFrom(u.calc);v.translate(-h._displayOriginX,-h._displayOriginY);var m=n.alpha*h.alpha,p=h.width,x=h.height,y=h.cellWidth,P=h.cellHeight,b=Math.ceil(p/y),E=Math.ceil(x/P),M=y,w=P,A=y-(b*y-p),R=P-(E*P-x),L,O,I=h.showCells,D=h.showAltCells,B=h.showOutline,z=0,X=0,W=0,j=0,N=0;if(B&&(M--,w--,A===y&&A--,R===P&&R--),a.pipelines.preBatch(h),I&&h.fillAlpha>
19240)for(L=f.fillTint,O=g.getTintAppendFloatAlpha(h.fillColor,h.fillAlpha*m),L.TL=O,L.TR=O,L.BL=O,L.BR=O,X=0;X<E;X++)for(D&&(W=X%2),z=0;z<b;z++){if(D&&W){W=0;continue}W++,j=z<b-1?M:A,N=X<E-1?w:R,f.batchFillRect(z*y,X*P,j,N)}if(D&&h.altFillAlpha>0)for(L=f.fillTint,O=g.getTintAppendFloatAlpha(h.altFillColor,h.altFillAlpha*m),L.TL=O,L.TR=O,L.BL=O,L.BR=O,X=0;X<E;X++)for(D&&(W=X%2),z=0;z<b;z++){if(D&&!W){W=1;continue}W=0,j=z<b-1?M:A,N=X<E-1?w:R,f.batchFillRect(z*y,X*P,j,N)}if(B&&h.outlineFillAlpha>0){var Y=f.strokeTint,F=g.getTintAppendFloatAlpha(h.outlineFillColor,h.outlineFillAlpha*m);for(Y.TL=F,Y.TR=F,Y.BL=F,Y.BR=F,z=1;z<b;z++){var G=z*y;f.batchLine(G,0,G,x,1,1,1,0,!1)}for(X=1;X<E;X++){var k=X*P;f.batchLine(0,k,p,k,1,1,1,0,!1)}}a.pipelines.postBatch(h)};l.exports=r},4415:(l,T,e)=>{/** 1925 * @author Richard Davey <[email protected]> 1926 * @copyright 2013-2023 Photon Storm Ltd. 1927 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1928 */var d=e(72296),g=e(56694),r=e(91461),a=new g({Extends:r,Mixins:[d],initialize:function(n,o,f,u,v,m,p,x){o===void 0&&(o=0),f===void 0&&(f=0),u===void 0&&(u=48),v===void 0&&(v=32),m===void 0&&(m=15658734),p===void 0&&(p=10066329),x===void 0&&(x=13421772),r.call(this,n,"IsoBox",null),this.projection=4,this.fillTop=m,this.fillLeft=p,this.fillRight=x,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(o,f),this.setSize(u,v),this.updateDisplayOrigin()},setProjection:function(h){return this.projection=h,this},setFaces:function(h,n,o){return h===void 0&&(h=!0),n===void 0&&(n=!0),o===void 0&&(o=!0),this.showTop=h,this.showLeft=n,this.showRight=o,this},setFillStyle:function(h,n,o){return this.fillTop=h,this.fillLeft=n,this.fillRight=o,this.isFilled=!0,this}});l.exports=a},32884:(l,T,e)=>{/** 1929 * @author Richard Davey <[email protected]> 1930 * @copyright 2013-2023 Photon Storm Ltd. 1931 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1932 */var d=e(15608),g=e(49584),r=function(a,h,n,o){n.addToRenderList(h);var f=a.currentContext;if(g(a,f,h,n,o)&&h.isFilled){var u=h.width,v=h.height,m=u/2,p=u/h.projection;h.showTop&&(d(f,h,h.fillTop),f.beginPath(),f.moveTo(-m,-v),f.lineTo(0,-p-v),f.lineTo(m,-v),f.lineTo(m,-1),f.lineTo(0,p-1),f.lineTo(-m,-1),f.lineTo(-m,-v),f.fill()),h.showLeft&&(d(f,h,h.fillLeft),f.beginPath(),f.moveTo(-m,0),f.lineTo(0,p),f.lineTo(0,p-v),f.lineTo(-m,-v),f.lineTo(-m,0),f.fill()),h.showRight&&(d(f,h,h.fillRight),f.beginPath(),f.moveTo(m,0),f.lineTo(0,p),f.lineTo(0,p-v),f.lineTo(m,-v),f.lineTo(m,0),f.fill()),f.restore()}};l.exports=r},88154:(l,T,e)=>{/** 1933 * @author Richard Davey <[email protected]> 1934 * @copyright 2013-2023 Photon Storm Ltd. 1935 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1936 */var d=e(61286),g=e(4415);d.register("isobox",function(r,a,h,n,o,f,u){return this.displayList.add(new g(this.scene,r,a,h,n,o,f,u))})},72296:(l,T,e)=>{/** 1937 * @author Richard Davey <[email protected]> 1938 * @copyright 2013-2023 Photon Storm Ltd. 1939 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1940 */var d=e(72283),g=d,r=d;g=e(33101),r=e(32884),l.exports={renderWebGL:g,renderCanvas:r}},33101:(l,T,e)=>{/** 1941 * @author Richard Davey <[email protected]> 1942 * @copyright 2013-2023 Photon Storm Ltd. 1943 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1944 */var d=e(73329),g=e(75512),r=function(a,h,n,o){n.addToRenderList(h);var f=a.pipelines.set(h.pipeline),u=d(h,n,o),v=f.calcMatrix.copyFrom(u.calc),m=h.width,p=h.height,x=m/2,y=m/h.projection,P=n.alpha*h.alpha;if(h.isFilled){var b,E,M,w,A,R,L,O,I;a.pipelines.preBatch(h),h.showTop&&(b=g.getTintAppendFloatAlpha(h.fillTop,P),E=v.getX(-x,-p),M=v.getY(-x,-p),w=v.getX(0,-y-p),A=v.getY(0,-y-p),R=v.getX(x,-p),L=v.getY(x,-p),O=v.getX(0,y-p),I=v.getY(0,y-p),f.batchQuad(h,E,M,w,A,R,L,O,I,0,0,1,1,b,b,b,b,2)),h.showLeft&&(b=g.getTintAppendFloatAlpha(h.fillLeft,P),E=v.getX(-x,0),M=v.getY(-x,0),w=v.getX(0,y),A=v.getY(0,y),R=v.getX(0,y-p),L=v.getY(0,y-p),O=v.getX(-x,-p),I=v.getY(-x,-p),f.batchQuad(h,E,M,w,A,R,L,O,I,0,0,1,1,b,b,b,b,2)),h.showRight&&(b=g.getTintAppendFloatAlpha(
1944h.fillRight,P),E=v.getX(x,0),M=v.getY(x,0),w=v.getX(0,y),A=v.getY(0,y),R=v.getX(0,y-p),L=v.getY(0,y-p),O=v.getX(x,-p),I=v.getY(x,-p),f.batchQuad(h,E,M,w,A,R,L,O,I,0,0,1,1,b,b,b,b,2)),a.pipelines.postBatch(h)}};l.exports=r},65159:(l,T,e)=>{/** 1945 * @author Richard Davey <[email protected]> 1946 * @copyright 2013-2023 Photon Storm Ltd. 1947 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1948 */var d=e(56694),g=e(93387),r=e(91461),a=new d({Extends:r,Mixins:[g],initialize:function(n,o,f,u,v,m,p,x,y){o===void 0&&(o=0),f===void 0&&(f=0),u===void 0&&(u=48),v===void 0&&(v=32),m===void 0&&(m=!1),p===void 0&&(p=15658734),x===void 0&&(x=10066329),y===void 0&&(y=13421772),r.call(this,n,"IsoTriangle",null),this.projection=4,this.fillTop=p,this.fillLeft=x,this.fillRight=y,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=m,this.isFilled=!0,this.setPosition(o,f),this.setSize(u,v),this.updateDisplayOrigin()},setProjection:function(h){return this.projection=h,this},setReversed:function(h){return this.isReversed=h,this},setFaces:function(h,n,o){return h===void 0&&(h=!0),n===void 0&&(n=!0),o===void 0&&(o=!0),this.showTop=h,this.showLeft=n,this.showRight=o,this},setFillStyle:function(h,n,o){return this.fillTop=h,this.fillLeft=n,this.fillRight=o,this.isFilled=!0,this}});l.exports=a},9923:(l,T,e)=>{/** 1949 * @author Richard Davey <[email protected]> 1950 * @copyright 2013-2023 Photon Storm Ltd. 1951 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1952 */var d=e(15608),g=e(49584),r=function(a,h,n,o){n.addToRenderList(h);var f=a.currentContext;if(g(a,f,h,n,o)&&h.isFilled){var u=h.width,v=h.height,m=u/2,p=u/h.projection,x=h.isReversed;h.showTop&&x&&(d(f,h,h.fillTop),f.beginPath(),f.moveTo(-m,-v),f.lineTo(0,-p-v),f.lineTo(m,-v),f.lineTo(0,p-v),f.fill()),h.showLeft&&(d(f,h,h.fillLeft),f.beginPath(),x?(f.moveTo(-m,-v),f.lineTo(0,p),f.lineTo(0,p-v)):(f.moveTo(-m,0),f.lineTo(0,p),f.lineTo(0,p-v)),f.fill()),h.showRight&&(d(f,h,h.fillRight),f.beginPath(),x?(f.moveTo(m,-v),f.lineTo(0,p),f.lineTo(0,p-v)):(f.moveTo(m,0),f.lineTo(0,p),f.lineTo(0,p-v)),f.fill()),f.restore()}};l.exports=r},67765:(l,T,e)=>{/** 1953 * @author Richard Davey <[email protected]> 1954 * @copyright 2013-2023 Photon Storm Ltd. 1955 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1956 */var d=e(61286),g=e(65159);d.register("isotriangle",function(r,a,h,n,o,f,u,v){return this.displayList.add(new g(this.scene,r,a,h,n,o,f,u,v))})},93387:(l,T,e)=>{/** 1957 * @author Richard Davey <[email protected]> 1958 * @copyright 2013-2023 Photon Storm Ltd. 1959 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1960 */var d=e(72283),g=d,r=d;g=e(54946),r=e(9923),l.exports={renderWebGL:g,renderCanvas:r}},54946:(l,T,e)=>{/** 1961 * @author Richard Davey <[email protected]> 1962 * @copyright 2013-2023 Photon Storm Ltd. 1963 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1964 */var d=e(73329),g=e(75512),r=function(a,h,n,o){n.addToRenderList(h);var f=a.pipelines.set(h.pipeline),u=d(h,n,o),v=f.calcMatrix.copyFrom(u.calc),m=h.width,p=h.height,x=m/2,y=m/h.projection,P=h.isReversed,b=n.alpha*h.alpha;if(h.isFilled){a.pipelines.preBatch(h);var E,M,w,A,R,L,O;if(h.showTop&&P){E=g.getTintAppendFloatAlpha(h.fillTop,b),M=v.getX(-x,-p),w=v.getY(-x,-p),A=v.getX(0,-y-p),R=v.getY(0,-y-p),L=v.getX(x,-p),O=v.getY(x,-p);var I=v.getX(0,y-p),D=v.getY(0,y-p);f.batchQuad(h,M,w,A,R,L,O,I,D,0,0,1,1,E,E,E,E,2)}h.showLeft&&(E=g.getTintAppendFloatAlpha(h.fillLeft,b),P?(M=v.getX(-x,-p),w=v.getY(-x,-p),A=v.getX(0,y),R=v.getY(0,y),L=v.getX(0,y-p),O=v.getY(0,y-p)):(M=v.getX(-x,0),w=v.getY(-x,0),A=v.getX(0,y),R=v.getY(0,y),L=v.getX(0,y-p),O=v.getY(0,y-p)),f.batchTri(h,M,w,A,R,L,O,0,0,1,1,E,E,E,2)),h.showRight&&(E=g.getTintAppendFloatAlpha(h.fillRight,b),P?(M=v.getX(x,-p),w=v.getY(x,-p),A=v.getX(0,y),R=v.getY(0,y),L=v.getX(0,y-p),O=v.getY(0,y-p)):(M=v.getX(x,0),w=v.getY(x,0),A=v.getX(0,y),R=v.getY(0,y),L=v.getX(0,y-p),O=v.getY(0,y-p)),f.batchTri(h,M,w,A,R,L,O,0,0,1,1,E,E,E,2)),a.pipelines.postBatch(h)}};l.exports=r},579:(l,T,e)=>{/** 1965 * @author Richard Davey <[email protected]> 1966 * @copyright 2013-2023 Photon Storm Ltd. 1967 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1968 */var d=e(56694),g=e(91461),r=e(88829),a=e(52660),h=new d({Extends:g,Mixins:[a],initialize:function(o,f,u,v,m,p,x,y,P){f===void 0&&(f=0),u===void 0&&(u=0),v===void 0&&(v=0),m===void 0&&(m=0),p===void 0&&(p=128),x===void 0&&(x=0),g.call(this,o,"Line",new r(v,m,p,x));var b=Math.max(1,this.geom.right-this.geom.left),E=Math.max(1,this.geom.bottom-this.geom.top);this.lineWidth=1,this._startWidth=1,this._endWidth=1,this.setPosition(f,u),this.setSize(b,E),y!==void 0&&this.setStrokeStyle(1,y,P),this.updateDisplayOrigin()},setLineWidth:function(n,o){return o===void 0&&(o=n),this._startWidth=n,this._endWidth=o,this.lineWidth=n,this},setTo:function(n,o,f,u){return this.geom.setTo(n,o,f,u),this}});l.exports=h},52044:(l,T,e)=>{/** 1969 * @author Richard Davey <[email protected]> 1970 * @copyright 2013-2023 Photon Storm Ltd. 1971 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1972 */var d=e(17876),g=e(49584),r=function(a,h,n,o){n.addToRenderList(h);var f=a.currentContext;if(g(a,f,h,n,o)){var u=h._displayOriginX,v=h._displayOriginY;h.isStroked&&(d(f,h),f.beginPath(),f.moveTo(h.geom.x1-u,h.geom.y1-v),f.lineTo(h.geom.x2-u,h.geom.y2-v),f.stroke()),f.restore(
1972)}};l.exports=r},85665:(l,T,e)=>{/** 1973 * @author Richard Davey <[email protected]> 1974 * @copyright 2013-2023 Photon Storm Ltd. 1975 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1976 */var d=e(61286),g=e(579);d.register("line",function(r,a,h,n,o,f,u,v){return this.displayList.add(new g(this.scene,r,a,h,n,o,f,u,v))})},52660:(l,T,e)=>{/** 1977 * @author Richard Davey <[email protected]> 1978 * @copyright 2013-2023 Photon Storm Ltd. 1979 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1980 */var d=e(72283),g=d,r=d;g=e(46952),r=e(52044),l.exports={renderWebGL:g,renderCanvas:r}},46952:(l,T,e)=>{/** 1981 * @author Richard Davey <[email protected]> 1982 * @copyright 2013-2023 Photon Storm Ltd. 1983 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1984 */var d=e(73329),g=e(75512),r=function(a,h,n,o){n.addToRenderList(h);var f=a.pipelines.set(h.pipeline),u=d(h,n,o);f.calcMatrix.copyFrom(u.calc);var v=h._displayOriginX,m=h._displayOriginY,p=n.alpha*h.alpha;if(a.pipelines.preBatch(h),h.isStroked){var x=f.strokeTint,y=g.getTintAppendFloatAlpha(h.strokeColor,h.strokeAlpha*p);x.TL=y,x.TR=y,x.BL=y,x.BR=y;var P=h._startWidth,b=h._endWidth;f.batchLine(h.geom.x1-v,h.geom.y1-m,h.geom.x2-v,h.geom.y2-m,P,b,1,0,!1,u.sprite,u.camera)}a.pipelines.postBatch(h)};l.exports=r},91249:(l,T,e)=>{/** 1985 * @author Richard Davey <[email protected]> 1986 * @copyright 2013-2023 Photon Storm Ltd. 1987 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1988 */var d=e(70573),g=e(56694),r=e(11117),a=e(14045),h=e(8580),n=e(91461),o=e(18974),f=new g({Extends:n,Mixins:[d],initialize:function(v,m,p,x,y,P){m===void 0&&(m=0),p===void 0&&(p=0),n.call(this,v,"Polygon",new h(x));var b=a(this.geom);this.setPosition(m,p),this.setSize(b.width,b.height),y!==void 0&&this.setFillStyle(y,P),this.updateDisplayOrigin(),this.updateData()},smooth:function(u){u===void 0&&(u=1);for(var v=0;v<u;v++)o(this.geom);return this.updateData()},setTo:function(u){this.geom.setTo(u);var v=a(this.geom);return this.setSize(v.width,v.height),this.updateDisplayOrigin(),this.updateData()},updateData:function(){for(var u=[],v=this.geom.points,m=0;m<v.length;m++)u.push(v[m].x,v[m].y);return u.push(v[0].x,v[0].y),this.pathIndexes=r(u),this.pathData=u,this}});l.exports=f},40834:(l,T,e)=>{/** 1989 * @author Richard Davey <[email protected]> 1990 * @copyright 2013-2023 Photon Storm Ltd. 1991 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1992 */var d=e(15608),g=e(17876),r=e(49584),a=function(h,n,o,f){o.addToRenderList(n);var u=h.currentContext;if(r(h,u,n,o,f)){var v=n._displayOriginX,m=n._displayOriginY,p=n.pathData,x=p.length-1,y=p[0]-v,P=p[1]-m;u.beginPath(),u.moveTo(y,P),n.closePath||(x-=2);for(var b=2;b<x;b+=2){var E=p[b]-v,M=p[b+1]-m;u.lineTo(E,M)}n.closePath&&u.closePath(),n.isFilled&&(d(u,n),u.fill()),n.isStroked&&(g(u,n),u.stroke()),u.restore()}};l.exports=a},88203:(l,T,e)=>{/** 1993 * @author Richard Davey <[email protected]> 1994 * @copyright 2013-2023 Photon Storm Ltd. 1995 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1996 */var d=e(61286),g=e(91249);d.register("polygon",function(r,a,h,n,o){return this.displayList.add(new g(this.scene,r,a,h,n,o))})},70573:(l,T,e)=>{/** 1997 * @author Richard Davey <[email protected]> 1998 * @copyright 2013-2023 Photon Storm Ltd. 1999 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2000 */var d=e(72283),g=d,r=d;g=e(72841),r=e(40834),l.exports={renderWebGL:g,renderCanvas:r}},72841:(l,T,e)=>{/** 2001 * @author Richard Davey <[email protected]> 2002 * @copyright 2013-2023 Photon Storm Ltd. 2003 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2004 */var d=e(19543),g=e(73329),r=e(50262),a=function(h,n,o,f){o.addToRenderList(n);var u=h.pipelines.set(n.pipeline),v=g(n,o,f),m=u.calcMatrix.copyFrom(v.calc),p=n._displayOriginX,x=n._displayOriginY,y=o.alpha*n.alpha;h.pipelines.preBatch(n),n.isFilled&&d(u,m,n,y,p,x),n.isStroked&&r(u,n,y,p,x),h.pipelines.postBatch(n)};l.exports=a},517:(l,T,e)=>{/** 2005 * @author Richard Davey <[email protected]> 2006 * @copyright 2013-2023 Photon Storm Ltd. 2007 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2008 */var d=e(56694),g=e(74118),r=e(91461),a=e(37673),h=new d({Extends:r,Mixins:[a],initialize:function(o,f,u,v,m,p,x){f===void 0&&(f=0),u===void 0&&(u=0),v===void 0&&(v=128),m===void 0&&(m=128),r.call(this,o,"Rectangle",new g(0,0,v,m)),this.setPosition(f,u),this.setSize(v,m),p!==void 0&&this.setFillStyle(p,x),this.updateDisplayOrigin(),this.updateData()},setSize:function(n,o){this.width=n,this.height=o,this.geom.setSize(n,o),this.updateData(),this.updateDisplayOrigin();var f=this.input;return f&&!f.customHitArea&&(f.hitArea.width=n,f.hitArea.height=o
2008),this},updateData:function(){var n=[],o=this.geom,f=this._tempLine;return o.getLineA(f),n.push(f.x1,f.y1,f.x2,f.y2),o.getLineB(f),n.push(f.x2,f.y2),o.getLineC(f),n.push(f.x2,f.y2),o.getLineD(f),n.push(f.x2,f.y2),this.pathData=n,this}});l.exports=h},4091:(l,T,e)=>{/** 2009 * @author Richard Davey <[email protected]> 2010 * @copyright 2013-2023 Photon Storm Ltd. 2011 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2012 */var d=e(15608),g=e(17876),r=e(49584),a=function(h,n,o,f){o.addToRenderList(n);var u=h.currentContext;if(r(h,u,n,o,f)){var v=n._displayOriginX,m=n._displayOriginY;n.isFilled&&(d(u,n),u.fillRect(-v,-m,n.width,n.height)),n.isStroked&&(g(u,n),u.beginPath(),u.rect(-v,-m,n.width,n.height),u.stroke()),u.restore()}};l.exports=a},94355:(l,T,e)=>{/** 2013 * @author Richard Davey <[email protected]> 2014 * @copyright 2013-2023 Photon Storm Ltd. 2015 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2016 */var d=e(61286),g=e(517);d.register("rectangle",function(r,a,h,n,o,f){return this.displayList.add(new g(this.scene,r,a,h,n,o,f))})},37673:(l,T,e)=>{/** 2017 * @author Richard Davey <[email protected]> 2018 * @copyright 2013-2023 Photon Storm Ltd. 2019 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2020 */var d=e(72283),g=d,r=d;g=e(43532),r=e(4091),l.exports={renderWebGL:g,renderCanvas:r}},43532:(l,T,e)=>{/** 2021 * @author Richard Davey <[email protected]> 2022 * @copyright 2013-2023 Photon Storm Ltd. 2023 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2024 */var d=e(73329),g=e(50262),r=e(75512),a=function(h,n,o,f){o.addToRenderList(n);var u=h.pipelines.set(n.pipeline),v=d(n,o,f);u.calcMatrix.copyFrom(v.calc);var m=n._displayOriginX,p=n._displayOriginY,x=o.alpha*n.alpha;if(h.pipelines.preBatch(n),n.isFilled){var y=u.fillTint,P=r.getTintAppendFloatAlpha(n.fillColor,n.fillAlpha*x);y.TL=P,y.TR=P,y.BL=P,y.BR=P,u.batchFillRect(-m,-p,n.width,n.height)}n.isStroked&&g(u,n,x,m,p),h.pipelines.postBatch(n)};l.exports=a},77843:(l,T,e)=>{/** 2025 * @author Richard Davey <[email protected]> 2026 * @copyright 2013-2023 Photon Storm Ltd. 2027 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2028 */var d=e(87956),g=e(56694),r=e(11117),a=e(91461),h=new g({Extends:a,Mixins:[d],initialize:function(o,f,u,v,m,p,x,y){f===void 0&&(f=0),u===void 0&&(u=0),v===void 0&&(v=5),m===void 0&&(m=32),p===void 0&&(p=64),a.call(this,o,"Star",null),this._points=v,this._innerRadius=m,this._outerRadius=p,this.setPosition(f,u),this.setSize(p*2,p*2),x!==void 0&&this.setFillStyle(x,y),this.updateDisplayOrigin(),this.updateData()},setPoints:function(n){return this._points=n,this.updateData()},setInnerRadius:function(n){return this._innerRadius=n,this.updateData()},setOuterRadius:function(n){return this._outerRadius=n,this.updateData()},points:{get:function(){return this._points},set:function(n){this._points=n,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(n){this._innerRadius=n,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(n){this._outerRadius=n,this.updateData()}},updateData:function(){var n=[],o=this._points,f=this._innerRadius,u=this._outerRadius,v=Math.PI/2*3,m=Math.PI/o,p=u,x=u;n.push(p,x+-u);for(var y=0;y<o;y++)n.push(p+Math.cos(v)*u,x+Math.sin(v)*u),v+=m,n.push(p+Math.cos(v)*f,x+Math.sin(v)*f),v+=m;return n.push(p,x+-u),this.pathIndexes=r(n),this.pathData=n,this}});l.exports=h},11401:(l,T,e)=>{/** 2029 * @author Richard Davey <[email protected]> 2030 * @copyright 2013-2023 Photon Storm Ltd. 2031 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2032 */var d=e(15608),g=e(17876),r=e(49584),a=function(h,n,o,f){o.addToRenderList(n);var u=h.currentContext;if(r(h,u,n,o,f)){var v=n._displayOriginX,m=n._displayOriginY,p=n.pathData,x=p.length-1,y=p[0]-v,P=p[1]-m;u.beginPath(),u.moveTo(y,P),n.closePath||(x-=2);for(var b=2;b<x;b+=2){var E=p[b]-v,M=p[b+1]-m;u.lineTo(E,M)}u.closePath(),n.isFilled&&(d(u,n),u.fill()),n.isStroked&&(g(u,n),u.stroke()),u.restore()}};l.exports=a},23962:(l,T,e)=>{/** 2033 * @author Richard Davey <[email protected]> 2034 * @copyright 2013-2023 Photon Storm Ltd. 2035 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2036 */var d=e(77843),g=e(61286);g.register("star",function(r,a,h,n,o,f,u){return this.displayList.add(new d(this.scene,r,a,h,n,o,f,u))})},87956:(l,T,e)=>{/** 2037 * @author Richard Davey <[email protected]> 2038 * @copyright 2013-2023 Photon Storm Ltd. 2039 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2040 */var d=e(72283),g=d,r=d;g=e(12037),r=e(11401),l.exports={renderWebGL:g,renderCanvas:r}},12037:(l,T,e)=>{/** 2041 * @author Richard Davey <[email protected]> 2042 * @copyright 2013-2023 Photon Storm Ltd. 2043 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2044 */var d=e(19543),g=e(73329),r=e(50262),a=function(h,n,o,f){o.addToRenderList(n);var u=h.pipelines.set(n.pipeline),v=g(n,o,f),m=u.calcMatrix.copyFrom(v.calc),p=n._displayOriginX,x=n._displayOriginY,y=o.alpha*n.alpha;h.pipelines.preBatch(n),n.isFilled&&d(u,m,n,y,p,x),n.isStroked&&r(u,n,y,p,x),h.pipelines.postBatch(n)};l.exports=a},21873:(l,T,e)=>{/** 2045 * @author Richard Davey <[email protected]> 2046 * @copyright 2013-2023 Photon Storm Ltd. 2047 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2048 */var d=e(56694),g=e(91461),r=e(66349),a=e(70498),h=new d({Extends:g,Mixins:[a],initialize:function(o,f,u,v,m,p,x,y,P,b,E){f===void 0&&(f=0),u===void 0&&(u=0),v===void 0&&(v=0),m===void 0&&(m=128),p===void 0&&(p=64),x===void 0&&(x=0),y===void 0&&(y=128),P===void 0&&(P=128),g.call(this,o,"Triangle",new r(v,m,p,x,y,P));var M=this.geom.right-this.geom.left,w=this.geom.bottom-this.geom.top;this.setPosition(f,u),this.setSize(M,w),b!==void 0&&this.setFillStyle(b,E),this.updateDisplayOrigin(),this.updateData()},setTo:function(n,o,f,u,v,m){return this.geom.setTo(n,o,f,u,v,m),this.updateData()},updateData:function(){var n=[],o=this.geom,f=this._tempLine;return o.getLineA(f),n.push(f.x1,f.y1,f.x2,f.y2),o.getLineB(f),n.push(f.x2,f.y2),o.getLineC(f),n.push(f.x2,f.y2),this.pathData=n,this}});l.exports=h},60213:(l,T,e)=>{/** 2049 * @author Richard Davey <[email protected]> 2050 * @copyright 2013-2023 Photon Storm Ltd. 2051 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2052 */var d=e(15608),g=e(17876),r=e(49584),a=function(h,n,o,f){o.addToRenderList(n);var u=h.currentContext;if(r(h,u,n,o,f)){var v=n._displayOriginX,m=n._displayOriginY,p=n.geom.x1-v,x=n.geom.y1-m,y=n.geom.x2-v,P=n.geom.y2-m,b=n.geom.x3-v,E=n.geom.y3-m;u.beginPath(),u.moveTo(p,x),u.lineTo(y,P),u.lineTo(b,E),u.closePath(),n.isFilled&&(d(u,n),u.fill()),n.isStroked&&(g(u,n),u.stroke()),u.restore(
2052)}};l.exports=a},79296:(l,T,e)=>{/** 2053 * @author Richard Davey <[email protected]> 2054 * @copyright 2013-2023 Photon Storm Ltd. 2055 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2056 */var d=e(61286),g=e(21873);d.register("triangle",function(r,a,h,n,o,f,u,v,m,p){return this.displayList.add(new g(this.scene,r,a,h,n,o,f,u,v,m,p))})},70498:(l,T,e)=>{/** 2057 * @author Richard Davey <[email protected]> 2058 * @copyright 2013-2023 Photon Storm Ltd. 2059 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2060 */var d=e(72283),g=d,r=d;g=e(72291),r=e(60213),l.exports={renderWebGL:g,renderCanvas:r}},72291:(l,T,e)=>{/** 2061 * @author Richard Davey <[email protected]> 2062 * @copyright 2013-2023 Photon Storm Ltd. 2063 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2064 */var d=e(73329),g=e(50262),r=e(75512),a=function(h,n,o,f){o.addToRenderList(n);var u=h.pipelines.set(n.pipeline),v=d(n,o,f);u.calcMatrix.copyFrom(v.calc);var m=n._displayOriginX,p=n._displayOriginY,x=o.alpha*n.alpha;if(h.pipelines.preBatch(n),n.isFilled){var y=u.fillTint,P=r.getTintAppendFloatAlpha(n.fillColor,n.fillAlpha*x);y.TL=P,y.TR=P,y.BL=P,y.BR=P;var b=n.geom.x1-m,E=n.geom.y1-p,M=n.geom.x2-m,w=n.geom.y2-p,A=n.geom.x3-m,R=n.geom.y3-p;u.batchFillTriangle(b,E,M,w,A,R,v.sprite,v.camera)}n.isStroked&&g(u,n,x,m,p),h.pipelines.postBatch(n)};l.exports=a},13747:(l,T,e)=>{/** 2065 * @author Richard Davey <[email protected]> 2066 * @copyright 2013-2023 Photon Storm Ltd. 2067 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2068 */var d=e(16569),g=e(56694),r=e(64937),a=e(89980),h=e(20791),n=new g({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.PostPipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,h],initialize:function(f,u,v,m,p){a.call(this,f,"Sprite"),this._crop=this.resetCropObject(),this.anims=new d(this),this.setTexture(m,p),this.setPosition(u,v),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(o,f){this.anims.update(o,f)},play:function(o,f){return this.anims.play(o,f)},playReverse:function(o,f){return this.anims.playReverse(o,f)},playAfterDelay:function(o,f){return this.anims.playAfterDelay(o,f)},playAfterRepeat:function(o,f){return this.anims.playAfterRepeat(o,f)},chain:function(o){return this.anims.chain(o)},stop:function(){return this.anims.stop()},stopAfterDelay:function(o){return this.anims.stopAfterDelay(o)},stopAfterRepeat:function(o){return this.anims.stopAfterRepeat(o)},stopOnFrame:function(o){return this.anims.stopOnFrame(o)},toJSON:function(){return r.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});l.exports=n},27573:l=>{/** 2069 * @author Richard Davey <[email protected]> 2070 * @copyright 2013-2023 Photon Storm Ltd. 2071 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2072 */var T=function(e,d,g,r){g.addToRenderList(d),e.batchSprite(d,d.frame,g,r)};l.exports=T},89219:(l,T,e)=>{/** 2073 * @author Richard Davey <[email protected]> 2074 * @copyright 2013-2023 Photon Storm Ltd. 2075 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2076 */var d=e(88933),g=e(32291),r=e(99325),a=e(20494),h=e(13747);r.register("sprite",function(n,o){n===void 0&&(n={});var f=a(n,"key",null),u=a(n,"frame",null),v=new h(this.scene,0,0,f,u);return o!==void 0&&(n.add=o),d(this.scene,v,n),g(v,n),v})},66135:(l,T,e)=>{/** 2077 * @author Richard Davey <[email protected]> 2078 * @copyright 2013-2023 Photon Storm Ltd. 2079 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2080 */var d=e(61286),g=e(13747);d.register("sprite",function(r,a,h,n){return this.displayList.add(new g(this.scene,r,a,h,n))})},20791:(l,T,e)=>{/** 2081 * @author Richard Davey <[email protected]> 2082 * @copyright 2013-2023 Photon Storm Ltd. 2083 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2084 */var d=e(72283),g=d,r=d;g=e(21034),r=e(27573),l.exports={renderWebGL:g,renderCanvas:r}},21034:l=>{/** 2085 * @author Richard Davey <[email protected]> 2086 * @copyright 2013-2023 Photon Storm Ltd. 2087 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2088 */var T=function(e,d,g,r){g.addToRenderList(d),d.pipeline.batchSprite(d,g,r)};l.exports=T},32979:l=>{/** 2089 * @author Richard Davey <[email protected]> 2090 * @copyright 2013-2023 Photon Storm Ltd. 2091 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2092 */var T=function(e,d,g){var r=e.canvas,a=e.context,h=e.style,n=[],o=0,f=g.length;h.maxLines>0&&h.maxLines<g.length&&(f=h.maxLines),h.syncFont(r,a);for(var u=0;u<f;u++){var v=h.strokeThickness;v+=a.measureText(g[u]).width,h.wordWrap&&(v-=a.measureText(" ").width),n[u]=Math.ceil(v),o=Math.max(o,n[u])}var m=d.fontSize+h.strokeThickness,p=m*f,x=e.lineSpacing;return f>1&&(p+=x*(f-1)),{width:o,height:p,lines:f,lineWidths:n,lineSpacing:
2092x,lineHeight:m}};l.exports=T},27030:(l,T,e)=>{/** 2093 * @author Richard Davey <[email protected]> 2094 * @copyright 2013-2023 Photon Storm Ltd. 2095 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2096 */var d=e(61068),g=function(r){var a=d.create(this),h=a.getContext("2d",{willReadFrequently:!0});r.syncFont(a,h);var n=h.measureText(r.testString);if("actualBoundingBoxAscent"in n){var o=n.actualBoundingBoxAscent,f=n.actualBoundingBoxDescent;return d.remove(a),{ascent:o,descent:f,fontSize:o+f}}var u=Math.ceil(n.width*r.baselineX),v=u,m=2*v;v=v*r.baselineY|0,a.width=u,a.height=m,h.fillStyle="#f00",h.fillRect(0,0,u,m),h.font=r._font,h.textBaseline="alphabetic",h.fillStyle="#000",h.fillText(r.testString,0,v);var p={ascent:0,descent:0,fontSize:0},x=h.getImageData(0,0,u,m);if(!x)return p.ascent=v,p.descent=v+6,p.fontSize=p.ascent+p.descent,d.remove(a),p;var y=x.data,P=y.length,b=u*4,E,M,w=0,A=!1;for(E=0;E<v;E++){for(M=0;M<b;M+=4)if(y[w+M]!==255){A=!0;break}if(!A)w+=b;else break}for(p.ascent=v-E,w=P-b,A=!1,E=m;E>v;E--){for(M=0;M<b;M+=4)if(y[w+M]!==255){A=!0;break}if(!A)w-=b;else break}return p.descent=E-v,p.fontSize=p.ascent+p.descent,d.remove(a),p};l.exports=g},76555:(l,T,e)=>{/** 2097 * @author Richard Davey <[email protected]> 2098 * @copyright 2013-2023 Photon Storm Ltd. 2099 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2100 */var d=e(99584),g=e(61068),r=e(56694),a=e(64937),h=e(89980),n=e(32979),o=e(10850),f=e(55638),u=e(80032),v=e(74744),m=new r({Extends:h,Mixins:[a.Alpha,a.BlendMode,a.ComputedSize,a.Crop,a.Depth,a.Flip,a.GetBounds,a.Mask,a.Origin,a.Pipeline,a.PostPipeline,a.ScrollFactor,a.Tint,a.Transform,a.Visible,u],initialize:function(x,y,P,b,E){y===void 0&&(y=0),P===void 0&&(P=0),h.call(this,x,"Text"),this.renderer=x.sys.renderer,this.setPosition(y,P),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(!0),this.canvas=g.create(this),this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this.style=new v(this,E),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.dirty=!1,this.style.resolution===0&&(this.style.resolution=1),this._crop=this.resetCropObject(),this.texture=x.sys.textures.addCanvas(null,this.canvas,!0),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(b),E&&E.padding&&this.setPadding(E.padding),E&&E.lineSpacing&&this.setLineSpacing(E.lineSpacing)},initRTL:function(){this.style.rtl&&(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",d(this.canvas,this.scene.sys.canvas),this.originX=1)},runWordWrap:function(p){var x=this.style;if(x.wordWrapCallback){var y=x.wordWrapCallback.call(x.wordWrapCallbackScope,p,this);return Array.isArray(y)&&(y=y.join(` 2101`)),y}else return x.wordWrapWidth?x.wordWrapUseAdvanced?this.advancedWordWrap(p,this.context,this.style.wordWrapWidth):this.basicWordWrap(p,this.context,this.style.wordWrapWidth):p},advancedWordWrap:function(p,x,y){for(var P="",b=p.replace(/ +/gi," ").split(this.splitRegExp),E=b.length,M=0;M<E;M++){var w=b[M],A="";w=w.replace(/^ *|\s*$/gi,"");var R=x.measureText(w).width;if(R<y){P+=w+` 2102`;continue}for(var L=y,O=w.split(" "),I=0;I<O.length;I++){var D=O[I],B=D+" ",z=x.measureText(B).width;if(z>L){if(I===0){for(var X=B;X.length&&(X=X.slice(0,-1),z=x.measureText(X).width,!(z<=L)););if(!X.length)throw new Error("wordWrapWidth < a single character");var W=D.substr(X.length);O[I]=W,A+=X}var j=O[I].length?I:I+1,N=O.slice(j).join(" ").replace(/[ \n]*$/gi,"");b.splice(M+1,0,N),E=b.length;break}else A+=B,L-=z}P+=A.replace(/[ \n]*$/gi,"")+` 2103`}return P=P.replace(/[\s|\n]*$/gi,""),P},basicWordWrap:function(p,x,y){for(var P="",b=p.split(this.splitRegExp),E=b.length-1,M=x.measureText(" ").width,w=0;w<=E;w++){for(var A=y,R=b[w].split(" "),L=R.length-1,O=0;O<=L;O++){var I=R[O],D=x.measureText(I).width,B=D;O<L&&(B+=M),B>A&&O>0&&(P+=` 2104`,A=y),P+=I,O<L?(P+=" ",A-=B):A-=D}w<E&&(P+=` 2105`)}return P},getWrappedText:function(p){p===void 0&&(p=this._text),this.style.syncFont(this.canvas,this.context);var x=this.runWordWrap(p);return x.split(this.splitRegExp)},setText:function(p){return!p&&p!==0&&(p=""),Array.isArray(p)&&(p=p.join(` 2106`)),p!==this._text&&(this._text=p.toString(),this.updateText()),this},appendText:function(p,x){x===void 0&&(x=!0),!p&&p!==0&&(p=""),Array.isArray(p)&&(p=p.join(`
2107`)),p=p.toString();var y=this._text.concat(x?` 2108`+p:p);return y!==this._text&&(this._text=y,this.updateText()),this},setStyle:function(p){return this.style.setStyle(p)},setFont:function(p){return this.style.setFont(p)},setFontFamily:function(p){return this.style.setFontFamily(p)},setFontSize:function(p){return this.style.setFontSize(p)},setFontStyle:function(p){return this.style.setFontStyle(p)},setFixedSize:function(p,x){return this.style.setFixedSize(p,x)},setBackgroundColor:function(p){return this.style.setBackgroundColor(p)},setFill:function(p){return this.style.setFill(p)},setColor:function(p){return this.style.setColor(p)},setStroke:function(p,x){return this.style.setStroke(p,x)},setShadow:function(p,x,y,P,b,E){return this.style.setShadow(p,x,y,P,b,E)},setShadowOffset:function(p,x){return this.style.setShadowOffset(p,x)},setShadowColor:function(p){return this.style.setShadowColor(p)},setShadowBlur:function(p){return this.style.setShadowBlur(p)},setShadowStroke:function(p){return this.style.setShadowStroke(p)},setShadowFill:function(p){return this.style.setShadowFill(p)},setWordWrapWidth:function(p,x){return this.style.setWordWrapWidth(p,x)},setWordWrapCallback:function(p,x){return this.style.setWordWrapCallback(p,x)},setAlign:function(p){return this.style.setAlign(p)},setResolution:function(p){return this.style.setResolution(p)},setLineSpacing:function(p){return this.lineSpacing=p,this.updateText()},setPadding:function(p,x,y,P){if(typeof p=="object"){var b=p,E=o(b,"x",null);E!==null?(p=E,y=E):(p=o(b,"left",0),y=o(b,"right",p));var M=o(b,"y",null);M!==null?(x=M,P=M):(x=o(b,"top",0),P=o(b,"bottom",x))}else p===void 0&&(p=0),x===void 0&&(x=p),y===void 0&&(y=p),P===void 0&&(P=x);return this.padding.left=p,this.padding.top=x,this.padding.right=y,this.padding.bottom=P,this.updateText()},setMaxLines:function(p){return this.style.setMaxLines(p)},updateText:function(){var p=this.canvas,x=this.context,y=this.style,P=y.resolution,b=y.metrics;y.syncFont(p,x);var E=this._text;(y.wordWrapWidth||y.wordWrapCallback)&&(E=this.runWordWrap(this._text));var M=E.split(this.splitRegExp),w=n(this,b,M),A=this.padding,R;y.fixedWidth===0?(this.width=w.width+A.left+A.right,R=w.width):(this.width=y.fixedWidth,R=this.width-A.left-A.right,R<w.width&&(R=w.width)),y.fixedHeight===0?this.height=w.height+A.top+A.bottom:this.height=y.fixedHeight;var L=this.width,O=this.height;this.updateDisplayOrigin(),L*=P,O*=P,L=Math.max(L,1),O=Math.max(O,1),p.width!==L||p.height!==O?(p.width=L,p.height=O,this.frame.setSize(L,O),y.syncFont(p,x),y.rtl&&(x.direction="rtl")):x.clearRect(0,0,L,O),x.save(),x.scale(P,P),y.backgroundColor&&(x.fillStyle=y.backgroundColor,x.fillRect(0,0,L,O)),y.syncStyle(p,x),x.translate(A.left,A.top);for(var I,D,B=0;B<w.lines;B++){if(I=y.strokeThickness/2,D=y.strokeThickness/2+B*w.lineHeight+b.ascent,B>0&&(D+=w.lineSpacing*B),y.rtl)I=L-I-A.left-A.right;else if(y.align==="right")I+=R-w.lineWidths[B];else if(y.align==="center")I+=(R-w.lineWidths[B])/2;else if(y.align==="justify"){var z=.85;if(w.lineWidths[B]/w.width>=z){var X=w.width-w.lineWidths[B],W=x.measureText(" ").width,j=M[B].trim(),N=j.split(" ");X+=(M[B].length-j.length)*W;for(var Y=Math.floor(X/W),F=0;Y>0;)N[F]+=" ",F=(F+1)%(N.length-1||1),--Y;M[B]=N.join(" ")}}this.autoRound&&(I=Math.round(I),D=Math.round(D)),y.strokeThickness&&(y.syncShadow(x,y.shadowStroke),x.strokeText(M[B],I,D)),y.color&&(y.syncShadow(x,y.shadowFill),x.fillText(M[B],I,D))}x.restore(),this.renderer&&this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(p,this.frame.source.glTexture,!0),this.frame.glTexture=this.frame.source.glTexture),this.dirty=!0;var G=this.input;return G&&!G.customHitArea&&(G.hitArea.width=this.width,G.hitArea.height=this.height),this},getTextMetrics:function(){return this.style.getTextMetrics()},text:{get:function(){return this._text},set:function(p){this.setText(p)}},toJSON:function(){var p=a.ToJSON(this),x={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 p.data=x,p},preDestroy:function(){this.style.rtl&&f(this.canvas),g.remove(this.canvas),this.texture.destroy()}});l.exports=m},71649:l=>{/** 2109 * @author Richard Davey <[email protected]> 2110 * @copyright 2013-2023 Photon Storm Ltd. 2111 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2112 */var T=function(e,d,g,r){d.width===0||d.height===0||(g.addToRenderList(d),e.batchSprite(d,d.frame,g,r))};l.exports=T},75397:(l,T,e)=>{/** 2113 * @author Richard Davey <[email protected]> 2114 * @copyright 2013-2023 Photon Storm Ltd. 2115 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2116 */var d=e(88933),g=e(99325),r=e(20494),a=e(76555);g.register("text",function(h,n){h===void 0&&(h={});var o=r(h,"text",""),f=r(h,"style",null),u=r(h,"padding",null);u!==null&&(f.padding=u);var v=new a(this.scene,0,0,o,f);return n!==void 0&&(h.add=n),d(this.scene,v,h),v.autoRound=r(h,"autoRound",!0),v.resolution=r(h,"resolution",1),v})},94627:(l,T,e)=>{/** 2117 * @author Richard Davey <[email protected]> 2118 * @copyright 2013-2023 Photon Storm Ltd. 2119 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2120 */var d=e(76555),g=e(61286);g.register("text",function(r,a,h,n){return this.displayList.add(new d(this.scene,r,a,h,n))})},80032:(l,T,e)=>{/** 2121 * @author Richard Davey <[email protected]> 2122 * @copyright 2013-2023 Photon Storm Ltd. 2123 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2124 */var d=e(72283),g=d,r=d;g=e(76128),r=e(71649),l.exports={renderWebGL:g,renderCanvas:r}},74744:(l,T,e)=>{/** 2125 * @author Richard Davey <[email protected]> 2126 * @copyright 2013-2023 Photon Storm Ltd. 2127 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2128 */var d=e(56694),g=e(20494),r=e(10850),a=e(27030),h={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]},n=new d({initialize:function(f,u){this.parent=f,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(u,!1,!0)},setStyle:function(o,f,u){f===void 0&&(f=!0),u===void 0&&(u=!1),o&&o.hasOwnProperty("fontSize")&&typeof o.fontSize=="number"&&(o.fontSize=o.fontSize.toString()+"px");for(var v in h){var m=u?h[v][1]:this[v];v==="wordWrapCallback"||v==="wordWrapCallbackScope"?this[v]=r(o,h[v][0],m):this[v]=g(o,h[v][0],m)}var p=r(o,"font",null);p!==null&&this.setFont(p,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var x=r(o,"fill",null);x!==null&&(this.color=x);var y=r(o,"metrics",!1);return y?this.metrics={ascent:r(y,"ascent",0),descent:r(y,"descent",0),fontSize:r(y,"fontSize",0)}:(f||!this.metrics)&&(this.metrics=a(this)),f?this.parent.updateText():this.parent},syncFont:function(o,f){f.font=this._font},syncStyle:function(o,f){f.textBaseline="alphabetic",f.fillStyle=this.color,f.strokeStyle=this.stroke,f.lineWidth=this.strokeThickness,f.lineCap="round",f.lineJoin="round"},syncShadow:function(o,f){f?(o.shadowOffsetX=this.shadowOffsetX,o.shadowOffsetY=this.shadowOffsetY,o.shadowColor=this.shadowColor,o.shadowBlur=this.shadowBlur):(o.shadowOffsetX=0,o.shadowOffsetY=0,o.shadowColor=0,o.shadowBlur=0)},update:function(o){return o&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=a(this)),this.parent.updateText()},setFont:function(o,f){f===void 0&&(f=!0);var u=o,v="",m="";if(typeof o!="string")u=r(o,"fontFamily","Courier"),v=r(o,"fontSize","16px"),m=r(o,"fontStyle","");else{var p=o.split(" "),x=0;m=p.length>2?p[x++]:"",v=p[x++]||"16px",u=p[x++]||"Courier"}return(u!==this.fontFamily||v!==this.fontSize||m!==this.fontStyle)&&(this.fontFamily=u,this.fontSize=v,this.fontStyle=m,f&&this.update(!0)),this.parent},setFontFamily:function(o){return this.fontFamily!==o&&(this.fontFamily=o,this.update(!0)),this.parent},setFontStyle:function(o){return this.fontStyle!==o&&(this.fontStyle=o,this.update(!0)),this.parent},setFontSize:function(o){return typeof o=="number"&&(o=o.toString()+"px"),this.fontSize!==o&&(this.fontSize=o,this.update(!0)),this.parent},setTestString:function(o){return this.testString=o,this.update(!0)},setFixedSize:function(o,f){return this.fixedWidth=o,this.fixedHeight=f,o&&(this.parent.width=o),f&&(this.parent.height=f),this.update(!1)}
2128,setBackgroundColor:function(o){return this.backgroundColor=o,this.update(!1)},setFill:function(o){return this.color=o,this.update(!1)},setColor:function(o){return this.color=o,this.update(!1)},setResolution:function(o){return this.resolution=o,this.update(!1)},setStroke:function(o,f){return f===void 0&&(f=this.strokeThickness),o===void 0&&this.strokeThickness!==0?(this.strokeThickness=0,this.update(!0)):(this.stroke!==o||this.strokeThickness!==f)&&(this.stroke=o,this.strokeThickness=f,this.update(!0)),this.parent},setShadow:function(o,f,u,v,m,p){return o===void 0&&(o=0),f===void 0&&(f=0),u===void 0&&(u="#000"),v===void 0&&(v=0),m===void 0&&(m=!1),p===void 0&&(p=!0),this.shadowOffsetX=o,this.shadowOffsetY=f,this.shadowColor=u,this.shadowBlur=v,this.shadowStroke=m,this.shadowFill=p,this.update(!1)},setShadowOffset:function(o,f){return o===void 0&&(o=0),f===void 0&&(f=o),this.shadowOffsetX=o,this.shadowOffsetY=f,this.update(!1)},setShadowColor:function(o){return o===void 0&&(o="#000"),this.shadowColor=o,this.update(!1)},setShadowBlur:function(o){return o===void 0&&(o=0),this.shadowBlur=o,this.update(!1)},setShadowStroke:function(o){return this.shadowStroke=o,this.update(!1)},setShadowFill:function(o){return this.shadowFill=o,this.update(!1)},setWordWrapWidth:function(o,f){return f===void 0&&(f=!1),this.wordWrapWidth=o,this.wordWrapUseAdvanced=f,this.update(!1)},setWordWrapCallback:function(o,f){return f===void 0&&(f=null),this.wordWrapCallback=o,this.wordWrapCallbackScope=f,this.update(!1)},setAlign:function(o){return o===void 0&&(o="left"),this.align=o,this.update(!1)},setMaxLines:function(o){return o===void 0&&(o=0),this.maxLines=o,this.update(!1)},getTextMetrics:function(){var o=this.metrics;return{ascent:o.ascent,descent:o.descent,fontSize:o.fontSize}},toJSON:function(){var o={};for(var f in h)o[f]=this[f];return o.metrics=this.getTextMetrics(),o},destroy:function(){this.parent=void 0}});l.exports=n},76128:(l,T,e)=>{/** 2129 * @author Richard Davey <[email protected]> 2130 * @copyright 2013-2023 Photon Storm Ltd. 2131 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2132 */var d=e(75512),g=function(r,a,h,n){if(!(a.width===0||a.height===0)){h.addToRenderList(a);var o=a.frame,f=o.width,u=o.height,v=d.getTintAppendFloatAlpha,m=r.pipelines.set(a.pipeline,a),p=m.setTexture2D(o.glTexture,a);m.batchTexture(a,o.glTexture,f,u,a.x,a.y,f/a.style.resolution,u/a.style.resolution,a.scaleX,a.scaleY,a.rotation,a.flipX,a.flipY,a.scrollFactorX,a.scrollFactorY,a.displayOriginX,a.displayOriginY,0,0,f,u,v(a.tintTopLeft,h.alpha*a._alphaTL),v(a.tintTopRight,h.alpha*a._alphaTR),v(a.tintBottomLeft,h.alpha*a._alphaBL),v(a.tintBottomRight,h.alpha*a._alphaBR),a.tintFill,0,0,h,n,!1,p)}};l.exports=g},35856:(l,T,e)=>{/** 2133 * @author Richard Davey <[email protected]> 2134 * @copyright 2013-2023 Photon Storm Ltd. 2135 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2136 */var d=e(61068),g=e(56694),r=e(64937),a=e(89980),h=e(3504),n=e(8213),o=e(9271),f=e(93736),u=8,v=new g({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Crop,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.PostPipeline,r.ScrollFactor,r.Tint,r.Transform,r.Visible,o],initialize:function(p,x,y,P,b,E,M){var w=p.sys.renderer;a.call(this,p,"TileSprite");var A=p.sys.textures.get(E),R=A.get(M);R.source.compressionAlgorithm&&(console.warn("TileSprite cannot use compressed texture"),A=p.sys.textures.get("__MISSING"),R=A.get()),A.type==="DynamicTexture"&&(console.warn("TileSprite cannot use Dynamic Texture"),A=p.sys.textures.get("__MISSING"),R=A.get()),!P||!b?(P=R.width,b=R.height):(P=Math.floor(P),b=Math.floor(b)),this._tilePosition=new f,this._tileScale=new f(1,1),this.dirty=!1,this.renderer=w,this.canvas=d.create(this,P,b),this.context=this.canvas.getContext("2d",{willReadFrequently:!1}),this.displayTexture=A,this.displayFrame=R,this._crop=this.resetCropObject(),this.texture=p.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.potWidth=h(R.width),this.potHeight=h(R.height),this.fillCanvas=d.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d",{willReadFrequently:!1}),this.fillPattern=null,this.setPosition(x,y),this.setSize(P,b),this.setFrame
2136(M),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)},setTexture:function(m,p){return this.displayTexture=this.scene.sys.textures.get(m),this.setFrame(p)},setFrame:function(m){var p=this.displayTexture.get(m);return this.potWidth=h(p.width),this.potHeight=h(p.height),this.canvas.width=0,!p.cutWidth||!p.cutHeight?this.renderFlags&=~u:this.renderFlags|=u,this.displayFrame=p,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(m,p){return m!==void 0&&(this.tilePositionX=m),p!==void 0&&(this.tilePositionY=p),this},setTileScale:function(m,p){return m===void 0&&(m=this.tileScaleX),p===void 0&&(p=m),this.tileScaleX=m,this.tileScaleY=p,this},updateTileTexture:function(){if(!(!this.dirty||!this.renderer)){var m=this.displayFrame;if(m.source.isRenderTexture||m.source.isGLTexture){console.warn("TileSprites can only use Image or Canvas based textures"),this.dirty=!1;return}var p=this.fillContext,x=this.fillCanvas,y=this.potWidth,P=this.potHeight;(!this.renderer||!this.renderer.gl)&&(y=m.cutWidth,P=m.cutHeight),p.clearRect(0,0,y,P),x.width=y,x.height=P,p.drawImage(m.source.image,m.cutX,m.cutY,m.cutWidth,m.cutHeight,0,0,y,P),this.renderer&&this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(x,this.fillPattern):this.fillPattern=p.createPattern(x,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var m=this.canvas;if((m.width!==this.width||m.height!==this.height)&&(m.width=this.width,m.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl){this.dirty=!1;return}var p=this.context;this.scene.sys.game.config.antialias||n.disable(p);var x=this._tileScale.x,y=this._tileScale.y,P=this._tilePosition.x,b=this._tilePosition.y;p.clearRect(0,0,this.width,this.height),p.save(),p.scale(x,y),p.translate(-P,-b),p.fillStyle=this.fillPattern,p.fillRect(P,b,this.width/x,this.height/y),p.restore(),this.dirty=!1},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),d.remove(this.canvas),d.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null,this.texture.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(m){this._tilePosition.x=m,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(m){this._tilePosition.y=m,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(m){this._tileScale.x=m,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(m){this._tileScale.y=m,this.dirty=!0}}});l.exports=v},93305:l=>{/** 2137 * @author Richard Davey <[email protected]> 2138 * @copyright 2013-2023 Photon Storm Ltd. 2139 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2140 */var T=function(e,d,g,r){d.updateCanvas(),g.addToRenderList(d),e.batchSprite(d,d.frame,g,r)};l.exports=T},63950:(l,T,e)=>{/** 2141 * @author Richard Davey <[email protected]> 2142 * @copyright 2013-2023 Photon Storm Ltd. 2143 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2144 */var d=e(88933),g=e(99325),r=e(20494),a=e(35856);g.register("tileSprite",function(h,n){h===void 0&&(h={});var o=r(h,"x",0),f=r(h,"y",0),u=r(h,"width",512),v=r(h,"height",512),m=r(h,"key",""),p=r(h,"frame",""),x=new a(this.scene,o,f,u,v,m,p);return n!==void 0&&(h.add=n),d(this.scene,x,h),x})},20509:(l,T,e)=>{/** 2145 * @author Richard Davey <[email protected]> 2146 * @copyright 2013-2023 Photon Storm Ltd. 2147 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2148 */var d=e(35856),g=e(61286);g.register("tileSprite",function(r,a,h,n,o,f){return this.displayList.add(new d(this.scene,r,a,h,n,o,f))})},9271:(l,T,e)=>{/** 2149 * @author Richard Davey <[email protected]> 2150 * @copyright 2013-2023 Photon Storm Ltd. 2151 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2152 */var d=e(72283),g=d,r=d;g=e(74287),r=e(93305),l.exports={renderWebGL:g,renderCanvas:r}},74287:(l,T,e)=>{/** 2153 * @author Richard Davey <[email protected]> 2154 * @copyright 2013-2023 Photon Storm Ltd. 2155 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2156 */var d=e(75512),g=function(r,a,h,n){a.updateCanvas();var o=a.width,f=a.height;if(!(o===0||f===0)){h.addToRenderList(a);var u=d.getTintAppendFloatAlpha,v=r.pipelines.set(a.pipeline,a),m=v.setTexture2D(a.fillPattern,a);v.batchTexture(a,a.fillPattern,a.displayFrame.width*a.tileScaleX,a.displayFrame.height*a.tileScaleY,a.x,a.y,o,f,a.scaleX,a.scaleY,a.rotation,a.flipX,a.flipY,a.scrollFactorX,a.scrollFactorY,a.originX*o,a.originY*f,0,0,o,f,u(a.tintTopLeft,h.alpha*a._alphaTL),u(a.tintTopRight,h.alpha*a._alphaTR),u(a.tintBottomLeft,h.alpha*a._alphaBL),u(a.tintBottomRight,h.alpha*a._alphaBR),a.tintFill,a.tilePositionX%a.displayFrame.width/a.displayFrame.width,a.tilePositionY%a.displayFrame.height/a.displayFrame.height,h,n,!1,m)}};l.exports=g},8630:(l,T,e)=>{/** 2157 * @author Richard Davey <[email protected]> 2158 * @copyright 2013-2023 Photon Storm Ltd. 2159 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2160 */var d=e(82897),g=e(56694),r=e(64937),a=e(56631),h=e(97081),n=e(89980),o=e(83392),f=e(76038),u=e(76583),v=e(77974),m=new g({Extends:n,Mixins:[r.Alpha,r.BlendM
2160ode,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.PostPipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,v],initialize:function(x,y,P,b){n.call(this,x,"Video"),this.video,this.videoTexture,this.videoTextureSource,this.snapshotTexture,this.flipY=!1,this._key=u(),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._crop=this.resetCropObject(),this.markers={},this._markerIn=0,this._markerOut=0,this._playingMarker=!1,this._lastUpdate=0,this.cacheKey="",this.isSeeking=!1,this._playCalled=!1,this._rfvCallbackId=0;var E=x.sys.game;this._device=E.device.video,this.setPosition(y,P),this.setSize(256,256),this.initPipeline(),this.initPostPipeline(!0),E.events.on(h.PAUSE,this.globalPause,this),E.events.on(h.RESUME,this.globalResume,this);var M=x.sys.sound;M&&M.on(f.GLOBAL_MUTE,this.globalMute,this),b&&this.load(b)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},load:function(p){var x=this.scene.sys.cache.video.get(p);return x?(this.cacheKey=p,this.loadHandler(x.url,x.noAudio,x.crossOrigin)):console.warn("No video in cache for key: "+p),this},changeSource:function(p,x,y,P,b){x===void 0&&(x=!0),y===void 0&&(y=!1),this.cacheKey!==p&&(this.load(p),x&&this.play(y,P,b))},getVideoKey:function(){return this.cacheKey},loadURL:function(p,x,y){x===void 0&&(x=!1);var P=this._device.getVideoURL(p);return P?(this.cacheKey="",this.loadHandler(P.url,x,y)):console.warn("No supported video format found for "+p),this},loadMediaStream:function(p,x,y){return this.loadHandler(null,x,y,p)},loadHandler:function(p,x,y,P){x||(x=!1);var b=this.video;if(b?(this.removeLoadEventHandlers(),this.stop()):(b=document.createElement("video"),b.controls=!1,b.setAttribute("playsinline","playsinline"),b.setAttribute("preload","auto"),b.setAttribute("disablePictureInPicture","true")),x?(b.muted=!0,b.defaultMuted=!0,b.setAttribute("autoplay","autoplay")):(b.muted=!1,b.defaultMuted=!1,b.removeAttribute("autoplay")),y?b.setAttribute("crossorigin",y):b.removeAttribute("crossorigin"),P)if("srcObject"in b)try{b.srcObject=P}catch(E){if(E.name!=="TypeError")throw E;b.src=URL.createObjectURL(P)}else b.src=URL.createObjectURL(P);else b.src=p;return this.addLoadEventHandlers(),this.retry=0,this.video=b,this._playCalled=!1,b.load(),this},requestVideoFrame:function(p,x){var y=this.video;if(y){var P=x.width,b=x.height,E=this.videoTexture,M=this.videoTextureSource,w=!E||M.source!==y;w?(this._codePaused=y.paused,this._codeMuted=y.muted,E?(M.source=y,M.width=P,M.height=b,E.get().setSize(P,b)):(E=this.scene.sys.textures.create(this._key,y,P,b),E.add("__BASE",0,0,0,P,b),this.setTexture(E),this.videoTexture=E,this.videoTextureSource=E.source[0],this.videoTextureSource.setFlipY(this.flipY),this.emit(a.VIDEO_TEXTURE,this,E)),this.setSizeToFrame(),this.updateDisplayOrigin()):M.update(),this.isStalled=!1,this.metadata=x;var A=x.mediaTime;w&&(this._lastUpdate=A,this.emit(a.VIDEO_CREATED,this,P,b),this.frameReady||(this.frameReady=!0,this.emit(a.VIDEO_PLAY,this))),this._playingMarker?A>=this._markerOut&&(y.loop?(y.currentTime=this._markerIn,this.emit(a.VIDEO_LOOP,this)):(this.stop(!1),this.emit(a.VIDEO_COMPLETE,this))):A<this._lastUpdate&&this.emit(a.VIDEO_LOOP,this),this._lastUpdate=A,this._rfvCallbackId=this.video.requestVideoFrameCallback(this.requestVideoFrame.bind(this))}},play:function(p,x,y){x===void 0&&(x=-1),y===void 0&&(y=o.MAX_SAFE_INTEGER);var P=this.video;return!P||this.isPlaying()?(P||console.warn("Video not loaded"),this):(p===void 0&&(p=P.loop),P.loop=p,this._markerIn=x,this._markerOut=y,this._playingMarker=x>-1&&y>x&&y<o.MAX_SAFE_INTEGER,this._playCalled||(this._rfvCallbackId=P.requestVideoFrameCallback(this.requestVideoFrame.bind(this)),this._playCalled=!0,this.createPlayPromise()),this)},addLoadEventHandlers:function(){var p=this.video;p&&(p.addEventListener("error",this._loadCallbackHandler),p.addEventListener("abort",this._loadCallbackHandler))},removeLoadEventHandlers:function(){var p=this.video;p&&(p.removeEventListener("error",this._loadCallbackHandler),p.removeEventListener("abort",this._loadCallbackHandler))},addEventHandlers:function(){var p=this.video;
2160if(p){var x=this._callbacks;for(var y in x)p.addEventListener(y,x[y])}},removeEventHandlers:function(){var p=this.video;if(p){var x=this._callbacks;for(var y in x)p.removeEventListener(y,x[y])}},createPlayPromise:function(p){p===void 0&&(p=!0);var x=this.video,y=x.play();if(y!==void 0){var P=this.playSuccess.bind(this),b=this.playError.bind(this);if(!p){var E=this;b=function(){E.failedPlayAttempts++}}y.then(P).catch(b)}else x.addEventListener("playing",this._callbacks.legacy),p||this.failedPlayAttempts++},addMarker:function(p,x,y){return!isNaN(x)&&x>=0&&!isNaN(y)&&y>x&&(this.markers[p]=[x,y]),this},playMarker:function(p,x){var y=this.markers[p];return y&&this.play(x,y[0],y[1]),this},removeMarker:function(p){return delete this.markers[p],this},snapshot:function(p,x){return p===void 0&&(p=this.width),x===void 0&&(x=this.height),this.snapshotArea(0,0,this.width,this.height,p,x)},snapshotArea:function(p,x,y,P,b,E){p===void 0&&(p=0),x===void 0&&(x=0),y===void 0&&(y=this.width),P===void 0&&(P=this.height),b===void 0&&(b=y),E===void 0&&(E=P);var M=this.video,w=this.snapshotTexture;return w?(w.setSize(b,E),M&&w.context.drawImage(M,p,x,y,P,0,0,b,E)):(w=this.scene.sys.textures.createCanvas(u(),b,E),this.snapshotTexture=w,M&&w.context.drawImage(M,p,x,y,P,0,0,b,E)),w.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(a.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 x=p.name;x==="NotAllowedError"?(this.touchLocked=!0,this.playWhenUnlocked=!0,this.failedPlayAttempts=1,this.emit(a.VIDEO_LOCKED,this)):x==="NotSupportedError"?(this.stop(!1),this.emit(a.VIDEO_UNSUPPORTED,this,p)):(this.stop(!1),this.emit(a.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(a.VIDEO_PLAYING,this)},loadErrorHandler:function(p){this.stop(!1),this.emit(a.VIDEO_ERROR,this,p)},stalledHandler:function(p){this.isStalled=!0,this.emit(a.VIDEO_STALLED,this,p)},completeHandler:function(){this._playCalled=!1,this.emit(a.VIDEO_COMPLETE,this)},preUpdate:function(p,x){var y=this.video;!y||!this._playCalled||this.touchLocked&&this.playWhenUnlocked&&(this.retry+=x,this.retry>=this.retryInterval&&(this.createPlayPromise(!1),this.retry=0))},seekTo:function(p){var x=this.video;if(x){var y=x.duration;if(y!==1/0&&!isNaN(y)){var P=y*p;this.setCurrentTime(P)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(p){var x=this.video;if(x){if(typeof p=="string"){var y=p[0],P=parseFloat(p.substr(1));y==="+"?p=x.currentTime+P:y==="-"&&(p=x.currentTime-P)}x.currentTime=p}return this},seekingHandler:function(){this.isSeeking=!0,this.emit(a.VIDEO_SEEKING,this)},seekedHandler:function(){this.isSeeking=!1,this.emit(a.VIDEO_SEEKED,this)},getProgress:function(){var p=this.video;if(p){var x=p.duration;if(x!==1/0&&!isNaN(x))return p.currentTime/x}return-1},getDuration:function(){return this.video?this.video.duration:0},setMute:function(p){p===void 0&&(p=!0),this._codeMuted=p;var x=this.video;return x&&(x.muted=this._systemMuted?!0:p),this},isMuted:function(){return this._codeMuted},globalMute:function(p,x){this._systemMuted=x;var y=this.video;y&&(y.muted=this._codeMuted?!0:x)},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 x=this.video;return this._codePaused=p,x&&!x.ended&&(p?x.paused||(this.removeEventHandlers(),x.pause()):p||(this._playCalled?x.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=d(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,x){return x===void 0&&(x=!1),this.videoTexture&&(this.scene.sys.textures.renameTexture(this._key,p),this.videoTextureSource.setFlipY(x)),this._key=p,this.flipY=x,!!this.videoTexture},stop:function(p){p===void 0&&(p=!0);var x=this.video;return x&&(this.removeEventHandlers(),x.cancelVideoFrameCallback(this._rfvCallbackId),x.pause()),this.retry=0,this._playCalled=!1,p&&this.emit
2160(a.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(h.PAUSE,this.globalPause,this),p.off(h.RESUME,this.globalResume,this);var x=this.scene.sys.sound;x&&x.off(f.GLOBAL_MUTE,this.globalMute,this)}});l.exports=m},56933:l=>{/** 2161 * @author Richard Davey <[email protected]> 2162 * @copyright 2013-2023 Photon Storm Ltd. 2163 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2164 */var T=function(e,d,g,r){d.videoTexture&&(g.addToRenderList(d),e.batchSprite(d,d.frame,g,r))};l.exports=T},65601:(l,T,e)=>{/** 2165 * @author Richard Davey <[email protected]> 2166 * @copyright 2013-2023 Photon Storm Ltd. 2167 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2168 */var d=e(88933),g=e(99325),r=e(20494),a=e(8630);g.register("video",function(h,n){h===void 0&&(h={});var o=r(h,"key",null),f=new a(this.scene,0,0,o);return n!==void 0&&(h.add=n),d(this.scene,f,h),f})},215:(l,T,e)=>{/** 2169 * @author Richard Davey <[email protected]> 2170 * @copyright 2013-2023 Photon Storm Ltd. 2171 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2172 */var d=e(8630),g=e(61286);g.register("video",function(r,a,h){return this.displayList.add(new d(this.scene,r,a,h))})},77974:(l,T,e)=>{/** 2173 * @author Richard Davey <[email protected]> 2174 * @copyright 2013-2023 Photon Storm Ltd. 2175 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2176 */var d=e(72283),g=d,r=d;g=e(83572),r=e(56933),l.exports={renderWebGL:g,renderCanvas:r}},83572:l=>{/** 2177 * @author Richard Davey <[email protected]> 2178 * @copyright 2013-2023 Photon Storm Ltd. 2179 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2180 */var T=function(e,d,g,r){d.videoTexture&&(g.addToRenderList(d),d.pipeline.batchSprite(d,g,r))};l.exports=T},71030:(l,T,e)=>{/** 2181 * @author Richard Davey <[email protected]> 2182 * @copyright 2013-2023 Photon Storm Ltd. 2183 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2184 */var d=e(95723),g=e(26673),r=e(65650),a=e(56694),h=e(64937),n=e(89980),o=e(74118),f=e(94287),u=new a({Extends:n,Mixins:[h.Depth,h.GetBounds,h.Origin,h.Transform,h.ScrollFactor,h.Visible],initialize:function(m,p,x,y,P){y===void 0&&(y=1),P===void 0&&(P=y),n.call(this,m,"Zone"),this.setPosition(p,x),this.width=y,this.height=P,this.blendMode=d.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,m,p){p===void 0&&(p=!0),this.width=v,this.height=m,this.updateDisplayOrigin();var x=this.input;return p&&x&&!x.customHitArea&&(x.hitArea.width=v,x.hitArea.height=m),this},setDisplaySize:function(v,m){return this.displayWidth=v,this.displayHeight=m,this},setCircleDropZone:function(v){return this.setDropZone(new g(0,0,v),r)},setRectangleDropZone:function(v,m){return this.setDropZone(new o(0,0,v,m),f)},setDropZone:function(v,m){return this.input||this.setInteractive(v,m,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(v,m,p){p.addToRenderList(m)},renderWebGL:function(v,m,p){p.addToRenderList(m)}});l.exports=u},24067:(l,T,e)=>{/** 2185 * @author Richard Davey <[email protected]> 2186 * @copyright 2013-2023 Photon Storm Ltd. 2187 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2188 */var d=e(99325),g=e(20494),r=e(71030);d.register("zone",function(a){var h=g(a,"x",0),n=g(a,"y",0),o=g(a,"width",1),f=g(a,"height",o);return new r(this.scene,h,n,o,f)})},34546:(l,T,e)=>{/** 2189 * @author Richard Davey <[email protected]> 2190 * @copyright 2013-2023 Photon Storm Ltd. 2191 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2192 */var d=e(71030),g=e(61286);g.register("zone",function(r,a,h,n){return this.displayList.add(new d(this.scene,r,a,h,n))})},95847:l=>{/** 2193 * @author Richard Davey <[email protected]> 2194 * @copyright 2013-2023 Photon Storm Ltd. 2195 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2196 */var T=function(e){return e.radius>
21960?Math.PI*e.radius*e.radius:0};l.exports=T},26673:(l,T,e)=>{/** 2197 * @author Richard Davey <[email protected]> 2198 * @copyright 2013-2023 Photon Storm Ltd. 2199 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2200 */var d=e(56694),g=e(65650),r=e(94026),a=e(62941),h=e(52394),n=e(30977),o=new d({initialize:function(u,v,m){u===void 0&&(u=0),v===void 0&&(v=0),m===void 0&&(m=0),this.type=h.CIRCLE,this.x=u,this.y=v,this._radius=m,this._diameter=m*2},contains:function(f,u){return g(this,f,u)},getPoint:function(f,u){return r(this,f,u)},getPoints:function(f,u,v){return a(this,f,u,v)},getRandomPoint:function(f){return n(this,f)},setTo:function(f,u,v){return this.x=f,this.y=u,this._radius=v,this._diameter=v*2,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(f,u){return u===void 0&&(u=f),this.x=f,this.y=u,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(f){this._radius=f,this._diameter=f*2}},diameter:{get:function(){return this._diameter},set:function(f){this._diameter=f,this._radius=f*.5}},left:{get:function(){return this.x-this._radius},set:function(f){this.x=f+this._radius}},right:{get:function(){return this.x+this._radius},set:function(f){this.x=f-this._radius}},top:{get:function(){return this.y-this._radius},set:function(f){this.y=f+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(f){this.y=f-this._radius}}});l.exports=o},37964:l=>{/** 2201 * @author Richard Davey <[email protected]> 2202 * @copyright 2013-2023 Photon Storm Ltd. 2203 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2204 */var T=function(e){return 2*(Math.PI*e.radius)};l.exports=T},72233:(l,T,e)=>{/** 2205 * @author Richard Davey <[email protected]> 2206 * @copyright 2013-2023 Photon Storm Ltd. 2207 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2208 */var d=e(79967),g=function(r,a,h){return h===void 0&&(h=new d),h.x=r.x+r.radius*Math.cos(a),h.y=r.y+r.radius*Math.sin(a),h};l.exports=g},61761:(l,T,e)=>{/** 2209 * @author Richard Davey <[email protected]> 2210 * @copyright 2013-2023 Photon Storm Ltd. 2211 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2212 */var d=e(26673),g=function(r){return new d(r.x,r.y,r.radius)};l.exports=g},65650:l=>{/** 2213 * @author Richard Davey <[email protected]> 2214 * @copyright 2013-2023 Photon Storm Ltd. 2215 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2216 */var T=function(e,d,g){if(e.radius>0&&d>=e.left&&d<=e.right&&g>=e.top&&g<=e.bottom){var r=(e.x-d)*(e.x-d),a=(e.y-g)*(e.y-g);return r+a<=e.radius*e.radius}else return!1};l.exports=T},39187:(l,T,e)=>{/** 2217 * @author Richard Davey <[email protected]> 2218 * @copyright 2013-2023 Photon Storm Ltd. 2219 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2220 */var d=e(65650),g=function(r,a){return d(r,a.x,a.y)};l.exports=g},58672:(l,T,e)=>{/** 2221 * @author Richard Davey <[email protected]> 2222 * @copyright 2013-2023 Photon Storm Ltd. 2223 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2224 */var d=e(65650),g=function(r,a){return d(r,a.x,a.y)&&d(r,a.right,a.y)&&d(r,a.x,a.bottom)&&d(r,a.right,a.bottom)};l.exports=g},42997:l=>{/** 2225 * @author Richard Davey <[email protected]> 2226 * @copyright 2013-2023 Photon Storm Ltd. 2227 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2228 */var T=function(e,d){return d.setTo(e.x,e.y,e.radius)};l.exports=T},94894:l=>{/** 2229 * @author Richard Davey <[email protected]> 2230 * @copyright 2013-2023 Photon Storm Ltd. 2231 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2232 */var T=function(e,d){return e.x===d.x&&e.y===d.y&&e.radius===d.radius};l.exports=T},48027:(l,T,e)=>{/** 2233 * @author Richard Davey <[email protected]> 2234 * @copyright 2013-2023 Photon Storm Ltd. 2235 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2236 */var d=e(74118),g=function(r,a){return a===void 0&&(a=new d),a.x=r.left,a.y=r.top,a.width=r.diameter,a.height=r.diameter,a};l.exports=g},94026:(l,T,e)=>{/** 2237 * @author Richard Davey <[email protected]> 2238 * @copyright 2013-2023 Photon Storm Ltd. 2239 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2240 */var d=e(72233),g=e(91806),r=e(83392),a=e(79967),h=function(n,o,f){f===void 0&&(f=new a);var u=g(o,0,r.PI2);return d(n,u,f)};l.exports=h},62941:(l,T,e)=>{/** 2241 * @author Richard Davey <[email protected]> 2242 * @copyright 2013-2023 Photon Storm Ltd. 2243 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2244 */var d=e(37964),g=e(72233),r=e(91806),a=e(83392),h=function(n,o,f,u){u===void 0&&(u=[]),!o&&f>0&&(o=d(n)/f);for(var v=0;v<o;v++){var m=r(v/o,0,a.PI2);u.push(g(n,m))}return u};l.exports=h},34585:l=>{/** 2245 * @author Richard Davey <[email protected]> 2246 * @copyright 2013-2023 Photon Storm Ltd. 2247 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2248 */var T=function(e,d,g){return e.x+=d,e.y+=g,e};l.exports=T},88665:l=>{/** 2249 * @author Richard Davey <[email protected]> 2250 * @copyright 2013-2023 Photon Storm Ltd. 2251 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2252 */var T=function(e,d){return e.x+=d.x,e.y+=d.y,e};l.exports=T},30977:(l,T,e)=>{/** 2253 * @author Richard Davey <[email protected]> 2254 * @copyright 2013-2023 Photon Storm Ltd. 2255 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2256 */var d=e(79967),g=function(r,a){a===void 0&&(a=new d);var h=2*Math.PI*Math.random(),n=Math.random()+Math.random(),o=n>1?2-n:n,f=o*Math.cos(h),u=o*Math.sin(h);return a.x=r.x+f*r.radius,a.y=r.y+u*r.radius,a};l.exports=g},6112:(l,T,e)=>{/** 2257 * @author Richard Davey <[email protected]> 2258 * @copyright 2013-2023 Photon Storm Ltd. 2259 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2260 */var d=e(26673);d.Area=e(95847),d.Circumference=e(37964),d.CircumferencePoint=e(72233),d.Clone=e(61761),d.Contains=e(65650),d.ContainsPoint=e(39187),d.ContainsRect=e(58672),d.CopyFrom=e(42997),d.Equals=e(94894),d.GetBounds=e(48027),d.GetPoint=e(94026),d.GetPoints=e(62941),d.Offset=e(34585),d.OffsetPoint=e(88665),d.Random=e(30977),l.exports=d},52394:l=>{/** 2261 * @author Richard Davey <[email protected]> 2262 * @copyright 2013-2023 Photon Storm Ltd. 2263 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2264 */var T={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6};l.exports=T},58605:l=>{/** 2265 * @author Richard Davey <[email protected]> 2266 * @copyright 2013-2023 Photon Storm Ltd. 2267 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2268 */var T=function(e){return e.isEmpty()?0:e.getMajorRadius()*e.getMinorRadius()*Math.PI};l.exports=T},39507:l=>{/** 2269 * @author Richard Davey <[email protected]> 2270 * @copyright 2013-2023 Photon Storm Ltd. 2271 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2272 */var T=function(e){var d=e.width/2,g=e.height/2,r=Math.pow(d-g,2)/Math.pow(d+g,2);return Math.PI*(d+g)*(1+3*r/(10+Math.sqrt(4-3*r)))};l.exports=T},86998:(l,T,e)=>{/** 2273 * @author Richard Davey <[email protected]> 2274 * @copyright 2013-2023 Photon Storm Ltd. 2275 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2276 */var d=e(79967),g=function(r,a,h){h===void 0&&(h=new d);var n=r.width/2,o=r.height/2;return h.x=r.x+n*Math.cos(a),h.y=r.y+o*Math.sin(a),h};l.exports=g},81773:(l,T,e)=>{/** 2277 * @author Richard Davey <[email protected]> 2278 * @copyright 2013-2023 Photon Storm Ltd. 2279 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2280 */var d=e(95669),g=function(r){return new d(r.x,r.y,r.width,r.height)};l.exports=g},72313:l=>{/** 2281 * @author Richard Davey <[email protected]> 2282 * @copyright 2013-2023 Photon Storm Ltd. 2283 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2284 */var T=function(e,d,g){if(e.width<=0||e.height<=0)return!1;var r=(d-e.x)/e.width,a=(g-e.y)/e.height;return r*=r,a*=a,r+a<.25};l.exports=T},34368:(l,T,e)=>{/** 2285 * @author Richard Davey <[email protected]> 2286 * @copyright 2013-2023 Photon Storm Ltd. 2287 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2288 */var d=e(72313),g=function(r,a){return d(r,a.x,a.y)};l.exports=g},71431:(l,T,e)=>{/** 2289 * @author Richard Davey <[email protected]> 2290 * @copyright 2013-2023 Photon Storm Ltd. 2291 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2292 */var d=e(72313),g=function(r,a){return d(r,a.x,a.y)&&d(r,a.right,a.y)&&d(r,a.x,a.bottom)&&d(r,a.right,a.bottom)};l.exports=g},75459:l=>{/** 2293 * @author Richard Davey <[email protected]> 2294 * @copyright 2013-2023 Photon Storm Ltd. 2295 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2296 */var T=function(e,d){return d.setTo(e.x,e.y,e.width,e.height)};l.exports=T},95669:(l,T,e)=>{/** 2297 * @author Richard Davey <[email protected]> 2298 * @copyright 2013-2023 Photon Storm Ltd. 2299 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2300 */var d=e(56694),g=e(72313),r=e(95340),a=e(54978),h=e(52394),n=e(72006),o=new d({initialize:function(u,v,m,p){u===void 0&&(u=0),v===void 0&&(v=0),m===void 0&&(m=0),p===void 0&&(p=0),this.type=h.ELLIPSE,this.x=u,this.y=v,this.width=m,this.height=p},contains:function(f,u){return g(this,f,u)},getPoint:function(f,u){return r(this,f,u)},getPoints:function(f,u,v){return a(this,f,u,v)},getRandomPoint:function(f){return n(this,f)},setTo:function(f,u,v,m){return this.x=f,this.y=u,this.width=v,this.height=m,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(f,u){return u===void 0&&(u=f),this.x=f,this.y=u,this},setSize:function(f,u){return u===void 0&&(u=f),this.width=f,this.height=u,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(f){this.x=f+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(f){this.x=f-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(f){this.y=f+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(f){this.y=f-this.height/2}}});l.exports=o},98068:l=>{/** 2301 * @author Richard Davey <[email protected]> 2302 * @copyright 2013-2023 Photon Storm Ltd. 2303 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2304 */var T=function(e,d){return e.x===d.x&&e.y===d.y&&e.width===d.width&&e.height===d.height};l.exports=T},72897:(l,T,e)=>{/** 2305 * @author Richard Davey <[email protected]> 2306 * @copyright 2013-2023 Photon Storm Ltd. 2307 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2308 */var d=e(74118),g=function(r,a){return a===void 0&&(a=new d),a.x=r.left,a.y=r.top,a.width=r.width,a.height=r.height,a};l.exports=g},95340:(l,T,e)=>{/** 2309 * @author Richard Davey <[email protected]> 2310 * @copyright 2013-2023 Photon Storm Ltd. 2311 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2312 */var d=e(86998),g=e(91806),r=e(83392),a=e(79967),h=function(n,o,f){f===void 0&&(f=new a);var u=g(o,0,r.PI2);return d(n,u,f)};l.exports=h},54978:(l,T,e)=>{/** 2313 * @author Richard Davey <[email protected]> 2314 * @copyright 2013-2023 Photon Storm Ltd. 2315 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2316 */var d=e(39507),g=e(86998),r=e(91806),a=e(83392),h=function(n,o,f,u){u===void 0&&(u=[]),!o&&f>0&&(o=d(n)/f);for(var v=0;v<o;v++){var m=r(v/o,0,a.PI2);u.push(g(n,m))}return u};l.exports=h},77951:l=>{/** 2317 * @author Richard Davey <[email protected]> 2318 * @copyright 2013-2023 Photon Storm Ltd. 2319 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2320 */var T=function(e,d,g){return e.x+=d,e.y+=g,e};l.exports=T},36233:l=>{/** 2321 * @author Richard Davey <[email protected]> 2322 * @copyright 2013-2023 Photon Storm Ltd. 2323 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2324 */var T=function(e,d){return e.x+=d.x,e.y+=d.y,e};l.exports=T},72006:(l,T,e)=>{/** 2325 * @author Richard Davey <[email protected]> 2326 * @copyright 2013-2023 Photon Storm Ltd. 2327 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2328 */var d=e(79967),g=function(r,a){a===void 0&&(a=new d);var h=Math.random()*Math.PI*2,n=Math.sqrt(Math.random());return a.x=r.x+n*Math.cos(h)*r.width/2,a.y=r.y+n*Math.sin(h)*r.height/2,a};l.exports=g},40652:(l,T,e)=>{/** 2329 * @author Richard Davey <[email protected]> 2330 * @copyright 2013-2023 Photon Storm Ltd. 2331 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2332 */var d=e(95669);d.Area=e(58605),d.Circumference=e(39507),d.CircumferencePoint=e(86998),d.Clone=e(81773),d.Contains=e(72313),d.ContainsPoint=e(34368),d.ContainsRect=e(71431),d.C
2332opyFrom=e(75459),d.Equals=e(98068),d.GetBounds=e(72897),d.GetPoint=e(95340),d.GetPoints=e(54978),d.Offset=e(77951),d.OffsetPoint=e(36233),d.Random=e(72006),l.exports=d},84068:(l,T,e)=>{/** 2333 * @author Richard Davey <[email protected]> 2334 * @copyright 2013-2023 Photon Storm Ltd. 2335 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2336 */var d=e(52394),g=e(98611),r={Circle:e(6112),Ellipse:e(40652),Intersects:e(7563),Line:e(28482),Mesh:e(14293),Point:e(63472),Polygon:e(44359),Rectangle:e(66658),Triangle:e(87619)};r=g(!1,r,d),l.exports=r},22184:(l,T,e)=>{/** 2337 * @author Richard Davey <[email protected]> 2338 * @copyright 2013-2023 Photon Storm Ltd. 2339 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2340 */var d=e(53996),g=function(r,a){return d(r.x,r.y,a.x,a.y)<=r.radius+a.radius};l.exports=g},26535:l=>{/** 2341 * @author Richard Davey <[email protected]> 2342 * @copyright 2013-2023 Photon Storm Ltd. 2343 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2344 */var T=function(e,d){var g=d.width/2,r=d.height/2,a=Math.abs(e.x-d.x-g),h=Math.abs(e.y-d.y-r),n=g+e.radius,o=r+e.radiu
2344s;if(a>n||h>o)return!1;if(a<=g||h<=r)return!0;var f=a-g,u=h-r,v=f*f,m=u*u,p=e.radius*e.radius;return v+m<=p};l.exports=T},71145:(l,T,e)=>{/** 2345 * @author Florian Vazelle 2346 * @author Geoffrey Glaive 2347 * @copyright 2013-2023 Photon Storm Ltd. 2348 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2349 */var d=e(79967),g=e(22184),r=function(a,h,n){if(n===void 0&&(n=[]),g(a,h)){var o=a.x,f=a.y,u=a.radius,v=h.x,m=h.y,p=h.radius,x,y,P,b,E;if(f===m)E=(p*p-u*u-v*v+o*o)/(2*(o-v)),x=1,y=-2*m,P=v*v+E*E-2*v*E+m*m-p*p,b=y*y-4*x*P,b===0?n.push(new d(E,-y/(2*x))):b>0&&(n.push(new d(E,(-y+Math.sqrt(b))/(2*x))),n.push(new d(E,(-y-Math.sqrt(b))/(2*x))));else{var M=(o-v)/(f-m),w=(p*p-u*u-v*v+o*o-m*m+f*f)/(2*(f-m));x=M*M+1,y=2*f*M-2*w*M-2*o,P=o*o+f*f+w*w-u*u-2*f*w,b=y*y-4*x*P,b===0?(E=-y/(2*x),n.push(new d(E,w-E*M))):b>0&&(E=(-y+Math.sqrt(b))/(2*x),n.push(new d(E,w-E*M)),E=(-y-Math.sqrt(b))/(2*x),n.push(new d(E,w-E*M)))}}return n};l.exports=r},62508:(l,T,e)=>{/** 2350 * @author Florian Vazelle 2351 * @author Geoffrey Glaive 2352 * @copyright 2013-2023 Photon Storm Ltd. 2353 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2354 */var d=e(26111),g=e(26535),r=function(a,h,n){if(n===void 0&&(n=[]),g(a,h)){var o=h.getLineA(),f=h.getLineB(),u=h.getLineC(),v=h.getLineD();d(o,a,n),d(f,a,n),d(u,a,n),d(v,a,n)}return n};l.exports=r},26111:(l,T,e)=>{/** 2355 * @author Florian Vazelle 2356 * @author Geoffrey Glaive 2357 * @copyright 2013-2023 Photon Storm Ltd. 2358 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2359 */var d=e(79967),g=e(61472),r=function(a,h,n){if(n===void 0&&(n=[]),g(a,h)){var o=a.x1,f=a.y1,u=a.x2,v=a.y2,m=h.x,p=h.y,x=h.radius,y=u-o,P=v-f,b=o-m,E=f-p,M=y*y+P*P,w=2*(y*b+P*E),A=b*b+E*E-x*x,R=w*w-4*M*A,L,O;if(R===0){var I=-w/(2*M);L=o+I*y,O=f+I*P,I>=0&&I<=1&&n.push(new d(L,O))}else if(R>0){var D=(-w-Math.sqrt(R))/(2*M);L=o+D*y,O=f+D*P,D>=0&&D<=1&&n.push(new d(L,O));var B=(-w+Math.sqrt(R))/(2*M);L=o+B*y,O=f+B*P,B>=0&&B<=1&&n.push(new d(L,O))}}return n};l.exports=r},96537:(l,T,e)=>{/** 2360 * @author Richard Davey 2361 * @copyright 2013-2023 Photon Storm Ltd. 2362 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2363 */var d=e(70015),g=function(r,a,h,n){h===void 0&&(h=!1);var o=r.x1,f=r.y1,u=r.x2,v=r.y2,m=a.x1,p=a.y1,x=a.x2,y=a.y2,P=u-o,b=v-f,E=x-m,M=y-p,w=P*M-b*E;if(w===0)return null;var A,R,L;if(h){if(A=(P*(p-f)+b*(o-m))/(E*b-M*P),R=(m+E*A-o)/P,R<0||A<0||A>1)return null;L=R}else{if(A=((m-o)*M-(p-f)*E)/w,R=((f-p)*P-(o-m)*b)/w,A<0||A>1||R<0||R>1)return null;L=A}return n===void 0&&(n=new d),n.set(o+P*L,f+b*L,L)};l.exports=g},17647:(l,T,e)=>{/** 2364 * @author Richard Davey 2365 * @copyright 2013-2023 Photon Storm Ltd. 2366 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2367 */var d=e(96537),g=e(88829),r=e(70015),a=new g,h=new r,n=function(o,f,u,v){u===void 0&&(u=!1),v===void 0&&(v=new r);var m=!1;v.set(),h.set();for(var p=f[0],x=1;x<f.length;x++){var y=f[x];a.setTo(p.x,p.y,y.x,y.y),p=y,d(o,a,u,h)&&(!m||h.z<v.z)&&(v.copy(h),m=!0)}return m?v:null};l.exports=n},68439:(l,T,e)=>{/** 2368 * @author Richard Davey 2369 * @copyright 2013-2023 Photon Storm Ltd. 2370 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2371 */var d=e(70015),g=e(51729),r=e(17647),a=new d,h=function(n,o,f,u){u===void 0&&(u=new g),Array.isArray(o)||(o=[o]);var v=!1;u.set(),a.set();for(var m=0;m<o.length;m++)r(n,o[m].points,f,a)&&(!v||a.z<u.z)&&(u.set(a.x,a.y,a.z,m),v=!0);return v?u:null};l.exports=h},9569:(l,T,e)=>{/** 2372 * @author Florian Vazelle 2373 * @author Geoffrey Glaive 2374 * @copyright 2013-2023 Photon Storm Ltd. 2375 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2376 */var d=e(79967),g=e(25227),r=e(47910),a=function(h,n,o){if(o===void 0&&(o=[]),r(h,n))for(var f=n.getLineA(),u=n.getLineB(),v=n.getLineC(),m=n.getLineD(),p=[new d,new d,new d,new d],x=[g(f,h,p[0]),g(u,h,p[1]),g(v,h,p[2]),g(m,h,p[3])],y=0;y<4;y++)x[y]&&o.push(p[y]);return o};l.exports=a},7449:(l,T,e)=>{/** 2377 * @author Richard Davey 2378 * @copyright 2013-2023 Photon Storm Ltd. 2379 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2380 */var d=e(51729),g=e(68439),r=e(88829),a=new r;function h(f,u,v,m,p){var x=Math.cos(f),y=Math.sin(f);a.setTo(u,v,u+x,v+y);var P=g(a,m,!0);P&&p.push(new d(P.x,P.y,f,P.w))}function n(f,u){return f.z-u.z}var o=function(f,u,v){Array.isArray(v)||(v=[v]);for(var m=[],p=[],x=0;x<v.length;x++)for(var y=v[x].points,P=0;P<y.length;P++){var b=Math.atan2(y[P].y-u,y[P].x-f);p.indexOf(b)===-1&&(h(b,f,u,v,m),h(b-1e-5,f,u,v,m),h(b+1e-5,f,u,v,m),p.push(b))}return m.sort(n)};l.exports=o},82931:(l,T,e)=>{/** 2381 * @author Richard Davey <[email protected]> 2382 * @copyright 2013-2023 Photon Storm Ltd. 2383 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2384 */var d=e(74118),g=e(90205),r=function(a,h,n){return n===void 0&&(n=new d),g(a,h)&&(n.x=Math.max(a.x,h.x),n.y=Math.max(a.y,h.y),n.width=Math.min(a.right,h.right)-n.x,n.height=Math.min(a.bottom,h.bottom)-n.y),n};l.exports=r},1946:(l,T,e)=>{/** 2385 * @author Florian Vazelle 2386 * @author Geoffrey Glaive 2387 * @copyright 2013-2023 Photon Storm Ltd. 2388 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2389 */var d=e(9569),g=e(90205),r=function(a,h,n){if(n===void 0&&(n=[]),g(a,h)){var o=a.getLineA(),f=a.getLineB(),u=a.getLineC(),v=a.getLineD();d(o,h,n),d(f,h,n),d(u,h,n),d(v,h,n)}return n};l.exports=r},34211:(l,T,e)=>{/** 2390 * @author Florian Vazelle 2391 * @author Geoffrey Glaive 2392 * @copyright 2013-2023 Photon Storm Ltd. 2393 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2394 */var d=e(20370),g=e(9569),r=function(a,h,n){if(n===void 0&&(n=[]),d(a,h)){var o=h.getLineA(),f=h.getLineB(),u=h.getLineC();g(o,a,n),g(f,a,n),g(u,a,n)}return n};l.exports=r},80511:(l,T,e)=>{/** 2395 * @author Florian Vazelle 2396 * @author Geoffrey Glaive 2397 * @copyright 2013-2023 Photon Storm Ltd. 2398 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2399 */var d=e(26111),g=e(48411),r=function(a,h,n){if(n===void 0&&(n=[]),g(a,h)){var o=a.getLineA(),f=a.getLineB(),u=a.getLineC();d(o,h,n),d(f,h,n),d(u,h,n)}return n};l.exports=r},31343:(l,T,e)=>{/** 2400 * @author Florian Vazelle 2401 * @author Geoffrey Glaive 2402 * @copyright 2013-2023 Photon Storm Ltd. 2403 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2404 */var d=e(79967),g=e(86117),r=e(25227),a=function(h,n,o){if(o===void 0&&(o=[]),g(h,n)
2404)for(var f=h.getLineA(),u=h.getLineB(),v=h.getLineC(),m=[new d,new d,new d],p=[r(f,n,m[0]),r(u,n,m[1]),r(v,n,m[2])],x=0;x<3;x++)p[x]&&o.push(m[x]);return o};l.exports=a},70534:(l,T,e)=>{/** 2405 * @author Florian Vazelle 2406 * @author Geoffrey Glaive 2407 * @copyright 2013-2023 Photon Storm Ltd. 2408 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2409 */var d=e(23589),g=e(31343),r=function(a,h,n){if(n===void 0&&(n=[]),d(a,h)){var o=h.getLineA(),f=h.getLineB(),u=h.getLineC();g(a,o,n),g(a,f,n),g(a,u,n)}return n};l.exports=r},61472:(l,T,e)=>{/** 2410 * @author Richard Davey <[email protected]> 2411 * @copyright 2013-2023 Photon Storm Ltd. 2412 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2413 */var d=e(65650),g=e(79967),r=new g,a=function(h,n,o){if(o===void 0&&(o=r),d(n,h.x1,h.y1))return o.x=h.x1,o.y=h.y1,!0;if(d(n,h.x2,h.y2))return o.x=h.x2,o.y=h.y2,!0;var f=h.x2-h.x1,u=h.y2-h.y1,v=n.x-h.x1,m=n.y-h.y1,p=f*f+u*u,x=f,y=u;if(p>0){var P=(v*f+m*u)/p;x*=P,y*=P}o.x=h.x1+x,o.y=h.y1+y;var b=x*x+y*y;return b<=p&&x*f+y*u>=0&&d(n,o.x,o.y)};l.exports=a},25227:l=>{/** 2414 * @author Richard Davey <[email protected]> 2415 * @copyright 2013-2023 Photon Storm Ltd. 2416 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2417 */var T=function(e,d,g){var r=e.x1,a=e.y1,h=e.x2,n=e.y2,o=d.x1,f=d.y1,u=d.x2,v=d.y2;if(r===h&&a===n||o===u&&f===v)return!1;var m=(v-f)*(h-r)-(u-o)*(n-a);if(m===0)return!1;var p=((u-o)*(a-f)-(v-f)*(r-o))/m,x=((h-r)*(a-f)-(n-a)*(r-o))/m;return p<0||p>1||x<0||x>1?!1:(g&&(g.x=r+p*(h-r),g.y=a+p*(n-a)),!0)};l.exports=T},47910:l=>{/** 2418 * @author Richard Davey <[email protected]> 2419 * @copyright 2013-2023 Photon Storm Ltd. 2420 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2421 */var T=function(e,d){var g=e.x1,r=e.y1,a=e.x2,h=e.y2,n=d.x,o=d.y,f=d.right,u=d.bottom,v=0;if(g>=n&&g<=f&&r>=o&&r<=u||a>=n&&a<=f&&h>=o&&h<=u)return!0;if(g<n&&a>=n){if(v=r+(h-r)*(n-g)/(a-g),v>o&&v<=u)return!0}else if(g>f&&a<=f&&(v=r+(h-r)*(f-g)/(a-g),v>=o&&v<=u))return!0;if(r<o&&h>=o){if(v=g+(a-g)*(o-r)/(h-r),v>=n&&v<=f)return!0}else if(r>u&&h<=u&&(v=g+(a-g)*(u-r)/(h-r),v>=n&&v<=f))return!0;return!1};l.exports=T},34426:l=>{/** 2422 * @author Richard Davey <[email protected]> 2423 * @author Florian Mertens 2424 * @copyright 2013-2023 Photon Storm Ltd. 2425 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2426 */var T=function(e,d,g){g===void 0&&(g=1);var r=d.x1,a=d.y1,h=d.x2,n=d.y2,o=e.x,f=e.y,u=(h-r)*(h-r)+(n-a)*(n-a);if(u===0)return!1;var v=((o-r)*(h-r)+(f-a)*(n-a))/u;if(v<0)return Math.sqrt((r-o)*(r-o)+(a-f)*(a-f))<=g;if(v>=0&&v<=1){var m=((a-f)*(h-r)-(r-o)*(n-a))/u;return Math.abs(m)*Math.sqrt(u)<=g}else return Math.sqrt((h-o)*(h-o)+(n-f)*(n-f))<=g};l.exports=T},81414:(l,T,e)=>{/** 2427 * @author Richard Davey <[email protected]> 2428 * @copyright 2013-2023 Photon Storm Ltd. 2429 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2430 */var d=e(34426),g=function(r,a){if(!d(r,a))return!1;var h=Math.min(a.x1,a.x2),n=Math.max(a.x1,a.x2),o=Math.min(a.y1,a.y2),f=Math.max(a.y1,a.y2);return r.x>=h&&r.x<=n&&r.y>=o&&r.y<=f};l.exports=g},90205:l=>{/** 2431 * @author Richard Davey <[email protected]> 2432 * @copyright 2013-2023 Photon Storm Ltd. 2433 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2434 */var T=function(e,d){return e.width<=0||e.height<=0||d.width<=0||d.height<=0?!1:!(e.right<d.x||e.bottom<d.y||e.x>d.right||e.y>d.bottom)};l.exports=T},20370:(l,T,e)=>{/** 2435 * @author Richard Davey <[email protected]> 2436 * @copyright 2013-2023 Photon Storm Ltd. 2437 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2438 */var d=e(25227),g=e(94287),r=e(86875),a=e(87279),h=function(n,o){if(o.left>n.right||o.right<n.left||o.top>n.bottom||o.bottom<n.top)return!1;var f=o.getLineA(),u=o.getLineB(),v=o.getLineC();if(g(n,f.x1,f.y1)||g(n,f.x2,f.y2)||g(n,u.x1,u.y1)||g(n,u.x2,u.y2)||g(n,v.x1,v.y1)||g(n,v.x2,v.y2))return!0;var m=n.getLineA(),p=n.getLineB(),x=n.getLineC(),y=n.getLineD();if(d(f,m)||d(f,p)||d(f,x)||d(f,y)||d(u,m)||d(u,p)||d(u,x)||d(u,y)||d(v,m)||d(v,p)||d(v,x)||d(v,y))return!0;var P=a(n),b=r(o,P,!0);return b.length>0};l.exports=h},8786:l=>{/** 2439 * @author Richard Davey <[email protected]> 2440 * @copyright 2013-2023 Photon Storm Ltd. 2441 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2442 */var T=function(e,d,g,r,a,h){return h===void 0&&(h=0),!(d>e.right+h||g<e.left-h||r>e.bottom+h||a<e.top-h)};l.exports=T},48411:(l,T,e)=>{/** 2443 * @author Richard Davey <[email protected]> 2444 * @copyright 2013-2023 Photon Storm Ltd. 2445 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2446 */var d=e(61472),g=e(60689),r=function(a,h){return a.left>h.right||a.right<h.left||a.top>h.bottom||a.bottom<h.top?!1:!!(g(a,h.x,h.y)||d(a.getLineA(),h)||d(a.getLineB(),h)||d(a.getLineC(),h))};l.exports=r},86117:(l,T,e)=>{/** 2447 * @author Richard Davey <[email protected]> 2448 * @copyright 2013-2023 Photon Storm Ltd. 2449 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2450 */var d=e(25227),g=function(r,a){return!!(r.contains(a.x1,a.y1)||r.contains(a.x2,a.y2)||d(r.getLineA(),a)||d(r.getLineB(),a)||d(r.getLineC(),a))};l.exports=g},23589:(l,T,e)=>{/** 2451 * @author Richard Davey <[email protected]> 2452 * @copyright 2013-2023 Photon Storm Ltd. 2453 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2454 */var d=e(86875),g=e(18680),r=e(25227),a=function(h,n){if(h.left>n.right||h.right<n.left||h.top>n.bottom||h.bottom<n.top)return!1;var o=h.getLineA(),f=h.getLineB(),u=h.getLineC(),v=n.getLineA(),m=n.getLineB(),p=n.getLineC();if(r(o,v)||r(o,m)||r(o,p)||r(f,v)||r(f,m)||r(f,p)||r(u,v)||r(u,m)||r(u,p))return!0;var x=g(h),y=d(n,x,!0);return y.length>0||(x=g(n),y=d(h,x,!0),y.length>0)};l.exports=a},7563:(l,T,e)=>{/** 2455 * @author Richard Davey <[email protected]> 2456 * @copyright 2013-2023 Photon Storm Ltd. 2457 * @license {@link https://opensource.org/licenses/MIT|MIT License}
2458 */l.exports={CircleToCircle:e(22184),CircleToRectangle:e(26535),GetCircleToCircle:e(71145),GetCircleToRectangle:e(62508),GetLineToCircle:e(26111),GetLineToLine:e(96537),GetLineToPoints:e(17647),GetLineToPolygon:e(68439),GetLineToRectangle:e(9569),GetRaysFromPointToPolygon:e(7449),GetRectangleIntersection:e(82931),GetRectangleToRectangle:e(1946),GetRectangleToTriangle:e(34211),GetTriangleToCircle:e(80511),GetTriangleToLine:e(31343),GetTriangleToTriangle:e(70534),LineToCircle:e(61472),LineToLine:e(25227),LineToRectangle:e(47910),PointToLine:e(34426),PointToLineSegment:e(81414),RectangleToRectangle:e(90205),RectangleToTriangle:e(20370),RectangleToValues:e(8786),TriangleToCircle:e(48411),TriangleToLine:e(86117),TriangleToTriangle:e(23589)}},50599:l=>{/** 2459 * @author Richard Davey <[email protected]> 2460 * @copyright 2013-2023 Photon Storm Ltd. 2461 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2462 */var T=function(e){return Math.atan2(e.y2-e.y1,e.x2-e.x1)};l.exports=T},58813:l=>{/** 2463 * @author Richard Davey <[email protected]> 2464 * @copyright 2013-2023 Photon Storm Ltd. 2465 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2466 */var T=function(e,d,g){d===void 0&&(d=1),g===void 0&&(g=[]);var r=Math.round(e.x1),a=Math.round(e.y1),h=Math.round(e.x2),n=Math.round(e.y2),o=Math.abs(h-r),f=Math.abs(n-a),u=r<h?1:-1,v=a<n?1:-1,m=o-f;g.push({x:r,y:a});for(var p=1;!(r===h&&a===n);){var x=m<<1;x>-f&&(m-=f,r+=u),x<o&&(m+=o,a+=v),p%d===0&&g.push({x:r,y:a}),p++}return g};l.exports=T},88513:l=>{/** 2467 * @author Richard Davey <[email protected]> 2468 * @copyright 2013-2023 Photon Storm Ltd. 2469 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2470 */var T=function(e,d,g){var r=d-(e.x1+e.x2)/2,a=g-(e.y1+e.y2)/2;return e.x1+=r,e.y1+=a,e.x2+=r,e.y2+=a,e};l.exports=T},26718:(l,T,e)=>{/** 2471 * @author Richard Davey <[email protected]> 2472 * @copyright 2013-2023 Photon Storm Ltd. 2473 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2474 */var d=e(88829),g=function(r){return new d(r.x1,r.y1,r.x2,r.y2)};l.exports=g},88930:l=>{/** 2475 * @author Richard Davey <[email protected]> 2476 * @copyright 2013-2023 Photon Storm Ltd. 2477 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2478 */var T=function(e,d){return d.setTo(e.x1,e.y1,e.x2,e.y2)};l.exports=T},90656:l=>{/** 2479 * @author Richard Davey <[email protected]> 2480 * @copyright 2013-2023 Photon Storm Ltd. 2481 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2482 */var T=function(e,d){return e.x1===d.x1&&e.y1===d.y1&&e.x2===d.x2&&e.y2===d.y2};l.exports=T},30897:(l,T,e)=>{/** 2483 * @author Richard Davey <[email protected]> 2484 * @copyright 2013-2023 Photon Storm Ltd. 2485 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2486 */var d=e(16028),g=function(r,a,h){h===void 0&&(h=a);var n=d(r),o=r.x2-r.x1,f=r.y2-r.y1;return a&&(r.x1=r.x1-o/n*a,r.y1=r.y1-f/n*a),h&&(r.x2=r.x2+o/n*h,r.y2=r.y2+f/n*h),r};l.exports=g},30684:(l,T,e)=>{/** 2487 * @author Richard Davey <[email protected]> 2488 * @copyright 2013-2023 Photon Storm Ltd. 2489 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2490 */var d=e(92951),g=e(21902),r=e(79967),a=function(h,n,o,f,u){f===void 0&&(f=0),u===void 0&&(u=[]);var v=[],m=h.x1,p=h.y1,x=h.x2-m,y=h.y2-p,P=g(n,u),b,E,M=o-1;for(b=0;b<M;b++)E=P(b/M),v.push(new r(m+x*E,p+y*E));if(E=P(1),v.push(new r(m+x*E,p+y*E)),f>0){var w=v[0],A=[w];for(b=1;b<v.length-1;b++){var R=v[b];d(w,R)>=f&&(A.push(R),w=R)}var L=v[v.length-1];return d(w,L)<f&&A.pop(),A.push(L),A}else return v};l.exports=a},20487:(l,T,e)=>{/** 2491 * @author Richard Davey <[email protected]> 2492 * @copyright 2013-2023 Photon Storm Ltd. 2493 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2494 */var d=e(79967),g=function(r,a){return a===void 0&&(a=new d),a.x=(r.x1+r.x2)/2,a.y=(r.y1+r.y2)/2,a};l.exports=g},11222:(l,T,e)=>{/** 2495 * @author Richard Davey <[email protected]> 2496 * @author Florian Mertens 2497 * @copyright 2013-2023 Photon Storm Ltd. 2498 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2499 */var d=e(79967),g=function(r,a,h){h===void 0&&(h=new d);var n=r.x1,o=r.y1,f=r.x2,u=r.y2,v=(f-n)*(f-n)+(u-o)*(u-o);if(v===0)return h;var m=((a.x-n)*(f-n)+(a.y-o)*(u-o))/v;return h.x=n+m*(f-n),h.y=o+m*(u-o),h};l.exports=g},7377:(l,T,e)=>{/** 2500 * @author Richard Davey <[email protected]> 2501 * @copyright 2013-2023 Photon Storm Ltd. 2502 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2503 */var d=e(83392),g=e(50599),r=e(79967),a=function(h,n){n===void 0&&(n=new r);var o=g(h)-d.TAU;return n.x=Math.cos(o),n.y=Math.sin(o),n};l.exports=a},66464:(l,T,e)=>{/** 2504 * @author Richard Davey <[email protected]> 2505 * @copyright 2013-2023 Photon Storm Ltd. 2506 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2507 */var d=e(79967),g=function(r,a,h){return h===void 0&&(h=new d),h.x=r.x1+(r.x2-r.x1)*a,h.y=r.y1+(r.y2-r.y1)*a,h};l.exports=g},8570:(l,T,e)=>{/** 2508 * @author Richard Davey <[email protected]> 2509 * @copyright 2013-2023 Photon Storm Ltd. 2510 * @license {@link https://opensource.org/licenses/MIT|MIT License}
2511 */var d=e(16028),g=e(79967),r=function(a,h,n,o){o===void 0&&(o=[]),!h&&n>0&&(h=d(a)/n);for(var f=a.x1,u=a.y1,v=a.x2,m=a.y2,p=0;p<h;p++){var x=p/h,y=f+(v-f)*x,P=u+(m-u)*x;o.push(new g(y,P))}return o};l.exports=r},65269:l=>{/** 2512 * @author Richard Davey <[email protected]> 2513 * @author Florian Mertens 2514 * @copyright 2013-2023 Photon Storm Ltd. 2515 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2516 */var T=function(e,d){var g=e.x1,r=e.y1,a=e.x2,h=e.y2,n=(a-g)*(a-g)+(h-r)*(h-r);if(n===0)return!1;var o=((r-d.y)*(a-g)-(g-d.x)*(h-r))/n;return Math.abs(o)*Math.sqrt(n)};l.exports=T},82996:l=>{/** 2517 * @author Richard Davey <[email protected]> 2518 * @copyright 2013-2023 Photon Storm Ltd. 2519 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2520 */var T=function(e){return Math.abs(e.y1-e.y2)};l.exports=T},16028:l=>{/** 2521 * @author Richard Davey <[email protected]> 2522 * @copyright 2013-2023 Photon Storm Ltd. 2523 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2524 */var T=function(e){return Math.sqrt((e.x2-e.x1)*(e.x2-e.x1)+(e.y2-e.y1)*(e.y2-e.y1))};l.exports=T},88829:(l,T,e)=>{/** 2525 * @author Richard Davey <[email protected]> 2526 * @copyright 2013-2023 Photon Storm Ltd. 2527 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2528 */var d=e(56694),g=e(66464),r=e(8570),a=e(52394),h=e(74077),n=e(93736),o=new d({initialize:function(u,v,m,p){u===void 0&&(u=0),v===void 0&&(v=0),m===void 0&&(m=0),p===void 0&&(p=0),this.type=a.LINE,this.x1=u,this.y1=v,this.x2=m,this.y2=p},getPoint:function(f,u){return g(this,f,u)},getPoints:function(f,u,v){return r(this,f,u,v)},getRandomPoint:function(f){return h(this,f)},setTo:function(f,u,v,m){return f===void 0&&(f=0),u===void 0&&(u=0),v===void 0&&(v=0),m===void 0&&(m=0),this.x1=f,this.y1=u,this.x2=v,this.y2=m,this},getPointA:function(f){return f===void 0&&(f=new n),f.set(this.x1,this.y1),f},getPointB:function(f){return f===void 0&&(f=new n),f.set(this.x2,this.y2),f},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(f){this.x1<=this.x2?this.x1=f:this.x2=f}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(f){this.x1>this.x2?this.x1=f:this.x2=f}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(f){this.y1<=this.y2?this.y1=f:this.y2=f}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(f){this.y1>this.y2?this.y1=f:this.y2=f}}});l.exports=o},73273:(l,T,e)=>{/** 2529 * @author Richard Davey <[email protected]> 2530 * @copyright 2013-2023 Photon Storm Ltd. 2531 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2532 */var d=e(83392),g=e(1071),r=e(50599),a=function(h){var n=r(h)-d.TAU;return g(n,-Math.PI,Math.PI)};l.exports=a},96936:(l,T,e)=>{/** 2533 * @author Richard Davey <[email protected]> 2534 * @copyright 2013-2023 Photon Storm Ltd. 2535 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2536 */var d=e(83392),g=e(50599),r=function(a){return Math.cos(g(a)-d.TAU)};l.exports=r},43581:(l,T,e)=>{/** 2537 * @author Richard Davey <[email protected]> 2538 * @copyright 2013-2023 Photon Storm Ltd. 2539 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2540 */var d=e(83392),g=e(50599),r=function(a){return Math.sin(g(a)-d.TAU)};l.exports=r},13990:l=>{/** 2541 * @author Richard Davey <[email protected]> 2542 * @copyright 2013-2023 Photon Storm Ltd. 2543 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2544 */var T=function(e,d,g){return e.x1+=d,e.y1+=g,e.x2+=d,e.y2+=g,e};l.exports=T},1298:l=>{/** 2545 * @author Richard Davey <[email protected]> 2546 * @copyright 2013-2023 Photon Storm Ltd. 2547 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2548 */var T=function(e){return-((e.x2-e.x1)/(e.y2-e.y1))};l.exports=T},74077:(l,T,e)=>{/** 2549 * @author Richard Davey <[email protected]> 2550 * @copyright 2013-2023 Photon Storm Ltd. 2551 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2552 */var d=e(79967),g=function(r,a){a===void 0&&(a=new d);var h=Math.random();return a.x=r.x1+h*(r.x2-r.x1),a.y=r.y1+h*(r.y2-r.y1),a};l.exports=g},30473:(l,T,e)=>{/** 2553 * @author Richard Davey <[email protected]> 2554 * @copyright 2013-2023 Photon Storm Ltd. 2555 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2556 */var d=e(50599),g=e(73273),r=function(a,h){return 2*g(h)-Math.PI-d(a)};l.exports=r},25968:(l,T,e)=>{/** 2557 * @author Richard Davey <[email protected]> 2558 * @copyright 2013-2023 Photon Storm Ltd. 2559 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2560 */var d=e(1809),g=function(r,a){var h=(r.x1+r.x2)/2,n=(r.y1+r.y2)/2;return d(r,h,n,a)};l.exports=g},24296:(l,T,e)=>{/** 2561 * @author Richard Davey <[email protected]> 2562 * @copyright 2013-2023 Photon Storm Ltd. 2563 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2564 */var d=e(1809),g=function(r,a,h){return d(r,a.x,a.y,h)};l.exports=g},1809:l=>{/** 2565 * @author Richard Davey <[email protected]> 2566 * @copyright 2013-2023 Photon Storm Ltd. 2567 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2568 */var T=function(e,d,g,r){var a=Math.cos(r),h=Math.sin(r),n=e.x1-d,o=e.y1-g;return e.x1=n*a-o*h+d,e.y1=n*h+o*a+g,n=e.x2-d,o=e.y2-g,e.x2=n*a-o*h+d,e.y2=n*h+o*a+g,e};l.exports=T},88171:l=>{/** 2569 * @author Richard Davey <[email protected]> 2570 * @copyright 2013-2023 Photon Storm Ltd. 2571 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2572 */var T=function(e,d,g,r,a){return e.x1=d,e.y1=g,e.x2=d+Math.cos(r)*a,e.y2=g+Math.sin(r)*a,e};l.exports=T},82797:l=>{/** 2573 * @author Richard Davey <[email protected]> 2574 * @copyright 2013-2023 Photon Storm Ltd. 2575 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2576 */var T=function(e){return(e.y2-e.y1)/(e.x2-e.x1)};l.exports=T},41067:l=>{/** 2577 * @author Richard Davey <[email protected]> 2578 * @copyright 2013-2023 Photon Storm Ltd. 2579 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2580 */var T=function(e){return Math.abs(e.x1-e.x2)};l.exports=T},28482:(l,T,e)=>{/** 2581 * @author Richard Davey <[email protected]> 2582 * @copyright 2013-2023 Photon Storm Ltd. 2583 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2584 */var d=e(88829);d.Angle=e(50599),d.BresenhamPoints=e(58813),d.CenterOn=e(88513),d.Clone=e(26718),d.CopyFrom=e(88930),d.Equals=e(90656),d.Extend=e(30897),d.GetEasedPoints=e(30684),d.GetMidPoint=e(20487),d.GetNearestPoint=e(11222),d.GetNormal=e(7377),d.GetPoint=e(66464),d.GetPoints=e(8570),d.GetShortestDistance=e(65269),d.Height=e(82996),d.Length=e(16028),d.NormalAngle=e(73273),d.NormalX=e(96936),d.NormalY=e(43581),d.Offset=e(13990),d.PerpSlope=e(1298),d.Random=e(74077),d.ReflectAngle=e(30473),d.Rotate=e(25968),d.RotateAroun
2584dPoint=e(24296),d.RotateAroundXY=e(1809),d.SetToAngle=e(88171),d.Slope=e(82797),d.Width=e(41067),l.exports=d},18693:(l,T,e)=>{/** 2585 * @author Richard Davey <[email protected]> 2586 * @copyright 2013-2023 Photon Storm Ltd. 2587 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2588 */var d=e(56694),g=e(74118),r=e(93736);function a(n,o,f,u){var v=n-f,m=o-u,p=v*v+m*m;return Math.sqrt(p)}var h=new d({initialize:function(o,f,u){this.vertex1=o,this.vertex2=f,this.vertex3=u,this.bounds=new g,this._inCenter=new r},getInCenter:function(n){n===void 0&&(n=!0);var o=this.vertex1,f=this.vertex2,u=this.vertex3,v,m,p,x,y,P;n?(v=o.x,m=o.y,p=f.x,x=f.y,y=u.x,P=u.y):(v=o.vx,m=o.vy,p=f.vx,x=f.vy,y=u.vx,P=u.vy);var b=a(y,P,p,x),E=a(v,m,y,P),M=a(p,x,v,m),w=b+E+M;return this._inCenter.set((v*b+p*E+y*M)/w,(m*b+x*E+P*M)/w)},contains:function(n,o,f){var u=this.vertex1,v=this.vertex2,m=this.vertex3,p=u.vx,x=u.vy,y=v.vx,P=v.vy,b=m.vx,E=m.vy;if(f){var M=f.a,w=f.b,A=f.c,R=f.d,L=f.e,O=f.f;p=u.vx*M+u.vy*A+L,x=u.vx*w+u.vy*R+O,y=v.vx*M+v.vy*A+L,P=v.vx*w+v.vy*R+O,b=m.vx*M+m.vy*A+L,E=m.vx*w+m.vy*R+O}var I=b-p,D=E-x,B=y-p,z=P-x,X=n-p,W=o-x,j=I*I+D*D,N=I*B+D*z,Y=I*X+D*W,F=B*B+z*z,G=B*X+z*W,k=j*F-N*N,V=k===0?0:1/k,U=(F*Y-N*G)*V,$=(j*G-N*Y)*V;return U>=0&&$>=0&&U+$<1},isCounterClockwise:function(n){var o=this.vertex1,f=this.vertex2,u=this.vertex3,v=(f.vx-o.vx)*(u.vy-o.vy)-(f.vy-o.vy)*(u.vx-o.vx);return n<=0?v>=0:v<0},load:function(n,o,f,u,v){return f=this.vertex1.load(n,o,f,u,v),f=this.vertex2.load(n,o,f,u,v),f=this.vertex3.load(n,o,f,u,v),f},transformCoordinatesLocal:function(n,o,f,u){return this.vertex1.transformCoordinatesLocal(n,o,f,u),this.vertex2.transformCoordinatesLocal(n,o,f,u),this.vertex3.transformCoordinatesLocal(n,o,f,u),this},updateBounds:function(){var n=this.vertex1,o=this.vertex2,f=this.vertex3,u=this.bounds;return u.x=Math.min(n.vx,o.vx,f.vx),u.y=Math.min(n.vy,o.vy,f.vy),u.width=Math.max(n.vx,o.vx,f.vx)-u.x,u.height=Math.max(n.vy,o.vy,f.vy)-u.y,this},isInView:function(n,o,f,u,v,m,p,x,y,P,b){this.update(u,v,m,p,x,y,P,b);var E=this.vertex1,M=this.vertex2,w=this.vertex3;if(E.ta<=0&&M.ta<=0&&w.ta<=0||o&&!this.isCounterClockwise(f))return!1;var A=this.bounds;A.x=Math.min(E.tx,M.tx,w.tx),A.y=Math.min(E.ty,M.ty,w.ty),A.width=Math.max(E.tx,M.tx,w.tx)-A.x,A.height=Math.max(E.ty,M.ty,w.ty)-A.y;var R=n.x+n.width,L=n.y+n.height;return A.width<=0||A.height<=0||n.width<=0||n.height<=0?!1:!(A.right<n.x||A.bottom<n.y||A.x>R||A.y>L)},scrollUV:function(n,o){return this.vertex1.scrollUV(n,o),this.vertex2.scrollUV(n,o),this.vertex3.scrollUV(n,o),this},scaleUV:function(n,o){return this.vertex1.scaleUV(n,o),this.vertex2.scaleUV(n,o),this.vertex3.scaleUV(n,o),this},setColor:function(n){return this.vertex1.color=n,this.vertex2.color=n,this.vertex3.color=n,this},update:function(n,o,f,u,v,m,p,x){return this.vertex1.update(o,f,u,v,m,p,x,n),this.vertex2.update(o,f,u,v,m,p,x,n),this.vertex3.update(o,f,u,v,m,p,x,n),this},translate:function(n,o){o===void 0&&(o=0);var f=this.vertex1,u=this.vertex2,v=this.vertex3;return f.x+=n,f.y+=o,u.x+=n,u.y+=o,v.x+=n,v.y+=o,this},x:{get:function(){return this.getInCenter().x},set:function(n){var o=this.getInCenter();this.translate(n-o.x,0)}},y:{get:function(){return this.getInCenter().y},set:function(n){var o=this.getInCenter();this.translate(0,n-o.y)}},alpha:{get:function(){var n=this.vertex1,o=this.vertex2,f=this.vertex3;return(n.alpha+o.alpha+f.alpha)/3},set:function(n){this.vertex1.alpha=n,this.vertex2.alpha=n,this.vertex3.alpha=n}},depth:{get:function(){var n=this.vertex1,o=this.vertex2,f=this.vertex3;return(n.vz+o.vz+f.vz)/3}},destroy:function(){this.vertex1=null,this.vertex2=null,this.vertex3=null}});l.exports=h},99425:(l,T,e)=>{/** 2589 * @author Richard Davey <[email protected]> 2590 * @copyright 2013-2023 Photon Storm Ltd. 2591 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2592 */var d=e(18693),g=e(72632),r=e(16650),a=e(70015),h=e(85769),n=new a,o=new a,f=new r,u=function(v){var m=g(v,"mesh"),p=g(v,"texture",null),x=g(v,"frame"),y=g(v,"width",1),P=g(v,"height",y),b=g(v,"widthSegments",1),E=g(v,"heightSegments",b),M=g(v,"x",0),w=g(v,"y",0),A=g(v,"z",0),R=g(v,"rotateX",0),L=g(v,"rotateY",0),O=g(v,"rotateZ",0),I=g(v,"zIsUp",!0),D=g(v,"isOrtho",m?m.dirtyCache[11]:!1),B=g(v,"colors",[16777215]),z=g(v,"alphas",[1]),X=g(v,"tile",!1),W=g(v,"flipY",!1),j=g(v,"width",null),N={faces:[],verts:[]};n.set(M,w,A),o.set(R,L,O),f.fromRotationXYTranslation(o,n,I);var Y;
2592if(!p&&m)p=m.texture,x||(Y=m.frame);else if(m&&typeof p=="string")p=m.scene.sys.textures.get(p);else if(!p)return N;Y||(Y=p.get(x)),!j&&D&&p&&m&&(y=Y.width/m.height,P=Y.height/m.height);var F=y/2,G=P/2,k=Math.floor(b),V=Math.floor(E),U=k+1,$=V+1,K=y/k,J=P/V,_=[],tt=[],st,ht,lt=0,nt=1,gt=0,bt=1;Y&&(lt=Y.u0,nt=Y.u1,W?(gt=Y.v1,bt=Y.v0):(gt=Y.v0,bt=Y.v1));var Pt=nt-lt,dt=bt-gt;for(ht=0;ht<$;ht++){var St=ht*J-G;for(st=0;st<U;st++){var Tt=st*K-F;tt.push(Tt,-St);var Vt=lt+Pt*(st/k),zt=gt+dt*(ht/V);_.push(Vt,zt)}}Array.isArray(B)||(B=[B]),Array.isArray(z)||(z=[z]);var be=0,pe=0;for(ht=0;ht<V;ht++)for(st=0;st<k;st++){var Qt=(st+U*ht)*2,Wt=(st+U*(ht+1))*2,me=(st+1+U*(ht+1))*2,ze=(st+1+U*ht)*2,Ke=B[pe],ei=z[be],Oi=new h(tt[Qt],tt[Qt+1],0,_[Qt],_[Qt+1],Ke,ei).transformMat4(f),or=new h(tt[Wt],tt[Wt+1],0,_[Wt],_[Wt+1],Ke,ei).transformMat4(f),lr=new h(tt[ze],tt[ze+1],0,_[ze],_[ze+1],Ke,ei).transformMat4(f),hr=new h(tt[Wt],tt[Wt+1],0,_[Wt],_[Wt+1],Ke,ei).transformMat4(f),ur=new h(tt[me],tt[me+1],0,_[me],_[me+1],Ke,ei).transformMat4(f),dr=new h(tt[ze],tt[ze+1],0,_[ze],_[ze+1],Ke,ei).transformMat4(f);X&&(Oi.setUVs(lt,bt),or.setUVs(lt,gt),lr.setUVs(nt,bt),hr.setUVs(lt,gt),ur.setUVs(nt,gt),dr.setUVs(nt,bt)),pe++,pe===B.length&&(pe=0),be++,be===z.length&&(be=0),N.verts.push(Oi,or,lr,hr,ur,dr),N.faces.push(new d(Oi,or,lr),new d(hr,ur,dr))}return m&&(m.faces=m.faces.concat(N.faces),m.vertices=m.vertices.concat(N.verts)),N};l.exports=u},53267:(l,T,e)=>{/** 2593 * @author Richard Davey <[email protected]> 2594 * @copyright 2013-2023 Photon Storm Ltd. 2595 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2596 */var d=e(18693),g=e(16650),r=e(70015),a=e(85769),h=new r,n=new r,o=new g,f=function(u,v,m,p,x,y,P,b,E,M){m===void 0&&(m=1),p===void 0&&(p=0),x===void 0&&(x=0),y===void 0&&(y=0),P===void 0&&(P=0),b===void 0&&(b=0),E===void 0&&(E=0),M===void 0&&(M=!0);var w={faces:[],verts:[]},A=u.materials;h.set(p,x,y),n.set(P,b,E),o.fromRotationXYTranslation(n,h,M);for(var R=0;R<u.models.length;R++)for(var L=u.models[R],O=L.vertices,I=L.textureCoords,D=L.faces,B=0;B<D.length;B++){var z=D[B],X=z.vertices[0],W=z.vertices[1],j=z.vertices[2],N=O[X.vertexIndex],Y=O[W.vertexIndex],F=O[j.vertexIndex],G=X.textureCoordsIndex,k=W.textureCoordsIndex,V=j.textureCoordsIndex,U=G===-1?{u:0,v:1}:I[G],$=k===-1?{u:0,v:0}:I[k],K=V===-1?{u:1,v:1}:I[V],J=16777215;z.material!==""&&A[z.material]&&(J=A[z.material]);var _=new a(N.x*m,N.y*m,N.z*m,U.u,U.v,J).transformMat4(o),tt=new a(Y.x*m,Y.y*m,Y.z*m,$.u,$.v,J).transformMat4(o),st=new a(F.x*m,F.y*m,F.z*m,K.u,K.v,J).transformMat4(o);w.verts.push(_,tt,st),w.faces.push(new d(_,tt,st))}return v&&(v.faces=v.faces.concat(w.faces),v.vertices=v.vertices.concat(w.verts)),w};l.exports=f},67623:(l,T,e)=>{/** 2597 * @author Richard Davey <[email protected]> 2598 * @copyright 2013-2023 Photon Storm Ltd. 2599 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2600 */var d=e(18693),g=e(85769),r=function(a,h,n,o,f,u,v,m){if(o===void 0&&(o=!1),u===void 0&&(u=16777215),v===void 0&&(v=1),m===void 0&&(m=!1),a.length!==h.length&&!o){console.warn("GenerateVerts: vertices and uvs count not equal");return}var p={faces:[],vertices:[]},x,y,P,b,E,M,w,A,R,L,O,I=o?3:2,D=Array.isArray(u),B=Array.isArray(v);if(Array.isArray(n)&&n.length>0)for(x=0;x<n.length;x++){var z=n[x],X=n[x]*2,W=n[x]*I;y=a[W],P=a[W+1],b=o?a[W+2]:0,E=h[X],M=h[X+1],m&&(M=1-M),w=D?u[z]:u,A=B?v[z]:v,R=0,L=0,O=0,f&&(R=f[W],L=f[W+1],O=o?f[W+2]:0),p.vertices.push(new g(y,P,b,E,M,w,A,R,L,O))}else{var j=0,N=0;for(x=0;x<a.length;x+=I)y=a[x],P=a[x+1],b=o?a[x+2]:0,E=h[j],M=h[j+1],w=D?u[N]:u,A=B?v[N]:v,R=0,L=0,O=0,f&&(R=f[x],L=f[x+1],O=o?f[x+2]:0),p.vertices.push(new g(y,P,b,E,M,w,A,R,L,O)),j+=2,N++}for(x=0;x<p.vertices.length;x+=3){var Y=p.vertices[x],F=p.vertices[x+1],G=p.vertices[x+2];p.faces.push(new d(Y,F,G))}return p};l.exports=r},27291:l=>{/** 2601 * @author Richard Davey <[email protected]> 2602 * @copyright 2013-2023 Photon Storm Ltd. 2603 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2604 */var T=!0,e="untitled",d="",g="";function r(y){var P=y.indexOf("#");return P>-1?y.substring(0,P):y}function a(y){return y.models.length===0&&y.models.push({faces:[],name:e,textureCoords:[],vertexNormals:[],vertices:[]}),d="",y.models[y.models.length-1]}function h(y,P){var b=y.length>=2?y[1]:e;P.models.push({faces:[],name:b,textureCoords:[],vertexNormals:[],vertices:[]}),d=""}function n(y){y.length===2&&(d=y[1])}function o(y,P){var b=y.length,E=b>=2?parseFloat(y[1]):0,M=b>=3?parseFloat(y[2]):0,w=b>=4?parseFloat(y[3]):0;a(P).vertices.push({x:E,y:M,z:w})}function f(y,P){var b=y.length,E=b>=2?parseFloat(y[1]):0,M=b>=3?parseFloat(y[2]):0,w=b>=4?parseFloat(y[3]):0;isNaN(E)&&(E=0),isNaN(M)&&(M=0),isNaN(w)&&(w=0),T&&(M=1-M),a(P).textureCoords.push({u:E,v:M,w})}function u(y,P){var b=y.length,E=b>=2?parseFloat(y[1]):0,M=b>=3?parseFloat(y[2]):0,w=b>=4?parseFloat(y[3]):0;a(P).vertexNormals.push({x:E,y:M,z:w})}function v(y,P){var b=y.length-1;if(!(b<3)){for(var E={group:d,material:g,vertices:[]},M=0;M<b;M++){var w=y[M+1],A=w.split("/"),R=A.length;if(!(R<1||R>3)){var L=0,O=0,I=0;L=parseInt(A[0],10),R>1&&A[1]!==""&&(O=parseInt(A[1],10)),R>2&&(I=parseInt(A[2],10)),L!==0&&(L<0&&(L=a(P).vertices.length+1+L),O-=1,L-=1,I-=1,E.vertices.push({textureCoordsIndex:O,vertexIndex:L,vertexNormalIndex:I}))}}a(P).faces.push(E)}}function m(y,P){y.length>=2&&P.materialLibraries.push(y[1])}function p(y){y.length>=2&&(g=y[1])}var x=function(y,P){P===void 0&&(P=!0),T=P;var b={materials:{},materialLibraries:[],models:[]};d="",g="";for(var E=y.split(` 2605`),M=0;M<E.length;M++){var w=r(E[M]),A=w.replace(/\s\s+/g," ").trim().split(" ");switch(A[0].toLowerCase()){case"o":h(A,b);break;case"g":n(A);break;case"v":o(A,b);break;
2605case"vt":f(A,b);break;case"vn":u(A,b);break;case"f":v(A,b);break;case"mtllib":m(A,b);break;case"usemtl":p(A);break}}return b};l.exports=x},76799:(l,T,e)=>{/** 2606 * @author Richard Davey <[email protected]> 2607 * @copyright 2013-2023 Photon Storm Ltd. 2608 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2609 */var d=e(22946),g=function(r){for(var a={},h=r.split(` 2610`),n="",o=0;o<h.length;o++){var f=h[o].trim();if(!(f.indexOf("#")===0||f==="")){var u=f.replace(/\s\s+/g," ").trim().split(" ");switch(u[0].toLowerCase()){case"newmtl":{n=u[1];break}case"kd":{var v=Math.floor(u[1]*255),m=u.length>=2?Math.floor(u[2]*255):v,p=u.length>=3?Math.floor(u[3]*255):v;a[n]=d(v,m,p);break}}}}return a};l.exports=g},15313:l=>{/** 2611 * @author Richard Davey <[email protected]> 2612 * @copyright 2013-2023 Photon Storm Ltd. 2613 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2614 */var T=function(e,d,g,r){var a,h;if(g===void 0&&r===void 0){var n=e.getInCenter();a=n.x,h=n.y}var o=Math.cos(d),f=Math.sin(d),u=e.vertex1,v=e.vertex2,m=e.vertex3,p=u.x-a,x=u.y-h;u.set(p*o-x*f+a,p*f+x*o+h),p=v.x-a,x=v.y-h,v.set(p*o-x*f+a,p*f+x*o+h),p=m.x-a,x=m.y-h,m.set(p*o-x*f+a,p*f+x*o+h)};l.exports=T},85769:(l,T,e)=>{/** 2615 * @author Richard Davey <[email protected]> 2616 * @copyright 2013-2023 Photon Storm Ltd. 2617 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2618 */var d=e(56694),g=e(75512),r=e(70015),a=new d({Extends:r,initialize:function(n,o,f,u,v,m,p,x,y,P){m===void 0&&(m=16777215),p===void 0&&(p=1),x===void 0&&(x=0),y===void 0&&(y=0),P===void 0&&(P=0),r.call(this,n,o,f),this.vx=0,this.vy=0,this.vz=0,this.nx=x,this.ny=y,this.nz=P,this.u=u,this.v=v,this.color=m,this.alpha=p,this.tx=0,this.ty=0,this.ta=0,this.tu=u,this.tv=v},setUVs:function(h,n){return this.u=h,this.v=n,this.tu=h,this.tv=n,this},scrollUV:function(h,n){return this.tu+=h,this.tv+=n,this},scaleUV:function(h,n){return this.tu=this.u*h,this.tv=this.v*n,this},transformCoordinatesLocal:function(h,n,o,f){var u=this.x,v=this.y,m=this.z,p=h.val,x=u*p[0]+v*p[4]+m*p[8]+p[12],y=u*p[1]+v*p[5]+m*p[9]+p[13],P=u*p[2]+v*p[6]+m*p[10]+p[14],b=u*p[3]+v*p[7]+m*p[11]+p[15];this.vx=x/b*n,this.vy=-(y/b)*o,f<=0?this.vz=P/b:this.vz=-(P/b)},resize:function(h,n,o,f,u,v){return this.x=h,this.y=n,this.vx=this.x*o,this.vy=-this.y*f,this.vz=0,u<.5?this.vx+=o*(.5-u):u>.5&&(this.vx-=o*(u-.5)),v<.5?this.vy+=f*(.5-v):v>.5&&(this.vy-=f*(v-.5)),this},update:function(h,n,o,f,u,v,m,p){var x=this.vx*h+this.vy*o+u,y=this.vx*n+this.vy*f+v;return m&&(x=Math.round(x),y=Math.round(y)),this.tx=x,this.ty=y,this.ta=this.alpha*p,this},load:function(h,n,o,f,u){return h[++o]=this.tx,h[++o]=this.ty,h[++o]=this.tu,h[++o]=this.tv,h[++o]=f,h[++o]=u,n[++o]=g.getTintAppendFloatAlpha(this.color,this.ta),o}});l.exports=a},14293:(l,T,e)=>{/** 2619 * @author Richard Davey <[email protected]> 2620 * @copyright 2013-2023 Photon Storm Ltd. 2621 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2622 */var d={Face:e(18693),GenerateGridVerts:e(99425),GenerateObjVerts:e(53267),GenerateVerts:e(67623),ParseObj:e(27291),ParseObjMaterial:e(76799),RotateFace:e(15313),Vertex:e(85769)};l.exports=d},77601:l=>{/** 2623 * @author Richard Davey <[email protected]> 2624 * @copyright 2013-2023 Photon Storm Ltd. 2625 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2626 */var T=function(e){return e.setTo(Math.ceil(e.x),Math.ceil(e.y))};l.exports=T},38933:(l,T,e)=>{/** 2627 * @author Richard Davey <[email protected]> 2628 * @copyright 2013-2023 Photon Storm Ltd. 2629 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2630 */var d=e(79967),g=function(r){return new d(r.x,r.y)};l.exports=g},47103:l=>{/** 2631 * @author Richard Davey <[email protected]> 2632 * @copyright 2013-2023 Photon Storm Ltd. 2633 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2634 */var T=function(e,d){return d.setTo(e.x,e.y)};l.exports=T},13625:l=>{/** 2635 * @author Richard Davey <[email protected]> 2636 * @copyright 2013-2023 Photon Storm Ltd. 2637 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2638 */var T=function(e,d){return e.x===d.x&&e.y===d.y};l.exports=T},12536:l=>{/** 2639 * @author Richard Davey <[email protected]> 2640 * @copyright 2013-2023 Photon Storm Ltd. 2641 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2642 */var T=function(e){return e.setTo(Math.floor(e.x),Math.floor(e.y))};l.exports=T},54205:(l,T,e)=>{/** 2643 * @author Richard Davey <[email protected]> 2644 * @copyright 2013-2023 Photon Storm Ltd. 2645 * @license {@link https://opensource.org/licenses/MIT|MIT License}
2646 */var d=e(79967),g=function(r,a){if(a===void 0&&(a=new d),!Array.isArray(r))throw new Error("GetCentroid points argument must be an array");var h=r.length;if(h<1)throw new Error("GetCentroid points array must not be empty");if(h===1)a.x=r[0].x,a.y=r[0].y;else{for(var n=0;n<h;n++)a.x+=r[n].x,a.y+=r[n].y;a.x/=h,a.y/=h}return a};l.exports=g},50083:l=>{/** 2647 * @author Richard Davey <[email protected]> 2648 * @copyright 2013-2023 Photon Storm Ltd. 2649 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2650 */var T=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)};l.exports=T},82712:l=>{/** 2651 * @author Richard Davey <[email protected]> 2652 * @copyright 2013-2023 Photon Storm Ltd. 2653 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2654 */var T=function(e){return e.x*e.x+e.y*e.y};l.exports=T},20052:(l,T,e)=>{/** 2655 * @author Richard Davey <[email protected]> 2656 * @copyright 2013-2023 Photon Storm Ltd. 2657 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2658 */var d=e(74118),g=function(r,a){a===void 0&&(a=new d);for(var h=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,f=Number.POSITIVE_INFINITY,u=0;u<r.length;u++){var v=r[u];v.x>h&&(h=v.x),v.x<n&&(n=v.x),v.y>o&&(o=v.y),v.y<f&&(f=v.y)}return a.x=n,a.y=f,a.width=h-n,a.height=o-f,a};l.exports=g},77154:(l,T,e)=>{/** 2659 * @author Richard Davey <[email protected]> 2660 * @copyright 2013-2023 Photon Storm Ltd. 2661 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2662 */var d=e(79967),g=function(r,a,h,n){return h===void 0&&(h=0),n===void 0&&(n=new d),n.x=r.x+(a.x-r.x)*h,n.y=r.y+(a.y-r.y)*h,n};l.exports=g},42397:l=>{/** 2663 * @author Richard Davey <[email protected]> 2664 * @copyright 2013-2023 Photon Storm Ltd. 2665 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2666 */var T=function(e){return e.setTo(e.y,e.x)};l.exports=T},59464:(l,T,e)=>{/** 2667 * @author Richard Davey <[email protected]> 2668 * @copyright 2013-2023 Photon Storm Ltd. 2669 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2670 */var d=e(79967),g=function(r,a){return a===void 0&&(a=new d),a.setTo(-r.x,-r.y)};l.exports=g},79967:(l,T,e)=>{/** 2671 * @author Richard Davey <[email protected]> 2672 * @copyright 2013-2023 Photon Storm Ltd. 2673 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2674 */var d=e(56694),g=e(52394),r=new d({initialize:function(h,n){h===void 0&&(h=0),n===void 0&&(n=h),this.type=g.POINT,this.x=h,this.y=n},setTo:function(a,h){return a===void 0&&(a=0),h===void 0&&(h=a),this.x=a,this.y=h,this}});l.exports=r},53581:(l,T,e)=>{/** 2675 * @author Richard Davey <[email protected]> 2676 * @copyright 2013-2023 Photon Storm Ltd. 2677 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2678 */var d=e(79967),g=e(82712),r=function(a,h,n){n===void 0&&(n=new d);var o=a.x*h.x+a.y*h.y,f=o/g(h);return f!==0&&(n.x=f*h.x,n.y=f*h.y),n};l.exports=r},50817:(l,T,e)=>{/** 2679 * @author Richard Davey <[email protected]> 2680 * @copyright 2013-2023 Photon Storm Ltd. 2681 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2682 */var d=e(79967),g=function(r,a,h){h===void 0&&(h=new d);var n=r.x*a.x+r.y*a.y;return n!==0&&(h.x=n*a.x,h.y=n*a.y),h};l.exports=g},40525:(l,T,e)=>{/** 2683 * @author Richard Davey <[email protected]> 2684 * @copyright 2013-2023 Photon Storm Ltd. 2685 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2686 */var d=e(50083),g=function(r,a){if(r.x!==0||r.y!==0){var h=d(r);r.x/=h,r.y/=h}return r.x*=a,r.y*=a,r};l.exports=g},63472:(l,T,e)=>{/** 2687 * @author Richard Davey <[email protected]> 2688 * @copyright 2013-2023 Photon Storm Ltd. 2689 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2690 */var d=e(79967);d.Ceil=e(77601),d.Clone=e(38933),d.CopyFrom=e(47103),d.Equals=e(13625),d.Floor=e(12536),d.GetCentroid=e(54205),d.GetMagnitude=e(50083),d.GetMagnitudeSq=e(82712),d.GetRectangleFromPoints=e(20052),d.Interpolate=e(77154),d.Invert=e(42397),d.Negative=e(59464),d.Project=e(53581),d.ProjectUnit=e(50817),d.SetMagnitude=e(40525),l.exports=d},19631:(l,T,e)=>{/** 2691 * @author Richard Davey <[email protected]> 2692 * @copyright 2013-2023 Photon Storm Ltd. 2693 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2694 */var d=e(8580),g=function(r){return new d(r.points)};l.exports=g},45604:l=>{/** 2695 * @author Richard Davey <[email protected]> 2696 * @copyright 2013-2023 Photon Storm Ltd. 2697 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2698 */var T=function(e,d,g){for(var r=!1,a=-1,h=e.points.length-1;++a<e.points.length;h=a){var n=e.points[a].x,o=e.points[a].y,f=e.points[h].x,u=e.points[h].y;(o<=g&&g<u||u<=g&&g<o)&&d<(f-n)*(g-o)/(u-o)+n&&(r=!r)}return r};l.exports=T},87289:(l,T,e)=>{/** 2699 * @author Richard Davey <[email protected]> 2700 * @copyright 2013-2023 Photon Storm Ltd. 2701 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2702 */var d=e(45604),g=function(r,a){return d(r,a.x,a.y)};l.exports=g},11117:l=>{/** 2703 * @author Richard Davey <[email protected]> 2704 * @copyright 2013-2023 Photon Storm Ltd. 2705 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2706 */function T(N,Y,F){F=F||2;var G=Y&&Y.length,k=G?Y[0]*F:N.length,V=e(N,0,k,F,!0),U=[];if(!V||V.next===V.prev)return U;var $,K,J,_,tt,st,ht;if(G&&(V=o(N,Y,V,F)),N.length>80*F){$=J=N[0],K=_=N[1];for(var lt=F;lt<k;lt+=F)tt=N[lt],st=N[lt+1],tt<$&&($=tt),st<K&&(K=st),tt>J&&(J=tt),st>_&&(_=st);ht=Math.max(J-$,_-K),ht=ht!==0?32767/ht:0}return g(V,U,F,$,K,ht,0),U}function e(N,Y,F,G,k){var V,U;if(k===j(N,Y,F,G)>0)for(V=Y;V<F;V+=G)U=z(V,N[V],N[V+1],U);else for(V=F-G;V>=Y;V-=G)U=z(V,N[V],N[V+1],U);return U&&w(U,U.next)&&(X(U),U=U.next),U}function d(N,Y){if(!N)return N;Y||(Y=N);var F=N,G;do if(G=!1,!F.steiner&&(w(F,F.next)||M(F.prev,F,F.next)===0)){if(X(F),F=Y=F.prev,F===F.next)break;G=!0}else F=F.next;while(G||F!==Y);return Y}function g(N,Y,F,G,k,V,U){if(N){!U&&V&&p(N,G,k,V);for(var $=N,K,J;N.prev!==N.next;){if(K=N.prev,J=N.next,V?a(N,G,k,V):r(N)){Y.push(K.i/F|0),Y.push(N.i/F|0),Y.push(J.i/F|0),X(N),N=J.next,$=J.next;continue}if(N=J,N===$){U?U===1?(N=h(d(N),Y,F),g(N,Y,F,G,k,V,2)):U===2&&n(N,Y,F,G,k,V):g(d(N),Y,F,G,k,V,1);break}}}}function r(N){var Y=N.prev,F=N,G=N.next;if(M(Y,F,G)>=0)return!1;for(var k=Y.x,V=F.x,U=G.x,$=Y.y,K=F.y,J=G.y,_=k<V?k<U?k:U:V<U?V:U,tt=$<K?$<J?$:J:K<J?K:J,st=k>V?k>U?k:U:V>U?V:U,ht=$>K?$>J?$:J:K>J?K:J,lt=G.next;lt!==Y;){if(lt.x>=_&<.x<=st&<.y>=tt&<.y<=ht&&b(k,$,V,K,U,J,lt.x,lt.y)&&M(lt.prev,lt,lt.next)>=0)return!1;lt=lt.next}return!0}function a(N,Y,F,G){var k=N.prev,V=N,U=N.next;if(M(k,V,U)>=0)return!1;for(var $=k.x,K=V.x,J=U.x,_=k.y,tt=V.y,st=U.y,ht=$<K?$<J?$:J:K<J?K:J,lt=_<tt?_<st?_:st:tt<st?tt:st,nt=$>K?$>J?$:J:K>J?K:J,gt=_>tt?_>st?_:st:tt>st?tt:st,bt=y(ht,lt,Y,F,G),Pt=y(nt,gt,Y,F,G),dt=N.prevZ,St=N.nextZ;dt&&dt.z>=bt&&St&&St.z<=Pt;){if(dt.x>=ht&&dt.x<=nt&&dt.y>=lt&&dt.y<=gt&&dt!==k&&dt!==U&&b($,_,K,tt,J,st,dt.x,dt.y)&&M(dt.prev,dt,dt.next)>
vendor: 4,293 bytes, line 2706
2706=0||(dt=dt.prevZ,St.x>=ht&&St.x<=nt&&St.y>=lt&&St.y<=gt&&St!==k&&St!==U&&b($,_,K,tt,J,st,St.x,St.y)&&M(St.prev,St,St.next)>=0))return!1;St=St.nextZ}for(;dt&&dt.z>=bt;){if(dt.x>=ht&&dt.x<=nt&&dt.y>=lt&&dt.y<=gt&&dt!==k&&dt!==U&&b($,_,K,tt,J,st,dt.x,dt.y)&&M(dt.prev,dt,dt.next)>=0)return!1;dt=dt.prevZ}for(;St&&St.z<=Pt;){if(St.x>=ht&&St.x<=nt&&St.y>=lt&&St.y<=gt&&St!==k&&St!==U&&b($,_,K,tt,J,st,St.x,St.y)&&M(St.prev,St,St.next)>=0)return!1;St=St.nextZ}return!0}function h(N,Y,F){var G=N;do{var k=G.prev,V=G.next.next;!w(k,V)&&A(k,G,G.next,V)&&I(k,V)&&I(V,k)&&(Y.push(k.i/F|0),Y.push(G.i/F|0),Y.push(V.i/F|0),X(G),X(G.next),G=N=V),G=G.next}while(G!==N);return d(G)}function n(N,Y,F,G,k,V){var U=N;do{for(var $=U.next.next;$!==U.prev;){if(U.i!==$.i&&E(U,$)){var K=B(U,$);U=d(U,U.next),K=d(K,K.next),g(U,Y,F,G,k,V,0),g(K,Y,F,G,k,V,0);return}$=$.next}U=U.next}while(U!==N)}function o(N,Y,F,G){var k=[],V,U,$,K,J;for(V=0,U=Y.length;V<U;V++)$=Y[V]*G,K=V<U-1?Y[V+1]*G:N.length,J=e(N,$,K,G,!1),J===J.next&&(J.steiner=!0),k.push(P(J));for(k.sort(f),V=0;V<k.length;V++)F=u(k[V],F);return F}function f(N,Y){return N.x-Y.x}function u(N,Y){var F=v(N,Y);if(!F)return Y;var G=B(F,N);return d(G,G.next),d(F,F.next)}function v(N,Y){var F=Y,G=N.x,k=N.y,V=-1/0,U;do{if(k<=F.y&&k>=F.next.y&&F.next.y!==F.y){var $=F.x+(k-F.y)*(F.next.x-F.x)/(F.next.y-F.y);if($<=G&&$>V&&(V=$,U=F.x<F.next.x?F:F.next,$===G))return U}F=F.next}while(F!==Y);if(!U)return null;var K=U,J=U.x,_=U.y,tt=1/0,st;F=U;do G>=F.x&&F.x>=J&&G!==F.x&&b(k<_?G:V,k,J,_,k<_?V:G,k,F.x,F.y)&&(st=Math.abs(k-F.y)/(G-F.x),I(F,N)&&(st<tt||st===tt&&(F.x>U.x||F.x===U.x&&m(U,F)))&&(U=F,tt=st)),F=F.next;while(F!==K);return U}function m(N,Y){return M(N.prev,N,Y.prev)<0&&M(Y.next,N,N.next)<0}function p(N,Y,F,G){var k=N;do k.z===0&&(k.z=y(k.x,k.y,Y,F,G)),k.prevZ=k.prev,k.nextZ=k.next,k=k.next;while(k!==N);k.prevZ.nextZ=null,k.prevZ=null,x(k)}function x(N){var Y,F,G,k,V,U,$,K,J=1;do{for(F=N,N=null,V=null,U=0;F;){for(U++,G=F,$=0,Y=0;Y<J&&($++,G=G.nextZ,!!G);Y++);for(K=J;$>0||K>0&&G;)$!==0&&(K===0||!G||F.z<=G.z)?(k=F,F=F.nextZ,$--):(k=G,G=G.nextZ,K--),V?V.nextZ=k:N=k,k.prevZ=V,V=k;F=G}V.nextZ=null,J*=2}while(U>1);return N}function y(N,Y,F,G,k){return N=(N-F)*k|0,Y=(Y-G)*k|0,N=(N|N<<8)&16711935,N=(N|N<<4)&252645135,N=(N|N<<2)&858993459,N=(N|N<<1)&1431655765,Y=(Y|Y<<8)&16711935,Y=(Y|Y<<4)&252645135,Y=(Y|Y<<2)&858993459,Y=(Y|Y<<1)&1431655765,N|Y<<1}function P(N){var Y=N,F=N;do(Y.x<F.x||Y.x===F.x&&Y.y<F.y)&&(F=Y),Y=Y.next;while(Y!==N);return F}function b(N,Y,F,G,k,V,U,$){return(k-U)*(Y-$)>=(N-U)*(V-$)&&(N-U)*(G-$)>=(F-U)*(Y-$)&&(F-U)*(V-$)>=(k-U)*(G-$)}function E(N,Y){return N.next.i!==Y.i&&N.prev.i!==Y.i&&!O(N,Y)&&(I(N,Y)&&I(Y,N)&&D(N,Y)&&(M(N.prev,N,Y.prev)||M(N,Y.prev,Y))||w(N,Y)&&M(N.prev,N,N.next)>0&&M(Y.prev,Y,Y.next)>0)}function M(N,Y,F){return(Y.y-N.y)*(F.x-Y.x)-(Y.x-N.x)*(F.y-Y.y)}function w(N,Y){return N.x===Y.x&&N.y===Y.y}function A(N,Y,F,G){var k=L(M(N,Y,F)),V=L(M(N,Y,G)),U=L(M(F,G,N)),$=L(M(F,G,Y));return!!(k!==V&&U!==$||k===0&&R(N,F,Y)||V===0&&R(N,G,Y)||U===0&&R(F,N,G)||$===0&&R(F,Y,G))}function R(N,Y,F){return Y.x<=Math.max(N.x,F.x)&&Y.x>=Math.min(N.x,F.x)&&Y.y<=Math.max(N.y,F.y)&&Y.y>=Math.min(N.y,F.y)}function L(N){return N>0?1:N<0?-1:0}function O(N,Y){var F=N;do{if(F.i!==N.i&&F.next.i!==N.i&&F.i!==Y.i&&F.next.i!==Y.i&&A(F,F.next,N,Y))return!0;F=F.next}while(F!==N);return!1}function I(N,Y){return M(N.prev,N,N.next)<0?M(N,Y,N.next)>=0&&M(N,N.prev,Y)>=0:M(N,Y,N.prev)<0||M(N,N.next,Y)<0}function D(N,Y){var F=N,G=!1,k=(N.x+Y.x)/2,V=(N.y+Y.y)/2;do F.y>V!=F.next.y>V&&F.next.y!==F.y&&k<(F.next.x-F.x)*(V-F.y)/(F.next.y-F.y)+F.x&&(G=!G),F=F.next;while(F!==N);return G}function B(N,Y){var F=new W(N.i,N.x,N.y),G=new W(Y.i,Y.x,Y.y),k=N.next,V=Y.prev;return N.next=Y,Y.prev=N,F.next=k,k.prev=F,G.next=F,F.prev=G,V.next=G,G.prev=V,G}function z(N,Y,F,G){var k=new W(N,Y,F);return G?(k.next=G.next,k.prev=G,G.next.prev=k,G.next=k):(k.prev=k,k.next=k),k}function X(N){N.next.prev=N.prev,N.prev.next=N.next,N.prevZ&&(N.prevZ.nextZ=N.nextZ),N.nextZ&&(N.nextZ.prevZ=N.prevZ)}function W(N,Y,F){this.i=N,this.x=Y,this.y=F,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}T.deviation=function(N,Y,F,G){var k=Y&&Y.length,V=k?Y[0]*F:N.length,U=Math.abs(j(N,0,V,F));if(k)for(var $=0,K=Y.length;$<K;
2706$++){var J=Y[$]*F,_=$<K-1?Y[$+1]*F:N.length;U-=Math.abs(j(N,J,_,F))}var tt=0;for($=0;$<G.length;$+=3){var st=G[$]*F,ht=G[$+1]*F,lt=G[$+2]*F;tt+=Math.abs((N[st]-N[lt])*(N[ht+1]-N[st+1])-(N[st]-N[ht])*(N[lt+1]-N[st+1]))}return U===0&&tt===0?0:Math.abs((tt-U)/U)};function j(N,Y,F,G){for(var k=0,V=Y,U=F-G;V<F;V+=G)k+=(N[U]-N[V])*(N[V+1]+N[U+1]),U=V;return k}T.flatten=function(N){for(var Y=N[0][0].length,F={vertices:[],holes:[],dimensions:Y},G=0,k=0;k<N.length;k++){for(var V=0;V<N[k].length;V++)for(var U=0;U<Y;U++)F.vertices.push(N[k][V][U]);k>0&&(G+=N[k-1].length,F.holes.push(G))}return F},l.exports=T},14045:(l,T,e)=>{/** 2707 * @author Richard Davey <[email protected]> 2708 * @copyright 2013-2023 Photon Storm Ltd. 2709 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2710 */var d=e(74118),g=function(r,a){a===void 0&&(a=new d);for(var h=1/0,n=1/0,o=-h,f=-n,u,v=0;v<r.points.length;v++)u=r.points[v],h=Math.min(h,u.x),n=Math.min(n,u.y),o=Math.max(o,u.x),f=Math.max(f,u.y);return a.x=h,a.y=n,a.width=o-h,a.height=f-n,a};l.exports=g},98286:l=>{/** 2711 * @author Richard Davey <[email protected]> 2712 * @copyright 2013-2023 Photon Storm Ltd. 2713 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2714 */var T=function(e,d){d===void 0&&(d=[]);for(var g=0;g<e.points.length;g++)d.push(e.points[g].x),d.push(e.points[g].y);return d};l.exports=T},89294:(l,T,e)=>{/** 2715 * @author Richard Davey <[email protected]> 2716 * @copyright 2013-2023 Photon Storm Ltd. 2717 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2718 */var d=e(16028),g=e(88829),r=e(5159),a=function(h,n,o,f){f===void 0&&(f=[]);var u=h.points,v=r(h);!n&&o>0&&(n=v/o);for(var m=0;m<n;m++)for(var p=v*(m/n),x=0,y=0;y<u.length;y++){var P=u[y],b=u[(y+1)%u.length],E=new g(P.x,P.y,b.x,b.y),M=d(E);if(p<x||p>x+M){x+=M;continue}var w=E.getPoint((p-x)/M);f.push(w);break}return f};l.exports=a},5159:(l,T,e)=>{/** 2719 * @author Richard Davey <[email protected]> 2720 * @copyright 2013-2023 Photon Storm Ltd. 2721 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2722 */var d=e(16028),g=e(88829),r=function(a){for(var h=a.points,n=0,o=0;o<h.length;o++){var f=h[o],u=h[(o+1)%h.length],v=new g(f.x,f.y,u.x,u.y);n+=d(v)}return n};l.exports=r},8580:(l,T,e)=>{/** 2723 * @author Richard Davey <[email protected]> 2724 * @copyright 2013-2023 Photon Storm Ltd. 2725 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2726 */var d=e(56694),g=e(45604),r=e(89294),a=e(52394),h=new d({initialize:function(o){this.type=a.POLYGON,this.area=0,this.points=[],o&&this.setTo(o)},contains:function(n,o){return g(this,n,o)},setTo:function(n){if(this.area=0,this.points=[],typeof n=="string"&&(n=n.split(" ")),!Array.isArray(n))return this;for(var o,f=Number.MAX_VALUE,u=0;u<n.length;u++)o={x:0,y:0},typeof n[u]=="number"||typeof n[u]=="string"?(o.x=parseFloat(n[u]),o.y=parseFloat(n[u+1]),u++):Array.isArray(n[u])?(o.x=n[u][0],o.y=n[u][1]):(o.x=n[u].x,o.y=n[u].y),this.points.push(o),o.y<f&&(f=o.y);return this.calculateArea(f),this},calculateArea:function(){if(this.points.length<3)return this.area=0,this.area;for(var n=0,o,f,u=0;u<this.points.length-1;u++)o=this.points[u],f=this.points[u+1],n+=(f.x-o.x)*(o.y+f.y);return o=this.points[0],f=this.points[this.points.length-1],n+=(o.x-f.x)*(f.y+o.y),this.area=-n*.5,this.area},getPoints:function(n,o,f){return r(this,n,o,f)}});l.exports=h},32244:l=>{/** 2727 * @author Richard Davey <[email protected]> 2728 * @copyright 2013-2023 Photon Storm Ltd. 2729 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2730 */var T=function(e){return e.points.reverse(),e};l.exports=T},95874:l=>{function T(h,n){var o=h.x-n.x,f=h.y-n.y;return o*o+f*f}function e(h,n,o){var f=n.x,u=n.y,v=o.x-f,m=o.y-u;if(v!==0||m!==0){var p=((h.x-f)*v+(h.y-u)*m)/(v*v+m*m);p>1?(f=o.x,u=o.y):p>0&&(f+=v*p,u+=m*p)}return v=h.x-f,m=h.y-u,v*v+m*m}function d(h,n){for(var o=h[0],f=[o],u,v=1,m=h.length;v<m;v++)u=h[v],T(u,o)>n&&(f.push(u),o=u);return o!==u&&f.push(u),f}function g(h,n,o,f,u){for(var v=f,m,p=n+1;p<o;p++){var x=e(h[p],h[n],h[o]);x>v&&(m=p,v=x)}v>f&&(m-n>1&&g(h,n,m,f,u),u.push(h[m]),o-m>1&&g(h,m,o,f,u))}function r(h,n){var o=h.length-1,f=[h[0]];return g(h,0,o,n,f),f.push(h[o]),f}var a=function(h,n,o){n===void 0&&(n=1),o===void 0&&(o=!1);var f=h.points;if(f.length>2){var u=n*n;o||(f=d(f,u)),h.setTo(r(f,u))}return h};l.exports=a},18974:l=>{/** 2731 * @author Richard Davey <[email protected]> 2732 * @author Igor Ognichenko <[email protected]> 2733 * @copyright 2013-2023 Photon Storm Ltd. 2734 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2735 */var T=function(d,g){return d[0]=g[0],d[1]=g[1],d},e=function(d){var g,r=[],a=d.points;for(g=0;g<a.length;g++)r.push([a[g].x,a[g].y]);var h=[];for(r.length>0&&h.push(T([0,0],r[0])),g=0;g<r.length-1;
2735g++){var n=r[g],o=r[g+1],f=n[0],u=n[1],v=o[0],m=o[1];h.push([.85*f+.15*v,.85*u+.15*m]),h.push([.15*f+.85*v,.15*u+.85*m])}return r.length>1&&h.push(T([0,0],r[r.length-1])),d.setTo(h)};l.exports=e},23490:l=>{/** 2736 * @author Richard Davey <[email protected]> 2737 * @copyright 2013-2023 Photon Storm Ltd. 2738 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2739 */var T=function(e,d,g){for(var r=e.points,a=0;a<r.length;a++)r[a].x+=d,r[a].y+=g;return e};l.exports=T},44359:(l,T,e)=>{/** 2740 * @author Richard Davey <[email protected]> 2741 * @copyright 2013-2023 Photon Storm Ltd. 2742 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2743 */var d=e(8580);d.Clone=e(19631),d.Contains=e(45604),d.ContainsPoint=e(87289),d.Earcut=e(11117),d.GetAABB=e(14045),d.GetNumberArray=e(98286),d.GetPoints=e(89294),d.Perimeter=e(5159),d.Reverse=e(32244),d.Simplify=e(95874),d.Smooth=e(18974),d.Translate=e(23490),l.exports=d},1653:l=>{/** 2744 * @author Richard Davey <[email protected]> 2745 * @copyright 2013-2023 Photon Storm Ltd. 2746 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2747 */var T=function(e){return e.width*e.height};l.exports=T},33943:l=>{/** 2748 * @author Richard Davey <[email protected]> 2749 * @copyright 2013-2023 Photon Storm Ltd. 2750 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2751 */var T=function(e){return e.x=Math.ceil(e.x),e.y=Math.ceil(e.y),e};l.exports=T},58662:l=>{/** 2752 * @author Richard Davey <[email protected]> 2753 * @copyright 2013-2023 Photon Storm Ltd. 2754 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2755 */var T=function(e){return e.x=Math.ceil(e.x),e.y=Math.ceil(e.y),e.width=Math.ceil(e.width),e.height=Math.ceil(e.height),e};l.exports=T},79993:l=>{/** 2756 * @author Richard Davey <[email protected]> 2757 * @copyright 2013-2023 Photon Storm Ltd. 2758 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2759 */var T=function(e,d,g){return e.x=d-e.width/2,e.y=g-e.height/2,e};l.exports=T},81572:(l,T,e)=>{/** 2760 * @author Richard Davey <[email protected]> 2761 * @copyright 2013-2023 Photon Storm Ltd. 2762 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2763 */var d=e(74118),g=function(r){return new d(r.x,r.y,r.width,r.height)};l.exports=g},94287:l=>{/** 2764 * @author Richard Davey <[email protected]> 2765 * @copyright 2013-2023 Photon Storm Ltd. 2766 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2767 */var T=function(e,d,g){return e.width<=0||e.height<=0?!1:e.x<=d&&e.x+e.width>=d&&e.y<=g&&e.y+e.height>=g};l.exports=T},28687:(l,T,e)=>{/** 2768 * @author Richard Davey <[email protected]> 2769 * @copyright 2013-2023 Photon Storm Ltd. 2770 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2771 */var d=e(94287),g=function(r,a){return d(r,a.x,a.y)};l.exports=g},73222:l=>{/** 2772 * @author Richard Davey <[email protected]> 2773 * @copyright 2013-2023 Photon Storm Ltd. 2774 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2775 */var T=function(e,d){return d.width*d.height>e.width*e.height?!1:d.x>e.x&&d.x<e.right&&d.right>e.x&&d.right<e.right&&d.y>e.y&&d.y<e.bottom&&d.bottom>e.y&&d.bottom<e.bottom};l.exports=T},29538:l=>{/** 2776 * @author Richard Davey <[email protected]> 2777 * @copyright 2013-2023 Photon Storm Ltd. 2778 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2779 */var T=function(e,d){return d.setTo(e.x,e.y,e.width,e.height)};l.exports=T},87279:l=>{/** 2780 * @author Richard Davey <[email protected]> 2781 * @copyright 2013-2023 Photon Storm Ltd. 2782 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2783 */var T=function(e,d){return d===void 0&&(d=[]),d.push({x:e.x,y:e.y}),d.push({x:e.right,y:e.y}),d.push({x:e.right,y:e.bottom}),d.push({x:e.x,y:e.bottom}),d};l.exports=T},19989:l=>{/** 2784 * @author Richard Davey <[email protected]> 2785 * @copyright 2013-2023 Photon Storm Ltd. 2786 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2787 */var T=function(e,d){return e.x===d.x&&e.y===d.y&&e.width===d.width&&e.height===d.height};l.exports=T},92628:(l,T,e)=>{/** 2788 * @author Richard Davey <[email protected]> 2789 * @copyright 2013-2023 Photon Storm Ltd. 2790 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2791 */var d=e(6700),g=function(r,a){var h=d(r);return h<d(a)?r.setSize(a.height*h,a.height):r.setSize(a.width,a.width/h),r.setPosition(a.centerX-r.width/2,a.centerY-r.height/2)};l.exports=g},85028:(l,T,e)=>{/** 2792 * @author Richard Davey <[email protected]> 2793 * @copyright 2013-2023 Photon Storm Ltd. 2794 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2795 */var d=e(6700),g=function(r,a){var h=d(r);return h>d(a)?r.setSize(a.height*h,a.height):r.setSize(a.width,a.width/h),r.setPosition(a.centerX-r.width/2,a.centerY-r.height/2)};l.exports=g},71356:l=>{/** 2796 * @author Richard Davey <[email protected]> 2797 * @copyright 2013-2023 Photon Storm Ltd. 2798 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2799 */var T=function(e){return e.x=Math.floor(e.x),e.y=Math.floor(e.y),e};l.exports=T},21687:l=>{/** 2800 * @author Richard Davey <[email protected]> 2801 * @copyright 2013-2023 Photon Storm Ltd. 2802 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2803 */var T=function(e){return e.x=Math.floor(e.x),e.y=Math.floor(e.y),e.width=Math.floor(e.width),e.height=Math.floor(e.height),e};l.exports=T},80222:(l,T,e)=>{/** 2804 * @author Richard Davey <[email protected]> 2805 * @copyright 2013-2023 Photon Storm Ltd. 2806 * @license {@link https://opensource.org/licenses/MIT|MIT License}
2807 */var d=e(74118),g=e(83392),r=function(a,h){if(h===void 0&&(h=new d),a.length===0)return h;for(var n=Number.MAX_VALUE,o=Number.MAX_VALUE,f=g.MIN_SAFE_INTEGER,u=g.MIN_SAFE_INTEGER,v,m,p,x=0;x<a.length;x++)v=a[x],Array.isArray(v)?(m=v[0],p=v[1]):(m=v.x,p=v.y),n=Math.min(n,m),o=Math.min(o,p),f=Math.max(f,m),u=Math.max(u,p);return h.x=n,h.y=o,h.width=f-n,h.height=u-o,h};l.exports=r},75785:(l,T,e)=>{/** 2808 * @author samme 2809 * @copyright 2013-2023 Photon Storm Ltd. 2810 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2811 */var d=e(74118),g=function(r,a,h,n,o){return o===void 0&&(o=new d),o.setTo(Math.min(r,h),Math.min(a,n),Math.abs(r-h),Math.abs(a-n))};l.exports=g},6700:l=>{/** 2812 * @author Richard Davey <[email protected]> 2813 * @copyright 2013-2023 Photon Storm Ltd. 2814 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2815 */var T=function(e){return e.height===0?NaN:e.width/e.height};l.exports=T},35242:(l,T,e)=>{/** 2816 * @author Richard Davey <[email protected]> 2817 * @copyright 2013-2023 Photon Storm Ltd. 2818 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2819 */var d=e(79967),g=function(r,a){return a===void 0&&(a=new d),a.x=r.centerX,a.y=r.centerY,a};l.exports=g},47698:(l,T,e)=>{/** 2820 * @author Richard Davey <[email protected]> 2821 * @copyright 2013-2023 Photon Storm Ltd. 2822 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2823 */var d=e(85876),g=e(79967),r=function(a,h,n){if(n===void 0&&(n=new g),h<=0||h>=1)return n.x=a.x,n.y=a.y,n;var o=d(a)*h;return h>.5?(o-=a.width+a.height,o<=a.width?(n.x=a.right-o,n.y=a.bottom):(n.x=a.x,n.y=a.bottom-(o-a.width))):o<=a.width?(n.x=a.x+o,n.y=a.y):(n.x=a.right,n.y=a.y+(o-a.width)),n};l.exports=r},54932:(l,T,e)=>{/** 2824 * @author Richard Davey <[email protected]> 2825 * @copyright 2013-2023 Photon Storm Ltd. 2826 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2827 */var d=e(47698),g=e(85876),r=function(a,h,n,o){o===void 0&&(o=[]),!h&&n>0&&(h=g(a)/n);for(var f=0;f<h;f++){var u=f/h;o.push(d(a,u))}return o};l.exports=r},31591:(l,T,e)=>{/** 2828 * @author Richard Davey <[email protected]> 2829 * @copyright 2013-2023 Photon Storm Ltd. 2830 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2831 */var d=e(79967),g=function(r,a){return a===void 0&&(a=new d),a.x=r.width,a.y=r.height,a};l.exports=g},7782:(l,T,e)=>{/** 2832 * @author Richard Davey <[email protected]> 2833 * @copyright 2013-2023 Photon Storm Ltd. 2834 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2835 */var d=e(79993),g=function(r,a,h){var n=r.centerX,o=r.centerY;return r.setSize(r.width+a*2,r.height+h*2),d(r,n,o)};l.exports=g},66217:(l,T,e)=>{/** 2836 * @author Richard Davey <[email protected]> 2837 * @copyright 2013-2023 Photon Storm Ltd. 2838 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2839 */var d=e(74118),g=e(90205),r=function(a,h,n){return n===void 0&&(n=new d),g(a,h)?(n.x=Math.max(a.x,h.x),n.y=Math.max(a.y,h.y),n.width=Math.min(a.right,h.right)-n.x,n.height=Math.min(a.bottom,h.bottom)-n.y):n.setEmpty(),n};l.exports=r},40053:(l,T,e)=>{/** 2840 * @author Richard Davey <[email protected]> 2841 * @copyright 2013-2023 Photon Storm Ltd. 2842 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2843 */var d=e(85876),g=e(79967),r=function(a,h,n,o){if(o===void 0&&(o=[]),!h&&!n)return o;h?n=Math.round(d(a)/h):h=d(a)/n;for(var f=a.x,u=a.y,v=0,m=0;m<n;m++)switch(o.push(new g(f,u)),v){case 0:f+=h,f>=a.right&&(v=1,u+=f-a.right,f=a.right);break;case 1:u+=h,u>=a.bottom&&(v=2,f-=u-a.bottom,u=a.bottom);break;case 2:f-=h,f<=a.left&&(v=3,u-=a.left-f,f=a.left);break;case 3:u-=h,u<=a.top&&(v=0,u=a.top);break}return o};l.exports=r},86673:l=>{/** 2844 * @author Richard Davey <[email protected]> 2845 * @copyright 2013-2023 Photon Storm Ltd. 2846 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2847 */var T=function(e,d){for(var g=e.x,r=e.right,a=e.y,h=e.bottom,n=0;n<d.length;n++)g=Math.min(g,d[n].x),r=Math.max(r,d[n].x),a=Math.min(a,d[n].y),h=Math.max(h,d[n].y);return e.x=g,e.y=a,e.width=r-g,e.height=h-a,e};l.exports=T},14655:l=>{/** 2848 * @author Richard Davey <[email protected]> 2849 * @copyright 2013-2023 Photon Storm Ltd. 2850 * @license {@link https://opensource.org/licenses/MIT|MIT License}
2851 */var T=function(e,d){var g=Math.min(e.x,d.x),r=Math.max(e.right,d.right);e.x=g,e.width=r-g;var a=Math.min(e.y,d.y),h=Math.max(e.bottom,d.bottom);return e.y=a,e.height=h-a,e};l.exports=T},44755:l=>{/** 2852 * @author Richard Davey <[email protected]> 2853 * @copyright 2013-2023 Photon Storm Ltd. 2854 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2855 */var T=function(e,d,g){var r=Math.min(e.x,d),a=Math.max(e.right,d);e.x=r,e.width=a-r;var h=Math.min(e.y,g),n=Math.max(e.bottom,g);return e.y=h,e.height=n-h,e};l.exports=T},74466:l=>{/** 2856 * @author Richard Davey <[email protected]> 2857 * @copyright 2013-2023 Photon Storm Ltd. 2858 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2859 */var T=function(e,d,g){return e.x+=d,e.y+=g,e};l.exports=T},55946:l=>{/** 2860 * @author Richard Davey <[email protected]> 2861 * @copyright 2013-2023 Photon Storm Ltd. 2862 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2863 */var T=function(e,d){return e.x+=d.x,e.y+=d.y,e};l.exports=T},97474:l=>{/** 2864 * @author Richard Davey <[email protected]> 2865 * @copyright 2013-2023 Photon Storm Ltd. 2866 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2867 */var T=function(e,d){return e.x<d.right&&e.right>d.x&&e.y<d.bottom&&e.bottom>d.y};l.exports=T},85876:l=>{/** 2868 * @author Richard Davey <[email protected]> 2869 * @copyright 2013-2023 Photon Storm Ltd. 2870 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2871 */var T=function(e){return 2*(e.width+e.height)};l.exports=T},20243:(l,T,e)=>{/** 2872 * @author Richard Davey <[email protected]> 2873 * @copyright 2013-2023 Photon Storm Ltd. 2874 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2875 */var d=e(79967),g=e(75606),r=function(a,h,n){n===void 0&&(n=new d),h=g(h);var o=Math.sin(h),f=Math.cos(h),u=f>0?a.width/2:a.width/-2,v=o>0?a.height/2:a.height/-2;return Math.abs(u*o)<Math.abs(v*f)?v=u*o/f:u=v*f/o,n.x=u+a.centerX,n.y=v+a.centerY,n};l.exports=r},30001:(l,T,e)=>{/** 2876 * @author Richard Davey <[email protected]> 2877 * @copyright 2013-2023 Photon Storm Ltd. 2878 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2879 */var d=e(79967),g=function(r,a){return a===void 0&&(a=new d),a.x=r.x+Math.random()*r.width,a.y=r.y+Math.random()*r.height,a};l.exports=g},97691:(l,T,e)=>{/** 2880 * @author Richard Davey <[email protected]> 2881 * @copyright 2013-2023 Photon Storm Ltd. 2882 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2883 */var d=e(17489),g=e(73222),r=e(79967),a=function(h,n,o){if(o===void 0&&(o=new r),g(h,n))switch(d(0,3)){case 0:o.x=h.x+Math.random()*(n.right-h.x),o.y=h.y+Math.random()*(n.top-h.y);break;case 1:o.x=n.x+Math.random()*(h.right-n.x),o.y=n.bottom+Math.random()*(h.bottom-n.bottom);break;case 2:o.x=h.x+Math.random()*(n.x-h.x),o.y=n.y+Math.random()*(h.bottom-n.y);break;case 3:o.x=n.right+Math.random()*(h.right-n.right),o.y=h.y+Math.random()*(n.bottom-h.y);break}return o};l.exports=a},74118:(l,T,e)=>{/** 2884 * @author Richard Davey <[email protected]> 2885 * @copyright 2013-2023 Photon Storm Ltd. 2886 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2887 */var d=e(56694),g=e(94287),r=e(47698),a=e(54932),h=e(52394),n=e(88829),o=e(30001),f=new d({initialize:function(v,m,p,x){v===void 0&&(v=0),m===void 0&&(m=0),p===void 0&&(p=0),x===void 0&&(x=0),this.type=h.RECTANGLE,this.x=v,this.y=m,this.width=p,this.height=x},contains:function(u,v){return g(this,u,v)},getPoint:function(u,v){return r(this,u,v)},getPoints:function(u,v,m){return a(this,u,v,m)},getRandomPoint:function(u){return o(this,u)},setTo:function(u,v,m,p){return this.x=u,this.y=v,this.width=m,this.height=p,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(u,v){return v===void 0&&(v=u),this.x=u,this.y=v,this},setSize:function(u,v){return v===void 0&&(v=u),this.width=u,this.height=v,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(u){return u===void 0&&(u=new n),u.setTo(this.x,this.y,this.right,this.y),u},getLineB:function(u){return u===void 0&&(u=new n),u.setTo(this.right,this.y,this.right,this.bottom),u},getLineC:function(u){return u===void 0&&(u=new n),u.setTo(this.right,this.bottom,this.x,this.bottom),u},getLineD:function(u){return u===void 0&&(u=new n),u.setTo(this.x,this.bottom,this.x,this.y),u},left:{get:function(){return this.x},set:function(u){u>=this.right?this.width=0:this.width=this.right-u,this.x=u}},right:{get:function(){return this.x+this.width}
2887,set:function(u){u<=this.x?this.width=0:this.width=u-this.x}},top:{get:function(){return this.y},set:function(u){u>=this.bottom?this.height=0:this.height=this.bottom-u,this.y=u}},bottom:{get:function(){return this.y+this.height},set:function(u){u<=this.y?this.height=0:this.height=u-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(u){this.x=u-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(u){this.y=u-this.height/2}}});l.exports=f},51828:l=>{/** 2888 * @author Richard Davey <[email protected]> 2889 * @copyright 2013-2023 Photon Storm Ltd. 2890 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2891 */var T=function(e,d){return e.width===d.width&&e.height===d.height};l.exports=T},5691:l=>{/** 2892 * @author Richard Davey <[email protected]> 2893 * @copyright 2013-2023 Photon Storm Ltd. 2894 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2895 */var T=function(e,d,g){return g===void 0&&(g=d),e.width*=d,e.height*=g,e};l.exports=T},58795:(l,T,e)=>{/** 2896 * @author Richard Davey <[email protected]> 2897 * @copyright 2013-2023 Photon Storm Ltd. 2898 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2899 */var d=e(74118),g=function(r,a,h){h===void 0&&(h=new d);var n=Math.min(r.x,a.x),o=Math.min(r.y,a.y),f=Math.max(r.right,a.right)-n,u=Math.max(r.bottom,a.bottom)-o;return h.setTo(n,o,f,u)};l.exports=g},66658:(l,T,e)=>{/** 2900 * @author Richard Davey <[email protected]> 2901 * @copyright 2013-2023 Photon Storm Ltd. 2902 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2903 */var d=e(74118);d.Area=e(1653),d.Ceil=e(33943),d.CeilAll=e(58662),d.CenterOn=e(79993),d.Clone=e(81572),d.Contains=e(94287),d.ContainsPoint=e(28687),d.ContainsRect=e(73222),d.CopyFrom=e(29538),d.Decompose=e(87279),d.Equals=e(19989),d.FitInside=e(92628),d.FitOutside=e(85028),d.Floor=e(71356),d.FloorAll=e(21687),d.FromPoints=e(80222),d.FromXY=e(75785),d.GetAspectRatio=e(6700),d.GetCenter=e(35242),d.GetPoint=e(47698),d.GetPoints=e(54932),d.GetSize=e(31591),d.Inflate=e(7782),d.Intersection=e(66217),d.MarchingAnts=e(40053),d.MergePoints=e(86673),d.MergeRect=e(14655),d.MergeXY=e(44755),d.Offset=e(74466),d.OffsetPoint=e(55946),d.Overlaps=e(97474),d.Perimeter=e(85876),d.PerimeterPoint=e(20243),d.Random=e(30001),d.RandomOutside=e(97691),d.SameDimensions=e(51828),d.Scale=e(5691),d.Union=e(58795),l.exports=d},19108:l=>{/** 2904 * @author Richard Davey <[email protected]> 2905 * @copyright 2013-2023 Photon Storm Ltd. 2906 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2907 */var T=function(e){var d=e.x1,g=e.y1,r=e.x2,a=e.y2,h=e.x3,n=e.y3;return Math.abs(((h-d)*(a-g)-(r-d)*(n-g))/2)};l.exports=T},41199:(l,T,e)=>{/** 2908 * @author Richard Davey <[email protected]> 2909 * @copyright 2013-2023 Photon Storm Ltd. 2910 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2911 */var d=e(66349),g=function(r,a,h){var n=h*(Math.sqrt(3)/2),o=r,f=a,u=r+h/2,v=a+n,m=r-h/2,p=a+n;return new d(o,f,u,v,m,p)};l.exports=g},88730:(l,T,e)=>{/** 2912 * @author Richard Davey <[email protected]> 2913 * @copyright 2013-2023 Photon Storm Ltd. 2914 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2915 */var d=e(11117),g=e(66349),r=function(a,h,n,o,f){h===void 0&&(h=null),n===void 0&&(n=1),o===void 0&&(o=1),f===void 0&&(f=[]);for(var u=d(a,h),v,m,p,x,y,P,b,E,M,w=0;w<u.length;w+=3)v=u[w],m=u[w+1],p=u[w+2],x=a[v*2]*n,y=a[v*2+1]*o,P=a[m*2]*n,b=a[m*2+1]*o,E=a[p*2]*n,M=a[p*2+1]*o,f.push(new g(x,y,P,b,E,M));return f};l.exports=r},3635:(l,T,e)=>{/** 2916 * @author Richard Davey <[email protected]> 2917 * @copyright 2013-2023 Photon Storm Ltd. 2918 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2919 */var d=e(66349),g=function(r,a,h,n){n===void 0&&(n=h);var o=r,f=a,u=r,v=a-n,m=r+h,p=a;return new d(o,f,u,v,m,p)};l.exports=g},1882:(l,T,e)=>{/** 2920 * @author Richard Davey <[email protected]> 2921 * @copyright 2013-2023 Photon Storm Ltd. 2922 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2923 */var d=e(56595),g=e(9640),r=function(a,h,n,o){o===void 0&&(o=d);var f=o(a),u=h-f.x,v=n-f.y;return g(a,u,v)};l.exports=r},56595:(l,T,e)=>{/** 2924 * @author Richard Davey <[email protected]> 2925 * @copyright 2013-2023 Photon Storm Ltd. 2926 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2927 */var d=e(79967),g=function(r,a){return a===void 0&&(a=new d),a.x=(r.x1+r.x2+r.x3)/3,a.y=(r.y1+r.y2+r.y3)/3,a};l.exports=g},91835:(l,T,e)=>{/** 2928 * @author Richard Davey <[email protected]> 2929 * @copyright 2013-2023 Photon Storm Ltd. 2930 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2931 */var d=e(93736);function g(a,h,n,o){return a*o-h*n}var r=function(a,h){h===void 0&&(h=new d);var n=a.x3,o=a.y3,f=a.x1-n,u=a.y1-o,v=a.x2-n,m=a.y2-o,p=2*g(f,u,v,m),x=g(u,f*f+u*u,m,v*v+m*m),y=g(f,f*f+u*u,v,v*v+m*m);return h.x=n-x/p,h.y=o+y/p,h};l.exports=r},97073:(l,T,e)=>{/** 2932 * @author Richard Davey <[email protected]> 2933 * @copyright 2013-2023 Photon Storm Ltd. 2934 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2935 */var d=e(26673),g=function(r,a){a===void 0&&(a=new d);var h=r.x1,n=r.y1,o=r.x2,f=r.y2,u=r.x3,v=r.y3,m=o-h,p=f-n,x=u-h,y=v-n,P=m*(h+o)+p*(n+f),b=x*(h+u)+y*(n+v),E=2*(m*(v-f)-p*(u-o)),M,w;if(Math.abs(E)<1e-6){var A=Math.min(h,o,u),R=Math.min(n,f,v);M=(Math.max(h,o,u)-A)*.5,w=(Math.max(n,f,v)-R)*.5,a.x=A+M,a.y=R+w,a.radius=Math.sqrt(M*M+w*w)}else a.x=(y*P-p*b)/E,a.y=(m*b-x*P)/E,M=a.x-h,w=a.y-n,a.radius=Math.sqrt(M*M+w*w);return a};l.exports=g},75974:(l,T,e)=>{/** 2936 * @author Richard Davey <[email protected]> 2937 * @copyright 2013-2023 Photon Storm Ltd. 2938 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2939 */var d=e(66349),g=function(r){return new d(r.x1,r.y1,r.x2,r.y2,r.x3,r.y3)};l.exports=g},60689:l=>{/** 2940 * @author Richard Davey <[email protected]> 2941 * @copyright 2013-2023 Photon Storm Ltd. 2942 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2943 */var T=function(e,d,g){var r=e.x3-e.x1,a=e.y3-e.y1,h=e.x2-e.x1,n=e.y2-e.y1,o=d-e.x1,f=g-e.y1,u=r*r+a*a,v=r*h+a*n,m=r*o+a*f,p=h*h+n*n,x=h*o+n*f,y=u*p-v*v,P=y===0?0:1/y,b=(p*m-v*x)*P,E=(u*x-v*m)*P;return b>=0&&E>=0&&b+E<1};l.exports=T},86875:l=>{/** 2944 * @author Richard Davey <[email protected]> 2945 * @copyright 2013-2023 Photon Storm Ltd. 2946 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2947 */var T=function(e,d,g,r){g===void 0&&(g=!1),r===void 0&&(r=[]);for(var a=e.x3-e.x1,h=e.y3-e.y1,n=e.x2-e.x1,o=e.y2-e.y1,f=a*a+h*h,u=a*n+h*o,v=n*n+o*o,m=f*v-u*u,p=m===0?0:1/m,x,y,P,b,E,M,w=e.x1,A=e.y1,R=0;R<d.length&&(P=d[R].x-w,b=d[R].y-A,E=a*P+h*b,M=n*P+o*b,x=(v*E-u*M)*p,y=(f*M-u*E)*p,!(x>=0&&y>=0&&x+y<1&&(r.push({x:d[R].x,y:d[R].y}),g)));R++);return r};l.exports=T},51532:(l,T,e)=>{/** 2948 * @author Richard Davey <[email protected]> 2949 * @copyright 2013-2023 Photon Storm Ltd. 2950 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2951 */var d=e(60689),g=function(r,a){return d(r,a.x,a.y)};l.exports=g},42538:l=>{/** 2952 * @author Richard Davey <[email protected]> 2953 * @copyright 2013-2023 Photon Storm Ltd. 2954 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2955 */var T=function(e,d){return d.setTo(e.x1,e.y1,e.x2,e.y2,e.x3,e.y3)};l.exports=T},18680:l=>{/** 2956 * @author Richard Davey <[email protected]> 2957 * @copyright 2013-2023 Photon Storm Ltd. 2958 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2959 */var T=function(e,d){return d===void 0&&(d=[]),d.push({x:e.x1,y:e.y1}),d.push({x:e.x2,y:e.y2}),d.push({x:e.x3,y:e.y3}),d};l.exports=T},29977:l=>{/** 2960 * @author Richard Davey <[email protected]> 2961 * @copyright 2013-2023 Photon Storm Ltd. 2962 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2963 */var T=function(e,d){return e.x1===d.x1&&e.y1===d.y1&&e.x2===d.x2&&e.y2===d.y2&&e.x3===d.x3&&e.y3===d.y3};l.exports=T},56088:(l,T,e)=>{/** 2964 * @author Richard Davey <[email protected]> 2965 * @copyright 2013-2023 Photon Storm Ltd. 2966 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2967 */var d=e(79967),g=e(16028),r=function(a,h,n){n===void 0&&(n=new d);var o=a.getLineA(),f=a.getLineB(),u=a.getLineC();if(h<=0||h>=1)return n.x=o.x1,n.y=o.y1,n;var v=g(o),m=g(f),p=g(u),x=v+m+p,y=x*h,P=0;return y<v?(P=y/v,n.x=o.x1+(o.x2-o.x1)*P,n.y=o.y1+(o.y2-o.y1)*P):y>v+m?(y-=v+m,P=y/p,n.x=u.x1+(u.x2-u.x1)*P,n.y=u.y1+(u.y2-u.y1)*P):(y-=v,P
2967=y/m,n.x=f.x1+(f.x2-f.x1)*P,n.y=f.y1+(f.y2-f.y1)*P),n};l.exports=r},24402:(l,T,e)=>{/** 2968 * @author Richard Davey <[email protected]> 2969 * @copyright 2013-2023 Photon Storm Ltd. 2970 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2971 */var d=e(16028),g=e(79967),r=function(a,h,n,o){o===void 0&&(o=[]);var f=a.getLineA(),u=a.getLineB(),v=a.getLineC(),m=d(f),p=d(u),x=d(v),y=m+p+x;!h&&n>0&&(h=y/n);for(var P=0;P<h;P++){var b=y*(P/h),E=0,M=new g;b<m?(E=b/m,M.x=f.x1+(f.x2-f.x1)*E,M.y=f.y1+(f.y2-f.y1)*E):b>m+p?(b-=m+p,E=b/x,M.x=v.x1+(v.x2-v.x1)*E,M.y=v.y1+(v.y2-v.y1)*E):(b-=m,E=b/p,M.x=u.x1+(u.x2-u.x1)*E,M.y=u.y1+(u.y2-u.y1)*E),o.push(M)}return o};l.exports=r},83648:(l,T,e)=>{/** 2972 * @author Richard Davey <[email protected]> 2973 * @copyright 2013-2023 Photon Storm Ltd. 2974 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2975 */var d=e(79967);function g(a,h,n,o){var f=a-n,u=h-o,v=f*f+u*u;return Math.sqrt(v)}var r=function(a,h){h===void 0&&(h=new d);var n=a.x1,o=a.y1,f=a.x2,u=a.y2,v=a.x3,m=a.y3,p=g(v,m,f,u),x=g(n,o,v,m),y=g(f,u,n,o),P=p+x+y;return h.x=(n*p+f*x+v*y)/P,h.y=(o*p+u*x+m*y)/P,h};l.exports=r},9640:l=>{/** 2976 * @author Richard Davey <[email protected]> 2977 * @copyright 2013-2023 Photon Storm Ltd. 2978 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2979 */var T=function(e,d,g){return e.x1+=d,e.y1+=g,e.x2+=d,e.y2+=g,e.x3+=d,e.y3+=g,e};l.exports=T},95290:(l,T,e)=>{/** 2980 * @author Richard Davey <[email protected]> 2981 * @copyright 2013-2023 Photon Storm Ltd. 2982 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2983 */var d=e(16028),g=function(r){var a=r.getLineA(),h=r.getLineB(),n=r.getLineC();return d(a)+d(h)+d(n)};l.exports=g},99761:(l,T,e)=>{/** 2984 * @author Richard Davey <[email protected]> 2985 * @copyright 2013-2023 Photon Storm Ltd. 2986 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2987 */var d=e(79967),g=function(r,a){a===void 0&&(a=new d);var h=r.x2-r.x1,n=r.y2-r.y1,o=r.x3-r.x1,f=r.y3-r.y1,u=Math.random(),v=Math.random();return u+v>=1&&(u=1-u,v=1-v),a.x=r.x1+(h*u+o*v),a.y=r.y1+(n*u+f*v),a};l.exports=g},21934:(l,T,e)=>{/** 2988 * @author Richard Davey <[email protected]> 2989 * @copyright 2013-2023 Photon Storm Ltd. 2990 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2991 */var d=e(19211),g=e(83648),r=function(a,h){var n=g(a);return d(a,n.x,n.y,h)};l.exports=r},68454:(l,T,e)=>{/** 2992 * @author Richard Davey <[email protected]> 2993 * @copyright 2013-2023 Photon Storm Ltd. 2994 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2995 */var d=e(19211),g=function(r,a,h){return d(r,a.x,a.y,h)};l.exports=g},19211:l=>{/** 2996 * @author Richard Davey <[email protected]> 2997 * @copyright 2013-2023 Photon Storm Ltd. 2998 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2999 */var T=function(e,d,g,r){var a=Math.cos(r),h=Math.sin(r),n=e.x1-d,o=e.y1-g;return e.x1=n*a-o*h+d,e.y1=n*h+o*a+g,n=e.x2-d,o=e.y2-g,e.x2=n*a-o*h+d,e.y2=n*h+o*a+g,n=e.x3-d,o=e.y3-g,e.x3=n*a-o*h+d,e.y3=n*h+o*a+g,e};l.exports=T},66349:(l,T,e)=>{/** 3000 * @author Richard Davey <[email protected]> 3001 * @copyright 2013-2023 Photon Storm Ltd. 3002 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3003 */var d=e(56694),g=e(60689),r=e(56088),a=e(24402),h=e(52394),n=e(88829),o=e(99761),f=new d({initialize:function(v,m,p,x,y,P){v===void 0&&(v=0),m===void 0&&(m=0),p===void 0&&(p=0),x===void 0&&(x=0),y===void 0&&(y=0),P===void 0&&(P=0),this.type=h.TRIANGLE,this.x1=v,this.y1=m,this.x2=p,this.y2=x,this.x3=y,this.y3=P},contains:function(u,v){return g(this,u,v)},getPoint:function(u,v){return r(this,u,v)},getPoints:function(u,v,m){return a(this,u,v,m)},getRandomPoint:function(u){return o(this,u)},setTo:function(u,v,m,p,x,y){return u===void 0&&(u=0),v===void 0&&(v=0),m===void 0&&(m=0),p===void 0&&(p=0),x===void 0&&(x=0),y===void 0&&(y=0),this.x1=u,this.y1=v,this.x2=m,this.y2=p,this.x3=x,this.y3=y,this},getLineA:function(u){return u===void 0&&(u=new n),u.setTo(this.x1,this.y1,this.x2,this.y2),u},getLineB:function(u){return u===void 0&&(u=new n),u.setTo(this.x2,this.y2,this.x3,this.y3),u},getLineC:function(u){return u===void 0&&(u=new n),u.setTo(this.x3,this.y3,this.x1,this.y1),u},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(u){var v=0;this.x1<=this.x2&&this.x1<=this.x3?v=this.x1-u:this.x2<=this.x1&&this.x2<=this.x3?v=this.x2-u:v=this.x3-u,this.x1-=v,this.x2-=v,this.x3-=v}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(u){var v=0;this.x1>=this.x2&&this.x1>=this.x3?v=this.x1-u:this.x2>=this.x1&&this.x2>=this.x3?v=this.x2-u:v=this.x3-u,this.x1-=v,this.x2-=v,this.x3-=v}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)}
3003,set:function(u){var v=0;this.y1<=this.y2&&this.y1<=this.y3?v=this.y1-u:this.y2<=this.y1&&this.y2<=this.y3?v=this.y2-u:v=this.y3-u,this.y1-=v,this.y2-=v,this.y3-=v}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(u){var v=0;this.y1>=this.y2&&this.y1>=this.y3?v=this.y1-u:this.y2>=this.y1&&this.y2>=this.y3?v=this.y2-u:v=this.y3-u,this.y1-=v,this.y2-=v,this.y3-=v}}});l.exports=f},87619:(l,T,e)=>{/** 3004 * @author Richard Davey <[email protected]> 3005 * @copyright 2013-2023 Photon Storm Ltd. 3006 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3007 */var d=e(66349);d.Area=e(19108),d.BuildEquilateral=e(41199),d.BuildFromPolygon=e(88730),d.BuildRight=e(3635),d.CenterOn=e(1882),d.Centroid=e(56595),d.CircumCenter=e(91835),d.CircumCircle=e(97073),d.Clone=e(75974),d.Contains=e(60689),d.ContainsArray=e(86875),d.ContainsPoint=e(51532),d.CopyFrom=e(42538),d.Decompose=e(18680),d.Equals=e(29977),d.GetPoint=e(56088),d.GetPoints=e(24402),d.InCenter=e(83648),d.Perimeter=e(95290),d.Offset=e(9640),d.Random=e(99761),d.Rotate=e(21934),d.RotateAroundPoint=e(68454),d.RotateAroundXY=e(19211),l.exports=d},27395:l=>{/** 3008 * @author Richard Davey <[email protected]> 3009 * @copyright 2013-2023 Photon Storm Ltd. 3010 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3011 */var T=function(e,d,g){return{gameObject:e,enabled:!0,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:d,hitAreaCallback:g,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragX:0,dragY:0}};l.exports=T},18104:l=>{/** 3012 * @author Richard Davey <[email protected]> 3013 * @copyright 2013-2023 Photon Storm Ltd. 3014 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3015 */var T=function(e,d){return function(g,r,a,h){var n=e.getPixelAlpha(r,a,h.texture.key,h.frame.name);return n&&n>=d}};l.exports=T},69898:(l,T,e)=>{/** 3016 * @author Richard Davey <[email protected]> 3017 * @copyright 2013-2023 Photon Storm Ltd. 3018 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3019 */var d=e(56694),g=e(72687),r=e(6659),a=e(33963),h=e(97081),n=e(71064),o=e(7905),f=e(40398),u=e(37579),v=e(69360),m=e(64462),p=new d({initialize:function(y,P){this.game=y,this.scaleManager,this.canvas,this.config=P,this.enabled=!0,this.events=new r,this.isOver=!0,this.defaultCursor="",this.keyboard=P.inputKeyboard?new n(this):null,this.mouse=P.inputMouse?new o(this):null,this.touch=P.inputTouch?new u(this):null,this.pointers=[],this.pointersTotal=P.inputActivePointers,P.inputTouch&&this.pointersTotal===1&&(this.pointersTotal=2);for(var b=0;b<=this.pointersTotal;b++){var E=new f(this,b);E.smoothFactor=P.inputSmoothFactor,this.pointers.push(E)}this.mousePointer=P.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],y.events.once(h.BOOT,this.boot,this)},boot:function(){var x=this.game,y=x.events;this.canvas=x.canvas,this.scaleManager=x.scale,this.events.emit(a.MANAGER_BOOT),y.on(h.PRE_RENDER,this.preRender,this),y.once(h.DESTROY,this.destroy,this)},setCanvasOver:function(x){this.isOver=!0,this.events.emit(a.GAME_OVER,x)},setCanvasOut:function(x){this.isOver=!1,this.events.emit(a.GAME_OUT,x)},preRender:function(){var x=this.game.loop.now,y=this.game.loop.delta,P=this.game.scene.getScenes(!0,!0);this.time=x,this.events.emit(a.MANAGER_UPDATE);for(var b=0;b<P.length;b++){var E=P[b];if(E.sys.input&&E.sys.input.updatePoll(x,y)&&this.globalTopOnly)return}},setDefaultCursor:function(x){this.defaultCursor=x,this.canvas.style.cursor!==x&&(this.canvas.style.cursor=x)},setCursor:function(x){x.cursor&&(this.canvas.style.cursor=x.cursor)},resetCursor:function(x){x.cursor&&this.canvas&&(this.canvas.style.cursor=this.defaultCursor)},addPointer:function(x){x===void 0&&(x=1);var y=[];this.pointersTotal+x>10&&(x=10-this.pointersTotal);for(var P=0;P<x;P++){var b=this.pointers.length,E=new f(this,b);E.smoothFactor=this.config.inputSmoothFactor,this.pointers.push(E),this.pointersTotal++,y.push(E)}return y},updateInputPlugins:function(x,y){var P=this.game.scene.getScenes(!1,!0);this._tempSkip=!1;for(var b=0;b<P.length;b++){var E=P[b];if(E.sys.input){var M=E.sys.input.update(x,y);if(M&&this.globalTopOnly||this._tempSkip)return}}},onTouchStart:function(x){for(var y=this.pointers,P=[],b=0;b<x.changedTouches.length;b++)for(var E=x.changedTouches[b],M=1;M<this.pointersTotal;M++){var w=y[M];
3019if(!w.active){w.touchstart(E,x),this.activePointer=w,P.push(w);break}}this.updateInputPlugins(g.TOUCH_START,P)},onTouchMove:function(x){for(var y=this.pointers,P=[],b=0;b<x.changedTouches.length;b++)for(var E=x.changedTouches[b],M=1;M<this.pointersTotal;M++){var w=y[M];if(w.active&&w.identifier===E.identifier){var A=document.elementFromPoint(E.pageX,E.pageY),R=A===this.canvas;!this.isOver&&R?this.setCanvasOver(x):this.isOver&&!R&&this.setCanvasOut(x),this.isOver&&(w.touchmove(E,x),this.activePointer=w,P.push(w));break}}this.updateInputPlugins(g.TOUCH_MOVE,P)},onTouchEnd:function(x){for(var y=this.pointers,P=[],b=0;b<x.changedTouches.length;b++)for(var E=x.changedTouches[b],M=1;M<this.pointersTotal;M++){var w=y[M];if(w.active&&w.identifier===E.identifier){w.touchend(E,x),P.push(w);break}}this.updateInputPlugins(g.TOUCH_END,P)},onTouchCancel:function(x){for(var y=this.pointers,P=[],b=0;b<x.changedTouches.length;b++)for(var E=x.changedTouches[b],M=1;M<this.pointersTotal;M++){var w=y[M];if(w.active&&w.identifier===E.identifier){w.touchcancel(E,x),P.push(w);break}}this.updateInputPlugins(g.TOUCH_CANCEL,P)},onMouseDown:function(x){var y=this.mousePointer;y.down(x),y.updateMotion(),this.activePointer=y,this.updateInputPlugins(g.MOUSE_DOWN,this.mousePointerContainer)},onMouseMove:function(x){var y=this.mousePointer;y.move(x),y.updateMotion(),this.activePointer=y,this.updateInputPlugins(g.MOUSE_MOVE,this.mousePointerContainer)},onMouseUp:function(x){var y=this.mousePointer;y.up(x),y.updateMotion(),this.activePointer=y,this.updateInputPlugins(g.MOUSE_UP,this.mousePointerContainer)},onMouseWheel:function(x){var y=this.mousePointer;y.wheel(x),this.activePointer=y,this.updateInputPlugins(g.MOUSE_WHEEL,this.mousePointerContainer)},onPointerLockChange:function(x){var y=this.mouse.locked;this.mousePointer.locked=y,this.events.emit(a.POINTERLOCK_CHANGE,x,y)},inputCandidate:function(x,y){var P=x.input;if(!P||!P.enabled||!x.willRender(y))return!1;var b=!0,E=x.parentContainer;if(E)do{if(!E.willRender(y)){b=!1;break}E=E.parentContainer}while(E);return b},hitTest:function(x,y,P,b){b===void 0&&(b=this._tempHitTest);var E=this._tempPoint,M=P.scrollX,w=P.scrollY;b.length=0;var A=x.x,R=x.y;P.getWorldPoint(A,R,E),x.worldX=E.x,x.worldY=E.y;for(var L={x:0,y:0},O=this._tempMatrix,I=this._tempMatrix2,D=0;D<y.length;D++){var B=y[D];if(this.inputCandidate(B,P)){var z=E.x+M*B.scrollFactorX-M,X=E.y+w*B.scrollFactorY-w;B.parentContainer?(B.getWorldTransformMatrix(O,I),O.applyInverse(z,X,L)):m(z,X,B.x,B.y,B.rotation,B.scaleX,B.scaleY,L),this.pointWithinHitArea(B,L.x,L.y)&&b.push(B)}}return b},pointWithinHitArea:function(x,y,P){y+=x.displayOriginX,P+=x.displayOriginY;var b=x.input;return b&&b.hitAreaCallback(b.hitArea,y,P,x)?(b.localX=y,b.localY=P,!0):!1},pointWithinInteractiveObject:function(x,y,P){return x.hitArea?(y+=x.gameObject.displayOriginX,P+=x.gameObject.displayOriginY,x.localX=y,x.localY=P,x.hitAreaCallback(x.hitArea,y,P,x)):!1},transformPointer:function(x,y,P,b){var E=x.position,M=x.prevPosition;M.x=E.x,M.y=E.y;var w=this.scaleManager.transformX(y),A=this.scaleManager.transformY(P),R=x.smoothFactor;!b||R===0?(E.x=w,E.y=A):(E.x=w*R+M.x*(1-R),E.y=A*R+M.y*(1-R))},destroy:function(){this.events.removeAllListeners(),this.game.events.off(h.PRE_RENDER),this.keyboard&&this.keyboard.destroy(),this.mouse&&this.mouse.destroy(),this.touch&&this.touch.destroy();for(var x=0;x<this.pointers.length;x++)this.pointers[x].destroy();this.pointers=[],this._tempHitTest=[],this._tempMatrix.destroy(),this.canvas=null,this.game=null}});l.exports=p},12499:(l,T,e)=>{/** 3020 * @author Richard Davey <[email protected]> 3021 * @copyright 2013-2023 Photon Storm Ltd. 3022 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3023 */var d=e(26673),g=e(65650),r=e(56694),a=e(72687),h=e(27395),n=e(18104),o=e(53996),f=e(95669),u=e(72313),v=e(33963),m=e(6659),p=e(72632),x=e(52394),y=e(63399),P=e(42911),b=e(91963),E=e(74118),M=e(94287),w=e(7599),A=e(66349),R=e(60689),L=new r({Extends:m,initialize:function(I){m.call(this),this.scene=I,this.systems=I.sys,this.settings=I.sys.settings,this.manager=I.sys.game.input,this.pluginEvents=new m,this.enabled=!0,this.displayList,this.cameras,y.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0;var D={cancelled:!1};this._eventContainer={stopPropagation:function(){D.cancelled=!0}},this._eventData=D,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:[]}
3023,this._validTypes=["onDown","onUp","onOver","onOut","onMove","onDragStart","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDrop"],this._updatedThisFrame=!1,I.sys.events.once(w.BOOT,this.boot,this),I.sys.events.on(w.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(w.DESTROY,this.destroy,this),this.pluginEvents.emit(v.BOOT)},start:function(){var O=this.systems.events;O.on(w.TRANSITION_START,this.transitionIn,this),O.on(w.TRANSITION_OUT,this.transitionOut,this),O.on(w.TRANSITION_COMPLETE,this.transitionComplete,this),O.on(w.PRE_UPDATE,this.preUpdate,this),O.once(w.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,I=this._pendingInsertion,D=O.length,B=I.length;if(!(D===0&&B===0)){for(var z=this._list,X=0;X<D;X++){var W=O[X],j=z.indexOf(W);j>-1&&(z.splice(j,1),this.clear(W,!0))}this._pendingRemoval.length=0,this._list=z.concat(I.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.canInput()},updatePoll:function(O,I){if(!this.isActive())return!1;if(this.pluginEvents.emit(v.UPDATE,O,I),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var D,B=this.manager,z=B.pointers,X=B.pointersTotal;for(D=0;D<X;D++)z[D].updateMotion();if(this._list.length===0)return!1;var W=this.pollRate;if(W===-1)return!1;if(W>0)if(this._pollTimer-=I,this._pollTimer<0)this._pollTimer=this.pollRate;else return!1;var j=!1;for(D=0;D<X;D++){var N=0,Y=z[D];this._tempZones=[],this._temp=this.hitTestPointer(Y),this.sortGameObjects(this._temp,Y),this.sortDropZones(this._tempZones),this.topOnly&&(this._temp.length&&this._temp.splice(1),this._tempZones.length&&this._tempZones.splice(1)),N+=this.processOverOutEvents(Y),this.getDragState(Y)===2&&this.processDragThresholdEvent(Y,O),N>0&&(j=!0)}return j},update:function(O,I){if(!this.isActive())return!1;for(var D=I.length,B=!1,z=0;z<D;z++){var X=0,W=I[z];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)),O){case a.MOUSE_DOWN:X+=this.processDragDownEvent(W),X+=this.processDownEvents(W),X+=this.processOverOutEvents(W);break;case a.MOUSE_UP:X+=this.processDragUpEvent(W),X+=this.processUpEvents(W),X+=this.processOverOutEvents(W);break;case a.TOUCH_START:X+=this.processDragDownEvent(W),X+=this.processDownEvents(W),X+=this.processOverEvents(W);break;case a.TOUCH_END:case a.TOUCH_CANCEL:X+=this.processDragUpEvent(W),X+=this.processUpEvents(W),X+=this.processOutEvents(W);break;case a.MOUSE_MOVE:case a.TOUCH_MOVE:X+=this.processDragMoveEvent(W),X+=this.processMoveEvents(W),X+=this.processOverOutEvents(W);break;case a.MOUSE_WHEEL:X+=this.processWheelEvent(W);break}X>0&&(B=!0)}return this._updatedThisFrame=!0,B},clear:function(O,I){I===void 0&&(I=!1),this.disable(O);var D=O.input;D&&(this.removeDebug(O),D.gameObject=void 0,D.target=void 0,D.hitArea=void 0,D.hitAreaCallback=void 0,D.callbackContext=void 0,O.input=null),I||this.queueForRemoval(O);var B=this._draggable.indexOf(O);return B>-1&&this._draggable.splice(B,1),O},disable:function(O){var I=O.input;I&&(I.enabled=!1,I.dragState=0);var D=this._temp,B=this._drag,z=this._over,X=this.manager,W=D.indexOf(O);W>-1&&D.splice(W,1);for(var j=0;j<X.pointersTotal;j++)W=B[j].indexOf(O),W>-1&&B[j].splice(W,1),W=z[j].indexOf(O),W>-1&&(z[j].splice(W,1),X.resetCursor(I));return this},enable:function(O,I,D,B){return B===void 0&&(B=!1),O.input?O.input.enabled=!0:this.setHitArea(O,I,D),O.input&&B&&!O.input.dropZone&&(O.input.dropZone=B),this},hitTestPointer:function(O){for(var I=this.cameras.getCamerasBelowPointer(O),D=0;D<I.length;D++){for(var B=I[D],z=this.manager.hitTest(O,this._list,B),X=0;X<z.length;X++){var W=z[X];W.input.dropZone&&this._tempZones.push(W)}if(z.length>0)return O.camera=B,z}return O.camera=I[0],[]},processDownEvents:function(O){var I=0,D=this._temp,B=this._eventData,z=this._eventContainer;B.cancelled=!1;for(var X=!1,W=0;W<D.length;W++){var j=D[W];if(!(!j.input||!j.input.enabled)){if(I++,j.emit(v.GAMEOBJECT_POINTER_DOWN,O,j.input.localX,j.input.localY,z),B.cancelled||!j.input||!j.input.enabled){X=!0;break}
3023if(this.emit(v.GAMEOBJECT_DOWN,O,j,z),B.cancelled||!j.input){X=!0;break}}}return!X&&this.manager&&(O.downElement===this.manager.game.canvas?this.emit(v.POINTER_DOWN,O,D):this.emit(v.POINTER_DOWN_OUTSIDE,O)),I},getDragState:function(O){return this._dragState[O.id]},setDragState:function(O,I){this._dragState[O.id]=I},processDragThresholdEvent:function(O,I){var D=!1,B=this.dragTimeThreshold,z=this.dragDistanceThreshold;if((z>0&&o(O.x,O.y,O.downX,O.downY)>=z||B>0&&I>=O.downTime+B)&&(D=!0),D)return this.setDragState(O,3),this.processDragStartList(O)},processDragStartList:function(O){if(this.getDragState(O)!==3)return 0;for(var I=this._drag[O.id],D=0;D<I.length;D++){var B=I[D],z=B.input;z.dragState=2,z.dragStartX=B.x,z.dragStartY=B.y,z.dragStartXGlobal=O.worldX,z.dragStartYGlobal=O.worldY,z.dragX=z.dragStartXGlobal-z.dragStartX,z.dragY=z.dragStartYGlobal-z.dragStartY,B.emit(v.GAMEOBJECT_DRAG_START,O,z.dragX,z.dragY),this.emit(v.DRAG_START,O,B)}return this.setDragState(O,4),I.length},processDragDownEvent:function(O){var I=this._temp;if(this._draggable.length===0||I.length===0||!O.primaryDown||this.getDragState(O)!==0)return 0;this.setDragState(O,1);for(var D=[],B=0;B<I.length;B++){var z=I[B];z.input.draggable&&z.input.dragState===0&&D.push(z)}return D.length===0?(this.setDragState(O,0),0):(D.length>1&&(this.sortGameObjects(D,O),this.topOnly&&D.splice(1)),this._drag[O.id]=D,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;for(var I=this._tempZones,D=this._drag[O.id],B=0;B<D.length;B++){var z=D[B],X=z.input,W=X.target;if(W){var j=I.indexOf(W);j===0?(z.emit(v.GAMEOBJECT_DRAG_OVER,O,W),this.emit(v.DRAG_OVER,O,z,W)):j>0?(z.emit(v.GAMEOBJECT_DRAG_LEAVE,O,W),this.emit(v.DRAG_LEAVE,O,z,W),X.target=I[0],W=X.target,z.emit(v.GAMEOBJECT_DRAG_ENTER,O,W),this.emit(v.DRAG_ENTER,O,z,W)):(z.emit(v.GAMEOBJECT_DRAG_LEAVE,O,W),this.emit(v.DRAG_LEAVE,O,z,W),I[0]?(X.target=I[0],W=X.target,z.emit(v.GAMEOBJECT_DRAG_ENTER,O,W),this.emit(v.DRAG_ENTER,O,z,W)):X.target=null)}else!W&&I[0]&&(X.target=I[0],W=X.target,z.emit(v.GAMEOBJECT_DRAG_ENTER,O,W),this.emit(v.DRAG_ENTER,O,z,W));var N,Y;if(!z.parentContainer)N=O.worldX-X.dragX,Y=O.worldY-X.dragY;else{var F=O.worldX-X.dragStartXGlobal,G=O.worldY-X.dragStartYGlobal,k=z.getParentRotation(),V=F*Math.cos(k)+G*Math.sin(k),U=G*Math.cos(k)-F*Math.sin(k);V*=1/z.parentContainer.scaleX,U*=1/z.parentContainer.scaleY,N=V+X.dragStartX,Y=U+X.dragStartY}z.emit(v.GAMEOBJECT_DRAG,O,N,Y),this.emit(v.DRAG,O,z,N,Y)}return D.length},processDragUpEvent:function(O){for(var I=this._drag[O.id],D=0;D<I.length;D++){var B=I[D],z=B.input;if(z&&z.dragState===2){z.dragState=0,z.dragX=z.localX-B.displayOriginX,z.dragY=z.localY-B.displayOriginY;var X=!1,W=z.target;W&&(B.emit(v.GAMEOBJECT_DROP,O,W),this.emit(v.DROP,O,B,W),z.target=null,X=!0),B.input&&B.input.enabled&&(B.emit(v.GAMEOBJECT_DRAG_END,O,z.dragX,z.dragY,X),this.emit(v.DRAG_END,O,B,X))}}return this.setDragState(O,0),I.splice(0),0},processMoveEvents:function(O){var I=0,D=this._temp,B=this._eventData,z=this._eventContainer;B.cancelled=!1;for(var X=!1,W=0;W<D.length;W++){var j=D[W];if(!(!j.input||!j.input.enabled)){if(I++,j.emit(v.GAMEOBJECT_POINTER_MOVE,O,j.input.localX,j.input.localY,z),B.cancelled||!j.input||!j.input.enabled){X=!0;break}
3023if(this.emit(v.GAMEOBJECT_MOVE,O,j,z),B.cancelled||!j.input||!j.input.enabled){X=!0;break}if(this.topOnly)break}}return X||this.emit(v.POINTER_MOVE,O,D),I},processWheelEvent:function(O){var I=0,D=this._temp,B=this._eventData,z=this._eventContainer;B.cancelled=!1;for(var X=!1,W=O.deltaX,j=O.deltaY,N=O.deltaZ,Y=0;Y<D.length;Y++){var F=D[Y];if(!(!F.input||!F.input.enabled)){if(I++,F.emit(v.GAMEOBJECT_POINTER_WHEEL,O,W,j,N,z),B.cancelled||!F.input||!F.input.enabled){X=!0;break}if(this.emit(v.GAMEOBJECT_WHEEL,O,F,W,j,N,z),B.cancelled||!F.input||!F.input.enabled){X=!0;break}}}return X||this.emit(v.POINTER_WHEEL,O,D,W,j,N),I},processOverEvents:function(O){var I=this._temp,D=0,B=I.length,z=[];if(B>0){var X=this.manager,W=this._eventData,j=this._eventContainer;W.cancelled=!1;for(var N=!1,Y=0;Y<B;Y++){var F=I[Y];if(!(!F.input||!F.input.enabled)){if(z.push(F),X.setCursor(F.input),F.emit(v.GAMEOBJECT_POINTER_OVER,O,F.input.localX,F.input.localY,j),D++,W.cancelled||!F.input||!F.input.enabled){N=!0;break}if(this.emit(v.GAMEOBJECT_OVER,O,F,j),W.cancelled||!F.input||!F.input.enabled){N=!0;break}}}N||this.emit(v.POINTER_OVER,O,z)}return this._over[O.id]=z,D},processOutEvents:function(O){var I=this._over[O.id],D=0,B=I.length;if(B>0){var z=this.manager,X=this._eventData,W=this._eventContainer;X.cancelled=!1;var j=!1;this.sortGameObjects(I,O);for(var N=0;N<B;N++){var Y=I[N];if(Y=I[N],!(!Y.input||!Y.input.enabled)){if(z.resetCursor(Y.input),Y.emit(v.GAMEOBJECT_POINTER_OUT,O,W),D++,X.cancelled||!Y.input||!Y.input.enabled){j=!0;break}
3023if(this.emit(v.GAMEOBJECT_OUT,O,Y,W),X.cancelled||!Y.input||!Y.input.enabled){j=!0;break}j||this.emit(v.POINTER_OUT,O,I)}}this._over[O.id]=[]}return D},processOverOutEvents:function(O){var I=this._temp,D,B,z=[],X=[],W=[],j=this._over[O.id],N=this._drag[O.id],Y=this.manager;for(D=0;D<j.length;D++)B=j[D],I.indexOf(B)===-1&&N.indexOf(B)===-1?z.push(B):W.push(B);for(D=0;D<I.length;D++)B=I[D],j.indexOf(B)===-1&&X.push(B);var F=z.length,G=0,k=this._eventData,V=this._eventContainer;k.cancelled=!1;var U=!1;if(F>0){for(this.sortGameObjects(z,O),D=0;D<F;D++)if(B=z[D],!(!B.input||!B.input.enabled)){if(Y.resetCursor(B.input),B.emit(v.GAMEOBJECT_POINTER_OUT,O,V),G++,k.cancelled||!B.input||!B.input.enabled){U=!0;break}if(this.emit(v.GAMEOBJECT_OUT,O,B,V),k.cancelled||!B.input||!B.input.enabled){U=!0;break}}U||this.emit(v.POINTER_OUT,O,z)}if(F=X.length,k.cancelled=!1,U=!1,F>0){for(this.sortGameObjects(X,O),D=0;D<F;D++)if(B=X[D],!(!B.input||!B.input.enabled)){if(Y.setCursor(B.input),B.emit(v.GAMEOBJECT_POINTER_OVER,O,B.input.localX,B.input.localY,V),G++,k.cancelled||!B.input||!B.input.enabled){U=!0;break}
3023if(this.emit(v.GAMEOBJECT_OVER,O,B,V),k.cancelled||!B.input||!B.input.enabled){U=!0;break}}U||this.emit(v.POINTER_OVER,O,X)}return j=W.concat(X),this._over[O.id]=this.sortGameObjects(j,O),G},processUpEvents:function(O){var I=this._temp,D=this._eventData,B=this._eventContainer;D.cancelled=!1;for(var z=!1,X=0;X<I.length;X++){var W=I[X];if(!(!W.input||!W.input.enabled)){if(W.emit(v.GAMEOBJECT_POINTER_UP,O,W.input.localX,W.input.localY,B),D.cancelled||!W.input||!W.input.enabled){z=!0;break}if(this.emit(v.GAMEOBJECT_UP,O,W,B),D.cancelled||!W.input||!W.input.enabled){z=!0;break}}}return!z&&this.manager&&(O.upElement===this.manager.game.canvas?this.emit(v.POINTER_UP,O,I):this.emit(v.POINTER_UP_OUTSIDE,O)),I.length},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,I){I===void 0&&(I=!0),Array.isArray(O)||(O=[O]);for(var D=0;D<O.length;D++){var B=O[D];B.input.draggable=I;var z=this._draggable.indexOf(B);I&&z===-1?this._draggable.push(B):!I&&z>-1&&this._draggable.splice(z,1)}return this},makePixelPerfect:function(O){O===void 0&&(O=1);var I=this.systems.textures;return n(I,O)},setHitArea:function(O,I,D){if(I===void 0)return this.setHitAreaFromTexture(O);Array.isArray(O)||(O=[O]);var B=!1,z=!1,X=!1,W=!1,j=!1,N=!0;if(P(I)){var Y=I;I=p(Y,"hitArea",null),D=p(Y,"hitAreaCallback",null),B=p(Y,"draggable",!1),z=p(Y,"dropZone",!1),X=p(Y,"cursor",!1),W=p(Y,"useHandCursor",!1),j=p(Y,"pixelPerfect",!1);var F=p(Y,"alphaTolerance",1);j&&(I={},D=this.makePixelPerfect(F)),(!I||!D)&&(this.setHitAreaFromTexture(O),N=!1)}else typeof I=="function"&&!D&&(D=I,I={});for(var G=0;G<O.length;G++){var k=O[G];if(j&&k.type==="Container"){console.warn("Cannot pixelPerfect test a Container. Use a custom callback.");continue}var V=k.input?k.input:h(k,I,D);V.customHitArea=N,V.dropZone=z,V.cursor=W?"pointer":X,k.input=V,B&&this.setDraggable(k),this.queueForInsertion(k)}return this},setHitAreaCircle:function(O,I,D,B,z){z===void 0&&(z=g);var X=new d(I,D,B);return this.setHitArea(O,X,z)},setHitAreaEllipse:function(O,I,D,B,z,X){X===void 0&&(X=u);var W=new f(I,D,B,z);return this.setHitArea(O,W,X)},setHitAreaFromTexture:function(O,I){I===void 0&&(I=M),Array.isArray(O)||(O=[O]);for(var D=0;D<O.length;D++){var B=O[D],z=B.frame,X=0,W=0;if(B.width?(X=B.width,W=B.height):z&&(X=z.realWidth,W=z.realHeight),B.type==="Container"&&(X===0||W===0)){console.warn("Container.setInteractive must specify a Shape or call setSize() first");continue}X!==0&&W!==0&&(B.input=h(B,new E(0,0,X,W),I),this.queueForInsertion(B))}return this},setHitAreaRectangle:function(O,I,D,B,z,X){X===void 0&&(X=M);var W=new E(I,D,B,z);return this.setHitArea(O,W,X)},setHitAreaTriangle:function(O,I,D,B,z,X,W,j){j===void 0&&(j=R);var N=new A(I,D,B,z,X,W);return this.setHitArea(O,N,j)},enableDebug:function(O,I){I===void 0&&(I=65280);var D=O.input;if(!D||!D.hitArea)return this;var B=D.hitArea,z=B.type,X=D.hitAreaDebug,W=this.systems.add,j=this.systems.updateList;X&&(j.remove(X),X.destroy(),X=null);var N=0,Y=0;switch(z){case x.CIRCLE:X=W.arc(0,0,B.radius),N=B.x-B.radius,Y=B.y-B.radius;break;case x.ELLIPSE:X=W.ellipse(0,0,B.width,B.height),N=B.x-B.width/2,Y=B.y-B.height/2;break;case x.LINE:X=W.line(0,0,B.x1,B.y1,B.x2,B.y2);break;case x.POLYGON:X=W.polygon(0,0,B.points);break;case x.RECTANGLE:X=W.rectangle(0,0,B.width,B.height),N=B.x,Y=B.y;break;case x.TRIANGLE:X=W.triangle(0,0,B.x1,B.y1,B.x2,B.y2,B.x3,B.y3);break}return X&&(X.isFilled=!1,X.strokeColor=I,X.preUpdate=function(){X.setStrokeStyle(1/O.scale,X.strokeColor),X.setDisplayOrigin(O.displayOriginX,O.displayOriginY);var F=O.x,G=O.y,k=O.rotation,V=O.scaleX,U=O.scaleY;if(O.parentContainer){var $=O.getWorldTransformMatrix();F=$.tx,G=$.ty,k=$.rotation,V=$.scaleX,U=$.scaleY}X.setRotation(k),X.setScale(V,U),X.setPosition(F+N*V,G+Y*U),X.setScrollFactor(O.scrollFactorX,O.scrollFactorY),X.setDepth(O.depth)},j.add(X),D.hitAreaDebug=X),this},removeDebug:function(O){var I=O.input;if(I&&I.hitAreaDebug){var D=I.hitAreaDebug;this.systems.updateList.remove(D),D.destroy(),I.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,I){if(O.length<2||!I.camera)return O;var D=I.camera.renderList;return O.sort(function(B,z){var X=Math.max(D.indexOf(B),0),W=Math.max(D.indexOf(z),0);return W-X})},sortDropZones:function(O){return O.length<2?O:(this.scene.sys.depthSort(),O.sort(this.sortDropZoneHandler.bind(this)))},sortDropZoneHandler:function(O,I){if(!O.parentContainer&&!I.parentContainer)return this.displayList.getIndex(I)-this.displayList.getIndex(O);if(O.parentContainer===I.parentContainer)return I.parentContainer.getIndex(I)-O.parentContainer.getIndex(O);if(O.parentContainer===I)return-1;if(I.parentContainer===O)return 1;for(var D=O.getIndexList(),B=I.getIndexList(),z=Math.min(D.length,B.length),X=0;X<z;X++){var W=D[X],j=B[X];if(W!==j)return j-W}return B.length-D.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 I=this.manager;I.canvas.style.cursor=I.defaultCursor;var D=this.systems.events;D.off(w.TRANSITION_START,this.transitionIn,this),D.off(w.TRANSITION_OUT,this.transitionOut,this),D.off(w.TRANSITION_COMPLETE,this.transitionComplete,this),D.off(w.PRE_UPDATE,this.preUpdate,this),I.events.off(v.GAME_OUT,this.onGameOut,this),I.events.off(v.GAME_OVER,this.onGameOver,this),D.off(w.SHUTDOWN,this.shutdown,this)},resetPointers:function(){for(var O=this.manager.pointers,I=0;I<O.length;I++)O[I].reset()},destroy:function(){this.shutdown(),this.pluginEvents.emit(v.DESTROY),this.pluginEvents.removeAllListeners(),this.scene.sys.events.off(w.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]}}});b.register("InputPlugin",L,"input"),l.exports=L},63399:(l,T,e)=>{/** 3024 * @author Richard Davey <[email protected]> 3025 * @copyright 2013-2023 Photon Storm Ltd. 3026 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3027 */var d=e(10850),g={},r={};r.register=function(a,h,n,o,f){g[a]={plugin:h,mapping:n,settingsKey:o,configKey:f}},r.getPlugin=function(a){return g[a]},r.install=function(a){var h=a.scene.sys,n=h.settings.input,o=h.game.config;for(var f in g){var u=g[f].plugin,v=g[f].mapping,m=g[f].settingsKey,p=g[f].configKey;d(n,m,o[p])&&(a[v]=new u(a))}},r.remove=function(a){g.hasOwnProperty(a)&&delete g[a]},l.exports=r},40398:(l,T,e)=>{/** 3028 * @author Richard Davey <[email protected]> 3029 * @copyright 2013-2023 Photon Storm Ltd. 3030 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3031 */var d=e(90447),g=e(56694),r=e(53996),a=e(88456),h=e(44521),n=e(93736),o=e(36580),f=new g({initialize:function(v,m){this.manager=v,this.id=m,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new n,this.prevPosition=new n,this.midPoint=new n(-1,-1),this.velocity=new n,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=m===0,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(u){var v=u.getWorldPoint(this.x,this.y);return this.worldX=v.x,this.worldY=v.y,this},positionToCamera:function(u,v){return u.getWorldPoint(this.x,this.y,v)},updateMotion:function(){var u=this.position.x,v=this.position.y,m=this.midPoint.x,p=this.midPoint.y;if(!(u===m&&v===p)){var x=h(this.motionFactor,m,u),y=h(this.motionFactor,p,v);a(x,u,.1)&&(x=u),a(y,v,.1)&&(y=v),this.midPoint.set(x,y);var P=u-x,b=v-y;this.velocity.set(P,b),this.angle=d(x,y,u,v),this.distance=Math.sqrt(P*P+b*b)}},up:function(u){"buttons"in u&&(this.buttons=u.buttons),this.event=u,this.button=u.button,this.upElement=u.target,this.manager.transformPointer(this,u.pageX,u.pageY,!1),u.button===0&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y),this.buttons===0&&(this.isDown=!1,this.upTime=u.timeStamp,this.wasTouch=!1)},down:function(u){"buttons"in u&&(this.buttons=u.buttons),this.event=u,this.button=u.button,this.downElement=u.target,this.manager.transformPointer(this,u.pageX,u.pageY,!1),u.button===0&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y),o.macOS&&u.ctrlKey&&(this.buttons=2,this.primaryDown=!1),this.isDown||(this.isDown=!0,this.downTime=u.timeStamp),this.wasTouch=!1},move:function(u){"buttons"in u&&(this.buttons=u.buttons),this.event=u,this.manager.transformPointer(this,u.pageX,u.pageY,!0),this.locked&&(this.movementX=u.movementX||u.mozMovementX||u.webkitMovementX||0,this.movementY=u.movementY||u.mozMovementY||u.webkitMovementY||0),this.moveTime=u.timeStamp,this.wasTouch=!1},wheel:function(u){"buttons"in u&&(this.buttons=u.buttons),this.event=u,this.manager.transformPointer(this,u.pageX,u.pageY,!1),this.deltaX=u.deltaX,this.deltaY=u.deltaY,this.deltaZ=u.deltaZ,this.wasTouch=!1},touchstart:function(u,v){u.pointerId&&(this.pointerId=u.pointerId),this.identifier=u.identifier,this.target=u.target,this.active=!0,this.buttons=1,this.event=v,this.downElement=u.target,this.manager.transformPointer(this,u.pageX,u.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(u,v){this.event=v,this.manager.transformPointer(this,u.pageX,u.pageY,!0),this.moveTime=v.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(u,v){this.buttons=0,this.event=v,this.upElement=u.target,this.manager.transformPointer(this,u.pageX,u.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(u,v){this.buttons=0,this.event=v,this.upElement=u.target,this.manager.transformPointer(this,u.pageX,u.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.button===0&&!this.isDown},rightButtonReleased:function(){return this.button===2&&!this.isDown},middleButtonReleased:function(){return this.button===1&&!this.isDown},backButtonReleased:function(){return this.button===3&&!this.isDown},forwardButtonReleased:function(){return this.button===4&&!this.isDown},getDistance:function(){return this.isDown?r(this.downX,this.downY,this.x,this.y):r(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?d(this.downX,this.downY,this.x,this.y):d(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(u,v){u===void 0&&(u=10),v===void 0&&(v=[]);for(var m=this.prevPosition.x,p=this.prevPosition.y,x=this.position.x,y=this.position.y,P=0;P<u;P++){var b=1/u*P;v[P]={x:h(b,m,x),y:h(b,p,y)}}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(u){this.position.x=u}},y:{get:function(){return this.position.y},set:function(u){this.position.y=u}},time:{get:function(){return this.event?this.event.timeStamp:0}}});l.exports=f},72687:l=>{/** 3032 * @author Richard Davey <[email protected]> 3033 * @copyright 2013-2023 Photon Storm Ltd. 3034 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3035 */var T={MOUSE_DOWN:0,MOUSE_MOVE:1,MOUSE_UP:2,TOUCH_START:3,TOUC
3035H_MOVE:4,TOUCH_END:5,POINTER_LOCK_CHANGE:6,TOUCH_CANCEL:7,MOUSE_WHEEL:8};l.exports=T},14874:l=>{/** 3036 * @author Richard Davey <[email protected]> 3037 * @copyright 2013-2023 Photon Storm Ltd. 3038 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3039 */l.exports="boot"},54168:l=>{/** 3040 * @author Richard Davey <[email protected]> 3041 * @copyright 2013-2023 Photon Storm Ltd. 3042 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3043 */l.exports="destroy"},526:l=>{/** 3044 * @author Richard Davey <[email protected]> 3045 * @copyright 2013-2023 Photon Storm Ltd. 3046 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3047 */l.exports="dragend"},81623:l=>{/** 3048 * @author Richard Davey <[email protected]> 3049 * @copyright 2013-2023 Photon Storm Ltd. 3050 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3051 */l.exports="dragenter"},94472:l=>{/** 3052 * @author Richard Davey <[email protected]> 3053 * @copyright 2013-2023 Photon Storm Ltd. 3054 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3055 */l.exports="drag"},9304:l=>{/** 3056 * @author Richard Davey <[email protected]> 3057 * @copyright 2013-2023 Photon Storm Ltd. 3058 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3059 */l.exports="dragleave"},34265:l=>{/** 3060 * @author Richard Davey <[email protected]> 3061 * @copyright 2013-2023 Photon Storm Ltd. 3062 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3063 */l.exports="dragover"},50151:l=>{/** 3064 * @author Richard Davey <[email protected]> 3065 * @copyright 2013-2023 Photon Storm Ltd. 3066 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3067 */l.exports="dragstart"},98134:l=>{/** 3068 * @author Richard Davey <[email protected]> 3069 * @copyright 2013-2023 Photon Storm Ltd. 3070 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3071 */l.exports="drop"},56773:l=>{/** 3072 * @author Richard Davey <[email protected]> 3073 * @copyright 2013-2023 Photon Storm Ltd. 3074 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3075 */l.exports="gameobjectdown"},45824:l=>{/** 3076 * @author Richard Davey <[email protected]> 3077 * @copyright 2013-2023 Photon Storm Ltd. 3078 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3079 */l.exports="dragend"},39578:l=>{/** 3080 * @author Richard Davey <[email protected]> 3081 * @copyright 2013-2023 Photon Storm Ltd. 3082 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3083 */l.exports="dragenter"},72072:l=>{/** 3084 * @author Richard Davey <[email protected]> 3085 * @copyright 2013-2023 Photon Storm Ltd. 3086 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3087 */l.exports="drag"},82569:l=>{/** 3088 * @author Richard Davey <[email protected]> 3089 * @copyright 2013-2023 Photon Storm Ltd. 3090 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3091 */l.exports="dragleave"},70833:l=>{/** 3092 * @author Richard Davey <[email protected]> 3093 * @copyright 2013-2023 Photon Storm Ltd. 3094 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3095 */l.exports="dragover"},81442:l=>{/** 3096 * @author Richard Davey <[email protected]> 3097 * @copyright 2013-2023 Photon Storm Ltd. 3098 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3099 */l.exports="dragstart"},32936:l=>{/** 3100 * @author Richard Davey <[email protected]> 3101 * @copyright 2013-2023 Photon Storm Ltd. 3102 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3103 */l.exports="drop"},99658:l=>{/** 3104 * @author Richard Davey <[email protected]> 3105 * @copyright 2013-2023 Photon Storm Ltd. 3106 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3107 */l.exports="gameobjectmove"},60515:l=>{/** 3108 * @author Richard Davey <[email protected]> 3109 * @copyright 2013-2023 Photon Storm Ltd. 3110 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3111 */l.exports="gameobjectout"},55254:l=>{/** 3112 * @author Richard Davey <[email protected]> 3113 * @copyright 2013-2023 Photon Storm Ltd. 3114 * @license {@link https://opensource.org/licenses/MIT|MIT License}
3115 */l.exports="gameobjectover"},34782:l=>{/** 3116 * @author Richard Davey <[email protected]> 3117 * @copyright 2013-2023 Photon Storm Ltd. 3118 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3119 */l.exports="pointerdown"},41769:l=>{/** 3120 * @author Richard Davey <[email protected]> 3121 * @copyright 2013-2023 Photon Storm Ltd. 3122 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3123 */l.exports="pointermove"},65588:l=>{/** 3124 * @author Richard Davey <[email protected]> 3125 * @copyright 2013-2023 Photon Storm Ltd. 3126 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3127 */l.exports="pointerout"},61640:l=>{/** 3128 * @author Richard Davey <[email protected]> 3129 * @copyright 2013-2023 Photon Storm Ltd. 3130 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3131 */l.exports="pointerover"},49342:l=>{/** 3132 * @author Richard Davey <[email protected]> 3133 * @copyright 2013-2023 Photon Storm Ltd. 3134 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3135 */l.exports="pointerup"},82662:l=>{/** 3136 * @author Richard Davey <[email protected]> 3137 * @copyright 2013-2023 Photon Storm Ltd. 3138 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3139 */l.exports="wheel"},13058:l=>{/** 3140 * @author Richard Davey <[email protected]> 3141 * @copyright 2013-2023 Photon Storm Ltd. 3142 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3143 */l.exports="gameobjectup"},52426:l=>{/** 3144 * @author Richard Davey <[email protected]> 3145 * @copyright 2013-2023 Photon Storm Ltd. 3146 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3147 */l.exports="gameobjectwheel"},78072:l=>{/** 3148 * @author Richard Davey <[email protected]> 3149 * @copyright 2013-2023 Photon Storm Ltd. 3150 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3151 */l.exports="gameout"},1545:l=>{/** 3152 * @author Richard Davey <[email protected]> 3153 * @copyright 2013-2023 Photon Storm Ltd. 3154 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3155 */l.exports="gameover"},67137:l=>{/** 3156 * @author Richard Davey <[email protected]> 3157 * @copyright 2013-2023 Photon Storm Ltd. 3158 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3159 */l.exports="boot"},27678:l=>{/** 3160 * @author Richard Davey <[email protected]> 3161 * @copyright 2013-2023 Photon Storm Ltd. 3162 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3163 */l.exports="process"},22257:l=>{/** 3164 * @author Richard Davey <[email protected]> 3165 * @copyright 2013-2023 Photon Storm Ltd. 3166 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3167 */l.exports="update"},90379:l=>{/** 3168 * @author Richard Davey <[email protected]> 3169 * @copyright 2013-2023 Photon Storm Ltd. 3170 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3171 */l.exports="pointerlockchange"},88909:l=>{/** 3172 * @author Richard Davey <[email protected]> 3173 * @copyright 2013-2023 Photon Storm Ltd. 3174 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3175 */l.exports="pointerdown"},36548:l=>{/** 3176 * @author Richard Davey <[email protected]> 3177 * @copyright 2013-2023 Photon Storm Ltd. 3178 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3179 */l.exports="pointerdownoutside"},18483:l=>{/** 3180 * @author Richard Davey <[email protected]> 3181 * @copyright 2013-2023 Photon Storm Ltd. 3182 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3183 */l.exports="pointermove"},22355:l=>{/** 3184 * @author Richard Davey <[email protected]> 3185 * @copyright 2013-2023 Photon Storm Ltd. 3186 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3187 */l.exports="pointerout"},7997:l=>{/** 3188 * @author Richard Davey <[email protected]> 3189 * @copyright 2013-2023 Photon Storm Ltd. 3190 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3191 */l.exports="pointerover"},66318:l=>{/** 3192 * @author Richard Davey <[email protected]> 3193 * @copyright 2013-2023 Photon Storm Ltd. 3194 * @license {@link https://opensource.org/licenses/MIT|MIT License}
3195 */l.exports="pointerup"},94812:l=>{/** 3196 * @author Richard Davey <[email protected]> 3197 * @copyright 2013-2023 Photon Storm Ltd. 3198 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3199 */l.exports="pointerupoutside"},37310:l=>{/** 3200 * @author Richard Davey <[email protected]> 3201 * @copyright 2013-2023 Photon Storm Ltd. 3202 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3203 */l.exports="wheel"},24196:l=>{/** 3204 * @author Richard Davey <[email protected]> 3205 * @copyright 2013-2023 Photon Storm Ltd. 3206 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3207 */l.exports="preupdate"},27053:l=>{/** 3208 * @author Richard Davey <[email protected]> 3209 * @copyright 2013-2023 Photon Storm Ltd. 3210 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3211 */l.exports="shutdown"},29413:l=>{/** 3212 * @author Richard Davey <[email protected]> 3213 * @copyright 2013-2023 Photon Storm Ltd. 3214 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3215 */l.exports="start"},25165:l=>{/** 3216 * @author Richard Davey <[email protected]> 3217 * @copyright 2013-2023 Photon Storm Ltd. 3218 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3219 */l.exports="update"},33963:(l,T,e)=>{/** 3220 * @author Richard Davey <[email protected]> 3221 * @copyright 2013-2023 Photon Storm Ltd. 3222 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3223 */l.exports={BOOT:e(14874),DESTROY:e(54168),DRAG_END:e(526),DRAG_ENTER:e(81623),DRAG:e(94472),DRAG_LEAVE:e(9304),DRAG_OVER:e(34265),DRAG_START:e(50151),DROP:e(98134),GAME_OUT:e(78072),GAME_OVER:e(1545),GAMEOBJECT_DOWN:e(56773),GAMEOBJECT_DRAG_END:e(45824),GAMEOBJECT_DRAG_ENTER:e(39578),GAMEOBJECT_DRAG:e(72072),GAMEOBJECT_DRAG_LEAVE:e(82569),GAMEOBJECT_DRAG_OVER:e(70833),GAMEOBJECT_DRAG_START:e(81442),GAMEOBJECT_DROP:e(32936),GAMEOBJECT_MOVE:e(99658),GAMEOBJECT_OUT:e(60515),GAMEOBJECT_OVER:e(55254),GAMEOBJECT_POINTER_DOWN:e(34782),GAMEOBJECT_POINTER_MOVE:e(41769),GAMEOBJECT_POINTER_OUT:e(65588),GAMEOBJECT_POINTER_OVER:e(61640),GAMEOBJECT_POINTER_UP:e(49342),GAMEOBJECT_POINTER_WHEEL:e(82662),GAMEOBJECT_UP:e(13058),GAMEOBJECT_WHEEL:e(52426),MANAGER_BOOT:e(67137),MANAGER_PROCESS:e(27678),MANAGER_UPDATE:e(22257),POINTER_DOWN:e(88909),POINTER_DOWN_OUTSIDE:e(36548),POINTER_MOVE:e(18483),POINTER_OUT:e(22355),POINTER_OVER:e(7997),POINTER_UP:e(66318),POINTER_UP_OUTSIDE:e(94812),POINTER_WHEEL:e(37310),POINTERLOCK_CHANGE:e(90379),PRE_UPDATE:e(24196),SHUTDOWN:e(27053),START:e(29413),UPDATE:e(25165)}},70848:(l,T,e)=>{/** 3224 * @author Richard Davey <[email protected]> 3225 * @copyright 2013-2023 Photon Storm Ltd. 3226 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3227 */var d=e(56694),g=new d({initialize:function(a,h){this.pad=a,this.events=a.events,this.index=h,this.value=0,this.threshold=.1},update:function(r){this.value=r},getValue:function(){return Math.abs(this.value)<this.threshold?0:this.value},destroy:function(){this.pad=null,this.events=null}});l.exports=g},21274:(l,T,e)=>{/** 3228 * @author Richard Davey <[email protected]> 3229 * @copyright 2013-2023 Photon Storm Ltd. 3230 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3231 */var d=e(56694),g=e(43200),r=new d({initialize:function(h,n){this.pad=h,this.events=h.manager,this.index=n,this.value=0,this.threshold=1,this.pressed=!1},update:function(a){this.value=a;var h=this.pad,n=this.index;a>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(g.BUTTON_DOWN,h,this,a),this.pad.emit(g.GAMEPAD_BUTTON_DOWN,n,a,this)):this.pressed&&(this.pressed=!1,this.events.emit(g.BUTTON_UP,h,this,a),this.pad.emit(g.GAMEPAD_BUTTON_UP,n,a,this))},destroy:function(){this.pad=null,this.events=null}});l.exports=r},75956:(l,T,e)=>{/** 3232 * @author Richard Davey <[email protected]> 3233 * @copyright 2013-2023 Photon Storm Ltd. 3234 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3235 */var d=e(70848),g=e(21274),r=e(56694),a=e(6659),h=e(93736),n=new r({Extends:a,initialize:function(f,u){a.call(this),this.manager=f,this.pad=u,this.id=u.id,this.index=u.index;for(var v=[],m=0;m<u.buttons.length;m++)v.push(new g(this,m));this.buttons=v;var p=[];for(m=0;m<u.axes.length;m++)p.push(new d(this,m));this.axes=p,this.vibration=u.vibrationActuator;var x={value:0,pressed:!1};this._LCLeft=v[14]?v[14]:x,this._LCRight=v[15]?v[15]:x,this._LCTop=v[12]?v[12]:x,this._LCBottom=v[13]?v[13]:x,this._RCLeft=v[2]?v[2]:x,this._RCRight=v[1]?v[1]:x,this._RCTop=v[3]?v[3]:x,this._RCBottom=v[0]?v[0]:x,this._FBLeftTop=v[4]?v[4]:x,this._FBLeftBottom=v[6]?v[6]:x,this._FBRightTop=v[5]?v[5]:x,this._FBRightBottom=v[7]?v[7]:x;var y={value:0};this._HAxisLeft=p[0]?p[0]:y,this._VAxisLeft=p[1]?p[1]:y,this._HAxisRight=p[2]?p[2]:y,this._VAxisRight=p[3]?p[3]:y,this.leftStick=new h,this.rightStick=new h,this._created=performance.now()},getAxisTotal:function(){return this.axes.length},getAxisValue:function(o){return this.axes[o].getValue()},setAxisThreshold:function(o){for(var f=0;f<this.axes.length;f++)this.axes[f].threshold=o},getButtonTotal:function(){return this.buttons.length},getButtonValue:function(o){return this.buttons[o].value},isButtonDown:function(o){return this.buttons[o].pressed}
3235,update:function(o){if(!(o.timestamp<this._created)){var f,u=this.buttons,v=o.buttons,m=u.length;for(f=0;f<m;f++)u[f].update(v[f].value);var p=this.axes,x=o.axes;for(m=p.length,f=0;f<m;f++)p[f].update(x[f]);m>=2&&(this.leftStick.set(p[0].getValue(),p[1].getValue()),m>=4&&this.rightStick.set(p[2].getValue(),p[3].getValue()))}},destroy:function(){this.removeAllListeners(),this.manager=null,this.pad=null;var o;for(o=0;o<this.buttons.length;o++)this.buttons[o].destroy();for(o=0;o<this.axes.length;o++)this.axes[o].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}}});l.exports=n},1379:(l,T,e)=>{/** 3236 * @author Richard Davey <[email protected]> 3237 * @copyright 2013-2023 Photon Storm Ltd. 3238 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3239 */var d=e(56694),g=e(6659),r=e(43200),a=e(75956),h=e(10850),n=e(63399),o=e(33963),f=new d({Extends:g,initialize:function(v){g.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(o.BOOT,this.boot,this),v.pluginEvents.on(o.START,this.start,this)},boot:function(){var u=this.scene.sys.game,v=this.settings.input,m=u.config;this.enabled=h(v,"gamepad",m.inputGamepad)&&u.device.input.gamepads,this.target=h(v,"gamepad.target",m.inputGamepadEventTarget),this.sceneInputPlugin.pluginEvents.once(o.DESTROY,this.destroy,this)},start:function(){this.enabled&&(this.startListeners(),this.refreshPads()),this.sceneInputPlugin.pluginEvents.once(o.SHUTDOWN,this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var u=this,v=this.target,m=function(p){p.defaultPrevented||!u.isActive()||(u.refreshPads(),u.queue.push(p))};this.onGamepadHandler=m,v.addEventListener("gamepadconnected",m,!1),v.addEventListener("gamepaddisconnected",m,!1),this.sceneInputPlugin.pluginEvents.on(o.UPDATE,this.update,this)},stopListeners:function(){this.target.removeEventListener("gamepadconnected",this.onGamepadHandler),this.target.removeEventListener("gamepaddisconnected",this.onGamepadHandler),this.sceneInputPlugin.pluginEvents.off(o.UPDATE,this.update);for(var u=0;u<this.gamepads.length;u++)this.gamepads[u].removeAllListeners()},disconnectAll:function(){for(var u=0;u<this.gamepads.length;u++)this.gamepads[u].pad.connected=!1},refreshPads:function(){var u=navigator.getGamepads();if(!u)this.disconnectAll();else for(var v=this.gamepads,m=0;m<u.length;m++){var p=u[m];if(p){var x=p.id,y=p.index,P=v[y];if(P)P.id!==x?(P.destroy(),v[y]=new a(this,p)):P.update(p);else{var b=new a(this,p);v[y]=b,this._pad1?this._pad2?this._pad3?this._pad4||(this._pad4=b):this._pad3=b:this._pad2=b:this._pad1=b}}}},getAll:function(){for(var u=[],v=this.gamepads,m=0;m<v.length;m++)v[m]&&u.push(v[m]);return u},getPad:function(u){for(var v=this.gamepads,m=0;m<v.length;m++)if(v[m]&&v[m].index===u)return v[m]},update:function(){if(this.enabled){this.refreshPads();var u=this.queue.length;if(u!==0)for(var v=this.queue.splice(0,u),m=0;m<u;m++){var p=v[m],x=this.getPad(p.gamepad.index);p.type==="gamepadconnected"?this.emit(r.CONNECTED,x,p):p.type==="gamepaddisconnected"&&this.emit(r.DISCONNECTED,x,p)}}},shutdown:function(){this.stopListeners(),this.removeAllListeners()},destroy:function(){this.shutdown();for(var u=0;u<this.gamepads.length;u++)this.gamepads[u]&&this.gamepads[u].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}}});n.register("GamepadPlugin",f,"gamepad","gamepad","inputGamepad"),l.exports=f},33171:l=>{/** 3240 * @author Richard Davey <[email protected]> 3241 * @copyright 2013-2023 Photon Storm Ltd. 3242 * @license {@link https://opensource.org/licenses/MIT|MIT License}
3243 */l.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}},74982:l=>{/** 3244 * @author Richard Davey <[email protected]> 3245 * @copyright 2013-2023 Photon Storm Ltd. 3246 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3247 */l.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}},43247:l=>{/** 3248 * @author Richard Davey <[email protected]> 3249 * @copyright 2013-2023 Photon Storm Ltd. 3250 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3251 */l.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}},4898:(l,T,e)=>{/** 3252 * @author Richard Davey <[email protected]> 3253 * @copyright 2013-2023 Photon Storm Ltd. 3254 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3255 */l.exports={DUALSHOCK_4:e(74982),SNES_USB:e(33171),XBOX_360:e(43247)}},17344:l=>{/** 3256 * @author Richard Davey <[email protected]> 3257 * @copyright 2013-2023 Photon Storm Ltd. 3258 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3259 */l.exports="down"},36635:l=>{/** 3260 * @author Richard Davey <[email protected]> 3261 * @copyright 2013-2023 Photon Storm Ltd. 3262 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3263 */l.exports="up"},85724:l=>{/** 3264 * @author Richard Davey <[email protected]> 3265 * @copyright 2013-2023 Photon Storm Ltd. 3266 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3267 */l.exports="connected"},55832:l=>{/** 3268 * @author Richard Davey <[email protected]> 3269 * @copyright 2013-2023 Photon Storm Ltd. 3270 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3271 */l.exports="disconnected"},772:l=>{/** 3272 * @author Richard Davey <[email protected]> 3273 * @copyright 2013-2023 Photon Storm Ltd. 3274 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3275 */l.exports="down"},33608:l=>{/** 3276 * @author Richard Davey <[email protected]> 3277 * @copyright 2013-2023 Photon Storm Ltd. 3278 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3279 */l.exports="up"},43200:(l,T,e)=>{/** 3280 * @author Richard Davey <[email protected]> 3281 * @copyright 2013-2023 Photon Storm Ltd. 3282 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3283 */l.exports={BUTTON_DOWN:e(17344),BUTTON_UP:e(36635),CONNECTED:e(85724),DISCONNECTED:e(55832),GAMEPAD_BUTTON_DOWN:e(772),GAMEPAD_BUTTON_UP:e(33608)}},92636:(l,T,e)=>{/** 3284 * @author Richard Davey <[email protected]> 3285 * @copyright 2013-2023 Photon Storm Ltd. 3286 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3287 */l.exports={Axis:e(70848),Button:e(21274),Events:e(43200),Gamepad:e(75956),GamepadPlugin:e(1379),Configs:e(4898)}},20873:(l,T,e)=>{/** 3288 * @author Richard Davey <[email protected]> 3289 * @copyright 2013-2023 Photon Storm Ltd. 3290 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3291 */var d=e(72687),g=e(98611),r={CreatePixelPerfectHandler:e(18104),CreateInteractiveObject:e(27395),Events:e(33963),Gamepad:e(92636),InputManager:e(69898),InputPlugin:e(12499),InputPluginCache:e(63399),Keyboard:e(28388),Mouse:e(11343),Pointer:e(40398),Touch:e(77423)};r=g(!1,r,d),l.exports=r},71064:(l,T,e)=>{/** 3292 * @author Richard Davey <[email protected]> 3293 * @copyright 2013-2023 Photon Storm Ltd. 3294 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3295 */var d=e(66458),g=e(56694),r=e(97081),a=e(33963),h=e(11873),n=e(72283),o=new g({initialize:function(u){this.manager=u,this.queue=[],this.preventDefault=!0,this.captures=[],this.enabled=!1,this.target,this.onKeyDown=n,this.onKeyUp=n,u.events.once(a.MANAGER_BOOT,this.boot,this)},boot:function(){var f=this.manager.config;this.enabled=f.inputKeyboard,this.target=f.inputKeyboardEventTarget,this.addCapture(f.inputKeyboardCapture),!this.target&&window&&(this.target=window),this.enabled&&this.target&&this.startListeners(),this.manager.game.events.on(r.POST_STEP,this.postUpdate,this)},startListeners:function(){var f=this;this.onKeyDown=function(v){if(!(v.defaultPrevented||!f.enabled||!f.manager)){f.queue.push(v),f.manager.events.emit(a.MANAGER_PROCESS);var m=v.altKey||v.ctrlKey||v.shiftKey||v.metaKey;f.preventDefault&&!m&&f.captures.indexOf(v.keyCode)>-1&&v.preventDefault()}},this.onKeyUp=function(v){if(!(v.defaultPrevented||!f.enabled||!f.manager)){f.queue.push(v),f.manager.events.emit(a.MANAGER_PROCESS);var m=v.altKey||v.ctrlKey||v.shiftKey||v.metaKey;f.preventDefault&&!m&&f.captures.indexOf(v.keyCode)>-1&&v.preventDefault()}};var u=this.target;u&&(u.addEventListener("keydown",this.onKeyDown,!1),u.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var f=this.target;f.removeEventListener("keydown",this.onKeyDown,!1),f.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(f){typeof f=="string"&&(f=f.split(",")),Array.isArray(f)||(f=[f]);for(var u=this.captures,v=0;v<f.length;v++){var m=f[v];typeof m=="string"&&(m=h[m.trim().toUpperCase()]),u.indexOf(m)===-1&&u.push(m)}this.preventDefault=u.length>0},removeCapture:function(f){typeof f=="string"&&(f=f.split(",")),Array.isArray(f)||(f=[f]);for(var u=this.captures,v=0;v<f.length;v++){var m=f[v];typeof m=="string"&&(m=h[m.toUpperCase()]),d(u,m)}this.preventDefault=u.length>0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(r.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});l.exports=o},89666:(l,T,e)=>{/** 3296 * @author Richard Davey <[email protected]> 3297 * @copyright 2013-2023 Photon Storm Ltd. 3298 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3299 */var d=e(56694),g=e(6659),r=e(94030),a=e(97081),h=e(10850),n=e(33963),o=e(63399),f=e(50165),u=e(11873),v=e(95625),m=e(48044),p=e(7599),x=e(84314),y=new d({Extends:g,initialize:function(b){g.call(this),this.game=b.systems.game,this.scene=b.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=b,this.manager=b.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],this.prevCode=null,this.prevTime=0,this.prevType=null,b.pluginEvents.once(n.BOOT,this.boot,this),b.pluginEvents.on(n.START,this.start,this)},boot:function(){var P=this.settings.input;this.enabled=h(P,"keyboard",!0);var b=h(P,"keyboard.capture",null);b&&this.addCaptures(b),this.sceneInputPlugin.pluginEvents.once(n.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.events.on(n.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(n.SHUTDOWN,this.shutdown,this),this.game.events.on(a.BLUR,this.resetKeys,this),this.scene.sys.events.on(p.PAUSE,this.resetKeys,this),this.scene.sys.events.on(p.SLEEP,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.canInput()},addCapture:function(P){return this.manager.addCapture(P),this},removeCapture:function(P){return this.manager.removeCapture(P),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:u.UP,down:u.DOWN,left
3299:u.LEFT,right:u.RIGHT,space:u.SPACE,shift:u.SHIFT})},addKeys:function(P,b,E){b===void 0&&(b=!0),E===void 0&&(E=!1);var M={};if(typeof P=="string"){P=P.split(",");for(var w=0;w<P.length;w++){var A=P[w].trim();A&&(M[A]=this.addKey(A,b,E))}}else for(var R in P)M[R]=this.addKey(P[R],b,E);return M},addKey:function(P,b,E){b===void 0&&(b=!0),E===void 0&&(E=!1);var M=this.keys;if(P instanceof f){var w=M.indexOf(P);return w>-1?M[w]=P:M[P.keyCode]=P,b&&this.addCapture(P.keyCode),P.setEmitOnRepeat(E),P}return typeof P=="string"&&(P=u[P.toUpperCase()]),M[P]||(M[P]=new f(this,P),b&&this.addCapture(P),M[P].setEmitOnRepeat(E)),M[P]},removeKey:function(P,b,E){b===void 0&&(b=!1),E===void 0&&(E=!1);var M=this.keys,w;if(P instanceof f){var A=M.indexOf(P);A>-1&&(w=this.keys[A],this.keys[A]=void 0)}else typeof P=="string"&&(P=u[P.toUpperCase()]);return M[P]&&(w=M[P],M[P]=void 0),w&&(w.plugin=null,E&&this.removeCapture(w.keyCode),b&&w.destroy()),this},removeAllKeys:function(P,b){P===void 0&&(P=!1),b===void 0&&(b=!1);for(var E=this.keys,M=0;M<E.length;M++){var w=E[M];w&&(E[M]=void 0,b&&this.removeCapture(w.keyCode),P&&w.destroy())}return this},createCombo:function(P,b){return new v(this,P,b)},checkDown:function(P,b){if(b===void 0&&(b=0),this.enabled&&P.isDown){var E=x(this.time-P.timeDown,b);if(E>P._tick)return P._tick=E,!0}return!1},update:function(){var P=this.manager.queue,b=P.length;if(!(!this.isActive()||b===0))for(var E=this.keys,M=0;M<b;M++){var w=P[M],A=w.keyCode,R=E[A],L=!1;w.cancelled===void 0&&(w.cancelled=0,w.stopImmediatePropagation=function(){w.cancelled=1},w.stopPropagation=function(){w.cancelled=-1}),w.cancelled!==-1&&(A===this.prevCode&&w.timeStamp===this.prevTime&&w.type===this.prevType||(this.prevCode=A,this.prevTime=w.timeStamp,this.prevType=w.type,w.type==="keydown"?(R&&(L=R.isDown,R.onDown(w)),!w.cancelled&&(!R||!L)&&(m[A]&&this.emit(r.KEY_DOWN+m[A],w),w.cancelled||this.emit(r.ANY_KEY_DOWN,w))):(R&&R.onUp(w),w.cancelled||(m[A]&&this.emit(r.KEY_UP+m[A],w),w.cancelled||this.emit(r.ANY_KEY_UP,w))),w.cancelled===1&&(w.cancelled=0)))}},resetKeys:function(){for(var P=this.keys,b=0;b<P.length;b++)P[b]&&P[b].reset();return this},shutdown:function(){this.removeAllKeys(!0),this.removeAllListeners(),this.sceneInputPlugin.manager.events.off(n.MANAGER_PROCESS,this.update,this),this.game.events.off(a.BLUR,this.resetKeys),this.scene.sys.events.off(p.PAUSE,this.resetKeys,this),this.scene.sys.events.off(p.SLEEP,this.resetKeys,this),this.queue=[]},destroy:function(){this.shutdown();for(var P=this.keys,b=0;b<P.length;b++)P[b]&&P[b].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}}});o.register("KeyboardPlugin",y,"keyboard","keyboard","inputKeyboard"),l.exports=y},60258:l=>{/** 3300 * @author Richard Davey <[email protected]> 3301 * @copyright 2013-2023 Photon Storm Ltd. 3302 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3303 */var T=function(e,d){return d.timeLastMatched=e.timeStamp,d.index++,d.index===d.size?!0:(d.current=d.keyCodes[d.index],!1)};l.exports=T},95625:(l,T,e)=>{/** 3304 * @author Richard Davey <[email protected]> 3305 * @copyright 2013-2023 Photon Storm Ltd. 3306 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3307 */var d=e(56694),g=e(94030),r=e(72632),a=e(2544),h=e(88754),n=new d({initialize:function(f,u,v){if(v===void 0&&(v={}),u.length<2)return!1;this.manager=f,this.enabled=!0,this.keyCodes=[];for(var m=0;m<u.length;m++){var p=u[m];typeof p=="string"?this.keyCodes.push(p.toUpperCase().charCodeAt(0)):typeof p=="number"?this.keyCodes.push(p):p.hasOwnProperty("keyCode")&&this.keyCodes.push(p.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=r(v,"resetOnWrongKey",!0),this.maxKeyDelay=r(v,"maxKeyDelay",0),this.resetOnMatch=r(v,"resetOnMatch",!1),this.deleteOnMatch=r(v,"deleteOnMatch",!1);var x=this,y=function(P){if(!(x.matched||!x.enabled)){var b=a(P,x);b&&(x.manager.emit(g.COMBO_MATCH,x,P),x.resetOnMatch?h(x):x.deleteOnMatch&&x.destroy())}};this.onKeyDown=y,this.manager.on(g.ANY_KEY_DOWN,this.onKeyDown)},progress:{get:function(){return this.index/this.size}},destroy:function(){this.enabled=!1,this.keyCodes=[],this.manager.off(g.ANY_KEY_DOWN,this.onKeyDown),this.manager=null}});l.exports=n},2544:(l,T,e)=>{/** 3308 * @author Richard Davey <[email protected]> 3309 * @copyright 2013-2023 Photon Storm Ltd. 3310 * @license {@link https://opensource.org/licenses/MIT|MIT License}
3311 */var d=e(60258),g=function(r,a){if(a.matched)return!0;var h=!1,n=!1;if(r.keyCode===a.current)if(a.index>0&&a.maxKeyDelay>0){var o=a.timeLastMatched+a.maxKeyDelay;r.timeStamp<=o&&(n=!0,h=d(r,a))}else n=!0,h=d(r,a);return!n&&a.resetOnWrongKey&&(a.index=0,a.current=a.keyCodes[0]),h&&(a.timeLastMatched=r.timeStamp,a.matched=!0,a.timeMatched=r.timeStamp),h};l.exports=g},88754:l=>{/** 3312 * @author Richard Davey <[email protected]> 3313 * @copyright 2013-2023 Photon Storm Ltd. 3314 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3315 */var T=function(e){return e.current=e.keyCodes[0],e.index=0,e.timeLastMatched=0,e.matched=!1,e.timeMatched=0,e};l.exports=T},5044:l=>{/** 3316 * @author Richard Davey <[email protected]> 3317 * @copyright 2013-2023 Photon Storm Ltd. 3318 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3319 */l.exports="keydown"},40813:l=>{/** 3320 * @author Richard Davey <[email protected]> 3321 * @copyright 2013-2023 Photon Storm Ltd. 3322 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3323 */l.exports="keyup"},89319:l=>{/** 3324 * @author Richard Davey <[email protected]> 3325 * @copyright 2013-2023 Photon Storm Ltd. 3326 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3327 */l.exports="keycombomatch"},43267:l=>{/** 3328 * @author Richard Davey <[email protected]> 3329 * @copyright 2013-2023 Photon Storm Ltd. 3330 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3331 */l.exports="down"},78595:l=>{/** 3332 * @author Richard Davey <[email protected]> 3333 * @copyright 2013-2023 Photon Storm Ltd. 3334 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3335 */l.exports="keydown-"},30056:l=>{/** 3336 * @author Richard Davey <[email protected]> 3337 * @copyright 2013-2023 Photon Storm Ltd. 3338 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3339 */l.exports="keyup-"},81939:l=>{/** 3340 * @author Richard Davey <[email protected]> 3341 * @copyright 2013-2023 Photon Storm Ltd. 3342 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3343 */l.exports="up"},94030:(l,T,e)=>{/** 3344 * @author Richard Davey <[email protected]> 3345 * @copyright 2013-2023 Photon Storm Ltd. 3346 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3347 */l.exports={ANY_KEY_DOWN:e(5044),ANY_KEY_UP:e(40813),COMBO_MATCH:e(89319),DOWN:e(43267),KEY_DOWN:e(78595),KEY_UP:e(30056),UP:e(81939)}},28388:(l,T,e)=>{/** 3348 * @author Richard Davey <[email protected]> 3349 * @copyright 2013-2023 Photon Storm Ltd. 3350 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3351 */l.exports={Events:e(94030),KeyboardManager:e(71064),KeyboardPlugin:e(89666),Key:e(50165),KeyCodes:e(11873),KeyCombo:e(95625),AdvanceKeyCombo:e(60258),ProcessKeyCombo:e(2544),ResetKeyCombo:e(88754),JustDown:e(42460),JustUp:e(53162),DownDuration:e(64964),UpDuration:e(70331)}},64964:l=>{/** 3352 * @author Richard Davey <[email protected]> 3353 * @copyright 2013-2023 Photon Storm Ltd. 3354 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3355 */var T=function(e,d){d===void 0&&(d=50);var g=e.plugin.game.loop.time-e.timeDown;return e.isDown&&g<d};l.exports=T},42460:l=>{/** 3356 * @author Richard Davey <[email protected]> 3357 * @copyright 2013-2023 Photon Storm Ltd. 3358 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3359 */var T=function(e){return e._justDown?(e._justDown=!1,!0):!1};l.exports=T},53162:l=>{/** 3360 * @author Richard Davey <[email protected]> 3361 * @copyright 2013-2023 Photon Storm Ltd. 3362 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3363 */var T=function(e){return e._justUp?(e._justUp=!1,!0):!1};l.exports=T},50165:(l,T,e)=>{/** 3364 * @author Richard Davey <[email protected]> 3365 * @copyright 2013-2023 Photon Storm Ltd. 3366 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3367 */var d=e(56694),g=e(6659),r=e(94030),a=new d({Extends:g,initialize:function(n,o){g.call(this),this.plugin=n,this.keyCode=o,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(h){return this.emitOnRepeat=h,this},onDown:function(h){this.originalEvent=h,this.enabled&&(this.altKey=h.altKey,this.ctrlKey=h.ctrlKey,this.shiftKey=h.shift
3367Key,this.metaKey=h.metaKey,this.location=h.location,this.repeats++,this.isDown?this.emitOnRepeat&&this.emit(r.DOWN,this,h):(this.isDown=!0,this.isUp=!1,this.timeDown=h.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(r.DOWN,this,h)))},onUp:function(h){this.originalEvent=h,this.enabled&&(this.isDown=!1,this.isUp=!0,this.timeUp=h.timeStamp,this.duration=this.timeUp-this.timeDown,this.repeats=0,this._justDown=!1,this._justUp=!0,this._tick=-1,this.emit(r.UP,this,h))},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}});l.exports=a},11873:l=>{/** 3368 * @author Richard Davey <[email protected]> 3369 * @copyright 2013-2023 Photon Storm Ltd. 3370 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3371 */var T={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};l.exports=T},48044:(l,T,e)=>{/** 3372 * @author Richard Davey <[email protected]> 3373 * @copyright 2013-2023 Photon Storm Ltd. 3374 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3375 */var d=e(11873),g={};for(var r in d)g[d[r]]=r;l.exports=g},70331:l=>{/** 3376 * @author Richard Davey <[email protected]> 3377 * @copyright 2013-2023 Photon Storm Ltd. 3378 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3379 */var T=function(e,d){d===void 0&&(d=50);var g=e.plugin.game.loop.time-e.timeUp;return e.isUp&&g<d};l.exports=T},7905:(l,T,e)=>{/** 3380 * @author Richard Davey <[email protected]> 3381 * @copyright 2013-2023 Photon Storm Ltd. 3382 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3383 */var d=e(56694),g=e(90185),r=e(33963),a=e(72283),h=new d({initialize:function(o){this.manager=o,this.preventDefaultDown=!0,this.preventDefaultUp=!0,this.preventDefaultMove=!0,this.preventDefaultWheel=!1,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=a,this.onMouseDown=a,this.onMouseUp=a,this.onMouseDownWindow=a,this.onMouseUpWindow=a,this.onMouseOver=a,this.onMouseOut=a,this.onMouseWheel=a,this.pointerLockChange=a,this.isTop=!0,o.events.once(r.MANAGER_BOOT,this.boot,this)},boot:function(){var n=this.manager.config;this.enabled=n.inputMouse,this.target=n.inputMouseEventTarget,this.passive=n.inputMousePassive,this.preventDefaultDown=n.inputMousePreventDefaultDown,this.preventDefaultUp=n.inputMousePreventDefaultUp,this.preventDefaultMove=n.inputMousePreventDefaultMove,this.preventDefaultWheel=n.inputMousePreventDefaultWheel,this.target?typeof this.target=="string"&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,n.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",function(n){return n.preventDefault(),!1}),this},requestPointerLock:function(){if(g.pointerLock){var n=this.target;n.requestPointerLock=n.requestPointerLock||n.mozRequestPointerLock||n.webkitRequestPointerLock,n.requestPointerLock()}},releasePointerLock:function(){g.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var n=this.target;if(n){var o=this,f=this.manager,u=f.canvas,v=window&&window.focus&&f.game.config.autoFocus;this.onMouseMove=function(p){!p.defaultPrevented&&o.enabled&&f&&f.enabled&&(f.onMouseMove(p),o.preventDefaultMove&&p.preventDefault())},this.onMouseDown=function(p){v&&window.focus(),!p.defaultPrevented&&o.enabled&&f&&f.enabled&&(f.onMouseDown(p),o.preventDefaultDown&&p.target===u&&p.preventDefault())},this.onMouseDownWindow=function(p){!p.defaultPrevented&&o.enabled&&f&&f.enabled&&p.target!==u&&f.onMouseDown(p)},this.onMouseUp=function(p){!p.defaultPrevented&&o.enabled&&f&&f.enabled&&(f.onMouseUp(p),o.preventDefaultUp&&p.target===u&&p.preventDefault())},this.onMouseUpWindow=function(p){!p.defaultPrevented&&o.enabled&&f&&f.enabled&&p.target!==u&&f.onMouseUp(p)},this.onMouseOver=function(p){!p.defaultPrevented&&o.enabled&&f&&f.enabled&&f.setCanvasOver(p)},this.onMouseOut=function(p){!p.defaultPrevented&&o.enabled&&f&&f.enabled&&f.setCanvasOut(p)},this.onMouseWheel=function(p){!p.defaultPrevented&&o.enabled&&f&&f.enabled&&f.onMouseWheel(p),o.preventDefaultWheel&&p.target===u&&p.preventDefault()};var m={passive:!0};if(n.addEventListener("mousemove",this.onMouseMove),n.addEventListener("mousedown",this.onMouseDown),n.addEventListener("mouseup",this.onMouseUp),n.addEventListener("mouseover",this.onMouseOver,m),n.addEventListener("mouseout",this.onMouseOut,m),this.preventDefaultWheel?n.addEventListener("wheel",this.onMouseWheel,{passive:!1}):n.addEventListener("wheel",this.onMouseWheel,m),window&&f.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,m),window.top.addEventListener("mouseup",this.onMouseUpWindow,m)}catch{window.addEventListener("mousedown",this.onMouseDownWindow,m),window.addEventListener("mouseup",this.onMouseUpWindow,m),this.isTop=!1}g.pointerLock&&(this.pointerLockChange=function(p){var x=o.target;o.locked=document.pointerLockElement===x||document.mozPointerLockElement===x||document.webkitPointerLockElement===x,f.onPointerLockChange(p)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var n=this.target;n.removeEventListener("mousemove",this.onMouseMove),n.removeEventListener("mousedown",this.onMouseDown),n.removeEventListener("mouseup",this.onMouseUp),n.removeEventListener("mouseover",this.onMouseOver),n.removeEventListener("mouseout",this.onMouseOut),window&&(n=this.isTop?window.top:window,n.removeEventListener("mousedown",this.onMouseDownWindow),n.removeEventListener("mouseup",this.onMouseUpWindow)),g.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}});l.exports=h},11343:(l,T,e)=>{/** 3384 * @author Richard Davey <[email protected]> 3385 * @copyright 2013-2023 Photon Storm Ltd. 3386 * @license {@link https://opensource.org/licenses/MIT|MIT License}
3387 */l.exports={MouseManager:e(7905)}},37579:(l,T,e)=>{/** 3388 * @author Richard Davey <[email protected]> 3389 * @copyright 2013-2023 Photon Storm Ltd. 3390 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3391 */var d=e(56694),g=e(33963),r=e(72283),a=new d({initialize:function(n){this.manager=n,this.capture=!0,this.enabled=!1,this.target,this.onTouchStart=r,this.onTouchStartWindow=r,this.onTouchMove=r,this.onTouchEnd=r,this.onTouchEndWindow=r,this.onTouchCancel=r,this.onTouchCancelWindow=r,this.isTop=!0,n.events.once(g.MANAGER_BOOT,this.boot,this)},boot:function(){var h=this.manager.config;this.enabled=h.inputTouch,this.target=h.inputTouchEventTarget,this.capture=h.inputTouchCapture,this.target?typeof this.target=="string"&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,h.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",function(h){return h.preventDefault(),!1}),this},startListeners:function(){var h=this.target;if(h){var n=this,o=this.manager,f=o.canvas,u=window&&window.focus&&o.game.config.autoFocus;this.onTouchMove=function(x){!x.defaultPrevented&&n.enabled&&o&&o.enabled&&(o.onTouchMove(x),n.capture&&x.cancelable&&x.preventDefault())},this.onTouchStart=function(x){u&&window.focus(),!x.defaultPrevented&&n.enabled&&o&&o.enabled&&(o.onTouchStart(x),n.capture&&x.cancelable&&x.target===f&&x.preventDefault())},this.onTouchStartWindow=function(x){!x.defaultPrevented&&n.enabled&&o&&o.enabled&&x.target!==f&&o.onTouchStart(x)},this.onTouchEnd=function(x){!x.defaultPrevented&&n.enabled&&o&&o.enabled&&(o.onTouchEnd(x),n.capture&&x.cancelable&&x.target===f&&x.preventDefault())},this.onTouchEndWindow=function(x){!x.defaultPrevented&&n.enabled&&o&&o.enabled&&x.target!==f&&o.onTouchEnd(x)},this.onTouchCancel=function(x){!x.defaultPrevented&&n.enabled&&o&&o.enabled&&(o.onTouchCancel(x),n.capture&&x.preventDefault())},this.onTouchCancelWindow=function(x){!x.defaultPrevented&&n.enabled&&o&&o.enabled&&o.onTouchCancel(x)};var v=this.capture,m={passive:!0},p={passive:!1};if(h.addEventListener("touchstart",this.onTouchStart,v?p:m),h.addEventListener("touchmove",this.onTouchMove,v?p:m),h.addEventListener("touchend",this.onTouchEnd,v?p:m),h.addEventListener("touchcancel",this.onTouchCancel,v?p:m),window&&o.game.config.inputWindowEvents)try{window.top.addEventListener("touchstart",this.onTouchStartWindow,p),window.top.addEventListener("touchend",this.onTouchEndWindow,p),window.top.addEventListener("touchcancel",this.onTouchCancelWindow,p)}catch{window.addEventListener("touchstart",this.onTouchStartWindow,p),window.addEventListener("touchend",this.onTouchEndWindow,p),window.addEventListener("touchcancel",this.onTouchCancelWindow,p),this.isTop=!1}this.enabled=!0}},stopListeners:function(){var h=this.target;h.removeEventListener("touchstart",this.onTouchStart),h.removeEventListener("touchmove",this.onTouchMove),h.removeEventListener("touchend",this.onTouchEnd),h.removeEventListener("touchcancel",this.onTouchCancel),window&&(h=this.isTop?window.top:window,h.removeEventListener("touchstart",this.onTouchStartWindow),h.removeEventListener("touchend",this.onTouchEndWindow),h.removeEventListener("touchcancel",this.onTouchCancelWindow))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});l.exports=a},77423:(l,T,e)=>{/** 3392 * @author Richard Davey <[email protected]> 3393 * @copyright 2013-2023 Photon Storm Ltd. 3394 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3395 */l.exports={TouchManager:e(37579)}},98035:(l,T,e)=>{/** 3396 * @author Richard Davey <[email protected]> 3397 * @copyright 2013-2023 Photon Storm Ltd. 3398 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3399 */var d=e(56694),g=e(12117),r=e(683),a=e(72632),h=e(30750),n=e(43531),o=e(88490),f=e(33868),u=new d({initialize:function(m,p){if(this.loader=m,this.cache=a(p,"cache",!1),this.type=a(p,"type",!1),!this.type)throw new Error("Invalid File type: "+this.type);this.key=a(p,"key",!1);var x=this.key;if(m.prefix&&m.prefix!==""&&(this.key=m.prefix+x),!this.key)throw new Error("Invalid File key: "+this.key);var y=a(p,"url");y===void 0?y=m.path+x+"."+a(p,"extension",""):typeof y=="string"&&!y.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)&&(y=m.path+y),this.url=y,this.src="",this.xhrSettings=f(a(p,"responseType",void 0)),a(p,"xhrSettings",!1)&&(this.xhrSettings=n(this.xhrSettings,a(p,"xhrSettings",{}
3399))),this.xhrLoader=null,this.state=typeof this.url=="function"?g.FILE_POPULATED:g.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=a(p,"config",{}),this.multiFile,this.linkFile},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(){this.state===g.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=g.FILE_LOADING,this.src=h(this,this.loader.baseURL),this.src.indexOf("data:")===0?console.warn("Local data URIs are not supported: "+this.key):this.xhrLoader=o(this,this.loader.xhr))},onLoad:function(v,m){var p=v.responseURL&&this.loader.localSchemes.some(function(P){return v.responseURL.indexOf(P)===0}),x=p&&m.target.status===0,y=!(m.target&&m.target.status!==200)||x;v.readyState===4&&v.status>=400&&v.status<=599&&(y=!1),this.state=g.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,y)},onError:function(){this.resetXHR(),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(r.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=g.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=g.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=g.FILE_E
3399RRORED,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!==g.FILE_PENDING_DESTROY){v===void 0&&(v=this.data);var m=this.key,p=this.type;this.loader.emit(r.FILE_COMPLETE,m,p,v),this.loader.emit(r.FILE_KEY_COMPLETE+p+"-"+m,m,p,v),this.loader.flagForRemoval(this),this.state=g.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});u.createObjectURL=function(v,m,p){if(typeof URL=="function")v.src=URL.createObjectURL(m);else{var x=new FileReader;x.onload=function(){v.removeAttribute("crossOrigin"),v.src="data:"+(m.type||p)+";base64,"+x.result.split(",")[1]},x.onerror=v.onerror,x.readAsDataURL(m)}},u.revokeObjectURL=function(v){typeof URL=="function"&&URL.revokeObjectURL(v.src)},l.exports=u},76846:l=>{/** 3400 * @author Richard Davey <[email protected]> 3401 * @copyright 2013-2023 Photon Storm Ltd. 3402 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3403 */var T={}
3403,e={install:function(d){for(var g in T)d[g]=T[g]},register:function(d,g){T[d]=g},destroy:function(){T={}}};l.exports=e},30750:l=>{/** 3404 * @author Richard Davey <[email protected]> 3405 * @copyright 2013-2023 Photon Storm Ltd. 3406 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3407 */var T=function(e,d){return e.url?e.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?e.url:d+e.url:!1};l.exports=T},67285:(l,T,e)=>{/** 3408 * @author Richard Davey <[email protected]> 3409 * @copyright 2013-2023 Photon Storm Ltd. 3410 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3411 */var d=e(56694),g=e(12117),r=e(58403),a=e(6659),h=e(683),n=e(76846),o=e(72632),f=e(10850),u=e(91963),v=e(7599),m=e(33868),p=new d({Extends:a,initialize:function(y){a.call(this);var P=y.sys.game.config,b=y.sys.settings.loader;this.scene=y,this.systems=y.sys,this.cacheManager=y.sys.cache,this.textureManager=y.sys.textures,this.sceneManager=y.sys.game.scene,n.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(o(b,"baseURL",P.loaderBaseURL)),this.setPath(o(b,"path",P.loaderPath)),this.setPrefix(o(b,"prefix",P.loaderPrefix)),this.maxParallelDownloads=o(b,"maxParallelDownloads",P.loaderMaxParallelDownloads),this.xhr=m(o(b,"responseType",P.loaderResponseType),o(b,"async",P.loaderAsync),o(b,"user",P.loaderUser),o(b,"password",P.loaderPassword),o(b,"timeout",P.loaderTimeout),o(b,"withCredentials",P.loaderWithCredentials)),this.crossOrigin=o(b,"crossOrigin",P.loaderCrossOrigin),this.imageLoadType=o(b,"imageLoadType",P.loaderImageLoadType),this.localSchemes=o(b,"localScheme",P.loaderLocalScheme),this.totalToLoad=0,this.progress=0,this.list=new r,this.inflight=new r,this.queue=new r,this._deleteQueue=new r,this.totalFailed=0,this.totalComplete=0,this.state=g.LOADER_IDLE,this.multiKeyIndex=0,y.sys.events.once(v.BOOT,this.boot,this),y.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(x){return x===void 0&&(x=""),x!==""&&x.substr(-1)!=="/"&&(x=x.concat("/")),this.baseURL=x,this},setPath:function(x){return x===void 0&&(x=""),x!==""&&x.substr(-1)!=="/"&&(x=x.concat("/")),this.path=x,this},setPrefix:function(x){return x===void 0&&(x=""),this.prefix=x,this},setCORS:function(x){return this.crossOrigin=x,this},addFile:function(x){Array.isArray(x)||(x=[x]);for(var y=0;y<x.length;y++){var P=x[y];this.keyExists(P)||(this.list.set(P),this.emit(h.ADD,P.key,P.type,this,P),this.isLoading()&&(this.totalToLoad++,this.updateProgress()))}},keyExists:function(x){var y=x.hasCacheConflict();return y||this.list.iterate(function(P){if(P.type===x.type&&P.key===x.key)return y=!0,!1}),!y&&this.isLoading()&&(this.inflight.iterate(function(P){if(P.type===x.type&&P.key===x.key)return y=!0,!1}),this.queue.iterate(function(P){if(P.type===x.type&&P.key===x.key)return y=!0,!1})),y},addPack:function(x,y){if(typeof y=="string"){var P=f(x,y);P&&(x={packKey:P})}var b=0,E=this.baseURL,M=this.path,w=this.prefix;for(var A in x)if(Object.prototype.hasOwnProperty.call(x,A)){var R=x[A],L=o(R,"baseURL",E),O=o(R,"path",M),I=o(R,"prefix",w),D=o(R,"files",null),B=o(R,"defaultType","void");if(Array.isArray(D)){this.setBaseURL(L),this.setPath(O),this.setPrefix(I);for(var z=0;z<D.length;z++){var X=D[z],W=X.hasOwnProperty("type")?X.type:B;this[W]&&(this[W](X),b++)}}}return this.setBaseURL(E),this.setPath(M),this.setPrefix(w),b>0},isLoading:function(){return this.state===g.LOADER_LOADING||this.state===g.LOADER_PROCESSING},isReady:function(){return this.state===g.LOADER_IDLE||this.state===g.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=g.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
3411(h.PROGRESS,this.progress)},update:function(){this.state===g.LOADER_LOADING&&this.list.size>0&&this.inflight.size<this.maxParallelDownloads&&this.checkLoadQueue()},checkLoadQueue:function(){this.list.each(function(x){if((x.state===g.FILE_POPULATED||x.state===g.FILE_PENDING&&this.inflight.size<this.maxParallelDownloads)&&(this.inflight.set(x),this.list.delete(x),x.crossOrigin||(x.crossOrigin=this.crossOrigin),x.load()),this.inflight.size===this.maxParallelDownloads)return!1},this)},nextFile:function(x,y){this.inflight&&(this.inflight.delete(x),this.updateProgress(),y?(this.totalComplete++,this.queue.set(x),this.emit(h.FILE_LOAD,x),x.onProcess()):(this.totalFailed++,this._deleteQueue.set(x),this.emit(h.FILE_LOAD_ERROR,x),this.fileProcessComplete(x)))},fileProcessComplete:function(x){!this.scene||!this.systems||!this.systems.game||this.systems.game.pendingDestroy||(x.state===g.FILE_ERRORED?x.multiFile&&x.multiFile.onFileFailed(x):x.state===g.FILE_COMPLETE&&(x.multiFile?x.multiFile.isReadyToProcess()&&(x.multiFile.addToCache(),x.multiFile.pendingDestroy()):(x.addToCache(),x.pendingDestroy())),this.queue.delete(x),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=g.LOADER_COMPLETE,this.systems.events.off(v.UPDATE,this.update,this),this._deleteQueue.iterateLocal("destroy"),this._deleteQueue.clear(),this.emit(h.COMPLETE,this,this.totalComplete,this.totalFailed)},flagForRemoval:function(x){this._deleteQueue.set(x)},saveJSON:function(x,y){return this.save(JSON.stringify(x),y)},save:function(x,y,P){y===void 0&&(y="file.json"),P===void 0&&(P="application/json");var b=new Blob([x],{type:P}),E=URL.createObjectURL(b),M=document.createElement("a");return M.download=y,M.textContent="Download "+y,M.href=E,M.click(),this},reset:function(){this.list.clear(),this.inflight.clear(),this.queue.clear();var x=this.systems.game.config,y=this.systems.settings.loader;this.setBaseURL(o(y,"baseURL",x.loaderBaseURL)),this.setPath(o(y,"path",x.loaderPath)),this.setPrefix(o(y,"prefix",x.loaderPrefix)),this.state=g.LOADER_IDLE},shutdown:function(){this.reset(),this.state=g.LOADER_SHUTDOWN,this.systems.events.off(v.UPDATE,this.update,this),this.systems.events.off(v.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.state=g.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}});u.register("Loader",p,"load"),l.exports=p},43531:(l,T,e)=>{/** 3412 * @author Richard Davey <[email protected]> 3413 * @copyright 2013-2023 Photon Storm Ltd. 3414 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3415 */var d=e(98611),g=e(33868),r=function(a,h){var n=a===void 0?g():d({},a);if(h)for(var o in h)h[o]!==void 0&&(n[o]=h[o]);return n};l.exports=r},45176:(l,T,e)=>{/** 3416 * @author Richard Davey <[email protected]> 3417 * @copyright 2013-2023 Photon Storm Ltd. 3418 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3419 */var d=e(56694),g=e(12117),r=e(683),a=new d({initialize:function(n,o,f,u){var v=[];u.forEach(function(p){p&&v.push(p)}),this.loader=n,this.type=o,this.key=f,this.multiKeyIndex=n.multiKeyIndex++,this.files=v,this.state=g.FILE_PENDING,this.complete=!1,this.pending=v.length,this.failed=0,this.config={},this.baseURL=n.baseURL,this.path=n.path,this.prefix=n.prefix;for(var m=0;m<v.length;m++)v[m].multiFile=this},isReadyToProcess:function(){return this.pending===0&&this.failed===0&&!this.complete},addToMultiFile:function(h){return this.files.push(h),h.multiFile=this,this.pending++,this.complete=!1,this},onFileComplete:function(h){var n=this.files.indexOf(h);n!==-1&&this.pending--},onFileFailed:function(h){var n=this.files.indexOf(h);n!==-1&&(this.failed++,console.error('File failed: %s "%s" (via %s "%s")',this.type,this.key,h.type,h.key))},pendingDestroy:function(){if(this.state!==g.FILE_PENDING_DESTROY){var h=this.key,n=this.type;this.loader.emit(r.FILE_COMPLETE,h,n),this.loader.emit(r.FILE_KEY_COMPLETE+n+"-"+h,h,n),this.loader.flagForRemoval(this);for(var o=0;o<this.files.length;o++)this.files[o].pendingDestroy();this.state=g.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.files=null,this.config=null}});l.exports=a},88490:(l,T,e)=>{/** 3420 * @author Richard Davey <[email protected]> 3421 * @copyright 2013-2023 Photon Storm Ltd. 3422 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3423 */var d=e(43531),g=function(r,a){var h=d(a,r.xhrSettings),n=new XMLHttpRequest;if(n.open("GET",r.src,h.async,h.user,h.password),n.responseType=r.xhrSettings.responseType,n.timeout=h.timeout,h.headers)for(var o in h.headers)n.setRequestHeader(o,h.headers[o]);return h.header&&h.headerValue&&n.setRequestHeader(h.header,h.headerValue),h.requestedWith&&n.setRequestHeader("X-Requested-With",h.requestedWith),h.overrideMimeType&&n.overrideMimeType(h.overrideMimeType),h.withCredentials&&(n.withCredentials=!0),n.onload=r.onLoad.bind(r,n),n.onerror=r.onError.bind(r,n),n.onprogress=r.onProgress.bind(r),n.send(),n};l.exports=g},33868:l=>{/** 3424 * @author Richard Davey <[email protected]> 3425 * @copyright 2013-2023 Photon Storm Ltd. 3426 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3427 */var T=function(e,d,g,r,a,h){return e===void 0&&(e=""),d===void 0&&(d=!0),g===void 0&&(g=""),r===void 0&&(r=""),a===void 0&&(a=0),h===void 0&&(h=!1),{responseType:e,async:d,user:g,password:r,timeout:a,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:h}};l.exports=T},12117:l=>{/** 3428 * @author Richard Davey <[email protected]> 3429 * @copyright 2013-2023 Photon Storm Ltd. 3430 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3431 */var T={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_E
3431RRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19,FILE_PENDING_DESTROY:20};l.exports=T},7398:l=>{/** 3432 * @author Richard Davey <[email protected]> 3433 * @copyright 2013-2023 Photon Storm Ltd. 3434 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3435 */l.exports="addfile"},52187:l=>{/** 3436 * @author Richard Davey <[email protected]> 3437 * @copyright 2013-2023 Photon Storm Ltd. 3438 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3439 */l.exports="complete"},36627:l=>{/** 3440 * @author Richard Davey <[email protected]> 3441 * @copyright 2013-2023 Photon Storm Ltd. 3442 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3443 */l.exports="filecomplete"},81925:l=>{/** 3444 * @author Richard Davey <[email protected]> 3445 * @copyright 2013-2023 Photon Storm Ltd. 3446 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3447 */l.exports="filecomplete-"},29774:l=>{/** 3448 * @author Richard Davey <[email protected]> 3449 * @copyright 2013-2023 Photon Storm Ltd. 3450 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3451 */l.exports="loaderror"},20943:l=>{/** 3452 * @author Richard Davey <[email protected]> 3453 * @copyright 2013-2023 Photon Storm Ltd. 3454 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3455 */l.exports="load"},74693:l=>{/** 3456 * @author Richard Davey <[email protected]> 3457 * @copyright 2013-2023 Photon Storm Ltd. 3458 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3459 */l.exports="fileprogress"},71176:l=>{/** 3460 * @author Richard Davey <[email protected]> 3461 * @copyright 2013-2023 Photon Storm Ltd. 3462 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3463 */l.exports="postprocess"},88984:l=>{/** 3464 * @author Richard Davey <[email protected]> 3465 * @copyright 2013-2023 Photon Storm Ltd. 3466 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3467 */l.exports="progress"},72753:l=>{/** 3468 * @author Richard Davey <[email protected]> 3469 * @copyright 2013-2023 Photon Storm Ltd. 3470 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3471 */l.exports="start"},683:(l,T,e)=>{/** 3472 * @author Richard Davey <[email protected]> 3473 * @copyright 2013-2023 Photon Storm Ltd. 3474 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3475 */l.exports={ADD:e(7398),COMPLETE:e(52187),FILE_COMPLETE:e(36627),FILE_KEY_COMPLETE:e(81925),FILE_LOAD_ERROR:e(29774),FILE_LOAD:e(20943),FILE_PROGRESS:e(74693),POST_PROCESS:e(71176),PROGRESS:e(88984),START:e(72753)}},46468:(l,T,e)=>{/** 3476 * @author Richard Davey <[email protected]> 3477 * @copyright 2013-2023 Photon Storm Ltd. 3478 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3479 */var d=e(56694),g=e(76846),r=e(70806),a=e(683),h=new d({Extends:r,initialize:function(o,f,u,v,m){r.call(this,o,f,u,v,m),this.type="animationJSON"},onProcess:function(){this.loader.once(a.POST_PROCESS,this.onLoadComplete,this),r.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});g.register("animation",function(n,o,f,u){if(Array.isArray(n))for(var v=0;v<n.length;v++)this.addFile(new h(this,n[v]));else this.addFile(new h(this,n,o,u,f));return this}),l.exports=h},31648:(l,T,e)=>{/** 3480 * @author Richard Davey <[email protected]> 3481 * @copyright 2013-2023 Photon Storm Ltd. 3482 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3483 */var d=e(56694),g=e(76846),r=e(72632),a=e(42927),h=e(42911),n=e(70806),o=e(45176),f=new d({Extends:o,initialize:function(v,m,p,x,y,P){var b,E;if(h(m)){var M=m;m=r(M,"key"),b=new a(v,{key:m,url:r(M,"textureURL"),extension:r(M,"textureExtension","png"),normalMap:r(M,"normalMap"),xhrSettings:r(M,"textureXhrSettings")}),E=new n(v,{key:m,url:r(M,"atlasURL"),extension:r(M,"atlasExtension","json"),xhrSettings:r(M,"atlasXhrSettings")})}else b=new a(v,m,p,y),E=new n(v,m,x,P);b.linkFile?o.call(this,v,"atlasjson",m,[b,E,b.linkFile]):o.call(this,v,"atlasjson",m,[b,E])},addToCache:function(){if(this.isReadyToProcess()){var u=this.files[0],v=this.files[1],m=this.files[2]?this.files[2].data:null;
3483this.loader.textureManager.addAtlas(u.key,u.data,v.data,m),v.addToCache(),this.complete=!0}}});g.register("aseprite",function(u,v,m,p,x){var y;if(Array.isArray(u))for(var P=0;P<u.length;P++)y=new f(this,u[P]),this.addFile(y.files);else y=new f(this,u,v,m,p,x),this.addFile(y.files);return this}),l.exports=f},73152:(l,T,e)=>{/** 3484 * @author Richard Davey <[email protected]> 3485 * @copyright 2013-2023 Photon Storm Ltd. 3486 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3487 */var d=e(56694),g=e(76846),r=e(72632),a=e(42927),h=e(42911),n=e(70806),o=e(45176),f=new d({Extends:o,initialize:function(v,m,p,x,y,P){var b,E;if(h(m)){var M=m;m=r(M,"key"),b=new a(v,{key:m,url:r(M,"textureURL"),extension:r(M,"textureExtension","png"),normalMap:r(M,"normalMap"),xhrSettings:r(M,"textureXhrSettings")}),E=new n(v,{key:m,url:r(M,"atlasURL"),extension:r(M,"atlasExtension","json"),xhrSettings:r(M,"atlasXhrSettings")})}else b=new a(v,m,p,y),E=new n(v,m,x,P);b.linkFile?o.call(this,v,"atlasjson",m,[b,E,b.linkFile]):o.call(this,v,"atlasjson",m,[b,E])},addToCache:function(){if(this.isReadyToProcess()){var u=this.files[0],v=this.files[1],m=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(u.key,u.data,v.data,m),this.complete=!0}}});g.register("atlas",function(u,v,m,p,x){var y;if(Array.isArray(u))for(var P=0;P<u.length;P++)y=new f(this,u[P]),this.addFile(y.files);else y=new f(this,u,v,m,p,x),this.addFile(y.files);return this}),l.exports=f},24616:(l,T,e)=>{/** 3488 * @author Richard Davey <[email protected]> 3489 * @copyright 2013-2023 Photon Storm Ltd. 3490 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3491 */var d=e(56694),g=e(76846),r=e(72632),a=e(42927),h=e(42911),n=e(45176),o=e(15297),f=new d({Extends:n,initialize:function(v,m,p,x,y,P){var b,E;if(h(m)){var M=m;m=r(M,"key"),b=new a(v,{key:m,url:r(M,"textureURL"),extension:r(M,"textureExtension","png"),normalMap:r(M,"normalMap"),xhrSettings:r(M,"textureXhrSettings")}),E=new o(v,{key:m,url:r(M,"atlasURL"),extension:r(M,"atlasExtension","xml"),xhrSettings:r(M,"atlasXhrSettings")})}else b=new a(v,m,p,y),E=new o(v,m,x,P);b.linkFile?n.call(this,v,"atlasxml",m,[b,E,b.linkFile]):n.call(this,v,"atlasxml",m,[b,E])},addToCache:function(){if(this.isReadyToProcess()){var u=this.files[0],v=this.files[1],m=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlasXML(u.key,u.data,v.data,m),this.complete=!0}}});g.register("atlasXML",function(u,v,m,p,x){var y;if(Array.isArray(u))for(var P=0;P<u.length;P++)y=new f(this,u[P]),this.addFile(y.files);else y=new f(this,u,v,m,p,x),this.addFile(y.files);return this}),l.exports=f},67448:(l,T,e)=>{/** 3492 * @author Richard Davey <[email protected]> 3493 * @copyright 2013-2023 Photon Storm Ltd. 3494 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3495 */var d=e(56694),g=e(12117),r=e(98035),a=e(76846),h=e(72632),n=e(30929),o=e(42911),f=new d({Extends:r,initialize:function(v,m,p,x,y){if(o(m)){var P=m;m=h(P,"key"),x=h(P,"xhrSettings"),y=h(P,"context",y)}var b={type:"audio",cache:v.cacheManager.audio,extension:p.type,responseType:"arraybuffer",key:m,url:p.url,xhrSettings:x,config:{context:y}};r.call(this,v,b)},onProcess:function(){this.state=g.FILE_PROCESSING;var u=this;this.config.context.decodeAudioData(this.xhrLoader.response,function(v){u.data=v,u.onProcessComplete()},function(v){console.error("Error decoding audio: "+u.key+" - ",v?v.message:null),u.onProcessError()}),this.config.context=null}});f.create=function(u,v,m,p,x){var y=u.systems.game,P=y.config.audio,b=y.device.audio;o(v)&&(m=h(v,"url",[]),p=h(v,"config",{}));var E=f.getAudioURL(y,m);return E?b.webAudio&&!P.disableWebAudio?new f(u,v,E,x,y.sound.context):new n(u,v,E,p):(console.warn('No audio URLs for "%s" matched this device',v),null)},f.getAudioURL=function(u,v){Array.isArray(v)||(v=[v]);for(var m=0;m<v.length;m++){var p=h(v[m],"url",v[m]);if(p.indexOf("blob:")===0||p.indexOf("data:")===0)return{url:p,type:""};var x=p.match(/\.([a-zA-Z0-9]+)($|\?)/);if(x=h(v[m],"type",x?x[1]:"").toLowerCase(),u.device.audio[x])return{url:p,type:x}}return null},a.register("audio",function(u,v,m,p){var x=this.systems.game,y=x.config.audio,P=x.device.audio;if(y.noAudio||!P.webAudio&&!P.audioData)return this;var b;if(Array.isArray(u))for(var E=0;E<u.length;E++)b=f.create(this,u[E]),b&&this.addFile(b);else b=f.create(this,u,v,m,p),b&&this.addFile(b);return this}),l.exports=f},66109:(l,T,e)=>{/** 3496 * @author Richard Davey <[email protected]> 3497 * @copyright 2013-2023 Photon Storm Ltd. 3498 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3499 */var d=e(67448),g=e(56694),r=e(76846),a=e(72632),h=e(42911),n=e(70806),o=e(45176),f=new g({Extends:o,initialize:function(v,m,p,x,y,P,b){if(h(m)){var E=m;m=a(E,"key"),p=a(E,"jsonURL"),x=a(E,"audioURL"),y=a(E,"audioConfig"),P=a(E,"audioXhrSettings"),b=a(E,"jsonXhrSettings")}var M;if(!x)M=new n(v,m,p,b),o.call(this,v,"audiosprite",m,[M]),this.config.resourceLoad=!0,this.config.audioConfig=y,this.config.audioXhrSettings=P;else{var w=d.create(v,m,x,y,P);w&&(M=new n(v,m,p,b),o.call(this,v,"audiosprite",m,[w,M]),this.config.resourceLoad=!1)}},onFileComplete:function(u){var v=this.files.indexOf(u);if(v!==-1&&(this.pending--,this.config.resourceLoad&&u.type==="json"&&u.data.hasOwnProperty("resources"))){var m=u.data.resources,p=a(this.config,"audioConfig"),x=a(this.config,"audioXhrSettings"),y=d.create(this.loader,u.key,m,p,x);y&&(this.addToMultiFile(y),this.loader.addFile(y))}},addToCache:function(){if(this.isReadyToProcess()){var u=this.files[0],v=this.files[1];u.addToCache(),v.addToCache(),this.complete=!0}}});r.register("audioSprite",function(u,v,m,p,x,y){var P=this.systems.game,b=P.config.audio,E=P.device.audio;if(b&&b.noAudio||!E.webAudio&&!E.audioData)return this;var M;if(Array.isArray(u))for(var w=0;w<u.length;w++)M=new f(this,u[w]),M.files&&this.addFile(M.files);else M=new f(this,u,v,m,p,x,y),M.files&&this.addFile(M.files);return this})},40612:(l,T,e)=>{/** 3500 * @author Richard Davey <[email protected]> 3501 * @copyright 2013-2023 Photon Storm Ltd. 3502 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3503 */var d=e(56694),g=e(12117),r=e(98035),a=e(76846),h=e(72632),n=e(42911),o=new d({Extends:r,initialize:function(u,v,m,p,x){var y="bin";if(n(v)){var P=v;v=h(P,"key"),m=h(P,"url"),p=h(P,"xhrSettings"),y=h(P,"extension",y),x=h(P,"dataType",x)}var b={type:"binary",cache:u.cacheManager.binary,extension:y,responseType:"arraybuffer",key:v,url:m,xhrSettings:p,config:{dataType:x}};r.call(this,u,b)},onProcess:function(){this.state=g.FILE_PROCESSING;var f=this.config.dataType;
3503this.data=f?new f(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});a.register("binary",function(f,u,v,m){if(Array.isArray(f))for(var p=0;p<f.length;p++)this.addFile(new o(this,f[p]));else this.addFile(new o(this,f,u,m,v));return this}),l.exports=o},54565:(l,T,e)=>{/** 3504 * @author Richard Davey <[email protected]> 3505 * @copyright 2013-2023 Photon Storm Ltd. 3506 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3507 */var d=e(56694),g=e(76846),r=e(72632),a=e(42927),h=e(42911),n=e(45176),o=e(31476),f=e(15297),u=new d({Extends:n,initialize:function(m,p,x,y,P,b){var E,M;if(h(p)){var w=p;p=r(w,"key"),E=new a(m,{key:p,url:r(w,"textureURL"),extension:r(w,"textureExtension","png"),normalMap:r(w,"normalMap"),xhrSettings:r(w,"textureXhrSettings")}),M=new f(m,{key:p,url:r(w,"fontDataURL"),extension:r(w,"fontDataExtension","xml"),xhrSettings:r(w,"fontDataXhrSettings")})}else E=new a(m,p,x,P),M=new f(m,p,y,b);E.linkFile?n.call(this,m,"bitmapfont",p,[E,M,E.linkFile]):n.call(this,m,"bitmapfont",p,[E,M])},addToCache:function(){if(this.isReadyToProcess()){var v=this.files[0],m=this.files[1];v.addToCache();var p=v.cache.get(v.key),x=o(m.data,v.cache.getFrame(v.key),0,0,p);this.loader.cacheManager.bitmapFont.add(v.key,{data:x,texture:v.key,frame:null}),this.complete=!0}}});g.register("bitmapFont",function(v,m,p,x,y){var P;if(Array.isArray(v))for(var b=0;b<v.length;b++)P=new u(this,v[b]),this.addFile(P.files);else P=new u(this,v,m,p,x,y),this.addFile(P.files);return this}),l.exports=u},99898:(l,T,e)=>{/** 3508 * @author Richard Davey <[email protected]> 3509 * @copyright 2013-2023 Photon Storm Ltd. 3510 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3511 */var d=e(56694),g=e(12117),r=e(98035),a=e(76846),h=e(72632),n=e(42911),o=new d({Extends:r,initialize:function(u,v,m,p){var x="css";if(n(v)){var y=v;v=h(y,"key"),m=h(y,"url"),p=h(y,"xhrSettings"),x=h(y,"extension",x)}var P={type:"script",cache:!1,extension:x,responseType:"text",key:v,url:m,xhrSettings:p};r.call(this,u,P)},onProcess:function(){this.state=g.FILE_PROCESSING,this.data=document.createElement("style"),this.data.defer=!1,this.data.innerHTML=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});a.register("css",function(f,u,v){if(Array.isArray(f))for(var m=0;m<f.length;m++)this.addFile(new o(this,f[m]));else this.addFile(new o(this,f,u,v));return this}),l.exports=o},47375:(l,T,e)=>{/** 3512 * @author Richard Davey <[email protected]> 3513 * @copyright 2021 Photon Storm Ltd. 3514 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3515 */var d=e(73152),g=e(40612),r=e(56694),a=e(76846),h=e(72632),n=e(42927),o=e(42911),f=e(70806),u=e(67409),v=e(30657),m=e(80802),p=e(45176),x=e(24904),y=new r({Extends:p,initialize:function(b,E,M,w){if(M.multiAtlasURL){var A=new f(b,{key:E,url:M.multiAtlasURL,xhrSettings:w,config:M});p.call(this,b,"texture",E,[A])}else{var R=M.textureURL.substr(M.textureURL.length-3);M.type||(M.type=R.toLowerCase()==="ktx"?"KTX":"PVR");var L=new g(b,{key:E,url:M.textureURL,extension:R,xhrSettings:w,config:M});if(M.atlasURL){var O=new f(b,{key:E,url:M.atlasURL,xhrSettings:w,config:M});p.call(this,b,"texture",E,[L,O])}else p.call(this,b,"texture",E,[L])}this.config=M},onFileComplete:function(P){var b=this.files.indexOf(P);if(b!==-1){if(this.pending--,!this.config.multiAtlasURL)return;if(P.type==="json"&&P.data.hasOwnProperty("textures")){var E=P.data.textures,M=this.config,w=this.loader,A=w.baseURL,R=w.path,L=w.prefix,O=h(M,"multiBaseURL",this.baseURL),I=h(M,"multiPath",this.path),D=h(M,"prefix",this.prefix),B=h(M,"textureXhrSettings");O&&w.setBaseURL(O),I&&w.setPath(I),D&&w.setPrefix(D);for(var z=0;z<E.length;z++){var X=E[z].image,W="CMA"+this.multiKeyIndex+"_"+X,j=new g(w,W,X,B);if(this.addToMultiFile(j),w.addFile(j),E[z].normalMap){var N=new g(w,W,E[z].normalMap,B);N.type="normalMap",j.setLink(N),this.addToMultiFile(N),w.addFile(N)}}w.setBaseURL(A),w.setPath(R),w.setPrefix(L)}}},addToCache:function(){if(this.isReadyToProcess()){var P=this.config;if(P.multiAtlasURL)this.addMultiToCache();else{var b=this.loader.systems.renderer,E=this.loader.textureManager,M,w=this.files[0],A=this.files[1];if(P.type==="PVR"?M=x(w.data):P.type==="KTX"&&(M=u(w.data)),M&&b.supportsCompressedTexture(P.format,M.internalFormat)){M.format=b.getCompressedTextureName(P.format,M.internalFormat);var R=A&&A.data?A.data:null;E.addCompressedTexture(w.key,M,R)}}this.complete=!0}},addMultiToCache:function(){for(var P=this.config,b=this.files[0],E=[],M=[],w=[],A=this.loader.systems.renderer,R=this.loader.textureManager,L,O=1;O<this.files.length;O++){var I=this.files[O];if(I.type!=="normalMap")for(var D=I.key.indexOf("_"),B=I.key.substr(D+1),z=I.data,
3515X=0;X<b.data.textures.length;X++){var W=b.data.textures[X];if(W.image===B){P.type==="PVR"?L=x(z):P.type==="KTX"&&(L=u(z)),L&&A.supportsCompressedTexture(P.format,L.internalFormat)&&(L.format=A.getCompressedTextureName(P.format,L.internalFormat),M.push(L),E.push(W),I.linkFile&&w.push(I.linkFile.data));break}}}w.length===0&&(w=void 0),R.addAtlasJSONArray(this.key,M,E,w),this.complete=!0}});a.register("texture",function(P,b,E){var M=this.systems.renderer,w=function(R,L,O,I){var D={format:null,type:null,textureURL:void 0,atlasURL:void 0,multiAtlasURL:void 0,multiPath:void 0,multiBaseURL:void 0};if(o(L)){var B=L;L=h(B,"key"),O=h(B,"url"),I=h(B,"xhrSettings")}var z=!1;for(var X in O)if(M.supportsCompressedTexture(X)){var W=O[X];typeof W=="string"?D.textureURL=W:D=v(W,D),D.format=X.toUpperCase(),z=!0;break}if(!z)console.warn("No supported compressed texture format or IMG fallback",L);else if(D.format==="IMG"){var j,N;D.multiAtlasURL?(N=new m(R,L,D.multiAtlasURL,D.multiPath,D.multiBaseURL,I),j=N.files):D.atlasURL?(N=new d(R,L,D.textureURL,D.atlasURL,I),j=N.files):j=new n(R,L,D.textureURL,I),R.addFile(j)}else{var Y=new y(R,L,D,I);R.addFile(Y.files)}};if(Array.isArray(P))for(var A=0;A<P.length;A++)w(this,P[A]);else w(this,P,b,E);return this}),l.exports=y},46568:(l,T,e)=>{/** 3516 * @author Richard Davey <[email protected]> 3517 * @copyright 2013-2023 Photon Storm Ltd. 3518 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3519 */var d=e(56694),g=e(12117),r=e(98035),a=e(76846),h=e(72632),n=e(42911),o=e(31053),f=new d({Extends:r,initialize:function(v,m,p,x,y){var P="glsl";if(n(m)){var b=m;m=h(b,"key"),p=h(b,"url"),x=h(b,"shaderType","fragment"),y=h(b,"xhrSettings"),P=h(b,"extension",P)}else x===void 0&&(x="fragment");var E={type:"glsl",cache:v.cacheManager.shader,extension:P,responseType:"text",key:m,url:p,config:{shaderType:x},xhrSettings:y};r.call(this,v,E)},onProcess:function(){this.state=g.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var u=this.data.split(` 3520`),v=this.extractBlock(u,0);if(v)for(;v;){var m=this.getShaderName(v.header),p=this.getShaderType(v.header),x=this.getShaderUniforms(v.header),y=v.shader;if(this.cache.has(m)){var P=this.cache.get(m);p==="fragment"?P.fragmentSrc=y:P.vertexSrc=y,P.uniforms||(P.uniforms=x)}else p==="fragment"?this.cache.add(m,new o(m,y,"",x)):this.cache.add(m,new o(m,"",y,x));v=this.extractBlock(u,v.offset)}else this.config.shaderType==="fragment"?this.cache.add(this.key,new o(this.key,this.data)):this.cache.add(this.key,new o(this.key,"",this.data))},getShaderName:function(u){for(var v=0;v<u.length;v++){var m=u[v].trim();if(m.substring(0,5)==="name:")return m.substring(5).trim()}return this.key},getShaderType:function(u){for(var v=0;v<u.length;v++){var m=u[v].trim();if(m.substring(0,5)==="type:")return m.substring(5).trim()}return this.config.shaderType},getShaderUniforms:function(u){for(var v={},m=0;m<u.length;m++){var p=u[m].trim();if(p.substring(0,8)==="uniform."){var x=p.indexOf(":");if(x){var y=p.substring(8,x);try{v[y]=JSON.parse(p.substring(x+1))}catch{console.warn("Invalid uniform JSON: "+y)}}}}return v},extractBlock:function(u,v){for(var m=-1,p=-1,x=-1,y=!1,P=!1,b=[],E=[],M=v;M<u.length;M++){var w=u[M].trim();if(w==="---")if(m===-1)m=M,y=!0;else if(y)p=M,y=!1,P=!0;else{P=!1;break}else y?b.push(w):P&&(E.push(w),x=M)}return!y&&p!==-1?{header:b,shader:E.join(` 3521`),offset:x}:null}});a.register("glsl",function(u,v,m,p){if(Array.isArray(u))for(var x=0;x<u.length;x++)this.addFile(new f(this,u[x]));else this.addFile(new f(this,u,v,m,p));return this}),l.exports=f},30929:(l,T,e)=>{/** 3522 * @author Richard Davey <[email protected]> 3523 * @copyright 2013-2023 Photon Storm Ltd. 3524 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3525 */var d=e(56694),g=e(683),r=e(98035),a=e(72632),h=e(30750),n=e(42911),o=new d({Extends:r,initialize:function(u,v,m,p){if(n(v)){var x=v;v=a(x,"key"),p=a(x,"config",p)}var y={type:"audio",cache:u.cacheManager.audio,extension:m.type,key:v,url:m.url,config:p};r.call(this,u,y),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 f=0;f<this.data.length;f++){var u=this.data[f];u.oncanplaythrough=null,u.onerror=null}this.loader.nextFile(this,!1)},onProgress:function(f){var u=f.target;u.oncanplaythrough=null,u.onerror=null,this.filesLoaded++,this.percentComplete=Math.min(this.filesLoaded/this.filesTotal,1),this.loader.emit(g.FILE_PROGRESS,this,this.percentComplete),this.filesLoaded===this.filesTotal&&this.onLoad()},load:function(){this.data=[];var f=this.config&&this.config.instances||1;this.filesTotal=f,this.filesLoaded=0,this.percentComplete=0;for(var u=0;u<f;u++){var v=new Audio;v.dataset||(v.dataset={}),v.dataset.name=this.key+("0"+u).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(u=0;
3525u<this.data.length;u++)v=this.data[u],v.src=h(this,this.loader.baseURL),this.locked||v.load();this.locked&&setTimeout(this.onLoad.bind(this))}});l.exports=o},77459:(l,T,e)=>{/** 3526 * @author Richard Davey <[email protected]> 3527 * @copyright 2013-2023 Photon Storm Ltd. 3528 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3529 */var d=e(56694),g=e(12117),r=e(98035),a=e(76846),h=e(72632),n=e(42911),o=new d({Extends:r,initialize:function(u,v,m,p){var x="html";if(n(v)){var y=v;v=h(y,"key"),m=h(y,"url"),p=h(y,"xhrSettings"),x=h(y,"extension",x)}var P={type:"text",cache:u.cacheManager.html,extension:x,responseType:"text",key:v,url:m,xhrSettings:p};r.call(this,u,P)},onProcess:function(){this.state=g.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});a.register("html",function(f,u,v){if(Array.isArray(f))for(var m=0;m<f.length;m++)this.addFile(new o(this,f[m]));else this.addFile(new o(this,f,u,v));return this}),l.exports=o},9755:(l,T,e)=>{/** 3530 * @author Richard Davey <[email protected]> 3531 * @copyright 2013-2023 Photon Storm Ltd. 3532 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3533 */var d=e(56694),g=e(12117),r=e(98035),a=e(76846),h=e(72632),n=e(42911),o=new d({Extends:r,initialize:function(u,v,m,p,x,y){p===void 0&&(p=512),x===void 0&&(x=512);var P="html";if(n(v)){var b=v;v=h(b,"key"),m=h(b,"url"),y=h(b,"xhrSettings"),P=h(b,"extension",P),p=h(b,"width",p),x=h(b,"height",x)}var E={type:"html",cache:u.textureManager,extension:P,responseType:"text",key:v,url:m,xhrSettings:y,config:{width:p,height:x}};r.call(this,u,E)},onProcess:function(){this.state=g.FILE_PROCESSING;var f=this.config.width,u=this.config.height,v=[];v.push('<svg width="'+f+'px" height="'+u+'px" viewBox="0 0 '+f+" "+u+'" 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 m=[v.join(` 3534`)],p=this;try{var x=new window.Blob(m,{type:"image/svg+xml;charset=utf-8"})}
3534catch{p.state=g.FILE_ERRORED,p.onProcessComplete();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){r.revokeObjectURL(p.data),p.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(p.data),p.onProcessError()},r.createObjectURL(this.data,x,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});a.register("htmlTexture",function(f,u,v,m,p){if(Array.isArray(f))for(var x=0;x<f.length;x++)this.addFile(new o(this,f[x]));else this.addFile(new o(this,f,u,v,m,p));return this}),l.exports=o},42927:(l,T,e)=>{/** 3535 * @author Richard Davey <[email protected]> 3536 * @copyright 2013-2023 Photon Storm Ltd. 3537 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3538 */var d=e(56694),g=e(12117),r=e(98035),a=e(76846),h=e(72632),n=e(42911),o=e(30750),f=new d({Extends:r,initialize:function u(v,m,p,x,y){var P="png",b;if(n(m)){var E=m;m=h(E,"key"),p=h(E,"url"),b=h(E,"normalMap"),x=h(E,"xhrSettings"),P=h(E,"extension",P),y=h(E,"frameConfig")}Array.isArray(p)&&(b=p[1],p=p[0]);var M={type:"image",cache:v.textureManager,extension:P,responseType:"blob",key:m,url:p,xhrSettings:x,config:y};if(r.call(this,v,M),b){var w=new u(v,this.key,b,x,y);w.type="normalMap",this.setLink(w),v.addFile(w)}this.useImageElementLoad=v.imageLoadType==="HTMLImageElement",this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=g.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var u=this;this.data.onload=function(){r.revokeObjectURL(u.data),u.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(u.data),u.onProcessError()}
3538,r.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var u=this.state;this.state=g.FILE_PROCESSING,u===g.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){if(this.state=g.FILE_LOADING,this.src=o(this,this.loader.baseURL),this.src.indexOf("data:")===0)console.warn("Local data URIs are not supported: "+this.key);else{this.data=new Image,this.data.crossOrigin=this.crossOrigin;var u=this;this.data.onload=function(){u.state=g.FILE_LOADED,u.loader.nextFile(u,!0)},this.data.onerror=function(){u.loader.nextFile(u,!1)},this.data.src=this.src}},addToCache:function(){var u=this.linkFile;u?u.state>=g.FILE_COMPLETE&&(this.type==="normalMap"?this.cache.addImage(this.key,u.data,this.data):this.cache.addImage(this.key,this.data,u.data)):this.cache.addImage(this.key,this.data)}});a.register("image",function(u,v,m){if(Array.isArray(u))for(var p=0;p<u.length;p++)this.addFile(new f(this,u[p]));else this.addFile(new f(this,u,v,m));return this}),l.exports=f},70806:(l,T,e)=>{/** 3539 * @author Richard Davey <[email protected]> 3540 * @copyright 2013-2023 Photon Storm Ltd. 3541 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3542 */var d=e(56694),g=e(12117),r=e(98035),a=e(76846),h=e(72632),n=e(10850),o=e(42911),f=new d({Extends:r,initialize:function(v,m,p,x,y){var P="json";if(o(m)){var b=m;m=h(b,"key"),p=h(b,"url"),x=h(b,"xhrSettings"),P=h(b,"extension",P),y=h(b,"dataKey",y)}var E={type:"json",cache:v.cacheManager.json,extension:P,responseType:"text",key:m,url:p,xhrSettings:x,config:y};r.call(this,v,E),o(p)&&(y?this.data=n(p,y):this.data=p,this.state=g.FILE_POPULATED)},onProcess:function(){if(this.state!==g.FILE_POPULATED){this.state=g.FILE_PROCESSING;try{var u=JSON.parse(this.xhrLoader.responseText)}catch(m){throw this.onProcessError(),m}var v=this.config;typeof v=="string"?this.data=n(u,v,u):this.data=u}this.onProcessComplete()}});a.register("json",function(u,v,m,p){if(Array.isArray(u))for(var x=0;x<u.length;x++)this.addFile(new f(this,u[x]));else this.addFile(new f(this,u,v,p,m));return this}),l.exports=f},80802:(l,T,e)=>{/** 3543 * @author Richard Davey <[email protected]> 3544 * @copyright 2013-2023 Photon Storm Ltd. 3545 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3546 */var d=e(56694),g=e(76846),r=e(72632),a=e(42927),h=e(42911),n=e(70806),o=e(45176),f=new d({Extends:o,initialize:function(v,m,p,x,y,P,b){if(h(m)){var E=m;m=r(E,"key"),r(E,"url",!1)?p=r(E,"url"):p=r(E,"atlasURL"),P=r(E,"xhrSettings"),x=r(E,"path"),y=r(E,"baseURL"),b=r(E,"textureXhrSettings")}var M=new n(v,m,p,P);o.call(this,v,"multiatlas",m,[M]),this.config.path=x,this.config.baseURL=y,this.config.textureXhrSettings=b},onFileComplete:function(u){var v=this.files.indexOf(u);if(v!==-1&&(this.pending--,u.type==="json"&&u.data.hasOwnProperty("textures"))){var m=u.data.textures,p=this.config,x=this.loader,y=x.baseURL,P=x.path,b=x.prefix,E=r(p,"baseURL",this.baseURL),M=r(p,"path",this.path),w=r(p,"prefix",this.prefix),A=r(p,"textureXhrSettings");x.setBaseURL(E),x.setPath(M),x.setPrefix(w);for(var R=0;R<m.length;R++){var L=m[R].image,O="MA"+this.multiKeyIndex+"_"+L,I=new a(x,O,L,A);if(this.addToMultiFile(I),x.addFile(I),m[R].normalMap){var D=new a(x,O,m[R].normalMap,A);D.type="normalMap",I.setLink(D),this.addToMultiFile(D),x.addFile(D)}}x.setBaseURL(y),x.setPath(P),x.setPrefix(b)}},addToCache:function(){if(this.isReadyToProcess()){for(var u=this.files[0],v=[],m=[],p=[],x=1;x<this.files.length;x++){var y=this.files[x];if(y.type!=="normalMap")for(var P=y.key.indexOf("_"),b=y.key.substr(P+1),E=y.data,M=0;M<u.data.textures.length;M++){var w=u.data.textures[M];if(w.image===b){m.push(E),v.push(w),y.linkFile&&p.push(y.linkFile.data);break}}}p.length===0&&(p=void 0),this.loader.textureManager.addAtlasJSONArray(this.key,m,v,p),this.complete=!0}}});g.register("multiatlas",function(u,v,m,p,x){var y;if(Array.isArray(u))for(var P=0;P<u.length;P++)y=new f(this,u[P]),this.addFile(y.files);else y=new f(this,u,v,m,p,x),this.addFile(y.files);return this}),l.exports=f},39034:(l,T,e)=>{/** 3547 * @author Richard Davey <[email protected]> 3548 * @copyright 2013-2023 Photon Storm Ltd. 3549 * @license {@link https://opensource.org/licenses/MIT|MIT License}
3550 */var d=e(56694),g=e(76846),r=e(72632),a=e(42911),h=e(45176),n=e(55188),o=new d({Extends:h,initialize:function(u,v,m,p){var x="js",y=[];if(a(v)){var P=v;v=r(P,"key"),m=r(P,"url"),p=r(P,"xhrSettings"),x=r(P,"extension",x)}Array.isArray(m)||(m=[m]);for(var b=0;b<m.length;b++){var E=new n(u,{key:v+"_"+b.toString(),url:m[b],extension:x,xhrSettings:p});E.onProcess=function(){this.onProcessComplete()},y.push(E)}h.call(this,u,"scripts",v,y)},addToCache:function(){if(this.isReadyToProcess()){for(var f=0;f<this.files.length;f++){var u=this.files[f];u.data=document.createElement("script"),u.data.language="javascript",u.data.type="text/javascript",u.data.defer=!1,u.data.text=u.xhrLoader.responseText,document.head.appendChild(u.data)}this.complete=!0}}});g.register("scripts",function(f,u,v){var m;if(Array.isArray(f))for(var p=0;p<f.length;p++)m=new o(this,f[p]),this.addFile(m.files);else m=new o(this,f,u,v),this.addFile(m.files);return this}),l.exports=o},85527:(l,T,e)=>{/** 3551 * @author Richard Davey <[email protected]> 3552 * @copyright 2013-2023 Photon Storm Ltd. 3553 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3554 */var d=e(56694),g=e(76846),r=e(72632),a=e(42911),h=e(45176),n=e(27291),o=e(76799),f=e(86897),u=new d({Extends:h,initialize:function(m,p,x,y,P,b){var E,M,w=m.cacheManager.obj;if(a(p)){var A=p;p=r(A,"key"),E=new f(m,{key:p,type:"obj",cache:w,url:r(A,"url"),extension:r(A,"extension","obj"),xhrSettings:r(A,"xhrSettings"),config:{flipUV:r(A,"flipUV",P)}}),y=r(A,"matURL"),y&&(M=new f(m,{key:p,type:"mat",cache:w,url:y,extension:r(A,"matExtension","mat"),xhrSettings:r(A,"xhrSettings")}))}else E=new f(m,{key:p,url:x,type:"obj",cache:w,extension:"obj",xhrSettings:b,config:{flipUV:P}}),y&&(M=new f(m,{key:p,url:y,type:"mat",cache:w,extension:"mat",xhrSettings:b}));h.call(this,m,"obj",p,[E,M])},addToCache:function(){if(this.isReadyToProcess()){var v=this.files[0],m=this.files[1],p=n(v.data,v.config.flipUV);m&&(p.materials=o(m.data)),v.cache.add(v.key,p),this.complete=!0}}});g.register("obj",function(v,m,p,x,y){var P;if(Array.isArray(v))for(var b=0;b<v.length;b++)P=new u(this,v[b]),this.addFile(P.files);else P=new u(this,v,m,p,x,y),this.addFile(P.files);return this}),l.exports=u},3616:(l,T,e)=>{/** 3555 * @author Richard Davey <[email protected]> 3556 * @copyright 2013-2023 Photon Storm Ltd. 3557 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3558 */var d=e(56694),g=e(12117),r=e(76846),a=e(70806),h=new d({Extends:a,initialize:function(o,f,u,v,m){a.call(this,o,f,u,v,m),this.type="packfile"},onProcess:function(){if(this.state!==g.FILE_POPULATED&&(this.state=g.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText)),this.data.hasOwnProperty("files")&&this.config){var n={};n[this.config]=this.data,this.data=n}this.loader.addPack(this.data,this.config),this.onProcessComplete()}});r.register("pack",function(n,o,f,u){if(Array.isArray(n))for(var v=0;v<n.length;v++)this.addFile(new h(this,n[v]));else this.addFile(new h(this,n,o,u,f));return this}),l.exports=h},12217:(l,T,e)=>{/** 3559 * @author Richard Davey <[email protected]> 3560 * @copyright 2013-2023 Photon Storm Ltd. 3561 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3562 */var d=e(56694),g=e(12117),r=e(98035),a=e(76846),h=e(72632),n=e(42911),o=new d({Extends:r,initialize:function(u,v,m,p,x,y){var P="js";if(n(v)){var b=v;v=h(b,"key"),m=h(b,"url"),y=h(b,"xhrSettings"),P=h(b,"extension",P),p=h(b,"start"),x=h(b,"mapping")}var E={type:"plugin",cache:!1,extension:P,responseType:"text",key:v,url:m,xhrSettings:y,config:{start:p,mapping:x}};r.call(this,u,E),typeof m=="function"&&(this.data=m,this.state=g.FILE_POPULATED)},onProcess:function(){var f=this.loader.systems.plugins,u=this.config,v=h(u,"start",!1),m=h(u,"mapping",null);if(this.state===g.FILE_POPULATED)f.install(this.key,this.data,v,m);else{this.state=g.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 p=f.install(this.key,window[this.key],v,m);(v||m)&&(this.loader.systems[m]=p,this.loader.scene[m]=p)}this.onProcessComplete()}});a.register("plugin",function(f,u,v,m,p){if(Array.isArray(f))for(var x=0;x<f.length;x++)this.addFile(new o(this,f[x]));else this.addFile(new o(this,f,u,v,m,p));return this}),l.exports=o},4474:(l,T,e)=>{/** 3563 * @author Richard Davey <[email protected]> 3564 * @copyright 2013-2023 Photon Storm Ltd. 3565 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3566 */var d=e(56694),g=e(12117),r=e(98035),a=e(76846),h=e(72632),n=e(42911),o=new d({Extends:r,initialize:function(u,v,m,p,x){var y="svg";if(n(v)){var P=v;v=h(P,"key"),m=h(P,"url"),p=h(P,"svgConfig",{}),x=h(P,"xhrSettings"),y=h(P,"extension",y)}var b={type:"svg",cache:u.textureManager,extension:y,responseType:"text",key:v,url:m,xhrSettings:x,config:{width:h(p,"width"),height:h(p,"height"),scale:h(p,"scale")}};r.call(this,u,b)},onProcess:function(){this.state=g.FILE_PROCESSING;
3566var f=this.xhrLoader.responseText,u=[f],v=this.config.width,m=this.config.height,p=this.config.scale;t:if(v&&m||p){var x=null,y=new DOMParser;x=y.parseFromString(f,"text/xml");var P=x.getElementsByTagName("svg")[0],b=P.hasAttribute("viewBox"),E=parseFloat(P.getAttribute("width")),M=parseFloat(P.getAttribute("height"));if(!b&&E&&M)P.setAttribute("viewBox","0 0 "+E+" "+M);else if(b&&!E&&!M){var w=P.getAttribute("viewBox").split(/\s+|,/);E=w[2],M=w[3]}if(p)if(E&&M)v=E*p,m=M*p;else break t;P.setAttribute("width",v.toString()+"px"),P.setAttribute("height",m.toString()+"px"),u=[new XMLSerializer().serializeToString(P)]}try{var A=new window.Blob(u,{type:"image/svg+xml;charset=utf-8"})}catch{this.onProcessError();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var R=this,L=!1;this.data.onload=function(){L||r.revokeObjectURL(R.data),R.onProcessComplete()},this.data.onerror=function(){L?R.onProcessError():(L=!0,r.revokeObjectURL(R.data),R.data.src="data:image/svg+xml,"+encodeURIComponent(u.join("")))},r.createObjectURL(this.data,A,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});a.register("svg",function(f,u,v,m){if(Array.isArray(f))for(var p=0;p<f.length;p++)this.addFile(new o(this,f[p]));else this.addFile(new o(this,f,u,v,m));return this}),l.exports=o},95171:(l,T,e)=>{/** 3567 * @author Richard Davey <[email protected]> 3568 * @copyright 2013-2023 Photon Storm Ltd. 3569 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3570 */var d=e(56694),g=e(12117),r=e(98035),a=e(76846),h=e(72632),n=e(42911),o=new d({Extends:r,initialize:function(u,v,m,p){var x="js";if(n(v)){var y=v;v=h(y,"key"),m=h(y,"url"),p=h(y,"xhrSettings"),x=h(y,"extension",x)}var P={type:"text",extension:x,responseType:"text",key:v,url:m,xhrSettings:p};r.call(this,u,P)},onProcess:function(){this.state=g.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var f=this.data.concat(`(function(){ 3571return new `+this.key+`(); 3572}).call(this);`),u=eval;this.loader.sceneManager.add(this.key,u(f)),this.complete=!0}});a.register("sceneFile",function(f,u,v){if(Array.isArray(f))for(var m=0;m<f.length;m++)this.addFile(new o(this,f[m]));else this.addFile(new o(this,f,u,v));return this}),l.exports=o},82458:(l,T,e)=>{/** 3573 * @author Richard Davey <[email protected]> 3574 * @copyright 2013-2023 Photon Storm Ltd. 3575 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3576 */var d=e(56694),g=e(12117),r=e(98035),a=e(76846),h=e(72632),n=e(42911),o=new d({Extends:r,initialize:function(u,v,m,p,x,y){var P="js";if(n(v)){var b=v;v=h(b,"key"),m=h(b,"url"),y=h(b,"xhrSettings"),P=h(b,"extension",P),p=h(b,"systemKey"),x=h(b,"sceneKey")}var E={type:"scenePlugin",cache:!1,extension:P,responseType:"text",key:v,url:m,xhrSettings:y,config:{systemKey:p,sceneKey:x}};r.call(this,u,E),typeof m=="function"&&(this.data=m,this.state=g.FILE_POPULATED)},onProcess:function(){var f=this.loader.systems.plugins,u=this.config,v=this.key,m=h(u,"systemKey",v),p=h(u,"sceneKey",v);this.state===g.FILE_POPULATED?f.installScenePlugin(m,this.data,p,this.loader.scene,!0):(this.state=g.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),f.installScenePlugin(m,window[this.key],p,this.loader.scene,!0)),this.onProcessComplete()}});a.register("scenePlugin",function(f,u,v,m,p){if(Array.isArray(f))for(var x=0;x<f.length;x++)this.addFile(new o(this,f[x]));else this.addFile(new o(this,f,u,v,m,p));return this}),l.exports=o},55188:(l,T,e)=>{/** 3577 * @author Richard Davey <[email protected]> 3578 * @copyright 2013-2023 Photon Storm Ltd. 3579 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3580 */var d=e(56694),g=e(12117),r=e(98035),a=e(76846),h=e(72632),n=e(42911),o=new d({Extends:r,initialize:function(u,v,m,p,x){var y="js";if(n(v)){var P=v;v=h(P,"key"),m=h(P,"url"),p=h(P,"type","script"),x=h(P,"xhrSettings"),y=h(P,"extension",y)}else p===void 0&&(p="script");var b={type:p,cache:!1,extension:y,responseType:"text",key:v,url:m,xhrSettings:x};r.call(this,u,b)},onProcess:function(){this.state=g.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLo
vendor: 4,417 bytes, lines 3580-3603
3580ader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});a.register("script",function(f,u,v,m){if(Array.isArray(f))for(var p=0;p<f.length;p++)this.addFile(new o(this,f[p]));else this.addFile(new o(this,f,u,v,m));return this}),l.exports=o},33536:(l,T,e)=>{/** 3581 * @author Richard Davey <[email protected]> 3582 * @copyright 2013-2023 Photon Storm Ltd. 3583 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3584 */var d=e(56694),g=e(12117),r=e(76846),a=e(42927),h=new d({Extends:a,initialize:function(o,f,u,v,m){a.call(this,o,f,u,m,v),this.type="spritesheet"},addToCache:function(){var n=this.linkFile;n?n.state>=g.FILE_COMPLETE&&(this.type==="normalMap"?this.cache.addSpriteSheet(this.key,n.data,this.config,this.data):this.cache.addSpriteSheet(this.key,this.data,this.config,n.data)):this.cache.addSpriteSheet(this.key,this.data,this.config)}});r.register("spritesheet",function(n,o,f,u){if(Array.isArray(n))for(var v=0;v<n.length;v++)this.addFile(new h(this,n[v]));else this.addFile(new h(this,n,o,f,u));return this}),l.exports=h},86897:(l,T,e)=>{/** 3585 * @author Richard Davey <[email protected]> 3586 * @copyright 2013-2023 Photon Storm Ltd. 3587 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3588 */var d=e(56694),g=e(12117),r=e(98035),a=e(76846),h=e(72632),n=e(42911),o=new d({Extends:r,initialize:function(u,v,m,p){var x="text",y="txt",P=u.cacheManager.text;if(n(v)){var b=v;v=h(b,"key"),m=h(b,"url"),p=h(b,"xhrSettings"),y=h(b,"extension",y),x=h(b,"type",x),P=h(b,"cache",P)}var E={type:x,cache:P,extension:y,responseType:"text",key:v,url:m,xhrSettings:p};r.call(this,u,E)},onProcess:function(){this.state=g.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});a.register("text",function(f,u,v){if(Array.isArray(f))for(var m=0;m<f.length;m++)this.addFile(new o(this,f[m]));else this.addFile(new o(this,f,u,v));return this}),l.exports=o},58673:(l,T,e)=>{/** 3589 * @author Richard Davey <[email protected]> 3590 * @copyright 2013-2023 Photon Storm Ltd. 3591 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3592 */var d=e(56694),g=e(12117),r=e(98035),a=e(76846),h=e(72632),n=e(42911),o=e(93560),f=new d({Extends:r,initialize:function(v,m,p,x){var y="csv";if(n(m)){var P=m;m=h(P,"key"),p=h(P,"url"),x=h(P,"xhrSettings"),y=h(P,"extension",y)}var b={type:"tilemapCSV",cache:v.cacheManager.tilemap,extension:y,responseType:"text",key:m,url:p,xhrSettings:x};r.call(this,v,b),this.tilemapFormat=o.CSV},onProcess:function(){this.state=g.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var u={format:this.tilemapFormat,data:this.data};this.cache.add(this.key,u)}});a.register("tilemapCSV",function(u,v,m){if(Array.isArray(u))for(var p=0;p<u.length;p++)this.addFile(new f(this,u[p]));else this.addFile(new f(this,u,v,m));return this}),l.exports=f},98896:(l,T,e)=>{/** 3593 * @author Richard Davey <[email protected]> 3594 * @copyright 2013-2023 Photon Storm Ltd. 3595 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3596 */var d=e(56694),g=e(76846),r=e(70806),a=e(93560),h=new d({Extends:r,initialize:function(o,f,u,v){r.call(this,o,f,u,v),this.type="tilemapJSON",this.cache=o.cacheManager.tilemap},addToCache:function(){var n={format:a.WELTMEISTER,data:this.data};this.cache.add(this.key,n)}});g.register("tilemapImpact",function(n,o,f){if(Array.isArray(n))for(var u=0;u<n.length;u++)this.addFile(new h(this,n[u]));else this.addFile(new h(this,n,o,f));return this}),l.exports=h},50563:(l,T,e)=>{/** 3597 * @author Richard Davey <[email protected]> 3598 * @copyright 2013-2023 Photon Storm Ltd. 3599 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3600 */var d=e(56694),g=e(76846),r=e(70806),a=e(93560),h=new d({Extends:r,initialize:function(o,f,u,v){r.call(this,o,f,u,v),this.type="tilemapJSON",this.cache=o.cacheManager.tilemap},addToCache:function(){var n={format:a.TILED_JSON,data:this.data};this.cache.add(this.key,n)}});g.register("tilemapTiledJSON",function(n,o,f){if(Array.isArray(n))for(var u=0;u<n.length;u++)this.addFile(new h(this,n[u]));else this.addFile(new h(this,n,o,f));return this}),l.exports=h},82857:(l,T,e)=>{/** 3601 * @author Richard Davey <[email protected]> 3602 * @copyright 2013-2023 Photon Storm Ltd. 3603 * @license {@link https://opensource.org/licenses/MIT|MIT License}
3604 */var d=e(56694),g=e(76846),r=e(72632),a=e(42927),h=e(42911),n=e(45176),o=e(86897),f=new d({Extends:n,initialize:function(v,m,p,x,y,P){var b,E;if(h(m)){var M=m;m=r(M,"key"),b=new a(v,{key:m,url:r(M,"textureURL"),extension:r(M,"textureExtension","png"),normalMap:r(M,"normalMap"),xhrSettings:r(M,"textureXhrSettings")}),E=new o(v,{key:m,url:r(M,"atlasURL"),extension:r(M,"atlasExtension","txt"),xhrSettings:r(M,"atlasXhrSettings")})}else b=new a(v,m,p,y),E=new o(v,m,x,P);b.linkFile?n.call(this,v,"unityatlas",m,[b,E,b.linkFile]):n.call(this,v,"unityatlas",m,[b,E])},addToCache:function(){if(this.isReadyToProcess()){var u=this.files[0],v=this.files[1],m=this.files[2]?this.files[2].data:null;this.loader.textureManager.addUnityAtlas(u.key,u.data,v.data,m),this.complete=!0}}});g.register("unityAtlas",function(u,v,m,p,x){var y;if(Array.isArray(u))for(var P=0;P<u.length;P++)y=new f(this,u[P]),this.addFile(y.files);else y=new f(this,u,v,m,p,x),this.addFile(y.files);return this}),l.exports=f},22833:(l,T,e)=>{/** 3605 * @author Richard Davey <[email protected]> 3606 * @copyright 2013-2023 Photon Storm Ltd. 3607 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3608 */var d=e(56694),g=e(12117),r=e(98035),a=e(76846),h=e(30750),n=e(72632),o=e(42911),f=new d({Extends:r,initialize:function(v,m,p,x){if(x===void 0&&(x=!1),o(m)){var y=m;m=n(y,"key"),p=n(y,"url",[]),x=n(y,"noAudio",!1)}var P=v.systems.game.device.video.getVideoURL(p);P||console.warn("VideoFile: No supported format for "+m);var b={type:"video",cache:v.cacheManager.video,extension:P.type,key:m,url:P.url,config:{noAudio:x}};r.call(this,v,b)},onProcess:function(){this.data={url:this.src,noAudio:this.config.noAudio,crossOrigin:this.crossOrigin},this.onProcessComplete()},load:function(){this.src=h(this,this.loader.baseURL),this.state=g.FILE_LOADED,this.loader.nextFile(this,!0)}});a.register("video",function(u,v,m){if(Array.isArray(u))for(var p=0;p<u.length;p++)this.addFile(new f(this,u[p]));else this.addFile(new f(this,u,v,m));return this}),l.exports=f},15297:(l,T,e)=>{/** 3609 * @author Richard Davey <[email protected]> 3610 * @copyright 2013-2023 Photon Storm Ltd. 3611 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3612 */var d=e(56694),g=e(12117),r=e(98035),a=e(76846),h=e(72632),n=e(42911),o=e(89200),f=new d({Extends:r,initialize:function(v,m,p,x){var y="xml";if(n(m)){var P=m;m=h(P,"key"),p=h(P,"url"),x=h(P,"xhrSettings"),y=h(P,"extension",y)}var b={type:"xml",cache:v.cacheManager.xml,extension:y,responseType:"text",key:m,url:p,xhrSettings:x};r.call(this,v,b)},onProcess:function(){this.state=g.FILE_PROCESSING,this.data=o(this.xhrLoader.responseText),this.data?this.onProcessComplete():this.onProcessError()}});a.register("xml",function(u,v,m){if(Array.isArray(u))for(var p=0;p<u.length;p++)this.addFile(new f(this,u[p]));else this.addFile(new f(this,u,v,m));return this}),l.exports=f},34034:(l,T,e)=>{/** 3613 * @author Richard Davey <[email protected]> 3614 * @copyright 2013-2023 Photon Storm Ltd. 3615 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3616 */l.exports={AnimationJSONFile:e(46468),AsepriteFile:e(31648),AtlasJSONFile:e(73152),AtlasXMLFile:e(24616),AudioFile:e(67448),AudioSpriteFile:e(66109),BinaryFile:e(40612),BitmapFontFile:e(54565),CompressedTextureFile:e(47375),CSSFile:e(99898),GLSLFile:e(46568),HTML5AudioFile:e(30929),HTMLFile:e(77459),HTMLTextureFile:e(9755),ImageFile:e(42927),JSONFile:e(70806),MultiAtlasFile:e(80802),MultiScriptFile:e(39034),OBJFile:e(85527),PackFile:e(3616),PluginFile:e(12217),SceneFile:e(95171),ScenePluginFile:e(82458),ScriptFile:e(55188),SpriteSheetFile:e(33536),SVGFile:e(4474),TextFile:e(86897),TilemapCSVFile:e(58673),TilemapImpactFile:e(98896),TilemapJSONFile:e(50563),UnityAtlasFile:e(82857),VideoFile:e(22833),XMLFile:e(15297)}},95695:(l,T,e)=>{/** 3617 * @author Richard Davey <[email protected]> 3618 * @copyright 2013-2023 Photon Storm Ltd. 3619 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3620 */var d=e(12117),g=e(98611),r={Events:e(683),FileTypes:e(34034),File:e(98035),FileTypesManager:e(76846),GetURL:e(30750),LoaderPlugin:e(67285),MergeXHRSettings:e(43531),MultiFile:e(45176),XHRLoader:e(88490),XHRSettings:e(33868)};r=g(!1,r,d),l.exports=r},26042:l=>{/** 3621 * @author Richard Davey <[email protected]> 3622 * @copyright 2013-2023 Photon Storm Ltd. 3623 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3624 */var T=function(e){for(var d=0,g=0;g<e.length;g++)d+=+e[g];return d/e.length};l.exports=T},22824:(l,T,e)=>{/** 3625 * @author Richard Davey <[email protected]> 3626 * @copyright 2013-2023 Photon Storm Ltd. 3627 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3628 */var d=e(8034),g=function(r,a){return d(r)/d(a)/d(r-a)};l.exports=g},17489:l=>{/** 3629 * @author Richard Davey <[email protected]> 3630 * @copyright 2013-2023 Photon Storm Ltd. 3631 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3632 */var T=function(e,d){return Math.floor(Math.random()*(d-e+1)+e)};l.exports=T},14976:l=>{/** 3633 * @author Richard Davey <[email protected]> 3634 * @copyright 2013-2023 Photon Storm Ltd. 3635 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3636 */var T=function(e,d,g,r,a){var h=(r-d)*.5,n=(a-g)*.5,o=e*e,f=e*o;return(2*g-2*r+h+n)*f+(-3*g+3*r-2*h-n)*o+h*e+g};l.exports=T},89129:l=>{/** 3637 * @author Richard Davey <[email protected]> 3638 * @copyright 2013-2023 Photon Storm Ltd. 3639 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3640 */var T=function(e,d,g){d===void 0&&(d=0),g===void 0&&(g=10);var r=Math.pow(g,-d);return Math.ceil(e*r)/r};l.exports=T},82897:l=>{/** 3641 * @author Richard Davey <[email protected]> 3642 * @copyright 2013-2023 Photon Storm Ltd. 3643 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3644 */var T=function(e,d,g){return Math.max(d,Math.min(g,e))};l.exports=T},75606:(l,T,e)=>{/** 3645 * @author Richard Davey <[email protected]> 3646 * @copyright 2013-2023 Photon Storm Ltd. 3647 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3648 */var d=e(83392),g=function(r){return r*d.DEG_TO_RAD};l.exports=g},767:l=>{/** 3649 * @author Richard Davey <[email protected]> 3650 * @copyright 2013-2023 Photon Storm Ltd. 3651 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3652 */var T=function(e,d){return Math.abs(e-d)};l.exports=T},9849:(l,T,e)=>{/** 3653 * @author Richard Davey <[email protected]> 3654 * @copyright 2013-2023 Photon Storm Ltd. 3655 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3656 */var d=e(82897),g=e(56694),r=e(16650),a=e(72283),h=new r,n=new g({initialize:function o(f,u,v,m){f===void 0&&(f=0),u===void 0&&(u=0),v===void 0&&(v=0),m===void 0&&(m=o.DefaultOrder),this._x=f,this._y=u,this._z=v,this._order=m,this.onChangeCallback=a},x:{get:function(){return this._x},set:function(o){this._x=o,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(o){this._y=o,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(o){this._z=o,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(o){this._order=o,this.onChangeCallback(this)}},set:function(o,f,u,v){return v===void 0&&(v=this._order),this._x=o,this._y=f,this._z=u,this._order=v,this.onChangeCallback(this),this},copy:function(o){return this.set(o.x,o.y,o.z,o.order)},setFromQuaternion:function(o,f,u){return f===void 0&&(f=this._order),u===void 0&&(u=!1),h.fromQuat(o),this.setFromRotationMatrix(h,f,u)},setFromRotationMatrix:function(o,f,u){f===void 0&&(f=this._order),u===void 0&&(u=!1);var v=o.val,m=v[0],p=v[4],x=v[8],y=v[1],P=v[5],b=v[9],E=v[2],M=v[6],w=v[10],A=0,R=0,L=0,O=.99999;switch(f){case"XYZ":{R=Math.asin(d(x,-1,1)),Math.abs(x)<O?(A=Math.atan2(-b,w),L=Math.atan2(-p,m)):A=Math.atan2(M,P);break}case"YXZ":{A=Math.asin(-d(b,-1,1)),Math.abs(b)<O?(R=Math.atan2(x,w),L=Math.atan2(y,P)):R=Math.atan2(-E,m);break}case"ZXY":{A=Math.asin(d(M,-1,1)),Math.abs(M)<O?(R=Math.atan2(-E,w),L=Math.atan2(-p,P)):L=Math.atan2(y,m);break}case"ZYX":{R=Math.asin(-d(E,-1,1)),Math.abs(E)<O?(A=Math.atan2(M,w),L=Math.atan2(y,m)):L=Math.atan2(-p,P);break}case"YZX":{L=Math.asin(d(y,-1,1)),Math.abs(y)<O?(A=Math.atan2(-b,P),R=Math.atan2(-E,m)):R=Math.atan2(x,w);break}case"XZY":{L=Math.asin(-d(p,-1,1)),Math.abs(p)<O?(A=Math.atan2(M,P),R=Math.atan2(x,m)):A=Math.atan2(-b,w);break}}return this._x=A,this._y=R,this._z=L,this._order=f,u&&this.onChangeCallback(this),this}});n.RotationOrders=["XYZ","YXZ","ZXY","ZYX","YZX","XZY"],n.DefaultOrder="XYZ",l.exports=n},8034:l=>{/** 3657 * @author Richard Davey <[email protected]> 3658 * @copyright 2013-2023 Photon Storm Ltd. 3659 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3660 */var T=function(e){if(e===0)return 1;for(var d=e;--e;)d*=e;return d};l.exports=T},61616:l=>{/** 3661 * @author Richard Davey <[email protected]> 3662 * @copyright 2013-2023 Photon Storm Ltd. 3663 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3664 */var T=function(e,d){return Math.random()*(d-e)+e};l.exports=T},60679:l=>{/** 3665 * @author Richard Davey <[email protected]> 3666 * @copyright 2013-2023 Photon Storm Ltd. 3667 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3668 */var T=function(e,d,g){d===void 0&&(d=0),g===void 0&&(g=10);var r=Math.pow(g,-d);return Math.floor(e*r)/r};l.exports=T},91806:(l,T,e)=>{/** 3669 * @author Richard Davey <[email protected]> 3670 * @copyright 2013-2023 Photon Storm Ltd. 3671 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3672 */var d=e(82897),g=function(r,a,h){return r=d(r,0,1),(h-a)*r+a};l.exports=g},79366:l=>{/** 3673 * @author Richard Davey <[email protected]> 3674 * @copyright 2013-2023 Photon Storm Ltd. 3675 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3676 */var T=function(e,d){return e/d/1e3};l.exports=T},43776:l=>{/** 3677 * @author Richard Davey <[email protected]> 3678 * @copyright 2013-2023 Photon Storm Ltd. 3679 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3680 */var T=function(e){return e==parseFloat(e)?!(e%2):void 0};l.exports=T},58442:l=>{/** 3681 * @author Richard Davey <[email protected]> 3682 * @copyright 2013-2023 Photon Storm Ltd. 3683 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3684 */var T=function(e){return e===parseFloat(e)?!(e%2):void 0};l.exports=T},42798:l=>{/** 3685 * @author Richard Davey <[email protected]> 3686 * @copyright 2013-2023 Photon Storm Ltd. 3687 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3688 */var T=function(e,d,g){return(d-e)*g+e};l.exports=T},61072:l=>{/** 3689 * @author Greg McLean <GregDevProjects> 3690 * @copyright 2021 Photon Storm Ltd. 3691 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3692 */var T=function(e,d,g){return g===void 0&&(g=0),e.clone().lerp(d,g)};l.exports=T},5341:(l,T,e)=>{/** 3693 * @author Richard Davey <[email protected]> 3694 * @copyright 2013-2023 Photon Storm Ltd. 3695 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3696 */var d=e(56694),g=new d({initialize:function(a){this.val=new Float32Array(9),a?this.copy(a):this.identity()},clone:function(){return new g(this)},set:function(r){return this.copy(r)},copy:function(r){var a=this.val,h=r.val;return a[0]=h[0],a[1]=h[1],a[2]=h[2],a[3]=h[3],a[4]=h[4],a[5]=h[5],a[6]=h[6],a[7]=h[7],a[8]=h[8],this},fromMat4:function(r){var a=r.val,h=this.val;return h[0]=a[0],h[1]=a[1],h[2]=a[2],h[3]=a[4],h[4]=a[5],h[5]=a[6],h[6]=a[8],h[7]=a[9],h[8]=a[10],this},fromArray:function(r){var a=this.val;return a[0]=r[0],a[1]=r[1],a[2]=r[2],a[3]=r[3],a[4]=r[4],a[5]=r[5],a[6]=r[6],a[7]=r[7],a[8]=r[8],this},identity:function(){var r=this.val;return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=1,r[5]=0,r[6]=0,r[7]=0,r[8]=1,this},transpose:function(){var r=this.val,a=r[1],h=r[2],n=r[5];return r[1]=r[3],r[2]=r[6],r[3]=a,r[5]=r[7],r[6]=h,r[7]=n,this},invert:function(){var r=this.val,a=r[0],h=r[1],n=r[2],o=r[3],f=r[4],u=r[5],v=r[6],m=r[7],p=r[8],x=p*f-u*m,y=-p*o+u*v,P=m*o-f*v,b=a*x+h*y+n*P;return b?(b=1/b,r[0]=x*b,r[1]=(-p*h+n*m)*b,r[2]=(u*h-n*f)*b,r[3]=y*b,r[4]=(p*a-n*v)*b,r[5]=(-u*a+n*o)*b,r[6]=P*b,r[7]=(-m*a+h*v)*b,r[8]=(f*a-h*o)*b,this):null},adjoint:function(){var r=this.val,a=r[0],h=r[1],n=r[2],o=r[3],f=r[4],u=r[5],v=r[6],m=r[7],p=r[8];return r[0]=f*p-u*m,r[1]=n*m-h*p,r[2]=h*u-n*f,r[3]=u*v-o*p,r[4]=a*p-n*v,r[5]=n*o-a*u,r[6]=o*m-f*v,r[7]=h*v-a*m,r[8]=a*f-h*o,this},determinant:function(){var r=this.val,a=r[0],h=r[1],n=r[2],o=r[3],f=r[4],u=r[5],v=r[6],m=r[7],p=r[8];return a*(p*f-u*m)+h*(-p*o+u*v)+n*(m*o-f*v)},multiply:function(r){var a=this.val,h=a[0],n=a[1],o=a[2],f=a[3],u=a[4],v=a[5],m=a[6],p=a[7],x=a[8],y=r.val,P=y[0],b=y[1],E=y[2],M=y[3],w=y[4],A=y[5],R=y[6],L=y[7],O=y[8];return a[0]=P*h+b*f+E*m,a[1]=P*n+b*u+E*p,a[2]=P*o+b*v+E*x,a[3]=M*h+w*f+A*m,a[4]=M*n+w*u+A*p,a[5]=M*o+w*v+A*x,a[6]=R
vendor: 5,073 bytes, lines 3696-3700
3696*h+L*f+O*m,a[7]=R*n+L*u+O*p,a[8]=R*o+L*v+O*x,this},translate:function(r){var a=this.val,h=r.x,n=r.y;return a[6]=h*a[0]+n*a[3]+a[6],a[7]=h*a[1]+n*a[4]+a[7],a[8]=h*a[2]+n*a[5]+a[8],this},rotate:function(r){var a=this.val,h=a[0],n=a[1],o=a[2],f=a[3],u=a[4],v=a[5],m=Math.sin(r),p=Math.cos(r);return a[0]=p*h+m*f,a[1]=p*n+m*u,a[2]=p*o+m*v,a[3]=p*f-m*h,a[4]=p*u-m*n,a[5]=p*v-m*o,this},scale:function(r){var a=this.val,h=r.x,n=r.y;return a[0]=h*a[0],a[1]=h*a[1],a[2]=h*a[2],a[3]=n*a[3],a[4]=n*a[4],a[5]=n*a[5],this},fromQuat:function(r){var a=r.x,h=r.y,n=r.z,o=r.w,f=a+a,u=h+h,v=n+n,m=a*f,p=a*u,x=a*v,y=h*u,P=h*v,b=n*v,E=o*f,M=o*u,w=o*v,A=this.val;return A[0]=1-(y+b),A[3]=p+w,A[6]=x-M,A[1]=p-w,A[4]=1-(m+b),A[7]=P+E,A[2]=x+M,A[5]=P-E,A[8]=1-(m+y),this},normalFromMat4:function(r){var a=r.val,h=this.val,n=a[0],o=a[1],f=a[2],u=a[3],v=a[4],m=a[5],p=a[6],x=a[7],y=a[8],P=a[9],b=a[10],E=a[11],M=a[12],w=a[13],A=a[14],R=a[15],L=n*m-o*v,O=n*p-f*v,I=n*x-u*v,D=o*p-f*m,B=o*x-u*m,z=f*x-u*p,X=y*w-P*M,W=y*A-b*M,j=y*R-E*M,N=P*A-b*w,Y=P*R-E*w,F=b*R-E*A,G=L*F-O*Y+I*N+D*j-B*W+z*X;return G?(G=1/G,h[0]=(m*F-p*Y+x*N)*G,h[1]=(p*j-v*F-x*W)*G,h[2]=(v*Y-m*j+x*X)*G,h[3]=(f*Y-o*F-u*N)*G,h[4]=(n*F-f*j+u*W)*G,h[5]=(o*j-n*Y-u*X)*G,h[6]=(w*z-A*B+R*D)*G,h[7]=(A*I-M*z-R*O)*G,h[8]=(M*B-w*I+R*L)*G,this):null}});l.exports=g},16650:(l,T,e)=>{/** 3697 * @author Richard Davey <[email protected]> 3698 * @copyright 2013-2023 Photon Storm Ltd. 3699 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3700 */var d=e(56694),g=e(70015),r=1e-6,a=new d({initialize:function(m){this.val=new Float32Array(16),m?this.copy(m):this.identity()},clone:function(){return new a(this)},set:function(v){return this.copy(v)},setValues:function(v,m,p,x,y,P,b,E,M,w,A,R,L,O,I,D){var B=this.val;return B[0]=v,B[1]=m,B[2]=p,B[3]=x,B[4]=y,B[5]=P,B[6]=b,B[7]=E,B[8]=M,B[9]=w,B[10]=A,B[11]=R,B[12]=L,B[13]=O,B[14]=I,B[15]=D,this},copy:function(v){var m=v.val;return this.setValues(m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7],m[8],m[9],m[10],m[11],m[12],m[13],m[14],m[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,m,p){var x=h.fromQuat(p),y=x.val,P=m.x,b=m.y,E=m.z;return this.setValues(y[0]*P,y[1]*P,y[2]*P,0,y[4]*b,y[5]*b,y[6]*b,0,y[8]*E,y[9]*E,y[10]*E,0,v.x,v.y,v.z,1)},xyz:function(v,m,p){this.identity();var x=this.val;return x[12]=v,x[13]=m,x[14]=p,this},scaling:function(v,m,p){this.zero();var x=this.val;return x[0]=v,x[5]=m,x[10]=p,x[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,m=v[1],p=v[2],x=v[3],y=v[6],P=v[7],b=v[11];return v[1]=v[4],v[2]=v[8],v[3]=v[12],v[4]=m,v[6]=v[9],v[7]=v[13],v[8]=p,v[9]=y,v[11]=v[14],v[12]=x,v[13]=P,v[14]=b,this},getInverse:function(v){return this.copy(v),this.invert()},invert:function(){var v=this.val,m=v[0],p=v[1],x=v[2],y=v[3],P=v[4],b=v[5],E=v[6],M=v[7],w=v[8],A=v[9],R=v[10],L=v[11],O=v[12],I=v[13],D=v[14],B=v[15],z=m*b-p*P,X=m*E-x*P,W=m*M-y*P,j=p*E-x*b,N=p*M-y*b,Y=x*M-y*E,F=w*I-A*O,G=w*D-R*O,k=w*B-L*O,V=A*D-R*I,U=A*B-L*I,$=R*B-L*D,K=z*$-X*U+W*V+j*k-N*G+Y*F;return K?(K=1/K,this.setValues((b*$-E*U+M*V)*K,(x*U-p*$-y*V)*K,(I*Y-D*N+B*j)*K,(R*N-A*Y-L*j)*K,(E*k-P*$-M*G)*K,(m*$-x*k+y*G)*K,(D*W-O*Y-B*X)*K,(w*Y-R*W+L*X)*K,(P*U-b*k+M*F)*K,(p*k-m*U-y*F)*K,(O*N-I*W+B*z)*K,(A*W-w*N-L*z)*K,(b*G-P*V-E*F)*K,(m*V-p*G+x*F)*K,(I*X-O*j-D*z)*K,(w*j-A*X+R*z)*K)):this},adjoint:function(){var v=this.val,m=v[0],p=v[1],x=v[2],y=v[3],P=v[4],b=v[5],E=v[6],M=v[7],w=v[8],A=v[9],R=v[10],L=v[11],O=v[12],I=v[13],D=v[14],B=v[15];return this.setValues(b*(R*B-L*D)-A*(E*B-M*D)+I*(E*L-M*R),-(p*(R*B-L*D)-A*(x*B-y*D)+I*(x*L-y*R)),p*(E*B-M*D)-b*(x*B-y*D)+I*(x*M-y*E),-(p*(E*L-M*R)-b*(x*L-y*R)+A*(x*M-y*E)),-(P*(R*B-L*D)-w*(E*B-M*D)+O*(E*L-M*R)),m*(R*B-L*D)-w*(x*B-y*D)+O*(x*L-y*R),-(m*(E*B-M*D)-P*(x*B-y*D)+O*(x*M-y*E)),m*(E*L-M*R)-P*(x*L-y*R)+w*(x*M-y*E),P*(A*B-L*I)-w*(b*B-M*I)+O*(b*L-M*A),-(m*(A*B-L*I)-w*(p*B-y*I)+O*(p*L-y*A)),m*(b*B-M*I)-P*(p*B-y*I)+O*(p*M-y*b),-(m*(b*L-M*A)-P*(p*L-y*A)+w*(p*M-y*b)),-(P*(A*D-R*I)-w*(b*D-E*I)+O*(b*R-E*A)),m*(A*D-R*I)-w*(p*D-x*I)+O*(p*R-x*A),-(m*(b*D-E*I)-P*(p*D-x*I)+O*(p*E-x*b)),m*(b*R-E*A)-P*(p*R-x*A)+w*(p*E-x*b))},determinant:function(){var v=this.val,m=v[0],p=v[1],x=v[2],y=v[3],P=v[4],b=v[5],E=v[6],M=v[7],w=v[8],A=v[9],R=v[10],L=v[11],O=v[12],I=v[13],D=v[14],B=v[15],z=m*b-p*P,X=m*E-x*P,W=m*M-y*P,j=p*E-x*b,N=p*M-y*b,Y=x*M-y*E,F=w*I-A*O,G=w*D-R*O,k=w*B-L*O,V=A*D-R*I,U=A*B-L*I,$=R*B-L*D;return z*$-X*U+W*V+j*k-N*G+Y*F},multiply:function(v){var m=this.val,p=m[0],x=m[1],y=m[2],P=m[3],b=m[4],E=m[5],M=m[6],w=m[7],A=m[8],R=m[9],L=m[10],O=m[11],I=m[12],D=m[13],B=m[14],z=m[15],X=v.val,W=X[0],j=X[1],N=X[2],Y=X[3];return m[0]=W*p+j*b+N*A+Y*I,m[1]=W*x+j*E+N*R+Y*D,m[2]=W*y+j*M+N*L+Y*B,m[3]=W*P+j*w+N*O+Y*z,W=X[4],j=X[5],N=X[6],Y=X[7],m[4]=W*p+j*b+N*A+Y*I,m[5]=W*x+j*E+N*R+Y*D,m[6]=W*y+j*M+N*L+Y*B,m[7]=W*P+j*w+N*O+Y*z,W=X[8],j=X[9],N=X[10],Y=X[11],m[8]=W*p+j*b+N*A+Y*I,m[9]=W*x+j*E+N*R+Y*D,m[10
3700]=W*y+j*M+N*L+Y*B,m[11]=W*P+j*w+N*O+Y*z,W=X[12],j=X[13],N=X[14],Y=X[15],m[12]=W*p+j*b+N*A+Y*I,m[13]=W*x+j*E+N*R+Y*D,m[14]=W*y+j*M+N*L+Y*B,m[15]=W*P+j*w+N*O+Y*z,this},multiplyLocal:function(v){var m=this.val,p=v.val;return this.setValues(m[0]*p[0]+m[1]*p[4]+m[2]*p[8]+m[3]*p[12],m[0]*p[1]+m[1]*p[5]+m[2]*p[9]+m[3]*p[13],m[0]*p[2]+m[1]*p[6]+m[2]*p[10]+m[3]*p[14],m[0]*p[3]+m[1]*p[7]+m[2]*p[11]+m[3]*p[15],m[4]*p[0]+m[5]*p[4]+m[6]*p[8]+m[7]*p[12],m[4]*p[1]+m[5]*p[5]+m[6]*p[9]+m[7]*p[13],m[4]*p[2]+m[5]*p[6]+m[6]*p[10]+m[7]*p[14],m[4]*p[3]+m[5]*p[7]+m[6]*p[11]+m[7]*p[15],m[8]*p[0]+m[9]*p[4]+m[10]*p[8]+m[11]*p[12],m[8]*p[1]+m[9]*p[5]+m[10]*p[9]+m[11]*p[13],m[8]*p[2]+m[9]*p[6]+m[10]*p[10]+m[11]*p[14],m[8]*p[3]+m[9]*p[7]+m[10]*p[11]+m[11]*p[15],m[12]*p[0]+m[13]*p[4]+m[14]*p[8]+m[15]*p[12],m[12]*p[1]+m[13]*p[5]+m[14]*p[9]+m[15]*p[13],m[12]*p[2]+m[13]*p[6]+m[14]*p[10]+m[15]*p[14],m[12]*p[3]+m[13]*p[7]+m[14]*p[11]+m[15]*p[15])},premultiply:function(v){return this.multiplyMatrices(v,this)},multiplyMatrices:function(v,m){var p=v.val,x=m.val,y=p[0],P=p[4],b=p[8],E=p[12],M=p[1],w=p[5],A=p[9],R=p[13],L=p[2],O=p[6],I=p[10],D=p[14],B=p[3],z=p[7],X=p[11],W=p[15],j=x[0],N=x[4],Y=x[8],F=x[12],G=x[1],k=x[5],V=x[9],U=x[13],$=x[2],K=x[6],J=x[10],_=x[14],tt=x[3],st=x[7],ht=x[11],lt=x[15];return this.setValues(y*j+P*G+b*$+E*tt,M*j+w*G+A*$+R*tt,L*j+O*G+I*$+D*tt,B*j+z*G+X*$+W*tt,y*N+P*k+b*K+E*st,M*N+w*k+A*K+R*st,L*N+O*k+I*K+D*st,B*N+z*k+X*K+W*st,y*Y+P*V+b*J+E*ht,M*Y+w*V+A*J+R*ht,L*Y+O*V+I*J+D*ht,B*Y+z*V+X*J+W*ht,y*F+P*U+b*_+E*lt,M*F+w*U+A*_+R*lt,L*F+O*U+I*_+D*lt,B*F+z*U+X*_+W*lt)},translate:function(v){return this.translateXYZ(v.x,v.y,v.z)},translateXYZ:function(v,m,p){var x=this.val;return x[12]=x[0]*v+x[4]*m+x[8]*p+x[12],x[13]=x[1]*v+x[5]*m+x[9]*p+x[13],x[14]=x[2]*v+x[6]*m+x[10]*p+x[14],x[15]=x[3]*v+x[7]*m+x[11]*p+x[15],this},scale:function(v){return this.scaleXYZ(v.x,v.y,v.z)},scaleXYZ:function(v,m,p){var x=this.val;return x[0]=x[0]*v,x[1]=x[1]*v,x[2]=x[2]*v,x[3]=x[3]*v,x[4]=x[4]*m,x[5]=x[5]*m,x[6]=x[6]*m,x[7]=x[7]*m,x[8]=x[8]*p,x[9]=x[9]*p,x[10]=x[10]*p,x[11]=x[11]*p,this},makeRotationAxis:function(v,m){var p=Math.cos(m),x=Math.sin(m),y=1-p,P=v.x,b=v.y,E=v.z,M=y*P,w=y*b;return this.setValues(M*P+p,M*b-x*E,M*E+x*b,0,M*b+x*E,w*b+p,w*E-x*P,0,M*E-x*b,w*E+x*P,y*E*E+p,0,0,0,0,1)},rotate:function(v,m){var p=this.val,x=m.x,y=m.y,P=m.z,b=Math.sqrt(x*x+y*y+P*P);if(Math.abs(b)<r)return this;b=1/b,x*=b,y*=b,P*=b;var E=Math.sin(v),M=Math.cos(v),w=1-M,A=p[0],R=p[1],L=p[2],O=p[3],I=p[4],D=p[5],B=p[6],z=p[7],X=p[8],W=p[9],j=p[10],N=p[11],Y=p[12],F=p[13],G=p[14],k=p[15],V=x*x*w+M,U=y*x*w+P*E,$=P*x*w-y*E,K=x*y*w-P*E,J=y*y*w+M,_=P*y*w+x*E,tt=x*P*w+y*E,st=y*P*w-x*E,ht=P*P*w+M;return this.setValues(A*V+I*U+X*$,R*V+D*U+W*$,L*V+B*U+j*$,O*V+z*U+N*$,A*K+I*J+X*_,R*K+D*J+W*_,L*K+B*J+j*_,O*K+z*J+N*_,A*tt+I*st+X*ht,R*tt+D*st+W*ht,L*tt+B*st+j*ht,O*tt+z*st+N*ht,Y,F,G,k)},rotateX:function(v){var m=this.val,p=Math.sin(v),x=Math.cos(v),y=m[4],P=m[5],b=m[6],E=m[7],M=m[8],w=m[9],A=m[10],R=m[11];return m[4]=y*x+M*p,m[5]=P*x+w*p,m[6]=b*x+A*p,m[7]=E*x+R*p,m[8]=M*x-y*p,m[9]=w*x-P*p,m[10]=A*x-b*p,m[11]=R*x-E*p,this},rotateY:function(v){var m=this.val,p=Math.sin(v),x=Math.cos(v),y=m[0],P=m[1],b=m[2],E=m[3],M=m[8],w=m[9],A=m[10],R=m[11];return m[0]=y*x-M*p,m[1]=P*x-w*p,m[2]=b*x-A*p,m[3]=E*x-R*p,m[8]=y*p+M*x,m[9]=P*p+w*x,m[10]=b*p+A*x,m[11]=E*p+R*x,this},rotateZ:function(v){var m=this.val,p=Math.sin(v),x=Math.cos(v),y=m[0],P=m[1],b=m[2],E=m[3],M=m[4],w=m[5],A=m[6],R=m[7];return m[0]=y*x+M*p,m[1]=P*x+w*p,m[2]=b*x+A*p,m[3]=E*x+R*p,m[4]=M*x-y*p,m[5]=w*x-P*p,m[6]=A*x-b*p,m[7]=R*x-E*p,this},fromRotationTranslation:function(v,m){var p=v.x,x=v.y,y=v.z,P=v.w,b=p+p,E=x+x,M=y+y,w=p*b,A=p*E,R=p*M,L=x*E,O=x*M,I=y*M,D=P*b,B=P*E,z=P*M;return this.setValues(1-(L+I),A+z,R-B,0,A-z,1-(w+I),O+D,0,R+B,O-D,1-(w+L),0,m.x,m.y,m.z,1)},fromQuat:function(v){var m=v.x,p=v.y,x=v.z,y=v.w,P=m+m,b=p+p,E=x+x,M=m*P,w=m*b,A=m*E,R=p*b,L=p*E,O=x*E,I=y*P,D=y*b,B=y*E;return this.setValues(1-(R+O),w+B,A-D,0,w-B,1-(M+O),L+I,0,A+D,L-I,1-(M+R),0,0,0,0,1)},frustum:function(v,m,p,x,y,P){var b=1/(m-v),E=1/(x-p),M=1/(y-P);return this.setValues(y*2*b,0,0,0,0,y*2*E,0,0,(m+v)*b,(x+p)*E,(P+y)*M,-1,0,0,P*y*2*M,0)},perspective:function(v,m,p,x){var y=1/Math.tan(v/2),P=1/(p-x);return this.setValues(y/m,0,0,0,0,y,0,0,0,0,(x+p)*P,-1,0,0,2*x*p*P,0)},perspectiveLH:function(v,m,p,x){return this.setValues(2*p/v,0,0,0,0,2*p/m,0,0,0,0,-x/(p-x),1,0,0,p*x/(p-x),0)},ortho:function(v,m,p,x,y,P){var b=v-m,E=p-x,M=y-P;return b=b===0?b:1/b,E=E===0?E:1/E,M=M===0?M:1/M,this.setValues(-2*b,0,0,0,0,-2*E,0,0,0,0,2*M,0,(v+m)*b,(x+p)*E,(P+y)*M,1)},lookAtRH:function(v,m,p){var x=this.val;return u.subVectors(v,m),u.getLengthSquared()===0&&(u.z=1),u.normalize(),o.crossVectors(p,u),o.getLengthSquared()===0&&(Math.abs(p.z)===1?u.x+=1e-4:u.z+=1e-4,u.normalize(),o.crossVectors(p,u)),o.normalize(),f.crossVectors(u,o),x[0]=o.x,x[1]=o.y,x[2]=o.z,x[4]=f.x,x[5]=f.y,x[6]=f.z,x[8]=u.x,x[9]=u.y,x[10]=u.z,this},lookAt:function(v,m,p){var x=v.x,y=v.y,P=v.z,b=p.x,E=p.y,M=p.z,w=m.x,A=m.y,R=m.z;if(Math.abs(x-w)<r&&Math.abs(y-A)<r&&Math.abs(P-R)<r)return this.identity();var L=x-w,O=y-A,I=P-R,D=1/Math.sqrt(L*L+O*O+I*I);L*=D,O*=D,I*=D;var B=E*I-M*O,z=M*L-b*I,X=b*O-E*L;D=Math.sqrt(B*B+z*z+X*X),D?(D=1/D,B*=D,z*=D,X*=D):(B=0,z=0,X=0);var W=O*X-I*z,j=I*B-L*X,N=L*z-O*B;return D=Math.sqrt(W*W+j*j+N*N),D?(D=1/D,W*=D,j*=D,N*=D):(W=0,j=0,N=0),this.setValues(B,W,L,0,z,j,O,0,X,N,I,0,-(B*x+z*y+X*P),-(W*x+j*y+N*P),-(L*x+O*y+I*P),1)},yawPitchRoll:function(v,m,p){this.zero(),h.zero(),n.zero();var x=this.val,y=h.val,P=n.val,b=Math.sin(p),E=Math.cos(p);return x[10]=1,x[15]=1,x[0]=E,x[1]=b,x[4]=-b,x[5]=E,b=Math.sin(m),E=Math.cos(m),y[0]=1,y[15]=1,y[5]=E,y[10]=E,y[9]=-b,y[6]=b,b=Math.sin(v),E=Math.cos(v),P[5]=1,P[15]=1,P[0]=E,P[2]=-b,P[8]=b,P[10]=E,this.multiplyLocal(h),this.multiplyLocal(n),this},setWorldMatrix:function(v,m,p,x,y){return this.yawPitchRoll(v.y,v.x,v.z),h.scaling(p.x,p.y,p.z),n.xyz(m.x,m.y,m.z),this.multiplyLocal(h),this.multiplyLocal(n),x&&this.multiplyLocal(x),y&&this.multiplyLocal(y),this},multiplyToMat4:function(v,m){var p=this.val,x=v.val,y=p[0],P=p[1],b=p[2],E=p[3],M=p[4],w=p[5],A=p[6],R=p[7
3700],L=p[8],O=p[9],I=p[10],D=p[11],B=p[12],z=p[13],X=p[14],W=p[15],j=x[0],N=x[1],Y=x[2],F=x[3],G=x[4],k=x[5],V=x[6],U=x[7],$=x[8],K=x[9],J=x[10],_=x[11],tt=x[12],st=x[13],ht=x[14],lt=x[15];return m.setValues(j*y+N*M+Y*L+F*B,N*P+N*w+Y*O+F*z,Y*b+N*A+Y*I+F*X,F*E+N*R+Y*D+F*W,G*y+k*M+V*L+U*B,G*P+k*w+V*O+U*z,G*b+k*A+V*I+U*X,G*E+k*R+V*D+U*W,$*y+K*M+J*L+_*B,$*P+K*w+J*O+_*z,$*b+K*A+J*I+_*X,$*E+K*R+J*D+_*W,tt*y+st*M+ht*L+lt*B,tt*P+st*w+ht*O+lt*z,tt*b+st*A+ht*I+lt*X,tt*E+st*R+ht*D+lt*W)},fromRotationXYTranslation:function(v,m,p){var x=m.x,y=m.y,P=m.z,b=Math.sin(v.x),E=Math.cos(v.x),M=Math.sin(v.y),w=Math.cos(v.y),A=x,R=y,L=P,O=-b,I=0-O*M,D=0-E*M,B=O*w,z=E*w;return p||(A=w*x+M*P,R=I*x+E*y+B*P,L=D*x+b*y+z*P),this.setValues(w,I,D,0,0,E,b,0,M,B,z,0,A,R,L,1)},getMaxScaleOnAxis:function(){var v=this.val,m=v[0]*v[0]+v[1]*v[1]+v[2]*v[2],p=v[4]*v[4]+v[5]*v[5]+v[6]*v[6],x=v[8]*v[8]+v[9]*v[9]+v[10]*v[10];return Math.sqrt(Math.max(m,p,x))}}),h=new a,n=new a,o=new g,f=new g,u=new g;l.exports=a},69635:l=>{/** 3701 * @author Richard Davey <[email protected]> 3702 * @copyright 2013-2023 Photon Storm Ltd. 3703 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3704 */var T=function(e,d,g){return Math.min(e+d,g)};l.exports=T},37394:l=>{/** 3705 * @author Vladislav Forsh <[email protected]> 3706 * @copyright 2021 RoboWhale 3707 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3708 */var T=function(e){var d=e.length;if(d===0)return 0;e.sort(function(r,a){return r-a});var g=Math.floor(d/2);return d%2===0?(e[g]+e[g-1])/2:e[g]};l.exports=T},17259:l=>{/** 3709 * @author Richard Davey <[email protected]> 3710 * @copyright 2013-2023 Photon Storm Ltd. 3711 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3712 */var T=function(e,d,g){return Math.max(e-d,g)};l.exports=T},61820:l=>{/** 3713 * @author Richard Davey <[email protected]> 3714 * @copyright 2013-2023 Photon Storm Ltd. 3715 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3716 */var T=function(e,d,g,r){g===void 0&&(g=d+1);var a=(e-d)/(g-d);return a>1?r!==void 0?(a=(r-e)/(r-g),a<0&&(a=0)):a=1:a<0&&(a=0),a};l.exports=T},75003:(l,T,e)=>{/** 3717 * @author Richard Davey <[email protected]> 3718 * @copyright 2013-2023 Photon Storm Ltd. 3719 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3720 */var d=e(56694),g=e(5341),r=e(72283),a=e(70015),h=1e-6,n=new Int8Array([1,2,0]),o=new Float32Array([0,0,0]),f=new a(1,0,0),u=new a(0,1,0),v=new a,m=new g,p=new d({initialize:function(y,P,b,E){this.onChangeCallback=r,this.set(y,P,b,E)},x:{get:function(){return this._x},set:function(x){this._x=x,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(x){this._y=x,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(x){this._z=x,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(x){this._w=x,this.onChangeCallback(this)}},copy:function(x){return this.set(x)},set:function(x,y,P,b,E){return E===void 0&&(E=!0),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=y||0,this._z=P||0,this._w=b||0),E&&this.onChangeCallback(this),this},add:function(x){return this._x+=x.x,this._y+=x.y,this._z+=x.z,this._w+=x.w,this.onChangeCallback(this),this},subtract:function(x){return this._x-=x.x,this._y-=x.y,this._z-=x.z,this._w-=x.w,this.onChangeCallback(this),this},scale:function(x){return this._x*=x,this._y*=x,this._z*=x,this._w*=x,this.onChangeCallback(this),this},length:function(){var x=this.x,y=this.y,P=this.z,b=this.w;return Math.sqrt(x*x+y*y+P*P+b*b)},lengthSq:function(){var x=this.x,y=this.y,P=this.z,b=this.w;return x*x+y*y+P*P+b*b},normalize:function(){var x=this.x,y=this.y,P=this.z,b=this.w,E=x*x+y*y+P*P+b*b;return E>0&&(E=1/Math.sqrt(E),this._x=x*E,this._y=y*E,this._z=P*E,this._w=b*E),this.onChangeCallback(this),this},dot:function(x){return this.x*x.x+this.y*x.y+this.z*x.z+this.w*x.w},lerp:function(x,y){y===void 0&&(y=0);var P=this.x,b=this.y,E=this.z,M=this.w;return this.set(P+y*(x.x-P),b+y*(x.y-b),E+y*(x.z-E),M+y*(x.w-M))},rotationTo:function(x,y){var P=x.x*y.x+x.y*y.y+x.z*y.z;return P<-.999999?(v.copy(f).cross(x).length()<h&&v.copy(u).cross(x),v.normalize(),this.setAxisAngle(v,Math.PI)):P>.999999?this.set(0,0,0,1):(v.copy(x).cross(y),this._x=v.x,this._y=v.y,this._z=v.z,this._w=1+P,this.normalize())},setAxes:function(x,y,P){var b=m.val;return b[0]=y.x,b[3]=y.y,b[6]=y.z,b[1]=P.x,b[4]=P.y,b[7]=P.z,b[2]=-x.x,b[5]=-x.y,b[8]=-x.z,this.fromMat3(m).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(x,y){y=y*.5;var P=Math.sin(y);
3720return this.set(P*x.x,P*x.y,P*x.z,Math.cos(y))},multiply:function(x){var y=this.x,P=this.y,b=this.z,E=this.w,M=x.x,w=x.y,A=x.z,R=x.w;return this.set(y*R+E*M+P*A-b*w,P*R+E*w+b*M-y*A,b*R+E*A+y*w-P*M,E*R-y*M-P*w-b*A)},slerp:function(x,y){var P=this.x,b=this.y,E=this.z,M=this.w,w=x.x,A=x.y,R=x.z,L=x.w,O=P*w+b*A+E*R+M*L;O<0&&(O=-O,w=-w,A=-A,R=-R,L=-L);var I=1-y,D=y;if(1-O>h){var B=Math.acos(O),z=Math.sin(B);I=Math.sin((1-y)*B)/z,D=Math.sin(y*B)/z}return this.set(I*P+D*w,I*b+D*A,I*E+D*R,I*M+D*L)},invert:function(){var x=this.x,y=this.y,P=this.z,b=this.w,E=x*x+y*y+P*P+b*b,M=E?1/E:0;return this.set(-x*M,-y*M,-P*M,b*M)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(x){x*=.5;var y=this.x,P=this.y,b=this.z,E=this.w,M=Math.sin(x),w=Math.cos(x);return this.set(y*w+E*M,P*w+b*M,b*w-P*M,E*w-y*M)},rotateY:function(x){x*=.5;var y=this.x,P=this.y,b=this.z,E=this.w,M=Math.sin(x),w=Math.cos(x);return this.set(y*w-b*M,P*w+E*M,b*w+y*M,E*w-P*M)},rotateZ:function(x){x*=.5;var y=this.x,P=this.y,b=this.z,E=this.w,M=Math.sin(x),w=Math.cos(x);return this.set(y*w+P*M,P*w-y*M,b*w+E*M,E*w-b*M)},calculateW:function(){var x=this.x,y=this.y,P=this.z;return this.w=-Math.sqrt(1-x*x-y*y-P*P),this},setFromEuler:function(x,y){var P=x.x/2,b=x.y/2,E=x.z/2,M=Math.cos(P),w=Math.cos(b),A=Math.cos(E),R=Math.sin(P),L=Math.sin(b),O=Math.sin(E);switch(x.order){case"XYZ":{this.set(R*w*A+M*L*O,M*L*A-R*w*O,M*w*O+R*L*A,M*w*A-R*L*O,y);break}case"YXZ":{this.set(R*w*A+M*L*O,M*L*A-R*w*O,M*w*O-R*L*A,M*w*A+R*L*O,y);break}case"ZXY":{this.set(R*w*A-M*L*O,M*L*A+R*w*O,M*w*O+R*L*A,M*w*A-R*L*O,y);break}case"ZYX":{this.set(R*w*A-M*L*O,M*L*A+R*w*O,M*w*O-R*L*A,M*w*A+R*L*O,y);break}case"YZX":{this.set(R*w*A+M*L*O,M*L*A+R*w*O,M*w*O-R*L*A,M*w*A-R*L*O,y);break}case"XZY":{this.set(R*w*A-M*L*O,M*L*A-R*w*O,M*w*O+R*L*A,M*w*A+R*L*O,y);break}}return this},setFromRotationMatrix:function(x){var y=x.val,P=y[0],b=y[4],E=y[8],M=y[1],w=y[5],A=y[9],R=y[2],L=y[6],O=y[10],I=P+w+O,D;return I>0?(D=.5/Math.sqrt(I+1),this.set((L-A)*D,(E-R)*D,(M-b)*D,.25/D)):P>w&&P>O?(D=2*Math.sqrt(1+P-w-O),this.set(.25*D,(b+M)/D,(E+R)/D,(L-A)/D)):w>O?(D=2*Math.sqrt(1+w-P-O),this.set((b+M)/D,.25*D,(A+L)/D,(E-R)/D)):(D=2*Math.sqrt(1+O-P-w),this.set((E+R)/D,(A+L)/D,.25*D,(M-b)/D)),this},fromMat3:function(x){var y=x.val,P=y[0]+y[4]+y[8],b;if(P>0)b=Math.sqrt(P+1),this.w=.5*b,b=.5/b,this._x=(y[7]-y[5])*b,this._y=(y[2]-y[6])*b,this._z=(y[3]-y[1])*b;else{var E=0;y[4]>y[0]&&(E=1),y[8]>y[E*3+E]&&(E=2);var M=n[E],w=n[M];b=Math.sqrt(y[E*3+E]-y[M*3+M]-y[w*3+w]+1),o[E]=.5*b,b=.5/b,o[M]=(y[M*3+E]+y[E*3+M])*b,o[w]=(y[w*3+E]+y[E*3+w])*b,this._x=o[0],this._y=o[1],this._z=o[2],this._w=(y[w*3+M]-y[M*3+w])*b}return this.onChangeCallback(this),this}});l.exports=p},23701:(l,T,e)=>{/** 3721 * @author Richard Davey <[email protected]> 3722 * @copyright 2013-2023 Photon Storm Ltd. 3723 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3724 */var d=e(83392),g=function(r){return r*d.RAD_TO_DEG};l.exports=g},16906:l=>{/** 3725 * @author Richard Davey <[email protected]> 3726 * @copyright 2013-2023 Photon Storm Ltd. 3727 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3728 */var T=function(e,d){d===void 0&&(d=1);var g=Math.random()*2*Math.PI;return e.x=Math.cos(g)*d,e.y=Math.sin(g)*d,e};l.exports=T},52417:l=>{/** 3729 * @author Richard Davey <[email protected]> 3730 * @copyright 2013-2023 Photon Storm Ltd. 3731 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3732 */var T=function(e,d){d===void 0&&(d=1);var g=Math.random()*2*Math.PI,r=Math.random()*2-1,a=Math.sqrt(1-r*r)*d;return e.x=Math.cos(g)*a,e.y=Math.sin(g)*a,e.z=r*d,e};l.exports=T},17915:l=>{/** 3733 * @author Richard Davey <[email protected]> 3734 * @copyright 2013-2023 Photon Storm Ltd. 3735 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3736 */var T=function(e,d){return d===void 0&&(d=1),e.x=(Math.random()*2-1)*d,e.y=(Math.random()*2-1)*d,e.z=(Math.random()*2-1)*d,e.w=(Math.random()*2-1)*d,e};l.exports=T},52257:l=>{/** 3737 * @author Richard Davey <[email protected]> 3738 * @copyright 2013-2023 Photon Storm Ltd. 3739 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3740 */var T=function(e,d){var g=e.x,r=e.y;return e.x=g*Math.cos(d)-r*Math.sin(d),e.y=g*Math.sin(d)+r*Math.cos(d),e};l.exports=T},2386:l=>{/** 3741 * @author Richard Davey <[email protected]> 3742 * @copyright 2013-2023 Photon Storm Ltd. 3743 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3744 */var T=function(e,d,g,r){var a=Math.cos(r),h=Math.sin(r),n=e.x-d,o=e.y-g;return e.x=n*a-o*h+d,e.y=n*h+o*a+g,e};l.exports=T},72395:l=>{/** 3745 * @author Richard Davey <[email protected]> 3746 * @copyright 2013-2023 Photon Storm Ltd. 3747 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3748 */var T=function(e,d,g,r,a){var h=r+Math.atan2(e.y-g,e.x-d);return e.x=d+a*Math.cos(h),e.y=g+a*Math.sin(h),e};l.exports=T},41061:l=>{/** 3749 * @author samme 3750 * @copyright 2013-2023 Photon Storm Ltd. 3751 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3752 */var T=function(e,d,g,r,a){return e.x=d+a*Math.cos(r),e.y=g+a*Math.sin(r),e};l.exports=T},93709:(l,T,e)=>{/** 3753 * @author Richard Davey <[email protected]> 3754 * @copyright 2013-2023 Photon Storm Ltd. 3755 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3756 */var d=e(70015),g=e(16650),r=e(75003),a=new g,h=new r,n=new d,o=function(f,u,v){return h.setAxisAngle(u,v),a.fromRotationTranslation(h,n.set(0,0,0)),f.transformMat4(a)};l.exports=o},67233:l=>{/** 3757 * @author Richard Davey <[email protected]> 3758 * @copyright 2013-2023 Photon Storm Ltd. 3759 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3760 */var T=function(e){return e>0?Math.ceil(e):Math.floor(e)};l.exports=T},64333:l=>{/** 3761 * @author Richard Davey <[email protected]> 3762 * @copyright 2013-2023 Photon Storm Ltd. 3763 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3764 */var T=function(e,d,g){d===void 0&&(d=0),g===void 0&&(g=10);var r=Math.pow(g,-d);return Math.round(e*r)/r};l.exports=T},59533:l=>{/** 3765 * @author Richard Davey <[email protected]> 3766 * @copyright 2013-2023 Photon Storm Ltd. 3767 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3768 */var T=function(e,d,g,r){d===void 0&&(d=1),g===void 0&&(g=1),r===void 0&&(r=1),r*=Math.PI/e;for(var a=[],h=[],n=0;n<e;n++)g-=d*r,d+=g*r,a[n]=g,h[n]=d;return{sin:h,cos:a,length:e}};l.exports=T},5514:l=>{/** 3769 * @author Richard Davey <[email protected]> 3770 * @copyright 2013-2023 Photon Storm Ltd. 3771 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3772 */var T=function(e,d,g){return e<=d?0:e>=g?1:(e=(e-d)/(g-d),e*e*(3-2*e))};l.exports=T},87736:l=>{/** 3773 * @author Richard Davey <[email protected]> 3774 * @copyright 2013-2023 Photon Storm Ltd. 3775 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3776 */var T=function(e,d,g){return e=Math.max(0,Math.min(1,(e-d)/(g-d))),e*e*e*(e*(e*6-15)+10)};l.exports=T},55805:(l,T,e)=>{/** 3777 * @author Richard Davey <[email protected]> 3778 * @copyright 2013-2023 Photon Storm Ltd. 3779 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3780 */var d=e(93736),g=function(r,a,h,n){n===void 0&&(n=new d);var o=0,f=0,u=a*h;return r>0&&r<=u&&(r>a-1?(f=Math.floor(r/a),o=r-f*a):o=r),n.set(o,f)};l.exports=g},64462:(l,T,e)=>{/** 3781 * @author Richard Davey <[email protected]> 3782 * @copyright 2013-2023 Photon Storm Ltd. 3783 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3784 */var d=e(93736),g=function(r,a,h,n,o,f,u,v){v===void 0&&(v=new d);var m=Math.sin(o),p=Math.cos(o),x=p*f,y=m*f,P=-m*u,b=p*u,E=1/(x*b+P*-y);return v.x=b*E*r+-P*E*a+(n*P-h*b)*E,v.y=x*E*a+-y*E*r+(-n*x+h*y)*E,v};l.exports=g},93736:(l,T,e)=>{/** 3785 * @author Richard Davey <[email protected]> 3786 * @copyright 2013-2023 Photon Storm Ltd. 3787 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3788 */var d=e(56694),g=e(88456),r=new d({initialize:function(h,n){this.x=0,this.y=0,typeof h=="object"?(this.x=h.x||0,this.y=h.y||0):(n===void 0&&(n=h),this.x=h||0,this.y=n||0)},clone:function(){return new r(this.x,this.y)},copy:function(a){return this.x=a.x||0,this.y=a.y||0,this},setFromObject:function(a){return this.x=a.x||0,this.y=a.y||0,this},set:function(a,h){return h===void 0&&(h=a),this.x=a,this.y=h,this},setTo:function(a,h){return this.set(a,h)},setToPolar:function(a,h){return h==null&&(h=1),this.x=Math.cos(a)*h,this.y=Math.sin(a)*h,this},equals:function(a){return this.x===a.x&&this.y===a.y},fuzzyEquals:function(a,h){return g(this.x,a.x,h)&&g(this.y,a.y,h)},angle:function(){var a=Math.atan2(this.y,this.x);return a<0&&(a+=2*Math.PI),a},setAngle:function(a){return this.setToPolar(a,this.length())},add:function(a){return this.x+=a.x,this.y+=a.y,this},subtract:function(a){return this.x-=a.x,this.y-=a.y,this},multiply:function(a){return this.x*=a.x,this.y*=a.y,this},scale:function(a){return isFinite(a)?(this.x*=a,this.y*=a):(this.x=0,this.y=0),this},divide:function(a){return this.x/=a.x,this.y/=a.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(a){var h=a.x-this.x,n=a.y-this.y;return Math.sqrt(h*h+n*n)},distanceSq:function(a){var h=a.x-this.x,n=a.y-this.y;return h*h+n*n},length:function(){var a=this.x,h=this.y;return Math.sqrt(a*a+h*h)}
3788,setLength:function(a){return this.normalize().scale(a)},lengthSq:function(){var a=this.x,h=this.y;return a*a+h*h},normalize:function(){var a=this.x,h=this.y,n=a*a+h*h;return n>0&&(n=1/Math.sqrt(n),this.x=a*n,this.y=h*n),this},normalizeRightHand:function(){var a=this.x;return this.x=this.y*-1,this.y=a,this},normalizeLeftHand:function(){var a=this.x;return this.x=this.y,this.y=a*-1,this},dot:function(a){return this.x*a.x+this.y*a.y},cross:function(a){return this.x*a.y-this.y*a.x},lerp:function(a,h){h===void 0&&(h=0);var n=this.x,o=this.y;return this.x=n+h*(a.x-n),this.y=o+h*(a.y-o),this},transformMat3:function(a){var h=this.x,n=this.y,o=a.val;return this.x=o[0]*h+o[3]*n+o[6],this.y=o[1]*h+o[4]*n+o[7],this},transformMat4:function(a){var h=this.x,n=this.y,o=a.val;return this.x=o[0]*h+o[4]*n+o[12],this.y=o[1]*h+o[5]*n+o[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(a){var h=this.length();return h&&h>a&&this.scale(a/h),this},reflect:function(a){return a=a.clone().normalize(),this.subtract(a.scale(2*this.dot(a)))},mirror:function(a){return this.reflect(a).negate()},rotate:function(a){var h=Math.cos(a),n=Math.sin(a);return this.set(h*this.x-n*this.y,n*this.x+h*this.y)},project:function(a){var h=this.dot(a)/a.dot(a);return this.copy(a).scale(h)}});r.ZERO=new r,r.RIGHT=new r(1,0),r.LEFT=new r(-1,0),r.UP=new r(0,-1),r.DOWN=new r(0,1),r.ONE=new r(1,1),l.exports=r},70015:(l,T,e)=>{/** 3789 * @author Richard Davey <[email protected]> 3790 * @copyright 2013-2023 Photon Storm Ltd. 3791 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3792 */var d=e(56694),g=new d({initialize:function(a,h,n){this.x=0,this.y=0,this.z=0,typeof a=="object"?(this.x=a.x||0,this.y=a.y||0,this.z=a.z||0):(this.x=a||0,this.y=h||0,this.z=n||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(r){return this.x=Math.min(this.x,r.x),this.y=Math.min(this.y,r.y),this.z=Math.min(this.z,r.z),this},max:function(r){return this.x=Math.max(this.x,r.x),this.y=Math.max(this.y,r.y),this.z=Math.max(this.z,r.z),this},clone:function(){return new g(this.x,this.y,this.z)},addVectors:function(r,a){return this.x=r.x+a.x,this.y=r.y+a.y,this.z=r.z+a.z,this},crossVectors:function(r,a){var h=r.x,n=r.y,o=r.z,f=a.x,u=a.y,v=a.z;return this.x=n*v-o*u,this.y=o*f-h*v,this.z=h*u-n*f,this},equals:function(r){return this.x===r.x&&this.y===r.y&&this.z===r.z},copy:function(r){return this.x=r.x,this.y=r.y,this.z=r.z||0,this},set:function(r,a,h){return typeof r=="object"?(this.x=r.x||0,this.y=r.y||0,this.z=r.z||0):(this.x=r||0,this.y=a||0,this.z=h||0),this},setFromMatrixPosition:function(r){return this.fromArray(r.val,12)},setFromMatrixColumn:function(r,a){return this.fromArray(r.val,a*4)},fromArray:function(r,a){return a===void 0&&(a=0),this.x=r[a],this.y=r[a+1],this.z=r[a+2],this},add:function(r){return this.x+=r.x,this.y+=r.y,this.z+=r.z||0,this},addScalar:function(r){return this.x+=r,this.y+=r,this.z+=r,this},addScale:function(r,a){return this.x+=r.x*a,this.y+=r.y*a,this.z+=r.z*a||0,this},subtract:function(r){return this.x-=r.x,this.y-=r.y,this.z-=r.z||0,this},multiply:function(r){return this.x*=r.x,this.y*=r.y,this.z*=r.z||1,this},scale:function(r){return isFinite(r)?(this.x*=r,this.y*=r,this.z*=r):(this.x=0,this.y=0,this.z=0),this},divide:function(r){return this.x/=r.x,this.y/=r.y,this.z/=r.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(r){var a=r.x-this.x,h=r.y-this.y,n=r.z-this.z||0;return Math.sqrt(a*a+h*h+n*n)},distanceSq:function(r){var a=r.x-this.x,h=r.y-this.y,n=r.z-this.z||0;return a*a+h*h+n*n},length:function(){var r=this.x,a=this.y,h=this.z;return Math.sqrt(r*r+a*a+h*h)},lengthSq:function(){var r=this.x,a=this.y,h=this.z;return r*r+a*a+h*h},normalize:function(){var r=this.x,a=this.y,h=this.z,n=r*r+a*a+h*h;return n>0&&(n=1/Math.sqrt(n),this.x=r*n,this.y=a*n,this.z=h*n),this},dot:function(r){return this.x*r.x+this.y*r.y+this.z*r.z},cross:function(r){var a=this.x,h=this.y,n=this.z,o=r.x,f=r.y,u=r.z;return this.x=h*u-n*f,this.y=n*o-a*u,this.z=a*f-h*o,this},lerp:function(r,a){a===void 0&&(a=0);var h=this.x,n=this.y,o=this.z;return this.x=h+a*(r.x-h),this.y=n+a*(r.y-n),this.z=o+a*(r.z-o),this},applyMatrix3:function(r){var a=this.x,h=this.y,n=this.z,o=r.val;
vendor: 1,280 bytes, line 3792
3792return this.x=o[0]*a+o[3]*h+o[6]*n,this.y=o[1]*a+o[4]*h+o[7]*n,this.z=o[2]*a+o[5]*h+o[8]*n,this},applyMatrix4:function(r){var a=this.x,h=this.y,n=this.z,o=r.val,f=1/(o[3]*a+o[7]*h+o[11]*n+o[15]);return this.x=(o[0]*a+o[4]*h+o[8]*n+o[12])*f,this.y=(o[1]*a+o[5]*h+o[9]*n+o[13])*f,this.z=(o[2]*a+o[6]*h+o[10]*n+o[14])*f,this},transformMat3:function(r){var a=this.x,h=this.y,n=this.z,o=r.val;return this.x=a*o[0]+h*o[3]+n*o[6],this.y=a*o[1]+h*o[4]+n*o[7],this.z=a*o[2]+h*o[5]+n*o[8],this},transformMat4:function(r){var a=this.x,h=this.y,n=this.z,o=r.val;return this.x=o[0]*a+o[4]*h+o[8]*n+o[12],this.y=o[1]*a+o[5]*h+o[9]*n+o[13],this.z=o[2]*a+o[6]*h+o[10]*n+o[14],this},transformCoordinates:function(r){var a=this.x,h=this.y,n=this.z,o=r.val,f=a*o[0]+h*o[4]+n*o[8]+o[12],u=a*o[1]+h*o[5]+n*o[9]+o[13],v=a*o[2]+h*o[6]+n*o[10]+o[14],m=a*o[3]+h*o[7]+n*o[11]+o[15];return this.x=f/m,this.y=u/m,this.z=v/m,this},transformQuat:function(r){var a=this.x,h=this.y,n=this.z,o=r.x,f=r.y,u=r.z,v=r.w,m=v*a+f*n-u*h,p=v*h+u*a-o*n,x=v*n+o*h-f*a,y=-o*a-f*h-u*n;return this.x=m*v+y*-o+p*-u-x*-f,this.y=p*v+y*-f+x*-o-m*-u,this.z=x*v+y*-u+m*-f-p*-o,this},project:function(r){var a=this.x,h=this.y,n=this.z,o=r.val,f=o[0],u=o[1],v=o[2],m=o[3],p=o[4],x=o[5],y=o[6],P=o[7],b=o[8],E=o[9],M=o[10],w=o[11],A=o[
379212],R=o[13],L=o[14],O=o[15],I=1/(a*m+h*P+n*w+O);return this.x=(a*f+h*p+n*b+A)*I,this.y=(a*u+h*x+n*E+R)*I,this.z=(a*v+h*y+n*M+L)*I,this},projectViewMatrix:function(r,a){return this.applyMatrix4(r).applyMatrix4(a)},unprojectViewMatrix:function(r,a){return this.applyMatrix4(r).applyMatrix4(a)},unproject:function(r,a){var h=r.x,n=r.y,o=r.z,f=r.w,u=this.x-h,v=f-this.y-1-n,m=this.z;return this.x=2*u/o-1,this.y=2*v/f-1,this.z=2*m-1,this.project(a)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});g.ZERO=new g,g.RIGHT=new g(1,0,0),g.LEFT=new g(-1,0,0),g.UP=new g(0,-1,0),g.DOWN=new g(0,1,0),g.FORWARD=new g(0,0,1),g.BACK=new g(0,0,-1),g.ONE=new g(1,1,1),l.exports=g},51729:(l,T,e)=>{/** 3793 * @author Richard Davey <[email protected]> 3794 * @copyright 2013-2023 Photon Storm Ltd. 3795 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3796 */var d=e(56694),g=new d({initialize:function(a,h,n,o){this.x=0,this.y=0,this.z=0,this.w=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=h||0,this.z=n||0,this.w=o||0)},clone:function(){return new g(this.x,this.y,this.z,this.w)},copy:function(r){return this.x=r.x,this.y=r.y,this.z=r.z||0,this.w=r.w||0,this},equals:function(r){return this.x===r.x&&this.y===r.y&&this.z===r.z&&this.w===r.w},set:function(r,a,h,n){return typeof r=="object"?(this.x=r.x||0,this.y=r.y||0,this.z=r.z||0,this.w=r.w||0):(this.x=r||0,this.y=a||0,this.z=h||0,this.w=n||0),this},add:function(r){return this.x+=r.x,this.y+=r.y,this.z+=r.z||0,this.w+=r.w||0,this},subtract:function(r){return this.x-=r.x,this.y-=r.y,this.z-=r.z||0,this.w-=r.w||0,this},scale:function(r){return this.x*=r,this.y*=r,this.z*=r,this.w*=r,this},length:function(){var r=this.x,a=this.y,h=this.z,n=this.w;return Math.sqrt(r*r+a*a+h*h+n*n)},lengthSq:function(){var r=this.x,a=this.y,h=this.z,n=this.w;return r*r+a*a+h*h+n*n},normalize:function(){var r=this.x,a=this.y,h=this.z,n=this.w,o=r*r+a*a+h*h+n*n;return o>0&&(o=1/Math.sqrt(o),this.x=r*o,this.y=a*o,this.z=h*o,this.w=n*o),this},dot:function(r){return this.x*r.x+this.y*r.y+this.z*r.z+this.w*r.w},lerp:function(r,a){a===void 0&&(a=0);var h=this.x,n=this.y,o=this.z,f=this.w;return this.x=h+a*(r.x-h),this.y=n+a*(r.y-n),this.z=o+a*(r.z-o),this.w=f+a*(r.w-f),this},multiply:function(r){return this.x*=r.x,this.y*=r.y,this.z*=r.z||1,this.w*=r.w||1,this},divide:function(r){return this.x/=r.x,this.y/=r.y,this.z/=r.z||1,this.w/=r.w||1,this},distance:function(r){var a=r.x-this.x,h=r.y-this.y,n=r.z-this.z||0,o=r.w-this.w||0;return Math.sqrt(a*a+h*h+n*n+o*o)},distanceSq:function(r){var a=r.x-this.x,h=r.y-this.y,n=r.z-this.z||0,o=r.w-this.w||0;return a*a+h*h+n*n+o*o},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(r){var a=this.x,h=this.y,n=this.z,o=this.w,f=r.val;return this.x=f[0]*a+f[4]*h+f[8]*n+f[12]*o,this.y=f[1]*a+f[5]*h+f[9]*n+f[13]*o,this.z=f[2]*a+f[6]*h+f[10]*n+f[14]*o,this.w=f[3]*a+f[7]*h+f[11]*n+f[15]*o,this},transformQuat:function(r){var a=this.x,h=this.y,n=this.z,o=r.x,f=r.y,u=r.z,v=r.w,m=v*a+f*n-u*h,p=v*h+u*a-o*n,x=v*n+o*h-f*a,y=-o*a-f*h-u*n;return this.x=m*v+y*-o+p*-u-x*-f,this.y=p*v+y*-f+x*-o-m*-u,this.z=x*v+y*-u+m*-f-p*-o,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});g.prototype.sub=g.prototype.subtract,g.prototype.mul=g.prototype.multiply,g.prototype.div=g.prototype.divide,g.prototype.dist=g.prototype.distance,g.prototype.distSq=g.prototype.distanceSq,g.prototype.len=g.prototype.length,g.prototype.lenSq=g.prototype.lengthSq,l.exports=g},9557:l=>{/** 3797 * @author Richard Davey <[email protected]> 3798 * @copyright 2013-2023 Photon Storm Ltd. 3799 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3800 */var T=function(e,d,g){return Math.abs(e-d)<=g};l.exports=T},1071:l=>{/** 3801 * @author Richard Davey <[email protected]> 3802 * @copyright 2013-2023 Photon Storm Ltd. 3803 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3804 */var T=function(e,d,g){if(e>=d&&e<=g)return e;var r=g-d;return d+((e-d)%r+r)%r};l.exports=T},90447:l=>{/** 3805 * @author Richard Davey <[email protected]> 3806 * @copyright 2013-2023 Photon Storm Ltd. 3807 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3808 */var T=function(e,d,g,r){return Math.atan2(r-d,g-e)};l.exports=T},94240:l=>{/** 3809 * @author Richard Davey <[email protected]> 3810 * @copyright 2013-2023 Photon Storm Ltd. 3811 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3812 */var T=function(e,d){return Math.atan2(d.y-e.y,d.x-e.x)};l.exports=T},84066:l=>{/** 3813 * @author Richard Davey <[email protected]> 3814 * @copyright 2013-2023 Photon Storm Ltd. 3815 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3816 */var T=function(e,d){return Math.atan2(d.x-e.x,d.y-e.y)};l.exports=T},9678:l=>{/** 3817 * @author Richard Davey <[email protected]> 3818 * @copyright 2013-2023 Photon Storm Ltd. 3819 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3820 */var T=function(e,d,g,r){return Math.atan2(g-e,r-d)};l.exports=T},76861:(l,T,e)=>{/** 3821 * @author Richard Davey <[email protected]> 3822 * @copyright 2013-2023 Photon Storm Ltd. 3823 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3824 */var d=e(83392),g=function(r){return r>Math.PI&&(r-=d.PI2),Math.abs(((r+d.TAU)%d.PI2-d.PI2)%d.PI2)};l.exports=g}
3824,37570:l=>{/** 3825 * @author Richard Davey <[email protected]> 3826 * @copyright 2013-2023 Photon Storm Ltd. 3827 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3828 */var T=function(e){return e=e%(2*Math.PI),e>=0?e:e+2*Math.PI};l.exports=T},87597:(l,T,e)=>{/** 3829 * @author Richard Davey <[email protected]> 3830 * @author @samme 3831 * @copyright 2013-2023 Photon Storm Ltd. 3832 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3833 */var d=e(61616),g=function(){return d(-Math.PI,Math.PI)};l.exports=g},74493:(l,T,e)=>{/** 3834 * @author Richard Davey <[email protected]> 3835 * @author @samme 3836 * @copyright 2013-2023 Photon Storm Ltd. 3837 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3838 */var d=e(61616),g=function(){return d(-180,180)};l.exports=g},19049:(l,T,e)=>{/** 3839 * @author Richard Davey <[email protected]> 3840 * @copyright 2013-2023 Photon Storm Ltd. 3841 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3842 */var d=e(37570),g=function(r){return d(r+Math.PI)};l.exports=g},90612:(l,T,e)=>{/** 3843 * @author Richard Davey <[email protected]> 3844 * @copyright 2013-2023 Photon Storm Ltd. 3845 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3846 */var d=e(83392),g=function(r,a,h){return h===void 0&&(h=.05),r===a||(Math.abs(a-r)<=h||Math.abs(a-r)>=d.PI2-h?r=a:(Math.abs(a-r)>Math.PI&&(a<r?a+=d.PI2:a-=d.PI2),a>r?r+=h:a<r&&(r-=h))),r};l.exports=g},93954:l=>{/** 3847 * @author Richard Davey <[email protected]> 3848 * @copyright 2013-2023 Photon Storm Ltd. 3849 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3850 */var T=function(e,d){var g=d-e;if(g===0)return 0;var r=Math.floor((g- -180)/360);return g-r*360};l.exports=T},35786:(l,T,e)=>{/** 3851 * @author Richard Davey <[email protected]> 3852 * @copyright 2013-2023 Photon Storm Ltd. 3853 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3854 */var d=e(1071),g=function(r){return d(r,-Math.PI,Math.PI)};l.exports=g},62138:(l,T,e)=>{/** 3855 * @author Richard Davey <[email protected]> 3856 * @copyright 2013-2023 Photon Storm Ltd. 3857 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3858 */var d=e(1071),g=function(r){return d(r,-180,180)};l.exports=g},22153:(l,T,e)=>{/** 3859 * @author Richard Davey <[email protected]> 3860 * @copyright 2013-2023 Photon Storm Ltd. 3861 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3862 */l.exports={Between:e(90447),BetweenPoints:e(94240),BetweenPointsY:e(84066),BetweenY:e(9678),CounterClockwise:e(76861),Normalize:e(37570),Random:e(87597),RandomDegrees:e(74493),Reverse:e(19049),RotateTo:e(90612),ShortestBetween:e(93954),Wrap:e(35786),WrapDegrees:e(62138)}},83392:l=>{/** 3863 * @author Richard Davey <[email protected]> 3864 * @copyright 2013-2023 Photon Storm Ltd. 3865 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3866 */var T={PI2:Math.PI*2,TAU:Math.PI*.5,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};l.exports=T},53996:l=>{/** 3867 * @author Richard Davey <[email protected]> 3868 * @copyright 2013-2023 Photon Storm Ltd. 3869 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3870 */var T=function(e,d,g,r){var a=e-g,h=d-r;return Math.sqrt(a*a+h*h)};l.exports=T},92951:l=>{/** 3871 * @author samme 3872 * @copyright 2013-2023 Photon Storm Ltd. 3873 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3874 */var T=function(e,d){var g=e.x-d.x,r=e.y-d.y;return Math.sqrt(g*g+r*r)};l.exports=T},12161:l=>{/** 3875 * @author samme 3876 * @copyright 2013-2023 Photon Storm Ltd. 3877 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3878 */var T=function(e,d){var g=e.x-d.x,r=e.y-d.y;return g*g+r*r};l.exports=T},38057:l=>{/** 3879 * @author samme 3880 * @copyright 2013-2023 Photon Storm Ltd. 3881 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3882 */var T=function(e,d,g,r){return Math.max(Math.abs(e-g),Math.abs(d-r))};l.exports=T},33297:l=>{/** 3883 * @author Richard Davey <[email protected]> 3884 * @copyright 2013-2023 Photon Storm Ltd. 3885 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3886 */var T=function(e,d,g,r,a){return a===void 0&&(a=2),Math.sqrt(Math.pow(g-e,a)+Math.pow(r-d,a))};l.exports=T},90366:l=>{/** 3887 * @author samme 3888 * @copyright 2013-2023 Photon Storm Ltd. 3889 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3890 */var T=function(e,d,g,r){return Math.abs(e-g)+Math.abs(d-r)};l.exports=T},35032:l=>{/** 3891 * @author Richard Davey <[email protected]> 3892 * @copyright 2013-2023 Photon Storm Ltd. 3893 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3894 */var T=function(e,d,g,r){var a=e-g,h=d-r;return a*a+h*h};l.exports=T},10130:(l,T,e)=>{/** 3895 * @author Richard Davey <[email protected]> 3896 * @copyright 2013-2023 Photon Storm Ltd. 3897 * @license {@link https://opensource.org/licenses/MIT|MIT License}
3898 */l.exports={Between:e(53996),BetweenPoints:e(92951),BetweenPointsSquared:e(12161),Chebyshev:e(38057),Power:e(33297),Snake:e(90366),Squared:e(35032)}},35060:(l,T,e)=>{/** 3899 * @author Richard Davey <[email protected]> 3900 * @copyright 2013-2023 Photon Storm Ltd. 3901 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3902 */var d=e(25265),g=e(57428),r=e(73214),a=e(71778),h=e(36468),n=e(88258),o=e(52910),f=e(67799),u=e(74083),v=e(92284),m=e(28035),p=e(8754);l.exports={Power0:o,Power1:f.Out,Power2:a.Out,Power3:u.Out,Power4:v.Out,Linear:o,Quad:f.Out,Cubic:a.Out,Quart:u.Out,Quint:v.Out,Sine:m.Out,Expo:n.Out,Circ:r.Out,Elastic:h.Out,Back:d.Out,Bounce:g.Out,Stepped:p,"Quad.easeIn":f.In,"Cubic.easeIn":a.In,"Quart.easeIn":u.In,"Quint.easeIn":v.In,"Sine.easeIn":m.In,"Expo.easeIn":n.In,"Circ.easeIn":r.In,"Elastic.easeIn":h.In,"Back.easeIn":d.In,"Bounce.easeIn":g.In,"Quad.easeOut":f.Out,"Cubic.easeOut":a.Out,"Quart.easeOut":u.Out,"Quint.easeOut":v.Out,"Sine.easeOut":m.Out,"Expo.easeOut":n.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":h.Out,"Back.easeOut":d.Out,"Bounce.easeOut":g.Out,"Quad.easeInOut":f.InOut,"Cubic.easeInOut":a.InOut,"Quart.easeInOut":u.InOut,"Quint.easeInOut":v.InOut,"Sine.easeInOut":m.InOut,"Expo.easeInOut":n.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":h.InOut,"Back.easeInOut":d.InOut,"Bounce.easeInOut":g.InOut}},25860:l=>{/** 3903 * @author Richard Davey <[email protected]> 3904 * @copyright 2013-2023 Photon Storm Ltd. 3905 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3906 */var T=function(e,d){return d===void 0&&(d=1.70158),e*e*((d+1)*e-d)};l.exports=T},45264:l=>{/** 3907 * @author Richard Davey <[email protected]> 3908 * @copyright 2013-2023 Photon Storm Ltd. 3909 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3910 */var T=function(e,d){d===void 0&&(d=1.70158);var g=d*1.525;return(e*=2)<1?.5*(e*e*((g+1)*e-g)):.5*((e-=2)*e*((g+1)*e+g)+2)};l.exports=T},36699:l=>{/** 3911 * @author Richard Davey <[email protected]> 3912 * @copyright 2013-2023 Photon Storm Ltd. 3913 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3914 */var T=function(e,d){return d===void 0&&(d=1.70158),--e*e*((d+1)*e+d)+1};l.exports=T},25265:(l,T,e)=>{/** 3915 * @author Richard Davey <[email protected]> 3916 * @copyright 2013-2023 Photon Storm Ltd. 3917 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3918 */l.exports={In:e(25860),Out:e(36699),InOut:e(45264)}},62191:l=>{/** 3919 * @author Richard Davey <[email protected]> 3920 * @copyright 2013-2023 Photon Storm Ltd. 3921 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3922 */var T=function(e){return e=1-e,e<.36363636363636365?1-7.5625*e*e:e<.7272727272727273?1-(7.5625*(e-=.5454545454545454)*e+.75):e<.9090909090909091?1-(7.5625*(e-=.8181818181818182)*e+.9375):1-(7.5625*(e-=.9545454545454546)*e+.984375)};l.exports=T},24799:l=>{/** 3923 * @author Richard Davey <[email protected]> 3924 * @copyright 2013-2023 Photon Storm Ltd. 3925 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3926 */var T=function(e){var d=!1;return e<.5?(e=1-e*2,d=!0):e=e*2-1,e<.36363636363636365?e=7.5625*e*e:e<.7272727272727273?e=7.5625*(e-=.5454545454545454)*e+.75:e<.9090909090909091?e=7.5625*(e-=.8181818181818182)*e+.9375:e=7.5625*(e-=.9545454545454546)*e+.984375,d?(1-e)*.5:e*.5+.5};l.exports=T},60819:l=>{/** 3927 * @author Richard Davey <[email protected]> 3928 * @copyright 2013-2023 Photon Storm Ltd. 3929 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3930 */var T=function(e){return e<.36363636363636365?7.5625*e*e:e<.7272727272727273?7.5625*(e-=.5454545454545454)*e+.75:e<.9090909090909091?7.5625*(e-=.8181818181818182)*e+.9375:7.5625*(e-=.9545454545454546)*e+.984375};l.exports=T},57428:(l,T,e)=>{/** 3931 * @author Richard Davey <[email protected]> 3932 * @copyright 2013-2023 Photon Storm Ltd. 3933 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3934 */l.exports={In:e(62191),Out:e(60819),InOut:e(24799)}},86855:l=>{/** 3935 * @author Richard Davey <[email protected]> 3936 * @copyright 2013-2023 Photon Storm Ltd. 3937 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3938 */var T=function(e){return 1-Math.sqrt(1-e*e)};l.exports=T},7280:l=>{/** 3939 * @author Richard Davey <[email protected]> 3940 * @copyright 2013-2023 Photon Storm Ltd. 3941 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3942 */var T=function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)};l.exports=T},18058:l=>{/** 3943 * @author Richard Davey <[email protected]> 3944 * @copyright 2013-2023 Photon Storm Ltd. 3945 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3946 */var T=function(e){return Math.sqrt(1- --e*e)};l.exports=T},73214:(l,T,e)=>{/** 3947 * @author Richard Davey <[email protected]> 3948 * @copyright 2013-2023 Photon Storm Ltd. 3949 * @license {@link https://opensource.org/licenses/MIT|MIT License}
3950 */l.exports={In:e(86855),Out:e(18058),InOut:e(7280)}},91532:l=>{/** 3951 * @author Richard Davey <[email protected]> 3952 * @copyright 2013-2023 Photon Storm Ltd. 3953 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3954 */var T=function(e){return e*e*e};l.exports=T},63180:l=>{/** 3955 * @author Richard Davey <[email protected]> 3956 * @copyright 2013-2023 Photon Storm Ltd. 3957 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3958 */var T=function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)};l.exports=T},16518:l=>{/** 3959 * @author Richard Davey <[email protected]> 3960 * @copyright 2013-2023 Photon Storm Ltd. 3961 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3962 */var T=function(e){return--e*e*e+1};l.exports=T},71778:(l,T,e)=>{/** 3963 * @author Richard Davey <[email protected]> 3964 * @copyright 2013-2023 Photon Storm Ltd. 3965 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3966 */l.exports={In:e(91532),Out:e(16518),InOut:e(63180)}},24729:l=>{/** 3967 * @author Richard Davey <[email protected]> 3968 * @copyright 2013-2023 Photon Storm Ltd. 3969 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3970 */var T=function(e,d,g){if(d===void 0&&(d=.1),g===void 0&&(g=.1),e===0)return 0;if(e===1)return 1;var r=g/4;return d<1?d=1:r=g*Math.asin(1/d)/(2*Math.PI),-(d*Math.pow(2,10*(e-=1))*Math.sin((e-r)*(2*Math.PI)/g))};l.exports=T},50325:l=>{/** 3971 * @author Richard Davey <[email protected]> 3972 * @copyright 2013-2023 Photon Storm Ltd. 3973 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3974 */var T=function(e,d,g){if(d===void 0&&(d=.1),g===void 0&&(g=.1),e===0)return 0;if(e===1)return 1;var r=g/4;return d<1?d=1:r=g*Math.asin(1/d)/(2*Math.PI),(e*=2)<1?-.5*(d*Math.pow(2,10*(e-=1))*Math.sin((e-r)*(2*Math.PI)/g)):d*Math.pow(2,-10*(e-=1))*Math.sin((e-r)*(2*Math.PI)/g)*.5+1};l.exports=T},84074:l=>{/** 3975 * @author Richard Davey <[email protected]> 3976 * @copyright 2013-2023 Photon Storm Ltd. 3977 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3978 */var T=function(e,d,g){if(d===void 0&&(d=.1),g===void 0&&(g=.1),e===0)return 0;if(e===1)return 1;var r=g/4;return d<1?d=1:r=g*Math.asin(1/d)/(2*Math.PI),d*Math.pow(2,-10*e)*Math.sin((e-r)*(2*Math.PI)/g)+1};l.exports=T},36468:(l,T,e)=>{/** 3979 * @author Richard Davey <[email protected]> 3980 * @copyright 2013-2023 Photon Storm Ltd. 3981 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3982 */l.exports={In:e(24729),Out:e(84074),InOut:e(50325)}},95638:l=>{/** 3983 * @author Richard Davey <[email protected]> 3984 * @copyright 2013-2023 Photon Storm Ltd. 3985 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3986 */var T=function(e){return Math.pow(2,10*(e-1))-.001};l.exports=T},10357:l=>{/** 3987 * @author Richard Davey <[email protected]> 3988 * @copyright 2013-2023 Photon Storm Ltd. 3989 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3990 */var T=function(e){return(e*=2)<1?.5*Math.pow(2,10*(e-1)):.5*(2-Math.pow(2,-10*(e-1)))};l.exports=T},14894:l=>{/** 3991 * @author Richard Davey <[email protected]> 3992 * @copyright 2013-2023 Photon Storm Ltd. 3993 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3994 */var T=function(e){return 1-Math.pow(2,-10*e)};l.exports=T},88258:(l,T,e)=>{/** 3995 * @author Richard Davey <[email protected]> 3996 * @copyright 2013-2023 Photon Storm Ltd. 3997 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3998 */l.exports={In:e(95638),Out:e(14894),InOut:e(10357)}},33063:(l,T,e)=>{/** 3999 * @author Richard Davey <[email protected]> 4000 * @copyright 2013-2023 Photon Storm Ltd. 4001 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4002 */l.exports={Back:e(25265),Bounce:e(57428),Circular:e(73214),Cubic:e(71778),Elastic:e(36468),Expo:e(88258),Linear:e(52910),Quadratic:e(67799),Quartic:e(74083),Quintic:e(92284),Sine:e(28035),Stepped:e(8754)}},43927:l=>{/** 4003 * @author Richard Davey <[email protected]> 4004 * @copyright 2013-2023 Photon Storm Ltd. 4005 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4006 */var T=function(e){return e};l.exports=T},52910:(l,T,e)=>{/** 4007 * @author Richard Davey <[email protected]> 4008 * @copyright 2013-2023 Photon Storm Ltd. 4009 * @license {@link https://opensource.org/licenses/MIT|MIT License}
4010 */l.exports=e(43927)},77471:l=>{/** 4011 * @author Richard Davey <[email protected]> 4012 * @copyright 2013-2023 Photon Storm Ltd. 4013 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4014 */var T=function(e){return e*e};l.exports=T},83863:l=>{/** 4015 * @author Richard Davey <[email protected]> 4016 * @copyright 2013-2023 Photon Storm Ltd. 4017 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4018 */var T=function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)};l.exports=T},44383:l=>{/** 4019 * @author Richard Davey <[email protected]> 4020 * @copyright 2013-2023 Photon Storm Ltd. 4021 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4022 */var T=function(e){return e*(2-e)};l.exports=T},67799:(l,T,e)=>{/** 4023 * @author Richard Davey <[email protected]> 4024 * @copyright 2013-2023 Photon Storm Ltd. 4025 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4026 */l.exports={In:e(77471),Out:e(44383),InOut:e(83863)}},48311:l=>{/** 4027 * @author Richard Davey <[email protected]> 4028 * @copyright 2013-2023 Photon Storm Ltd. 4029 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4030 */var T=function(e){return e*e*e*e};l.exports=T},55248:l=>{/** 4031 * @author Richard Davey <[email protected]> 4032 * @copyright 2013-2023 Photon Storm Ltd. 4033 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4034 */var T=function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)};l.exports=T},23135:l=>{/** 4035 * @author Richard Davey <[email protected]> 4036 * @copyright 2013-2023 Photon Storm Ltd. 4037 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4038 */var T=function(e){return 1- --e*e*e*e};l.exports=T},74083:(l,T,e)=>{/** 4039 * @author Richard Davey <[email protected]> 4040 * @copyright 2013-2023 Photon Storm Ltd. 4041 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4042 */l.exports={In:e(48311),Out:e(23135),InOut:e(55248)}},7313:l=>{/** 4043 * @author Richard Davey <[email protected]> 4044 * @copyright 2013-2023 Photon Storm Ltd. 4045 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4046 */var T=function(e){return e*e*e*e*e};l.exports=T},98759:l=>{/** 4047 * @author Richard Davey <[email protected]> 4048 * @copyright 2013-2023 Photon Storm Ltd. 4049 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4050 */var T=function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)};l.exports=T},26670:l=>{/** 4051 * @author Richard Davey <[email protected]> 4052 * @copyright 2013-2023 Photon Storm Ltd. 4053 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4054 */var T=function(e){return--e*e*e*e*e+1};l.exports=T},92284:(l,T,e)=>{/** 4055 * @author Richard Davey <[email protected]> 4056 * @copyright 2013-2023 Photon Storm Ltd. 4057 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4058 */l.exports={In:e(7313),Out:e(26670),InOut:e(98759)}},52929:l=>{/** 4059 * @author Richard Davey <[email protected]> 4060 * @copyright 2013-2023 Photon Storm Ltd. 4061 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4062 */var T=function(e){return e===0?0:e===1?1:1-Math.cos(e*Math.PI/2)};l.exports=T},66333:l=>{/** 4063 * @author Richard Davey <[email protected]> 4064 * @copyright 2013-2023 Photon Storm Ltd. 4065 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4066 */var T=function(e){return e===0?0:e===1?1:.5*(1-Math.cos(Math.PI*e))};l.exports=T},37255:l=>{/** 4067 * @author Richard Davey <[email protected]> 4068 * @copyright 2013-2023 Photon Storm Ltd. 4069 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4070 */var T=function(e){return e===0?0:e===1?1:Math.sin(e*Math.PI/2)};l.exports=T},28035:(l,T,e)=>{/** 4071 * @author Richard Davey <[email protected]> 4072 * @copyright 2013-2023 Photon Storm Ltd. 4073 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4074 */l.exports={In:e(52929),Out:e(37255),InOut:e(66333)}},52770:l=>{/** 4075 * @author Richard Davey <[email protected]> 4076 * @copyright 2013-2023 Photon Storm Ltd. 4077 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4078 */var T=function(e,d){return d===void 0&&(d=1),e<=0?0:e>=1?1:((d*e|0)+1)*(1/d)};l.exports=T},8754:(l,T,e)=>{/** 4079 * @author Richard Davey <[email protected]> 4080 * @copyright 2013-2023 Photon Storm Ltd. 4081 * @license {@link https://opensource.org/licenses/MIT|MIT License}
4082 */l.exports=e(52770)},17247:l=>{/** 4083 * @author Richard Davey <[email protected]> 4084 * @copyright 2013-2023 Photon Storm Ltd. 4085 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4086 */var T=function(e,d){return d===void 0&&(d=1e-4),Math.ceil(e-d)};l.exports=T},88456:l=>{/** 4087 * @author Richard Davey <[email protected]> 4088 * @copyright 2013-2023 Photon Storm Ltd. 4089 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4090 */var T=function(e,d,g){return g===void 0&&(g=1e-4),Math.abs(e-d)<g};l.exports=T},61824:l=>{/** 4091 * @author Richard Davey <[email protected]> 4092 * @copyright 2013-2023 Photon Storm Ltd. 4093 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4094 */var T=function(e,d){return d===void 0&&(d=1e-4),Math.floor(e+d)};l.exports=T},41935:l=>{/** 4095 * @author Richard Davey <[email protected]> 4096 * @copyright 2013-2023 Photon Storm Ltd. 4097 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4098 */var T=function(e,d,g){return g===void 0&&(g=1e-4),e>d-g};l.exports=T},54726:l=>{/** 4099 * @author Richard Davey <[email protected]> 4100 * @copyright 2013-2023 Photon Storm Ltd. 4101 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4102 */var T=function(e,d,g){return g===void 0&&(g=1e-4),e<d+g};l.exports=T},52778:(l,T,e)=>{/** 4103 * @author Richard Davey <[email protected]> 4104 * @copyright 2013-2023 Photon Storm Ltd. 4105 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4106 */l.exports={Ceil:e(17247),Equal:e(88456),Floor:e(61824),GreaterThan:e(41935),LessThan:e(54726)}},5923:(l,T,e)=>{/** 4107 * @author Richard Davey <[email protected]> 4108 * @copyright 2013-2023 Photon Storm Ltd. 4109 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4110 */var d=e(83392),g=e(98611),r={Angle:e(22153),Distance:e(10130),Easing:e(33063),Fuzzy:e(52778),Interpolation:e(48528),Pow2:e(73773),Snap:e(23679),RandomDataGenerator:e(81429),Average:e(26042),Bernstein:e(22824),Between:e(17489),CatmullRom:e(14976),CeilTo:e(89129),Clamp:e(82897),DegToRad:e(75606),Difference:e(767),Euler:e(9849),Factorial:e(8034),FloatBetween:e(61616),FloorTo:e(60679),FromPercent:e(91806),GetSpeed:e(79366),IsEven:e(43776),IsEvenStrict:e(58442),Linear:e(42798),LinearXY:e(61072),MaxAdd:e(69635),Median:e(37394),MinSub:e(17259),Percent:e(61820),RadToDeg:e(23701),RandomXY:e(16906),RandomXYZ:e(52417),RandomXYZW:e(17915),Rotate:e(52257),RotateAround:e(2386),RotateAroundDistance:e(72395),RotateTo:e(41061),RoundAwayFromZero:e(67233),RoundTo:e(64333),SinCosTableGenerator:e(59533),SmootherStep:e(87736),SmoothStep:e(5514),ToXY:e(55805),TransformXY:e(64462),Within:e(9557),Wrap:e(1071),Vector2:e(93736),Vector3:e(70015),Vector4:e(51729),Matrix3:e(5341),Matrix4:e(16650),Quaternion:e(75003),RotateVec3:e(93709)};r=g(!1,r,d),l.exports=r},63210:(l,T,e)=>{/** 4111 * @author Richard Davey <[email protected]> 4112 * @copyright 2013-2023 Photon Storm Ltd. 4113 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4114 */var d=e(22824),g=function(r,a){for(var h=0,n=r.length-1,o=0;o<=n;o++)h+=Math.pow(1-a,n-o)*Math.pow(a,o)*r[o]*d(n,o);return h};l.exports=g},88332:(l,T,e)=>{/** 4115 * @author Richard Davey <[email protected]> 4116 * @copyright 2013-2023 Photon Storm Ltd. 4117 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4118 */var d=e(14976),g=function(r,a){var h=r.length-1,n=h*a,o=Math.floor(n);return r[0]===r[h]?(a<0&&(o=Math.floor(n=h*(1+a))),d(n-o,r[(o-1+h)%h],r[o],r[(o+1)%h],r[(o+2)%h])):a<0?r[0]-(d(-n,r[0],r[0],r[1],r[1])-r[0]):a>1?r[h]-(d(n-h,r[h],r[h],r[h-1],r[h-1])-r[h]):d(n-o,r[o?o-1:0],r[o],r[h<o+1?h:o+1],r[h<o+2?h:o+2])};l.exports=g},34631:l=>{/** 4119 * @author Richard Davey <[email protected]> 4120 * @copyright 2013-2023 Photon Storm Ltd. 4121 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4122 */function T(a,h){var n=1-a;return n*n*n*h}function e(a,h){var n=1-a;return 3*n*n*a*h}function d(a,h){return 3*(1-a)*a*a*h}function g(a,h){return a*a*a*h}var r=function(a,h,n,o,f){return T(a,h)+e(a,n)+d(a,o)+g(a,f)};l.exports=r},47614:(l,T,e)=>{/** 4123 * @author Richard Davey <[email protected]> 4124 * @copyright 2013-2023 Photon Storm Ltd. 4125 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4126 */var d=e(42798),g=function(r,a){var h=r.length-1,n=h*a,o=Math.floor(n);return a<0?d(r[0],r[1],n):a>1?d(r[h],r[h-1],h-n):d(r[o],r[o+1>h?h:o+1],n-o)};l.exports=g},16252:l=>{/** 4127 * @author Richard Davey <[email protected]> 4128 * @copyright 2013-2023 Photon Storm Ltd. 4129 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4130 */function T(r,a){var h=1-r;return h*h*a}function e(r,a){return 2*(1-r)*r*a}function d(r,a){return r*r*a}var g=function(r,a,h,n){return T(r,a)+e(r,h)+d(r,n)};l.exports=g},44521:(l,T,e)=>{/** 4131 * @author Richard Davey <[email protected]> 4132 * @copyright 2013-2023 Photon Storm Ltd. 4133 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4134 */var d=e(5514),g=function(r,a,h){return a+(h-a)*d(r,0,1)};l.exports=g},45507:(l,T,e)=>{/** 4135 * @author Richard Davey <[email protected]> 4136 * @copyright 2013-2023 Photon Storm Ltd. 4137 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4138 */var d=e(87736),g=function(r,a,h){return a+(h-a)*d(r,0,1)};l.exports=g},48528:(l,T,e)=>{/** 4139 * @author Richard Davey <[email protected]> 4140 * @copyright 2013-2023 Photon Storm Ltd. 4141 * @license {@link https://opensource.org/licenses/MIT|MIT License}
4142 */l.exports={Bezier:e(63210),CatmullRom:e(88332),CubicBezier:e(34631),Linear:e(47614),QuadraticBezier:e(16252),SmoothStep:e(44521),SmootherStep:e(45507)}},3504:l=>{/** 4143 * @author Richard Davey <[email protected]> 4144 * @copyright 2013-2023 Photon Storm Ltd. 4145 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4146 */var T=function(e){var d=Math.log(e)/.6931471805599453;return 1<<Math.ceil(d)};l.exports=T},28621:l=>{/** 4147 * @author Richard Davey <[email protected]> 4148 * @copyright 2013-2023 Photon Storm Ltd. 4149 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4150 */var T=function(e,d){return e>0&&(e&e-1)===0&&d>0&&(d&d-1)===0};l.exports=T},2018:l=>{/** 4151 * @author Richard Davey <[email protected]> 4152 * @copyright 2013-2023 Photon Storm Ltd. 4153 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4154 */var T=function(e){return e>0&&(e&e-1)===0};l.exports=T},73773:(l,T,e)=>{/** 4155 * @author Richard Davey <[email protected]> 4156 * @copyright 2013-2023 Photon Storm Ltd. 4157 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4158 */l.exports={GetNext:e(3504),IsSize:e(28621),IsValue:e(2018)}},81429:(l,T,e)=>{/** 4159 * @author Richard Davey <[email protected]> 4160 * @copyright 2013-2023 Photon Storm Ltd. 4161 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4162 */var d=e(56694),g=new d({initialize:function(a){a===void 0&&(a=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],a&&this.init(a)},rnd:function(){var r=2091639*this.s0+this.c*23283064365386963e-26;return this.c=r|0,this.s0=this.s1,this.s1=this.s2,this.s2=r-this.c,this.s2},hash:function(r){var a,h=this.n;r=r.toString();for(var n=0;n<r.length;n++)h+=r.charCodeAt(n),a=.02519603282416938*h,h=a>>>0,a-=h,a*=h,h=a>>>0,a-=h,h+=a*4294967296;return this.n=h,(h>>>0)*23283064365386963e-26},init:function(r){typeof r=="string"?this.state(r):this.sow(r)},sow:function(r){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,!!r)for(var a=0;a<r.length&&r[a]!=null;a++){var h=r[a];this.s0-=this.hash(h),this.s0+=~~(this.s0<0),this.s1-=this.hash(h),this.s1+=~~(this.s1<0),this.s2-=this.hash(h),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(r,a){return Math.floor(this.realInRange(0,a-r+1)+r)},between:function(r,a){return Math.floor(this.realInRange(0,a-r+1)+r)},realInRange:function(r,a){return this.frac()*(a-r)+r},normal:function(){return 1-2*this.frac()},uuid:function(){var r="",a="";for(a=r="";r++<36;a+=~r%5|r*3&4?(r^15?8^this.frac()*(r^20?16:4):4).toString(16):"-");return a},pick:function(r){return r[this.integerInRange(0,r.length-1)]},sign:function(){return this.pick(this.signs)},weightedPick:function(r){return r[~~(Math.pow(this.frac(),2)*(r.length-1)+.5)]},timestamp:function(r,a){return this.realInRange(r||9466848e5,a||1577862e6)},angle:function(){return this.integerInRange(-180,180)},rotation:function(){return this.realInRange(-3.1415926,3.1415926)},state:function(r){return typeof r=="string"&&r.match(/^!rnd/)&&(r=r.split(","),this.c=parseFloat(r[1]),this.s0=parseFloat(r[2]),this.s1=parseFloat(r[3]),this.s2=parseFloat(r[4])),["!rnd",this.c,this.s0,this.s1,this.s2].join(",")},shuffle:function(r){for(var a=r.length-1,h=a;h>0;h--){var n=Math.floor(this.frac()*(h+1)),o=r[n];r[n]=r[h],r[h]=o}return r}});l.exports=g},82127:l=>{/** 4163 * @author Richard Davey <[email protected]> 4164 * @copyright 2013-2023 Photon Storm Ltd. 4165 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4166 */var T=function(e,d,g,r){return g===void 0&&(g=0),d===0?e:(e-=g,e=d*Math.ceil(e/d),r?(g+e)/d:g+e)};l.exports=T},84314:l=>{/** 4167 * @author Richard Davey <[email protected]> 4168 * @copyright 2013-2023 Photon Storm Ltd. 4169 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4170 */var T=function(e,d,g,r){return g===void 0&&(g=0),d===0?e:(e-=g,e=d*Math.floor(e/d),r?(g+e)/d:g+e)};l.exports=T},88462:l=>{/** 4171 * @author Richard Davey <[email protected]> 4172 * @copyright 2013-2023 Photon Storm Ltd. 4173 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4174 */var T=function(e,d,g,r){return g===void 0&&(g=0),d===0?e:(e-=g,e=d*Math.round(e/d),r?(g+e)/d:g+e)};l.exports=T},23679:(l,T,e)=>{/** 4175 * @author Richard Davey <[email protected]> 4176 * @copyright 2013-2023 Photon Storm Ltd. 4177 * @license {@link https://opensource.org/licenses/MIT|MIT License}
4178 */l.exports={Ceil:e(82127),Floor:e(84314),To:e(88462)}},92491:(l,T,e)=>{/** 4179 * @author Richard Davey <[email protected]> 4180 * @copyright 2013-2023 Photon Storm Ltd. 4181 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4182 */e(75205);var d=e(86459),g=e(98611),r={Actions:e(83979),Animations:e(13517),BlendModes:e(95723),Cache:e(45820),Cameras:e(44143),Core:e(80293),Class:e(56694),Create:e(84106),Curves:e(73962),Data:e(1999),Display:e(24816),DOM:e(3590),Events:e(95146),FX:e(96910),Game:e(15213),GameObjects:e(48013),Geom:e(84068),Input:e(20873),Loader:e(95695),Math:e(5923),Physics:e(53954),Plugins:e(45615),Renderer:e(42069),Scale:e(86754),ScaleModes:e(27394),Scene:e(87157),Scenes:e(20436),Structs:e(20010),Textures:e(87499),Tilemaps:e(52678),Time:e(97121),Tweens:e(75193),Utils:e(22178)};r.Sound=e(56751),r=g(!1,r,d),l.exports=r,e.g.Phaser=r},62832:(l,T,e)=>{/** 4183 * @author Richard Davey <[email protected]> 4184 * @copyright 2013-2023 Photon Storm Ltd. 4185 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4186 */var d=e(56694),g=e(7864),r=e(1539),a=new d({Extends:r,Mixins:[g.Acceleration,g.Angular,g.Bounce,g.Debug,g.Drag,g.Enable,g.Friction,g.Gravity,g.Immovable,g.Mass,g.Pushable,g.Size,g.Velocity],initialize:function(n,o,f,u,v){r.call(this,n,o,f,u,v),this.body=null}});l.exports=a},66150:(l,T,e)=>{/** 4187 * @author Richard Davey <[email protected]> 4188 * @copyright 2013-2023 Photon Storm Ltd. 4189 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4190 */var d=e(56694),g=e(75606),r=e(53996),a=e(35032),h=e(99523),n=e(72632),o=e(30657),f=e(2732),u=e(15147),v=e(91963),m=e(7599),p=e(93736),x=e(85233),y=new d({initialize:function(b){this.scene=b,this.systems=b.sys,this.config=this.getConfig(),this.world,this.add,b.sys.events.once(m.BOOT,this.boot,this),b.sys.events.on(m.START,this.start,this)},boot:function(){this.world=new x(this.scene,this.config),this.add=new h(this.world),this.systems.events.once(m.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new x(this.scene,this.config),this.add=new h(this.world));var P=this.systems.events;n(this.config,"customUpdate",!1)||P.on(m.UPDATE,this.world.update,this.world),P.on(m.POST_UPDATE,this.world.postUpdate,this.world),P.once(m.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(m.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(m.UPDATE,this.world.update,this.world)},getConfig:function(){var P=this.systems.game.config.physics,b=this.systems.settings.physics,E=o(n(b,"arcade",{}),n(P,"arcade",{}));return E},overlap:function(P,b,E,M,w){return E===void 0&&(E=null),M===void 0&&(M=null),w===void 0&&(w=E),this.world.collideObjects(P,b,E,M,w,!0)},collide:function(P,b,E,M,w){return E===void 0&&(E=null),M===void 0&&(M=null),w===void 0&&(w=E),this.world.collideObjects(P,b,E,M,w,!1)},collideTiles:function(P,b,E,M,w){return this.world.collideTiles(P,b,E,M,w)},overlapTiles:function(P,b,E,M,w){return this.world.overlapTiles(P,b,E,M,w)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(P,b,E,M,w,A){M===void 0&&(M=60);var R=Math.atan2(E-P.y,b-P.x);return P.body.acceleration.setToPolar(R,M),w!==void 0&&A!==void 0&&P.body.maxVelocity.set(w,A),R},accelerateToObject:function(P,b,E,M,w){return this.accelerateTo(P,b.x,b.y,E,M,w)},closest:function(P,b){b||(b=this.world.bodies.entries);for(var E=Number.MAX_VALUE,M=null,w=P.x,A=P.y,R=b.length,L=0;L<R;L++){var O=b[L],I=O.body||O;if(!(P===O||P===I||P===I.gameObject||P===I.center)){var D=a(w,A,I.center.x,I.center.y);D<E&&(M=O,E=D)}}return M},furthest:function(P,b){b||(b=this.world.bodies.entries);for(var E=-1,M=null,w=P.x,A=P.y,R=b.length,L=0;L<R;L++){var O=b[L],I=O.body||O;if(!(P===O||P===I||P===I.gameObject||P===I.center)){var D=a(w,A,I.center.x,I.center.y);D>E&&(M=O,E=D)}}return M},moveTo:function(P,b,E,M,w){M===void 0&&(M=60),w===void 0&&(w=0);var A=Math.atan2(E-P.y,b-P.x);return w>0&&(M=r(P.x,P.y,b,E)/(w/1e3)),P.body.velocity.setToPolar(A,M),A},moveToObject:function(P,b,E,M){return this.moveTo(P,b.x,b.y,E,M)},velocityFromAngle:function(P,b,E){return b===void 0&&(b=60),E===void 0&&(E=new p),E.setToPolar(g(P),b)},velocityFromRotation:function(P,b,E){return b===void 0&&(b=60),E===void 0&&(E=new p),E.setToPolar(P,b)},overlapRect:function(P,b,E,M,w,A){return u(this.world,P,b,E,M,w,A)},overlapCirc:function(P,b,E,M,w){return f(this.world,P,b,E,M,w)},shutdown:function(){if(this.world){var P=this.systems.events;P.off(m.UPDATE,this.world.update,this.world),P.off(m.POST_UPDATE,this.world.postUpdate,this.world),P.off(m.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null}},destroy:function(){this.shutdown(),this.scene.sys.events.off(m.START,this.start,this),this.scene=null,this.systems=null}});v.register("ArcadePhysics",y,"arcadePhysics"),l.exports=y},25084:(l,T,e)=>{/** 4191 * @author Richard Davey <[email protected]> 4192 * @copyright 2013-2023 Photon Storm Ltd. 4193 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4194 */var d=e(56694),g=e(7864),r=e(13747),a=new d({Extends:r,Mixins:[g.Acceleration,g.Angular,g.Bounce,g.Debug,g.Drag,g.Enable,g.Friction,g.Gravity,g.Immovable,g.Mass,g.Pushable,g.Size,g.Velocity],initialize:function(n,o,f,u,v){r.call(this,n,o,f,u,v),this.body=null}});l.exports=a},97602:(l,T,e)=>{/** 4195 * @author Richard Davey <[email protected]> 4196 * @author Benjamin D. Richards <[email protected]> 4197 * @copyright 2013-2023 Photon Storm Ltd. 4198 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4199 */var d=e(56694),g=e(47401),r=e(27037),a=e(23701),h=e(74118),n=e(94287),o=e(93736),f=new d({initialize:function(v,m){var p=64,x=64,y={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},P=m!==void 0;P&&m.displayWidth&&(p=m.displayWidth,x=m.displayHeight),P||(m=y),this.world=v,this.gameObject=P?m:void 0,this.isBody=!0,this.transform={x:m.x,y:m.
4199y,rotation:m.angle,scaleX:m.scaleX,scaleY:m.scaleY,displayOriginX:m.displayOriginX,displayOriginY:m.displayOriginY},this.debugShowBody=v.defaults.debugShowBody,this.debugShowVelocity=v.defaults.debugShowVelocity,this.debugBodyColor=v.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new o,this.position=new o(m.x-m.scaleX*m.displayOriginX,m.y-m.scaleY*m.displayOriginY),this.prev=this.position.clone(),this.prevFrame=this.position.clone(),this.allowRotation=!0,this.rotation=m.angle,this.preRotation=m.angle,this.width=p,this.height=x,this.sourceWidth=p,this.sourceHeight=x,m.frame&&(this.sourceWidth=m.frame.realWidth,this.sourceHeight=m.frame.realHeight),this.halfWidth=Math.abs(p/2),this.halfHeight=Math.abs(x/2),this.center=new o(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new o,this.newVelocity=new o,this.deltaMax=new o,this.acceleration=new o,this.allowDrag=!0,this.drag=new o,this.allowGravity=!0,this.gravity=new o,this.bounce=new o,this.worldBounce=null,this.customBoundsRectangle=v.bounds,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new o(1e4,1e4),this.maxSpeed=-1,this.friction=new o(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=g.FACING_NONE,this.immovable=!1,this.pushable=!0,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={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.syncBounds=!1,this.physicsType=g.DYNAMIC_BODY,this._sx=m.scaleX,this._sy=m.scaleY,this._dx=0,this._dy=0,this._tx=0,this._ty=0,this._bounds=new h},updateBounds:function(){var u=this.gameObject,v=this.transform;if(u.parentContainer){var m=u.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2);v.x=m.tx,v.y=m.ty,v.rotation=a(m.rotation),v.scaleX=m.scaleX,v.scaleY=m.scaleY,v.displayOriginX=u.displayOriginX,v.displayOriginY=u.displayOriginY}else v.x=u.x,v.y=u.y,v.rotation=u.angle,v.scaleX=u.scaleX,v.scaleY=u.scaleY,v.displayOriginX=u.displayOriginX,v.displayOriginY=u.displayOriginY;var p=!1;if(this.syncBounds){var x=u.getBounds(this._bounds);this.width=x.width,this.height=x.height,p=!0}else{var y=Math.abs(v.scaleX),P=Math.abs(v.scaleY);(this._sx!==y||this._sy!==P)&&(this.width=this.sourceWidth*y,this.height=this.sourceHeight*P,this._sx=y,this._sy=P,p=!0)}p&&(this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter())},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},updateFromGameObject:function(){this.updateBounds();var u=this.transform;this.position.x=u.x+u.scaleX*(this.offset.x-u.displayOriginX),this.position.y=u.y+u.scaleY*(this.offset.y-u.displayOriginY),this.updateCenter()},resetFlags:function(u){u===void 0&&(u=!1);var v=this.wasTouching,m=this.touching,p=this.blocked;u?(v.none=!0,v.up=!1,v.down=!1,v.left=!1,v.right=!1):(v.none=m.none,v.up=m.up,v.down=m.down,v.left=m.left,v.right=m.right),m.none=!0,m.up=!1,m.down=!1,m.left=!1,m.right=!1,p.none=!0,p.up=!1,p.down=!1,p.left=!1,p.right=!1,this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(u,v){u&&this.resetFlags(),this.gameObject&&this.updateFromGameObject(),this.rotation=this.transform.rotation,this.preRotation=this.rotation,this.moves&&(this.prev.x=this.position.x,this.prev.y=this.position.y,this.prevFrame.x=this.position.x,this.prevFrame.y=this.position.y),u&&this.update(v)},update:function(u){if(this.prev.x=this.position.x,this.prev.y=this.position.y,this.moves){this.world.updateMotion(this,u);var v=this.velocity.x,m=this.velocity.y;this.newVelocity.set(v*u,m*u),this.position.add(this.newVelocity),this.updateCenter(),this.angle=Math.atan2(m,v),this.speed=Math.sqrt(v*v+m*m),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds&&this.world.emit(r.WORLD_BOUNDS,this,this.blocked.up,this.blocked.down,this.blocked.left,this.blocked.right)}this._dx=this.position.x-this.prev.x,this._dy=this.position.y-this.prev.y},postUpdate:function(){var u=this.position.x-this.prevFrame.x,v=this.position.y-this.prevFrame.y,m=this.gameObject;if(this.moves){var p=this.deltaMax.x,x=this.deltaMax.y;p!==0&&u!==0&&(u<0&&u<-p?u=-p:u>0&&u>p&&(u=p)),x!==0&&v!==0&&(v<0&&v<-x?v=-x:v>0&&v>x&&(v=x)),m&&(m.x+=u,m.y+=v)}u<0?this.facing=g.FACING_LEFT:u>0&&(this.facing=g.FACING_RIGHT),v<0?this.facing=g.FACING_UP:v>0&&(this.facing=g.FACING_DOWN),this.allowRotation&&m&&(m.angle+=this.deltaZ()),this._tx=u,this._ty=v},setBoundsRectangle:function(u){return this.customBoundsRectangle=u||this.world.bounds,this},checkWorldBounds:function(){var u=this.position,v=this.customBoundsRectangle,m=this.world.checkCollision,p=this.worldBounce?-this.worldBounce.x:-this.bounce.x,x=this.worldBounce?-this.worldBounce.y:-this.bounce.y,y=!1;return u.x<v.x&&m.left?(u.x=v.x,this.velocity.x*=p,this.blocked.left=!0,y=!0):this.right>v.right&&m.right&&(u.x=v.right-this.width,this.velocity.x*=p,this.blocked.right=!0,y=!0),u.y<v.y&&m.up?(u.y=v.y,this.velocity.y*=x,this.blocked.up=!0,y=!0):this.bottom>v.bottom&&m.down&&(u.y=v.bottom-this.height,this.velocity.y*=x,this.blocked.down=!0,y=!0),y&&(this.blocked.none=!1,this.updateCenter()),y},setOffset:function(u,v){return v===void 0&&(v=u),this.offset.set(u,v),this},setGameObject:function(u,v){return v===void 0&&(v=!0),this.world.remove(this),this.gameObject&&this.gameObject.body&&(this.gameObject.body=null),this.gameObject=u,u.body&&(u.body=this),this.setSize(),this.world.add(this),this.enable=v,this},setSize:function(u,v,m){m===void 0&&(m=!0);var p=this.gameObject;if(p&&(!u&&p.frame&&(u=p.frame.realWidth),!v&&p.frame&&(v=p.frame.realHeight)),this.sourceWidth=u,this.sourceHeight=v,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(),m&&p&&p.getCenter){var x=(p.width-u)/2,y=(p.height-v)/2;this.offset.set(x,y)}return this.isCircle=!1,this.radius=0,this},setCircle:function(u,v,m){return v===void 0&&(v=this.offset.x),m===void 0&&(m=this.offset.y),u>0?(this.isCircle=!0,this.radius=u,this.sourceWidth=u*2,this.sourceHeight=u*2,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(v,m),this.updateCenter()):this.isCircle=!1,this},reset:function(u,v){this.stop();var m=this.gameObject;m&&(m.setPosition(u,v),this.rotation=m.angle,this.preRotation=m.angle);var p=this.position;m&&m.getTopLeft?m.getTopLeft(p):p.set(u,v),this.prev.copy(p),this.prevFrame.copy(p),m&&this.updateBounds(),this.updateCenter(),this.collideWorldBounds&&this.checkWorldBounds(),this.resetFlags(!0)},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(u){return u.x=this.x,u.y=this.y,u.right=this.right,u.bottom=this.bottom,u},hitTest:function(u,v){if(!this.isCircle)return n(this,u,v);if(this.radius>0&&u>=this.left&&u<=this.right&&v>=this.top&&v<=this.bottom){var m=(this.center.x-u)*(this.center.x-u),p=(this.center.y-v)*(this.center.y-v);return m+p<=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>
41990?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaXFinal:function(){return this._tx},deltaYFinal:function(){return this._ty},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(u){var v=this.position,m=v.x+this.halfWidth,p=v.y+this.halfHeight;this.debugShowBody&&(u.lineStyle(u.defaultStrokeWidth,this.debugBodyColor),this.isCircle?u.strokeCircle(m,p,this.width/2):(this.checkCollision.up&&u.lineBetween(v.x,v.y,v.x+this.width,v.y),this.checkCollision.right&&u.lineBetween(v.x+this.width,v.y,v.x+this.width,v.y+this.height),this.checkCollision.down&&u.lineBetween(v.x,v.y+this.height,v.x+this.width,v.y+this.height),this.checkCollision.left&&u.lineBetween(v.x,v.y,v.x,v.y+this.height))),this.debugShowVelocity&&(u.lineStyle(u.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),u.lineBetween(m,p,m+this.velocity.x/2,p+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setCollideWorldBounds:function(u,v,m,p){u===void 0&&(u=!0),this.collideWorldBounds=u;var x=v!==void 0,y=m!==void 0;return(x||y)&&(this.worldBounce||(this.worldBounce=new o),x&&(this.worldBounce.x=v),y&&(this.worldBounce.y=m)),p!==void 0&&(this.onWorldBounds=p),this},setVelocity:function(u,v){return this.velocity.set(u,v),u=this.velocity.x,v=this.velocity.y,this.speed=Math.sqrt(u*u+v*v),this},setVelocityX:function(u){return this.setVelocity(u,this.velocity.y)},setVelocityY:function(u){return this.setVelocity(this.velocity.x,u)},setMaxVelocity:function(u,v){return this.maxVelocity.set(u,v),this},setMaxVelocityX:function(u){return this.maxVelocity.x=u,this},setMaxVelocityY:function(u){return this.maxVelocity.y=u,this},setMaxSpeed:function(u){return this.maxSpeed=u,this},setBounce:function(u,v){return this.bounce.set(u,v),this},setBounceX:function(u){return this.bounce.x=u,this},setBounceY:function(u){return this.bounce.y=u,this},setAcceleration:function(u,v){return this.acceleration.set(u,v),this},setAccelerationX:function(u){return this.acceleration.x=u,this},setAccelerationY:function(u){return this.acceleration.y=u,this},setAllowDrag:function(u){return u===void 0&&(u=!0),this.allowDrag=u,this},setAllowGravity:function(u){return u===void 0&&(u=!0),this.allowGravity=u,this},setAllowRotation:function(u){return u===void 0&&(u=!0),this.allowRotation=u,this},setDrag:function(u,v){return this.drag.set(u,v),this},setDamping:function(u){return this.useDamping=u,this},setDragX:function(u){return this.drag.x=u,this},setDragY:function(u){return this.drag.y=u,this},setGravity:function(u,v){return this.gravity.set(u,v),this},setGravityX:function(u){return this.gravity.x=u,this},setGravityY:function(u){return this.gravity.y=u,this},setFriction:function(u,v){return this.friction.set(u,v),this},setFrictionX:function(u){return this.friction.x=u,this},setFrictionY:function(u){return this.friction.y=u,this},setAngularVelocity:function(u){return this.angularVelocity=u,this},setAngularAcceleration:function(u){return this.angularAcceleration=u,this},setAngularDrag:function(u){return this.angularDrag=u,this},setMass:function(u){return this.mass=u,this},setImmovable:function(u){return u===void 0&&(u=!0),this.immovable=u,this},setEnable:function(u){return u===void 0&&(u=!0),this.enable=u,this},processX:function(u,v,m,p){this.x+=u,this.updateCenter(),v!==null&&(this.velocity.x=v);var x=this.blocked;m&&(x.left=!0,x.none=!1),p&&(x.right=!0,x.none=!1)},processY:function(u,v,m,p){this.y+=u,this.updateCenter(),v!==null&&(this.velocity.y=v);var x=this.blocked;m&&(x.up=!0,x.none=!1),p&&(x.down=!0,x.none=!1)},x:{get:function(){return this.position.x},set:function(u){this.position.x=u}},y:{get:function(){return this.position.y},set:function(u){this.position.y=u}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});l.exports=f},3909:(l,T,e)=>{/** 4200 * @author Richard Davey <[email protected]> 4201 * @copyright 2013-2023 Photon Storm Ltd. 4202 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4203 */var d=e(56694),g=new d({initialize:function(a,h,n,o,f,u,v){this.world=a,this.name="",this.active=!0,this.overlapOnly=h,this.object1=n,this.object2=o,this.collideCallback=f,this.processCallback=u,this.callbackContext=v},setName:function(r){return this.name=r,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}});l.exports=g},99523:(l,T,e)=>{/** 4204 * @author Richard Davey <[email protected]> 4205 * @copyright 2013-2023 Photon Storm Ltd. 4206 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4207 */var d=e(62832),g=e(25084),r=e(97602),a=e(56694),h=e(47401),n=e(10481),o=e(66634),f=e(46346),u=new a({initialize:function(m){this.world=m,this.scene=m.scene,this.sys=m.scene.sys},collider:function(v,m,p,x,y){return this.world.addCollider(v,m,p,x,y)},overlap:function(v,m,p,x,y){return this.world.addOverlap(v,m,p,x,y)},existing:function(v,m){var p=m?h.STATIC_BODY:h.DYNAMIC_BODY;return this.world.enableBody(v,p),v},staticImage:function(v,m,p,x){var y=new d(this.scene,v,m,p,x);return this.sys.displayList.add(y),this.world.enableBody(y,h.STATIC_BODY),y},image:function(v,m,p,x){var y=new d(this.scene,v,m,p,x);return this.sys.displayList.add(y),this.world.enableBody(y,h.DYNAMIC_BODY),y},staticSprite:function(v,m,p,x){var y=new g(this.scene,v,m,p,x);return this.sys.displayList.add(y),this.sys.updateList.add(y),this.world.enableBody(y,h.STATIC_BODY),y},sprite:function(v,m,p,x){var y=new g(this.scene,v,m,p,x);return this.sys.displayList.add(y),this.sys.updateList.add(y),this.world.enableBody(y,h.DYNAMIC_BODY),y},staticGroup:function(v,m){return this.sys.updateList.add(new f(this.world,this.world.scene,v,m))},group:function(v,m){return this.sys.updateList.add(new n(this.world,this.world.scene,v,m))},body:function(v,m,p,x){var y=new r(this.world);return y.position.set(v,m),p&&x&&y.setSize(p,x),this.world.add(y,h.DYNAMIC_BODY),y},staticBody:function(v,m,p,x){var y=new o(this.world);return y.position.set(v,m),p&&x&&y.setSize(p,x),this.world.add(y,h.STATIC_BODY),y},destroy:function(){this.world=null,this.scene=null,this.sys=null}});l.exports=u},75671:(l,T,e)=>{/** 4208 * @author Richard Davey <[email protected]> 4209 * @copyright 2013-2023 Photon Storm Ltd. 4210 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4211 */var d=e(47401),g=function(r,a,h,n){var o=0,f=r.deltaAbsX()+a.deltaAbsX()+n;return r._dx===0&&a._dx===0?(r.embedded=!0,a.embedded=!0):r._dx>a._dx?(o=r.right-a.x,o>f&&!h||r.checkCollision.right===!1||a.checkCollision.left===!1?o=0:(r.touching.none=!1,r.touching.right=!0,a.touching.none=!1,a.touching.left=!0,a.physicsType===d.STATIC_BODY&&!h&&(r.blocked.none=!1,r.blocked.right=!0),r.physicsType===d.STATIC_BODY&&!h&&(a.blocked.none=!1,a.blocked.left=!0))):r._dx<a._dx&&(o=r.x-a.width-a.x,-o>f&&!h||r.checkCollision.left===!1||a.checkCollision.right===!1?o=0:(r.touching.none=!1,r.touching.left=!0,a.touching.none=!1,a.touching.right=!0,a.physicsType===d.STATIC_BODY&&!h&&(r.blocked.none=!1,r.blocked.left=!0),r.physicsType===d.STATIC_BODY&&!h&&(a.blocked.none=!1,a.blocked.right=!0))),r.overlapX=o,a.overlapX=o,o};l.exports=g},66185:(l,T,e)=>{/** 4212 * @author Richard Davey <[email protected]> 4213 * @copyright 2013-2023 Photon Storm Ltd. 4214 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4215 */var d=e(47401),g=function(r,a,h,n){var o=0,f=r.deltaAbsY()+a.deltaAbsY()+n;return r._dy===0&&a._dy===0?(r.embedded=!0,a.embedded=!0):r._dy>a._dy?(o=r.bottom-a.y,o>f&&!h||r.checkCollision.down===!1||a.checkCollision.up===!1?o=0:(r.touching.none=!1,r.touching.down=!0,a.touching.none=!1,a.touching.up=!0,a.physicsType===d.STATIC_BODY&&!h&&(r.blocked.none=!1,r.blocked.down=!0),r.physicsType===d.STATIC_BODY&&!h&&(a.blocked.none=!1,a.blocked.up=!0))):r._dy<a._dy&&(o=r.y-a.bottom,-o>f&&!h||r.checkCollision.up===!1||a.checkCollision.down===!1?o=0:(r.touching.none=!1,r.touching.up=!0,a.touching.none=!1,a.touching.down=!0,a.physicsType===d.STATIC_BODY&&!h&&(r.blocked.none=!1,r.blocked.up=!0),r.physicsType===d.STATIC_BODY&&!h&&(a.blocked.none=!1,a.blocked.down=!0))),r.overlapY=o,a.overlapY=o,o};l.exports=g},10481:(l,T,e)=>{/** 4216 * @author Richard Davey <[email protected]> 4217 * @copyright 2013-2023 Photon Storm Ltd. 4218 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4219 */var d=e(25084),g=e(56694),r=e(47401),a=e(72632),h=e(59192),n=e(42911),o=new g({Extends:h,initialize:function(u,v,m,p){if(!m&&!p)p={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};else if(n(m))p=m,m=null,p.internalCreateCallback=this.createCallbackHandler,p.internalRemoveCallback=this.removeCallbackHandler;else if(Array.isArray(m)&&n(m[0])){p=m[0];var x=this;m.forEach(function(y){y.internalCreateCallback=x.createCallbackHandler,y.internalRemoveCallback=x.removeCallbackHandler}),m=null}else p={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};this.world=u,p.classType=a(p,"classType",d),this.physicsType=r.DYNAMIC_BODY,this.defaults={setCollideWorldBounds:a(p,"collideWorldBounds",!1),setBoundsRectangle:a(p,"customBoundsRectangle",null),setAccelerationX:a(p,"accelerationX",0),setAccelerationY:a(p,"accelerationY",0),setAllowDrag:a(p,"allowDrag",!0),setAllowGravity:a(p,"allowGravity",!0),setAllowRotation:a(p,"allowRotation",!0),setDamping:a(p,"useDamping",!1),setBounceX:a(p,"bounceX",0),setBounceY:a(p,"bounceY",0),setDragX:a(p,"dragX",0),setDragY:a(p,"dragY",0),setEnable:a(p,"enable",!0),setGravityX:a(p,"gravityX",0),setGravityY:a(p,"gravityY",0),setFrictionX:a(p,"frictionX",0),setFrictionY:a(p,"frictionY",0),setMaxSpeed:a(p,"maxSpeed",-1),setMa
4219xVelocityX:a(p,"maxVelocityX",1e4),setMaxVelocityY:a(p,"maxVelocityY",1e4),setVelocityX:a(p,"velocityX",0),setVelocityY:a(p,"velocityY",0),setAngularVelocity:a(p,"angularVelocity",0),setAngularAcceleration:a(p,"angularAcceleration",0),setAngularDrag:a(p,"angularDrag",0),setMass:a(p,"mass",1),setImmovable:a(p,"immovable",!1)},h.call(this,v,m,p),this.type="PhysicsGroup"},createCallbackHandler:function(f){f.body||this.world.enableBody(f,r.DYNAMIC_BODY);var u=f.body;for(var v in this.defaults)u[v](this.defaults[v])},removeCallbackHandler:function(f){f.body&&this.world.disableBody(f)},setVelocity:function(f,u,v){v===void 0&&(v=0);for(var m=this.getChildren(),p=0;p<m.length;p++)m[p].body.velocity.set(f+p*v,u+p*v);return this},setVelocityX:function(f,u){u===void 0&&(u=0);for(var v=this.getChildren(),m=0;m<v.length;m++)v[m].body.velocity.x=f+m*u;return this},setVelocityY:function(f,u){u===void 0&&(u=0);for(var v=this.getChildren(),m=0;m<v.length;m++)v[m].body.velocity.y=f+m*u;return this}});l.exports=o},22916:l=>{/** 4220 * @author Richard Davey <[email protected]> 4221 * @copyright 2013-2023 Photon Storm Ltd. 4222 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4223 */var T,e,d,g,r,a,h,n,o,f,u,v,m,p,x,y,P,b=function(L,O,I){T=L,e=O;var D=T.velocity.x,B=e.velocity.x;return d=T.pushable,o=T._dx<0,f=T._dx>0,u=T._dx===0,x=Math.abs(T.right-e.x)<=Math.abs(e.right-T.x),h=B-D*T.bounce.x,g=e.pushable,v=e._dx<0,m=e._dx>0,p=e._dx===0,y=!x,n=D-B*e.bounce.x,P=Math.abs(I),E()},E=function(){return f&&x&&e.blocked.right?(T.processX(-P,h,!1,!0),1):o&&y&&e.blocked.left?(T.processX(P,h,!0),1):m&&y&&T.blocked.right?(e.processX(-P,n,!1,!0),2):v&&x&&T.blocked.left?(e.processX(P,n,!0),2):0},M=function(){var L=T.velocity.x,O=e.velocity.x,I=Math.sqrt(O*O*e.mass/T.mass)*(O>0?1:-1),D=Math.sqrt(L*L*T.mass/e.mass)*(L>0?1:-1),B=(I+D)*.5;return I-=B,D-=B,r=B+I*T.bounce.x,a=B+D*e.bounce.x,o&&y?w(0):v&&x?w(1):f&&x?w(2):m&&y?w(3):!1},w=function(L){if(d&&g)P*=.5,L===0||L===3?(T.processX(P,r),e.processX(-P,a)):(T.processX(-P,r),e.processX(P,a));else if(d&&!g)L===0||L===3?T.processX(P,h,!0):T.processX(-P,h,!1,!0);else if(!d&&g)L===0||L===3?e.processX(-P,n,!1,!0):e.processX(P,n,!0);else{var O=P*.5;L===0?p?(T.processX(P,0,!0),e.processX(0,null,!1,!0)):m?(T.processX(O,0,!0),e.processX(-O,0,!1,!0)):(T.processX(O,e.velocity.x,!0),e.processX(-O,null,!1,!0)):L===1?u?(T.processX(0,null,!1,!0),e.processX(P,0,!0)):f?(T.processX(-O,0,!1,!0),e.processX(O,0,!0)):(T.processX(-O,null,!1,!0),e.processX(O,T.velocity.x,!0)):L===2?p?(T.processX(-P,0,!1,!0),e.processX(0,null,!0)):v?(T.processX(-O,0,!1,!0),e.processX(O,0,!0)):(T.processX(-O,e.velocity.x,!1,!0),e.processX(O,null,!0)):L===3&&(u?(T.processX(0,null,!0),e.processX(-P,0,!1,!0)):o?(T.processX(O,0,!0),e.processX(-O,0,!1,!0)):(T.processX(O,e.velocity.y,!0),e.processX(-O,null,!1,!0)))}return!0},A=function(L){L===1?e.velocity.x=0:x?e.processX(P,n,!0):e.processX(-P,n,!1,!0),T.moves&&(e.y+=(T.y-T.prev.y)*T.friction.y,e._dy=e.y-e.prev.y)},R=function(L){L===2?T.velocity.x=0:y?T.processX(P,h,!0):T.processX(-P,h,!1,!0),e.moves&&(T.y+=(e.y-e.prev.y)*e.friction.y,T._dy=T.y-T.prev.y)};l.exports={BlockCheck:E,Check:M,Set:b,Run:w,RunImmovableBody1:A,RunImmovableBody2:R}},67050:l=>{/** 4224 * @author Richard Davey <[email protected]> 4225 * @copyright 2013-2023 Photon Storm Ltd. 4226 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4227 */var T,e,d,g,r,a,h,n,o,f,u,v,m,p,x,y,P,b=function(L,O,I){T=L,e=O;var D=T.velocity.y,B=e.velocity.y;return d=T.pushable,o=T._dy<0,f=T._dy>0,u=T._dy===0,x=Math.abs(T.bottom-e.y)<=Math.abs(e.bottom-T.y),h=B-D*T.bounce.y,g=e.pushable,v=e._dy<0,m=e._dy>0,p=e._dy===0,y=!x,n=D-B*e.bounce.y,P=Math.abs(I),E()},E=function(){return f&&x&&e.blocked.down?(T.processY(-P,h,!1,!0),1):o&&y&&e.blocked.up?(T.processY(P,h,!0),1):m&&y&&T.blocked.down?(e.processY(-P,n,!1,!0),2):v&&x&&T.blocked.up?(e.processY(P,n,!0),2):0},M=function(){var L=T.velocity.y,O=e.velocity.y,I=Math.sqrt(O*O*e.mass/T.mass)*(O>0?1:-1),D=Math.sqrt(L*L*T.mass/e.mass)*(L>0?1:-1),B=(I+D)*.5;return I-=B,D-=B,r=B+I*T.bounce.y,a=B+D*e.bounce.y,o&&y?w(0):v&&x?w(1):f&&x?w(2):m&&y?w(3):!1},w=function(L){if(d&&g)P*=.5,L===0||L===3?(T.processY(P,r),e.processY(-P,a)):(T.processY(-P,r),e.processY(P,a));else if(d&&!g)L===0||L===3?T.processY(P,h,!0):T.processY(-P,h,!1,!0);else if(!d&&g)L===0||L===3?e.processY(-P,n,!1,!0):e.processY(P,n,!0);else{var O=P*.5;L===0?p?(T.processY(P,0,!0),e.processY(0,null,!1,!0)):m?(T.processY(O,0,!0),e.processY(-O,0,!1,!0)):(T.processY(O,e.velocity.y,!0),e.processY(-O,null,!1,!0)):L===1?u?(T.processY(0,null,!1,!0),e.processY(P,0,!0)):f?(T.processY(-O,0,!1,!0),e.processY(O,0,!0)):(T.processY(-O,null,!1,!0),e.processY(O,T.velocity.y,!0)):L===2?p?(T.processY(-P,0,!1,!0),e.processY(0,null,!0)):v?(T.processY(-O,0,!1,!0),e.processY(O,0,!0)):(T.processY(-O,e.velocity.y,!1,!0),e.processY(O,null,!0)):L===3&&(u?(T.processY(0,null,!0),e.processY(-P,0,!1,!0)):o?(T.processY(O,0,!0),e.processY(-O,0,!1,!0)):(T.processY(O,e.velocity.y,!0),e.processY(-O,null,!1,!0)))}return!0},A=function(L){L===1?e.velocity.y=0:x?e.processY(P,n,!0):e.processY(-P,n,!1,!0),T.moves&&(e.x+=(T.x-T.prev.x)*T.friction.x,e._dx=e.x-e.prev.x)},R=function(L){L===2?T.velocity.y=0:y?T.processY(P,h,!0):T.processY(-P,h,!1,!0),e.moves&&(T.x+=(e.x-e.prev.x)*e.friction.x,T._dx=T.x-T.prev.x)};l.exports={BlockCheck:E,Check:M,Set:b,Run:w,RunImmovableBody1:A,RunImmovableBody2:R}},61777:(l,T,e)=>{/** 4228 * @author Richard Davey <[email protected]> 4229 * @copyright 2013-2023 Photon Storm Ltd. 4230 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4231 */var d=e(75671),g=e(22916),r=function(a,h,n,o,f){f===void 0&&(f=d(a,h,n,o));var u=a.immovable,v=h.immovable;if(n||f===0||u&&v||a.customSeparateX||h.customSeparateX)return f!==0||a.embedded&&h.embedded;var m=g.Set(a,h,f);return!u&&!v?m>0?!0:g.Check():(u?g.RunImmovableBody1(m):v&&g.RunImmovableBody2(m),!0)};l.exports=r},25299:(l,T,e)=>{/** 4232 * @author Richard Davey <[email protected]> 4233 * @copyright 2013-2023 Photon Storm Ltd. 4234 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4235 */var d=e(66185),g=e(67050),r=function(a,h,n,o,f){f===void 0&&(f=d(a,h,n,o));var u=a.immovable,v=h.immovable;if(n||f===0||u&&v||a.customSeparateY||h.customSeparateY)return f!==0||a.embedded&&h.embedded;var m=g.Set(a,h,f);return!u&&!v?m>0?!0:g.Check():(u?g.RunImmovableBody1(m):v&&g.RunImmovableBody2(m),!0)};l.exports=r},66634:(l,T,e)=>{/** 4236 * @author Richard Davey <[email protected]> 4237 * @copyright 2013-2023 Photon Storm Ltd. 4238 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4239 */var d=e(65650),g=e(56694),r=e(47401),a=e(94287),h=e(93736),n=new g({initialize:function(f,u){var v=64,m=64,p={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},x=u!==void 0;x&&u.displayWidth&&(v=u.displayWidth,m=u.displayHeight),x||(u=p),this.world=f,this.gameObject=x?u:void 0,this.isBody=!0,this.debugShowBody=f.defaults.debugShowStaticBody,this.debugBodyColor=f.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new h,this.position=new h(u.x-v*u.originX,u.y-m*u.originY),this.width=v,this.height=m,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new h(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=h.ZERO,this.allowGravity=!1,this.gravity=h.ZERO,this.bounce=h.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={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=r.STATIC_BODY,this._dx=0,this._dy=0},setGameObject:function(o,f){return o&&o!==this.gameObject&&(this.gameObject.body=null,o.body=this,this.gameObject=o),f&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var o=this.gameObject;return o.getTopLeft(this.position),this.width=o.displayWidth,this.height=o.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(o,f){return f===void 0&&(f=o),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(o,f),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(o,f,u){u===void 0&&(u=!0);var v=this.gameObject;if(!o&&v.frame&&(o=v.frame.realWidth),!f&&v.frame&&(f=v.frame.realHeight),this.world.staticTree.remove(this),this.width=o,this.height=f,this.halfWidth=Math.floor(o/2),this.halfHeight=Math.floor(f/2),u&&v.getCenter){var m=v.displayWidth/2,p=v.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(m-this.halfWidth,p-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(o,f,u){return f===void 0&&(f=this.offset.x),u===void 0&&(u=this.offset.y),o>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=o,this.width=o*2,this.height=o*2,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(f,u),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(o,f){var u=this.gameObject;o===void 0&&(o=u.x),f===void 0&&(f=u.y),this.world.staticTree.remove(this),u.setPosition(o,f),u.getTopLeft(this.position),this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(o){return o.x=this.x,o.y=this.y,o.right=this.right,o.bottom=this.bottom,o},hitTest:function(o,f){return this.isCircle?d(this,o,f):a(this,o,f)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(o){var f=this.position,u=f.x+this.halfWidth,v=f.y+this.halfHeight;this.debugShowBody&&(o.lineStyle(o.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?o.strokeCircle(u,v,this.width/2):o.strokeRect(f.x,f.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(o){return o<=0&&(o=.1),this.mass=o,this},x:{get:function(){return this.position.x},set:function(o){this.world.staticTree.remove(this),this.position.x=o,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(o){this.world.staticTree.remove(this),this.position.y=o,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}}});l.exports=n},46346:(l,T,e)=>{/** 4240 * @author Richard Davey <[email protected]> 4241 * @copyright 2013-2023 Photon Storm Ltd. 4242 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4243 */var d=e(25084),g=e(56694),r=e(47401),a=e(72632),h=e(59192),n=e(42911),o=new g({Extends:h,initialize:function(u,v,m,p){!m&&!p?p={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:d}:n(m)?(p=m,m=null,p.internalCreateCallback=this.createCallbackHandler,p.internalRemoveCallback=this.removeCallbackHandler,p.createMultipleCallback=this.createMultipleCallbackHandler,p.classType=a(p,"classType",d)):Array.isArray(m)&&n(m[0])?(p=m,m=null,p.forEach(function(x){x.internalCreateCallback=this.createCallbackHandler,x.internalRemoveCallback=this.removeCallbackHandler,x.createMultipleCallback=this.createMultipleCallbackHandler,x.classType=a(x,"classType",d)})):p={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler},this.world=u,this.physicsType=r.STATIC_BODY,h.call(this,v,m,p),this.type="StaticPhysicsGroup"},createCallbackHandler:function(f){f.body||this.world.enableBody(f,r.STATIC_BODY)},removeCallbackHandler:function(f){f.body&&this.world.disableBody(f)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var f=this.children.entries,u=0;u<f.length;u++)f[u].body.reset();return this}});l.exports=o},85233:(l,T,e)=>{/** 4244 * @author Richard Davey <[email protected]> 4245 * @copyright 2013-2023 Photon Storm Ltd. 4246 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4247 */var d=e(94240),g=e(97602),r=e(82897),a=e(56694),h=e(3909),n=e(47401),o=e(53996),f=e(92951),u=e(6659),v=e(27037),m=e(88456),p=e(41935),x=e(54726),y=e(75671),P=e(66185),b=e(44662),E=e(10850),M=e(83392),w=e(74623),A=e(25163),R=e(74118),L=e(68687),O=e(27354),I=e(61777),D=e(25299),B=e(58403),z=e(66634),X=e(28808),W=e(69360),j=e(93736),N=e(1071),Y=new a({Extends:u,initialize:function(G,k){u.call(this),this.scene=G,this.bodies=new B,this.staticBodies=new B,this.pendingDestroy=new B,this.colliders=new w,this.gravity=new j(E(k,"gravity.x",0),E(k,"gravity.y",0)
4247),this.bounds=new R(E(k,"x",0),E(k,"y",0),E(k,"width",G.sys.scale.width),E(k,"height",G.sys.scale.height)),this.checkCollision={up:E(k,"checkCollision.up",!0),down:E(k,"checkCollision.down",!0),left:E(k,"checkCollision.left",!0),right:E(k,"checkCollision.right",!0)},this.fps=E(k,"fps",60),this.fixedStep=E(k,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=E(k,"timeScale",1),this.OVERLAP_BIAS=E(k,"overlapBias",4),this.TILE_BIAS=E(k,"tileBias",16),this.forceX=E(k,"forceX",!1),this.isPaused=E(k,"isPaused",!1),this._total=0,this.drawDebug=E(k,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:E(k,"debugShowBody",!0),debugShowStaticBody:E(k,"debugShowStaticBody",!0),debugShowVelocity:E(k,"debugShowVelocity",!0),bodyDebugColor:E(k,"debugBodyColor",16711935),staticBodyDebugColor:E(k,"debugStaticBodyColor",255),velocityDebugColor:E(k,"debugVelocityColor",65280)},this.maxEntries=E(k,"maxEntries",16),this.useTree=E(k,"useTree",!0),this.tree=new L(this.maxEntries),this.staticTree=new L(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(F,G){G===void 0&&(G=n.DYNAMIC_BODY),Array.isArray(F)||(F=[F]);for(var k=0;k<F.length;k++){var V=F[k];if(V.isParent)for(var U=V.getChildren(),$=0;$<U.length;$++){var K=U[$];K.isParent?this.enable(K,G):this.enableBody(K,G)}else this.enableBody(V,G)}},enableBody:function(F,G){return G===void 0&&(G=n.DYNAMIC_BODY),F.hasTransformComponent&&(F.body||(G===n.DYNAMIC_BODY?F.body=new g(this,F):G===n.STATIC_BODY&&(F.body=new z(this,F))),this.add(F.body)),F},add:function(F){return F.physicsType===n.DYNAMIC_BODY?this.bodies.set(F):F.physicsType===n.STATIC_BODY&&(this.staticBodies.set(F),this.staticTree.insert(F)),F.enable=!0,F},disable:function(F){Array.isArray(F)||(F=[F]);for(var G=0;G<F.length;G++){var k=F[G];if(k.isParent)for(var V=k.getChildren(),U=0;U<V.length;U++){var $=V[U];$.isParent?this.disable($):this.disableBody($.body)}else this.disableBody(k.body)}},disableBody:function(F){this.remove(F),F.enable=!1},remove:function(F){F.physicsType===n.DYNAMIC_BODY?(this.tree.remove(F),this.bodies.delete(F)):F.physicsType===n.STATIC_BODY&&(this.staticBodies.delete(F),this.staticTree.remove(F))},createDebugGraphic:function(){var F=this.scene.sys.add.graphics({x:0,y:0});return F.setDepth(Number.MAX_VALUE),this.debugGraphic=F,this.drawDebug=!0,F},setBounds:function(F,G,k,V,U,$,K,J){return this.bounds.setTo(F,G,k,V),U!==void 0&&this.setBoundsCollision(U,$,K,J),this},setBoundsCollision:function(F,G,k,V){return F===void 0&&(F=!0),G===void 0&&(G=!0),k===void 0&&(k=!0),V===void 0&&(V=!0),this.checkCollision.left=F,this.checkCollision.right=G,this.checkCollision.up=k,this.checkCollision.down=V,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(F,G,k,V,U){k===void 0&&(k=null),V===void 0&&(V=null),U===void 0&&(U=k);var $=new h(this,!1,F,G,k,V,U);return this.colliders.add($),$},addOverlap:function(F,G,k,V,U){k===void 0&&(k=null),V===void 0&&(V=null),U===void 0&&(U=k);var $=new h(this,!0,F,G,k,V,U);return this.colliders.add($),$},removeCollider:function(F){return this.colliders.remove(F),this},setFPS:function(F){return this.fps=F,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this},update:function(F,G){if(!(this.isPaused||this.bodies.size===0)){var k,V=this._frameTime,U=this._frameTimeMS*this.timeScale;this._elapsed+=G;var $,K=this.bodies.entries,J=this._elapsed>=U;for(this.fixedStep||(V=G*.001,J=!0,this._elapsed=0),k=0;k<K.length;k++)$=K[k],$.enable&&$.preUpdate(J,V);if(J){this._elapsed-=U,this.stepsLastFrame=1,this.useTree&&(this.tree.clear(),this.tree.load(K));var _=this.colliders.update();for(k=0;k<_.length;k++){var tt=_[k];tt.active&&tt.update()}this.emit(v.WORLD_STEP,V)}for(;this._elapsed>=U;)this._elapsed-=U,this.step(V)}}
4247,step:function(F){var G,k,V=this.bodies.entries,U=V.length;for(G=0;G<U;G++)k=V[G],k.enable&&k.update(F);this.useTree&&(this.tree.clear(),this.tree.load(V));var $=this.colliders.update();for(G=0;G<$.length;G++){var K=$[G];K.active&&K.update()}this.emit(v.WORLD_STEP,F),this.stepsLastFrame++},postUpdate:function(){var F,G,k=this.bodies.entries,V=k.length,U=this.bodies,$=this.staticBodies;if(this.stepsLastFrame)for(this.stepsLastFrame=0,F=0;F<V;F++)G=k[F],G.enable&&G.postUpdate();if(this.drawDebug){var K=this.debugGraphic;for(K.clear(),F=0;F<V;F++)G=k[F],G.willDrawDebug()&&G.drawDebug(K);for(k=$.entries,V=k.length,F=0;F<V;F++)G=k[F],G.willDrawDebug()&&G.drawDebug(K)}var J=this.pendingDestroy;if(J.size>0){var _=this.tree,tt=this.staticTree;for(k=J.entries,V=k.length,F=0;F<V;F++)G=k[F],G.physicsType===n.DYNAMIC_BODY?(_.remove(G),U.delete(G)):G.physicsType===n.STATIC_BODY&&(tt.remove(G),$.delete(G)),G.world=void 0,G.gameObject=void 0;J.clear()}},updateMotion:function(F,G){F.allowRotation&&this.computeAngularVelocity(F,G),this.computeVelocity(F,G)},computeAngularVelocity:function(F,G){var k=F.angularVelocity,V=F.angularAcceleration,U=F.angularDrag,$=F.maxAngular;V?k+=V*G:F.allowDrag&&U&&(U*=G,p(k-U,0,.1)?k-=U:x(k+U,0,.1)?k+=U:k=0),k=r(k,-$,$);var K=k-F.angularVelocity;F.angularVelocity+=K,F.rotation+=F.angularVelocity*G},computeVelocity:function(F,G){var k=F.velocity.x,V=F.acceleration.x,U=F.drag.x,$=F.maxVelocity.x,K=F.velocity.y,J=F.acceleration.y,_=F.drag.y,tt=F.maxVelocity.y,st=F.speed,ht=F.maxSpeed,lt=F.allowDrag,nt=F.useDamping;F.allowGravity&&(k+=(this.gravity.x+F.gravity.x)*G,K+=(this.gravity.y+F.gravity.y)*G),V?k+=V*G:lt&&U&&(nt?(U=Math.pow(U,G),k*=U,st=Math.sqrt(k*k+K*K),m(st,0,.001)&&(k=0)):(U*=G,p(k-U,0,.01)?k-=U:x(k+U,0,.01)?k+=U:k=0)),J?K+=J*G:lt&&_&&(nt?(_=Math.pow(_,G),K*=_,st=Math.sqrt(k*k+K*K),m(st,0,.001)&&(K=0)):(_*=G,p(K-_,0,.01)?K-=_:x(K+_,0,.01)?K+=_:K=0)),k=r(k,-$,$),K=r(K,-tt,tt),F.velocity.set(k,K),ht>-1&&F.velocity.length()>ht&&(F.velocity.normalize().scale(ht),st=ht),F.speed=st},separate:function(F,G,k,V,U){var $,K,J=!1,_=!0;if(!F.enable||!G.enable||F.checkCollision.none||G.checkCollision.none||!this.intersects(F,G)||k&&k.call(V,F.gameObject,G.gameObject)===!1)return J;if(F.isCircle||G.isCircle){var tt=this.separateCircle(F,G,U);tt.result?(J=!0,_=!1):($=tt.x,K=tt.y,_=!0)}if(_){var st=!1,ht=!1,lt=this.OVERLAP_BIAS;U?(st=I(F,G,U,lt,$),ht=D(F,G,U,lt,K)):this.forceX||Math.abs(this.gravity.y+F.gravity.y)<Math.abs(this.gravity.x+F.gravity.x)?(st=I(F,G,U,lt,$),this.intersects(F,G)&&(ht=D(F,G,U,lt,K))):(ht=D(F,G,U,lt,K),this.intersects(F,G)&&(st=I(F,G,U,lt,$))),J=st||ht}return J&&(U?(F.onOverlap||G.onOverlap)&&this.emit(v.OVERLAP,F.gameObject,G.gameObject,F,G):(F.onCollide||G.onCollide)&&this.emit(v.COLLIDE,F.gameObject,G.gameObject,F,G)),J},separateCircle:function(F,G,k){y(F,G,!1,0),P(F,G,!1,0);var V=F.isCircle,U=G.isCircle,$=F.center,K=G.center,J=F.immovable,_=G.immovable,tt=F.velocity,st=G.velocity,ht=0,lt=!0;if(V!==U){lt=!1;var nt=$.x,gt=$.y,bt=F.halfWidth,Pt=G.position.x,dt=G.position.y,St=G.right,Tt=G.bottom;U&&(nt=K.x,gt=K.y,bt=G.halfWidth,Pt=F.position.x,dt=F.position.y,St=F.right,Tt=F.bottom),gt<dt?nt<Pt?ht=o(nt,gt,Pt,dt)-bt:nt>St&&(ht=o(nt,gt,St,dt)-bt):gt>Tt&&(nt<Pt?ht=o(nt,gt,Pt,Tt)-bt:nt>St&&(ht=o(nt,gt,St,Tt)-bt)),ht*=-1}else ht=F.halfWidth+G.halfWidth-f($,K);F.overlapR=ht,G.overlapR=ht;var Vt=d($,K),zt=(ht+M.EPSILON)*Math.cos(Vt),be=(ht+M.EPSILON)*Math.sin(Vt),pe={overlap:ht,result:!1,x:zt,y:be};if(k&&(!lt||lt&&ht!==0))return pe.result=!0,pe;if(!lt&&ht===0||J&&_||F.customSeparateX||G.customSeparateX)return pe.x=void 0,pe.y=void 0,pe;var Qt=!F.pushable&&!G.pushable;if(lt){var Wt=$.x-K.x,me=$.y-K.y,ze=Math.sqrt(Math.pow(Wt,2)+Math.pow(me,2)),Ke=(K.x-$.x)/ze||0,ei=(K.y-$.y)/ze||0,Oi=2*(tt.x*Ke+tt.y*ei-st.x*Ke-st.y*ei)/(F.mass+G.mass);(J||_)&&(Oi*=2),J||(tt.x=tt.x-Oi/F.mass*Ke,tt.y=tt.y-Oi/F.mass*ei,tt.multiply(F.bounce)),_||(st.x=st.x+Oi/G.mass*Ke,st.y=st.y+Oi/G.mass*ei,st.multiply(G.bounce)),!J&&!_&&(zt*=.5,be*=.5),J||(F.x-=zt,F.y-=be,F.updateCenter()),_||(G.x+=zt,G.y+=be,G.updateCenter()),pe.result=!0}else!J||F.pushable||Qt?(F.x-=zt,F.y-=be,F.updateCenter()):(!_||G.pushable||Qt)&&(G.x+=zt,G.y+=be,G.updateCenter()),pe.x=void 0,pe.y=void 0;return pe},intersects:function(F,G){return F===G?!1:!F.isCircle&&!G.isCircle?!(F.right<=G.left||F.bottom<=G.top||F.left>=G.right||F.top>=G.bottom):F.isCircle?G.isCircle?f(F.center,G.center)<=F.halfWidth+G.halfWidth:this.circleBodyIntersects(F,G):this.circleBodyIntersects(G,F)},circleBodyIntersects:function(F,G){var k=r(F.center.x,G.left,G.right),V=r(F.center.y,G.top,G.bottom),U=(F.center.x-k)*(F.center.x-k),$=(F.center.y-V)*(F.center.y-V);return U+$<=F.halfWidth*F.halfWidth},overlap:function(F,G,k,V,U){return k===void 0&&(k=null),V===void 0&&(V=null),U===void 0&&(U=k),this.collideObjects(F,G,k,V,U,!0)},collide:function(F,G,k,V,U){return k===void 0&&(k=null),V===void 0&&(V=null),U===void 0&&(U=k),this.collideObjects(F,G,k,V,U,!1)},collideObjects:function(F,G,k,V,U,$){var K,J;F.isParent&&(F.physicsType===void 0||G===void 0||F===G)&&(F=F.children.entries),G&&G.isParent&&G.physicsType===void 0&&(G=G.children.entries);var _=Array.isArray(F),tt=Array.isArray(G);if(this._total=0,!_&&!tt)this.collideHandler(F,G,k,V,U,$);else if(!_&&tt)for(K=0;K<G.length;K++)this.collideHandler(F,G[K],k,V,U,$);else if(_&&!tt)if(G)for(K=0;K<F.length;K++)this.collideHandler(F[K],G,k,V,U,$);else for(K=0;K<F.length;K++){var st=F[K];for(J=K+1;J<F.length;J++)K!==J&&this.collideHandler(st,F[J],k,V,U,$)}else for(K=0;K<F.length;K++)for(J=0;J<G.length;J++)this.collideHandler(F[K],G[J],k,V,U,$);return this._total>0},collideHandler:function(F,G,k,V,U,$){if(G===void 0&&F.isParent)return this.collideGroupVsGroup(
4247F,F,k,V,U,$);if(!F||!G)return!1;if(F.body||F.isBody){if(G.body||G.isBody)return this.collideSpriteVsSprite(F,G,k,V,U,$);if(G.isParent)return this.collideSpriteVsGroup(F,G,k,V,U,$);if(G.isTilemap)return this.collideSpriteVsTilemapLayer(F,G,k,V,U,$)}else if(F.isParent){if(G.body||G.isBody)return this.collideSpriteVsGroup(G,F,k,V,U,$);if(G.isParent)return this.collideGroupVsGroup(F,G,k,V,U,$);if(G.isTilemap)return this.collideGroupVsTilemapLayer(F,G,k,V,U,$)}else if(F.isTilemap){if(G.body||G.isBody)return this.collideSpriteVsTilemapLayer(G,F,k,V,U,$);if(G.isParent)return this.collideGroupVsTilemapLayer(G,F,k,V,U,$)}},collideSpriteVsSprite:function(F,G,k,V,U,$){var K=F.isBody?F:F.body,J=G.isBody?G:G.body;return!K||!J?!1:(this.separate(K,J,V,U,$)&&(k&&k.call(U,F,G),this._total++),!0)},collideSpriteVsGroup:function(F,G,k,V,U,$){var K=F.isBody?F:F.body;if(!(G.length===0||!K||!K.enable||K.checkCollision.none)){var J,_,tt;if(this.useTree||G.physicsType===n.STATIC_BODY){var st=this.treeMinMax;st.minX=K.left,st.minY=K.top,st.maxX=K.right,st.maxY=K.bottom;var ht=G.physicsType===n.DYNAMIC_BODY?this.tree.search(st):this.staticTree.search(st);for(_=ht.length,J=0;J<_;J++)tt=ht[J],!(K===tt||!tt.enable||tt.checkCollision.none||!G.contains(tt.gameObject))&&this.separate(K,tt,V,U,$)&&(k&&k.call(U,K.gameObject,tt.gameObject),this._total++)}else{var lt=G.getChildren(),nt=G.children.entries.indexOf(F);for(_=lt.length,J=0;J<_;J++)tt=lt[J].body,!(!tt||J===nt||!tt.enable)&&this.separate(K,tt,V,U,$)&&(k&&k.call(U,K.gameObject,tt.gameObject),this._total++)}}},collideGroupVsTilemapLayer:function(F,G,k,V,U,$){var K=F.getChildren();if(K.length===0)return!1;for(var J=!1,_=0;_<K.length;_++)(K[_].body||K[_].isBody)&&this.collideSpriteVsTilemapLayer(K[_],G,k,V,U,$)&&(J=!0);return J},collideTiles:function(F,G,k,V,U){return G.length===0||F.body&&!F.body.enable||F.isBody&&!F.enable?!1:this.collideSpriteVsTilesHandler(F,G,k,V,U,!1,!1)},overlapTiles:function(F,G,k,V,U){return G.length===0||F.body&&!F.body.enable||F.isBody&&!F.enable?!1:this.collideSpriteVsTilesHandler(F,G,k,V,U,!0,!1)},collideSpriteVsTilemapLayer:function(F,G,k,V,U,$){var K=F.isBody?F:F.body;if(!K.enable||K.checkCollision.none)return!1;var J=K.x,_=K.y,tt=K.width,st=K.height,ht=G.layer;if(ht.tileWidth>ht.baseTileWidth){var lt=(ht.tileWidth-ht.baseTileWidth)*G.scaleX;J-=lt,tt+=lt}if(ht.tileHeight>ht.baseTileHeight){var nt=(ht.tileHeight-ht.baseTileHeight)*G.scaleY;st+=nt}var gt=$?null:this.tileFilterOptions,bt=b(J,_,tt,st,gt,G.scene.cameras.main,G.layer);return bt.length===0?!1:this.collideSpriteVsTilesHandler(F,bt,k,V,U,$,!0)},collideSpriteVsTilesHandler:function(F,G,k,V,U,$,K){for(var J=F.isBody?F:F.body,_,tt={left:0,right:0,top:0,bottom:0},st,ht=!1,lt=0;lt<G.length;lt++){_=G[lt],st=_.tilemapLayer;var nt=st.tileToWorldXY(_.x,_.y);tt.left=nt.x,tt.top=nt.y,_.baseHeight!==_.height&&(tt.top-=(_.height-_.baseHeight)*st.scaleY),tt.right=tt.left+_.width*st.scaleX,tt.bottom=tt.top+_.height*st.scaleY,X(tt,J)&&(!V||V.call(U,F,_))&&A(_,F)&&($||O(lt,J,_,tt,st,this.TILE_BIAS,K))&&(this._total++,ht=!0,k&&k.call(U,F,_),$&&J.onOverlap?this.emit(v.TILE_OVERLAP,F,_,J):J.onCollide&&this.emit(v.TILE_COLLIDE,F,_,J))}return ht},collideGroupVsGroup:function(F,G,k,V,U,$){if(!(F.length===0||G.length===0))for(var K=F.getChildren(),J=0;J<K.length;J++)this.collideSpriteVsGroup(K[J],G,k,V,U,$)},wrap:function(F,G){F.body?this.wrapObject(F,G):F.getChildren?this.wrapArray(F.getChildren(),G):Array.isArray(F)?this.wrapArray(F,G):this.wrapObject(F,G)},wrapArray:function(F,G){for(var k=0;k<F.length;k++)this.wrapObject(F[k],G)},wrapObject:function(F,G){G===void 0&&(G=0),F.x=N(F.x,this.bounds.left-G,this.bounds.right+G),F.y=N(F.y,this.bounds.top-G,this.bounds.bottom+G)},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)}});l.exports=Y},5321:l=>{/** 4248 * @author Richard Davey <[email protected]> 4249 * @copyright 2013-2023 Photon Storm Ltd. 4250 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4251 */var T={setAcceleration:function(e,d){return this.body.acceleration.set(e,d),this},setAccelerationX:function(e){return this.body.acceleration.x=e,this},setAccelerationY:function(e){return this.body.acceleration.y=e,this}};l.exports=T},29257:l=>{/** 4252 * @author Richard Davey <[email protected]> 4253 * @copyright 2013-2023 Photon Storm Ltd. 4254 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4255 */var T={setAngularVelocity:function(e){return this.body.angularVelocity=e,this},setAngularAcceleration:function(e){return this.body.angularAcceleration=e,this},setAngularDrag:function(e){return this.body.angularDrag=e,this}};l.exports=T},62122:l=>{/** 4256 * @author Richard Davey <[email protected]> 4257 * @copyright 2013-2023 Photon Storm Ltd. 4258 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4259 */var T={setBounce:function(e,d){return this.body.bounce.set(e,d),this},setBounceX:function(e){return this.body.bounce.x=e,this},setBounceY:function(e){return this.body.bounce.y=e,this},setCollideWorldBounds:function(e,d,g,r){return this.body.setCollideWorldBounds(e,d,g,r),this}};l.exports=T},99803:l=>{/** 4260 * @author Richard Davey <[email protected]> 4261 * @copyright 2013-2023 Photon Storm Ltd. 4262 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4263 */var T={setDebug:function(e,d,g){return this.debugShowBody=e,this.debugShowVelocity=d,this.debugBodyColor=g,this},setDebugBodyColor:function(e){return this.body.debugBodyColor=e,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(e){this.body.debugShowBody=e}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(e){this.body.debugShowVelocity=e}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(e){this.body.debugBodyColor=e}}};l.exports=T},87145:l=>{/** 4264 * @author Richard Davey <[email protected]> 4265 * @copyright 2013-2023 Photon Storm Ltd. 4266 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4267 */var T={setDrag:function(e,d){return this.body.drag.set(e,d),this},setDragX:function(e){return this.body.drag.x=e,this},setDragY:function(e){return this.body.drag.y=e,this},setDamping:function(e){return this.body.useDamping=e,this}};l.exports=T},96174:l=>{/** 4268 * @author Richard Davey <[email protected]> 4269 * @copyright 2013-2023 Photon Storm Ltd. 4270 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4271 */var T={enableBody:function(e,d,g,r,a){return e&&this.body.reset(d,g),r&&(this.body.gameObject.active=!0),a&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(e,d){return e===void 0&&(e=!1),d===void 0&&(d=!1),this.body.stop(),this.body.enable=!1,e&&(this.body.gameObject.active=!1),d&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};l.exports=T},51702:l=>{/** 4272 * @author Richard Davey <[email protected]> 4273 * @copyright 2013-2023 Photon Storm Ltd. 4274 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4275 */var T={setFriction:function(e,d){return this.body.friction.set(e,d),this},setFrictionX:function(e){return this.body.friction.x=e,this},setFrictionY:function(e){return this.body.friction.y=e,this}};l.exports=T},25578:l=>{/** 4276 * @author Richard Davey <[email protected]> 4277 * @copyright 2013-2023 Photon Storm Ltd. 4278 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4279 */var T={setGravity:function(e,d){return this.body.gravity.set(e,d),this},setGravityX:function(e){return this.body.gravity.x=e,this},setGravityY:function(e){return this.body.gravity.y=e,this}};l.exports=T},72029:l=>{/** 4280 * @author Richard Davey <[email protected]> 4281 * @copyright 2013-2023 Photon Storm Ltd. 4282 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4283 */var T={setImmovable:function(e){return e===void 0&&(e=!0),this.body.immovable=e,this}};l.exports=T},34566:l=>{/** 4284 * @author Richard Davey <[email protected]> 4285 * @copyright 2013-2023 Photon Storm Ltd. 4286 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4287 */var T={setMass:function(e){return this.body.mass=e,this}};l.exports=T},2732:(l,T,e)=>{var d=e(15147),g=e(26673),r=e(22184),a=e(26535),h=function(n,o,f,u,v,m){var p=d(n,o-u,f-u,2*u,2*u,v,m);if(p.length===0)return p;for(var x=new g(o,f,u),y=new g,P=[],b=0;b<p.length;b++){var E=p[b];E.isCircle?(y.setTo(E.center.x,E.center.y,E.halfWidth),r(x,y)&&P.push(E)):a(x,E)&&P.push(E)}return P};l.exports=h}
4287,15147:l=>{var T=function(e,d,g,r,a,h,n){h===void 0&&(h=!0),n===void 0&&(n=!1);var o=[],f=[],u=e.treeMinMax;if(u.minX=d,u.minY=g,u.maxX=d+r,u.maxY=g+a,n&&(f=e.staticTree.search(u)),h&&e.useTree)o=e.tree.search(u);else if(h){var v=e.bodies,m={position:{x:d,y:g},left:d,top:g,right:d+r,bottom:g+a,isCircle:!1},p=e.intersects;v.iterate(function(x){p(x,m)&&o.push(x)})}return f.concat(o)};l.exports=T},57527:l=>{/** 4288 * @author Richard Davey <[email protected]> 4289 * @copyright 2013-2023 Photon Storm Ltd. 4290 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4291 */var T={setPushable:function(e){return e===void 0&&(e=!0),this.body.pushable=e,this}};l.exports=T},77687:l=>{/** 4292 * @author Richard Davey <[email protected]> 4293 * @copyright 2013-2023 Photon Storm Ltd. 4294 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4295 */var T={setOffset:function(e,d){return this.body.setOffset(e,d),this},setSize:function(e,d,g){return this.body.setSize(e,d,g),this},setBodySize:function(e,d,g){return this.body.setSize(e,d,g),this},setCircle:function(e,d,g){return this.body.setCircle(e,d,g),this}};l.exports=T},66536:l=>{/** 4296 * @author Richard Davey <[email protected]> 4297 * @copyright 2013-2023 Photon Storm Ltd. 4298 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4299 */var T={setVelocity:function(e,d){return this.body.setVelocity(e,d),this},setVelocityX:function(e){return this.body.setVelocityX(e),this},setVelocityY:function(e){return this.body.setVelocityY(e),this},setMaxVelocity:function(e,d){return this.body.maxVelocity.set(e,d),this}};l.exports=T},7864:(l,T,e)=>{/** 4300 * @author Richard Davey <[email protected]> 4301 * @copyright 2013-2023 Photon Storm Ltd. 4302 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4303 */l.exports={Acceleration:e(5321),Angular:e(29257),Bounce:e(62122),Debug:e(99803),Drag:e(87145),Enable:e(96174),Friction:e(51702),Gravity:e(25578),Immovable:e(72029),Mass:e(34566),OverlapCirc:e(2732),OverlapRect:e(15147),Pushable:e(57527),Size:e(77687),Velocity:e(66536)}},47401:l=>{/** 4304 * @author Richard Davey <[email protected]> 4305 * @copyright 2013-2023 Photon Storm Ltd. 4306 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4307 */var T={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};l.exports=T},22346:l=>{/** 4308 * @author Richard Davey <[email protected]> 4309 * @copyright 2013-2023 Photon Storm Ltd. 4310 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4311 */l.exports="collide"},95092:l=>{/** 4312 * @author Richard Davey <[email protected]> 4313 * @copyright 2013-2023 Photon Storm Ltd. 4314 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4315 */l.exports="overlap"},15775:l=>{/** 4316 * @author Richard Davey <[email protected]> 4317 * @copyright 2013-2023 Photon Storm Ltd. 4318 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4319 */l.exports="pause"},74142:l=>{/** 4320 * @author Richard Davey <[email protected]> 4321 * @copyright 2013-2023 Photon Storm Ltd. 4322 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4323 */l.exports="resume"},22825:l=>{/** 4324 * @author Richard Davey <[email protected]> 4325 * @copyright 2013-2023 Photon Storm Ltd. 4326 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4327 */l.exports="tilecollide"},10851:l=>{/** 4328 * @author Richard Davey <[email protected]> 4329 * @copyright 2013-2023 Photon Storm Ltd. 4330 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4331 */l.exports="tileoverlap"},7543:l=>{/** 4332 * @author Richard Davey <[email protected]> 4333 * @copyright 2013-2023 Photon Storm Ltd. 4334 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4335 */l.exports="worldbounds"},1487:l=>{/** 4336 * @author Richard Davey <[email protected]> 4337 * @copyright 2013-2023 Photon Storm Ltd. 4338 * @license {@link https://opensource.org/licenses/MIT|MIT License}
4339 */l.exports="worldstep"},27037:(l,T,e)=>{/** 4340 * @author Richard Davey <[email protected]> 4341 * @copyright 2013-2023 Photon Storm Ltd. 4342 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4343 */l.exports={COLLIDE:e(22346),OVERLAP:e(95092),PAUSE:e(15775),RESUME:e(74142),TILE_COLLIDE:e(22825),TILE_OVERLAP:e(10851),WORLD_BOUNDS:e(7543),WORLD_STEP:e(1487)}},39977:(l,T,e)=>{/** 4344 * @author Richard Davey <[email protected]> 4345 * @copyright 2013-2023 Photon Storm Ltd. 4346 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4347 */var d=e(47401),g=e(98611),r={ArcadePhysics:e(66150),Body:e(97602),Collider:e(3909),Components:e(7864),Events:e(27037),Factory:e(99523),GetOverlapX:e(75671),GetOverlapY:e(66185),SeparateX:e(61777),SeparateY:e(25299),Group:e(10481),Image:e(62832),Sprite:e(25084),StaticBody:e(66634),StaticGroup:e(46346),Tilemap:e(8413),World:e(85233)};r=g(!1,r,d),l.exports=r},25163:l=>{/** 4348 * @author Richard Davey <[email protected]> 4349 * @copyright 2013-2023 Photon Storm Ltd. 4350 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4351 */var T=function(e,d){return e.collisionCallback?!e.collisionCallback.call(e.collisionCallbackContext,d,e):e.layer.callbacks[e.index]?!e.layer.callbacks[e.index].callback.call(e.layer.callbacks[e.index].callbackContext,d,e):!0};l.exports=T},98209:l=>{/** 4352 * @author Richard Davey <[email protected]> 4353 * @copyright 2013-2023 Photon Storm Ltd. 4354 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4355 */var T=function(e,d){d<0?(e.blocked.none=!1,e.blocked.left=!0):d>0&&(e.blocked.none=!1,e.blocked.right=!0),e.position.x-=d,e.updateCenter(),e.bounce.x===0?e.velocity.x=0:e.velocity.x=-e.velocity.x*e.bounce.x};l.exports=T},72792:l=>{/** 4356 * @author Richard Davey <[email protected]> 4357 * @copyright 2013-2023 Photon Storm Ltd. 4358 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4359 */var T=function(e,d){d<0?(e.blocked.none=!1,e.blocked.up=!0):d>0&&(e.blocked.none=!1,e.blocked.down=!0),e.position.y-=d,e.updateCenter(),e.bounce.y===0?e.velocity.y=0:e.velocity.y=-e.velocity.y*e.bounce.y};l.exports=T},27354:(l,T,e)=>{/** 4360 * @author Richard Davey <[email protected]> 4361 * @copyright 2013-2023 Photon Storm Ltd. 4362 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4363 */var d=e(14405),g=e(52926),r=e(28808),a=function(h,n,o,f,u,v,m){var p=f.left,x=f.top,y=f.right,P=f.bottom,b=o.faceLeft||o.faceRight,E=o.faceTop||o.faceBottom;if(m||(b=!0,E=!0),!b&&!E)return!1;var M=0,w=0,A=0,R=1;if(n.deltaAbsX()>n.deltaAbsY()?A=-1:n.deltaAbsX()<n.deltaAbsY()&&(R=-1),n.deltaX()!==0&&n.deltaY()!==0&&b&&E&&(A=Math.min(Math.abs(n.position.x-y),Math.abs(n.right-p)),R=Math.min(Math.abs(n.position.y-P),Math.abs(n.bottom-x))),A<R){if(b&&(M=d(n,o,p,y,v,m),M!==0&&!r(f,n)))return!0;E&&(w=g(n,o,x,P,v,m))}else{if(E&&(w=g(n,o,x,P,v,m),w!==0&&!r(f,n)))return!0;b&&(M=d(n,o,p,y,v,m))}return M!==0||w!==0};l.exports=a},14405:(l,T,e)=>{/** 4364 * @author Richard Davey <[email protected]> 4365 * @copyright 2013-2023 Photon Storm Ltd. 4366 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4367 */var d=e(98209),g=function(r,a,h,n,o,f){var u=0,v=a.faceLeft,m=a.faceRight,p=a.collideLeft,x=a.collideRight;return f||(v=!0,m=!0,p=!0,x=!0),r.deltaX()<0&&x&&r.checkCollision.left?m&&r.x<n&&(u=r.x-n,u<-o&&(u=0)):r.deltaX()>0&&p&&r.checkCollision.right&&v&&r.right>h&&(u=r.right-h,u>o&&(u=0)),u!==0&&(r.customSeparateX?r.overlapX=u:d(r,u)),u};l.exports=g},52926:(l,T,e)=>{/** 4368 * @author Richard Davey <[email protected]> 4369 * @copyright 2013-2023 Photon Storm Ltd. 4370 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4371 */var d=e(72792),g=function(r,a,h,n,o,f){var u=0,v=a.faceTop,m=a.faceBottom,p=a.collideUp,x=a.collideDown;return f||(v=!0,m=!0,p=!0,x=!0),r.deltaY()<0&&x&&r.checkCollision.up?m&&r.y<n&&(u=r.y-n,u<-o&&(u=0)):r.deltaY()>0&&p&&r.checkCollision.down&&v&&r.bottom>h&&(u=r.bottom-h,u>o&&(u=0)),u!==0&&(r.customSeparateY?r.overlapY=u:d(r,u)),u};l.exports=g},28808:l=>{/** 4372 * @author Richard Davey <[email protected]> 4373 * @copyright 2013-2023 Photon Storm Ltd. 4374 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4375 */var T=function(e,d){return!(d.right<=e.left||d.bottom<=e.top||d.position.x>=e.right||d.position.y>=e.bottom)};l.exports=T},8413:(l,T,e)=>{/** 4376 * @author Richard Davey <[email protected]> 4377 * @copyright 2013-2023 Photon Storm Ltd. 4378 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4379 */var d={ProcessTileCallbacks:e(25163),ProcessTileSeparationX:e(98209),ProcessTileSeparationY:e(72792),SeparateTile:e(27354),TileCheckX:e(14405),TileCheckY:e(52926),TileIntersectsBody:e(28808)};l.exports=d},53954:(l,T,e)=>{/** 4380 * @author Richard Davey <[email protected]> 4381 * @copyright 2013-2023 Photon Storm Ltd. 4382 * @license {@link https://opensource.org/licenses/MIT|MIT License}
4383 */l.exports={Arcade:e(39977),Matter:e(45949)}},63568:(l,T,e)=>{/** 4384 * @author Richard Davey <[email protected]> 4385 * @copyright 2013-2023 Photon Storm Ltd. 4386 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4387 */var d=e(56694),g=e(93736),r=new d({initialize:function(){this.boundsCenter=new g,this.centerDiff=new g},parseBody:function(a){if(a=a.hasOwnProperty("body")?a.body:a,!a.hasOwnProperty("bounds")||!a.hasOwnProperty("centerOfMass"))return!1;var h=this.boundsCenter,n=this.centerDiff,o=a.bounds.max.x-a.bounds.min.x,f=a.bounds.max.y-a.bounds.min.y,u=o*a.centerOfMass.x,v=f*a.centerOfMass.y;return h.set(o/2,f/2),n.set(u-h.x,v-h.y),!0},getTopLeft:function(a,h,n){if(h===void 0&&(h=0),n===void 0&&(n=0),this.parseBody(a)){var o=this.boundsCenter,f=this.centerDiff;return new g(h+o.x+f.x,n+o.y+f.y)}return!1},getTopCenter:function(a,h,n){if(h===void 0&&(h=0),n===void 0&&(n=0),this.parseBody(a)){var o=this.boundsCenter,f=this.centerDiff;return new g(h+f.x,n+o.y+f.y)}return!1},getTopRight:function(a,h,n){if(h===void 0&&(h=0),n===void 0&&(n=0),this.parseBody(a)){var o=this.boundsCenter,f=this.centerDiff;return new g(h-(o.x-f.x),n+o.y+f.y)}return!1},getLeftCenter:function(a,h,n){if(h===void 0&&(h=0),n===void 0&&(n=0),this.parseBody(a)){var o=this.boundsCenter,f=this.centerDiff;return new g(h+o.x+f.x,n+f.y)}return!1},getCenter:function(a,h,n){if(h===void 0&&(h=0),n===void 0&&(n=0),this.parseBody(a)){var o=this.centerDiff;return new g(h+o.x,n+o.y)}return!1},getRightCenter:function(a,h,n){if(h===void 0&&(h=0),n===void 0&&(n=0),this.parseBody(a)){var o=this.boundsCenter,f=this.centerDiff;return new g(h-(o.x-f.x),n+f.y)}return!1},getBottomLeft:function(a,h,n){if(h===void 0&&(h=0),n===void 0&&(n=0),this.parseBody(a)){var o=this.boundsCenter,f=this.centerDiff;return new g(h+o.x+f.x,n-(o.y-f.y))}return!1},getBottomCenter:function(a,h,n){if(h===void 0&&(h=0),n===void 0&&(n=0),this.parseBody(a)){var o=this.boundsCenter,f=this.centerDiff;return new g(h+f.x,n-(o.y-f.y))}return!1},getBottomRight:function(a,h,n){if(h===void 0&&(h=0),n===void 0&&(n=0),this.parseBody(a)){var o=this.boundsCenter,f=this.centerDiff;return new g(h-(o.x-f.x),n-(o.y-f.y))}return!1}});l.exports=r},18171:(l,T,e)=>{/** 4388 * @author Richard Davey <[email protected]> 4389 * @copyright 2013-2023 Photon Storm Ltd. 4390 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4391 */var d=e(16929);d.Body=e(84125),d.Composite=e(11299),d.World=e(72005),d.Collision=e(63454),d.Detector=e(13657),d.Pairs=e(91327),d.Pair=e(70584),d.Query=e(13390),d.Resolver=e(44272),d.Constraint=e(52838),d.Common=e(68758),d.Engine=e(45775),d.Events=e(39073),d.Sleeping=e(22806),d.Plugin=e(84474),d.Bodies=e(68516),d.Composites=e(56643),d.Axes=e(50658),d.Bounds=e(84091),d.Svg=e(92765),d.Vector=e(10438),d.Vertices=e(39745),d.World.add=d.Composite.add,d.World.remove=d.Composite.remove,d.World.addComposite=d.Composite.addComposite,d.World.addBody=d.Composite.addBody,d.World.addConstraint=d.Composite.addConstraint,d.World.clear=d.Composite.clear,l.exports=d},72653:(l,T,e)=>{/** 4392 * @author Richard Davey <[email protected]> 4393 * @copyright 2013-2023 Photon Storm Ltd. 4394 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4395 */var d=e(68516),g=e(56694),r=e(56643),a=e(52838),h=e(92765),n=e(3860),o=e(7030),f=e(73658),u=e(84720),v=e(10998),m=e(72829),p=e(88596),x=e(39745),y=new g({initialize:function(b){this.world=b,this.scene=b.scene,this.sys=b.scene.sys},rectangle:function(P,b,E,M,w){var A=d.rectangle(P,b,E,M,w);return this.world.add(A),A},trapezoid:function(P,b,E,M,w,A){var R=d.trapezoid(P,b,E,M,w,A);return this.world.add(R),R},circle:function(P,b,E,M,w){var A=d.circle(P,b,E,M,w);return this.world.add(A),A},polygon:function(P,b,E,M,w){var A=d.polygon(P,b,E,M,w);return this.world.add(A),A},fromVertices:function(P,b,E,M,w,A,R){typeof E=="string"&&(E=x.fromPath(E));var L=d.fromVertices(P,b,E,M,w,A,R);return this.world.add(L),L},fromPhysicsEditor:function(P,b,E,M,w){w===void 0&&(w=!0);var A=v.parseBody(P,b,E,M);return w&&!this.world.has(A)&&this.world.add(A),A},fromSVG:function(P,b,E,M,w,A){M===void 0&&(M=1),w===void 0&&(w={}),A===void 0&&(A=!0);for(var R=E.getElementsByTagName("path"),L=[],O=0;O<R.length;O++){var I=h.pathToVertices(R[O],30);M!==1&&x.scale(I,M,M),L.push(I)}var D=d.fromVertices(P,b,L,w);return A&&this.world.add(D),D},fromJSON:function(P,b,E,M,w){M===void 0&&(M={}),w===void 0&&(w=!0);var A=m.parseBody(P,b,E,M);return A&&w&&this.world.add(A),A},imageStack:function(P,b,E,M,w,A,R,L,O){R===void 0&&(R=0),L===void 0&&(L=0),O===void 0&&(O={});var I=this.world,D=this.sys.displayList;O.addToWorld=!1;var B=r.stack(E,M,w,A,R,L,function(z,X){var W=new o(I,z,X,P,b,O);return D.add(W),W.body});return I.add(B),B},stack:function(P,b,E,M,w,A,R){var L=r.stack(P,b,E,M,w,A,R);return this.world.add(L),L},pyramid:function(P,b,E,M,w,A,R){var L=r.pyramid(P,b,E,M,w,A,R);return this.world.add(L),L},chain:function(P,b,E,M,w,A){return r.chain(P,b,E,M,w,A)},mesh:function(P,b,E,M,w){return r.mesh(P,b,E,M,w)},newtonsCradle:function(P,b,E,M,w){var A=r.newtonsCradle(P,b,E,M,w);return this.world.add(A),A},car:function(P,b,E,M,w){var A=r.car(P,b,E,M,w);return this.world.add(A),A},softBody:function(P,b,E,M,w,A,R,L,O,I){var D=r.softBody(P,b,E,M,w,A,R,L,O,I);return this.world.add(D),D},joint:function(P,b,E,M,w){return this.constraint(P,b,E,M,w)},spring:function(P,b,E,M,w){return this.constraint(P,b,E,M,w)},constraint:function(P,b,E,M,w){M===void 0&&(M=1),w===void 0&&(w={}),w.bodyA=P.type==="body"?P:P.body,w.bodyB=b.type==="body"?b:b.body,isNaN(E)||(w.length=E),w.stiffness=M;var A=a.create(w);return this.world.add(A),A},worldConstraint:function(P,b,E,M){E===void 0&&(E=1),M===void 0&&(M={}),M.bodyB=P.type==="body"?P:P.body,isNaN(b)||(M.length=b),M.stiffness=E;var w=a.create(M);return this.world.add(w),w},mouseSpring:function(P){return this.pointerConstraint(P)},pointerConstraint:function(P){P===void 0&&(P={}),P.hasOwnProperty("render")||(P.render={visible:!1});var b=new p(this.scene,this.world,P);return this.world.add(b.constraint),b},image:function(P,b,E,M,w){var A=new o(this.world,P,b,E,M,w);return this.sys.displayList.add(A),A},tileBody:function(P,b){return new u(this.world,P,b)},sprite:function(P,b,E,M,w){var A=new f(this.world,P,b,E,M,w);return this.sys.displayList.add(A),this.sys.updateList.add(A),A},gameObject:function(P,b,E){return n(this.world,P,b,E)},destroy:function(){this.world=null,this.scene=null,this.sys=null}});l.exports=y},3860:(l,T,e)=>{/** 4396 * @author Richard Davey <[email protected]> 4397 * @copyright 2013-2023 Photon Storm Ltd. 4398 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4399 */var d=e(74527),g=e(72632),r=e(93736);function a(n){return!!n.get&&typeof n.get=="function"||!!n.set&&typeof n.set=="function"}var h=function(n,o,f,u){f===void 0&&(f={}),u===void 0&&(u=!0);var v=o.x,m=o.y;o.body={temp:!0,position:{x:v,y:m}};var p=[d.Bounce,d.Collision,d.Force,d.Friction,d.Gravity,d.Mass,d.Sensor,d.SetBody,d.Sleep,d.Static,d.Transform,d.Velocity];
4399if(p.forEach(function(y){for(var P in y)a(y[P])?Object.defineProperty(o,P,{get:y[P].get,set:y[P].set}):Object.defineProperty(o,P,{value:y[P]})}),o.world=n,o._tempVec2=new r(v,m),f.hasOwnProperty("type")&&f.type==="body")o.setExistingBody(f,u);else{var x=g(f,"shape",null);x||(x="rectangle"),f.addToWorld=u,o.setBody(x,f)}return o};l.exports=h},7030:(l,T,e)=>{/** 4400 * @author Richard Davey <[email protected]> 4401 * @copyright 2013-2023 Photon Storm Ltd. 4402 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4403 */var d=e(56694),g=e(74527),r=e(89980),a=e(72632),h=e(1539),n=e(58210),o=e(93736),f=new d({Extends:h,Mixins:[g.Bounce,g.Collision,g.Force,g.Friction,g.Gravity,g.Mass,g.Sensor,g.SetBody,g.Sleep,g.Static,g.Transform,g.Velocity,n],initialize:function(v,m,p,x,y,P){r.call(this,v.scene,"Image"),this._crop=this.resetCropObject(),this.setTexture(x,y),this.setSizeToFrame(),this.setOrigin(),this.world=v,this._tempVec2=new o(m,p);var b=a(P,"shape",null);b?this.setBody(b,P):this.setRectangle(this.width,this.height,P),this.setPosition(m,p),this.initPipeline(),this.initPostPipeline(!0)}});l.exports=f},50583:(l,T,e)=>{/** 4404 * @author Richard Davey <[email protected]> 4405 * @copyright 2013-2023 Photon Storm Ltd. 4406 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4407 */var d=e(84093),g=e(50658),r=e(68516),a=e(84125),h=e(63568),n=e(84091),o=e(56694),f=e(63454),u=e(68758),v=e(11299),m=e(56643),p=e(52838),x=e(13657),y=e(53996),P=e(72653),b=e(72632),E=e(10850),M=e(1675),w=e(80391),A=e(16929),R=e(44097),L=e(30657),O=e(70584),I=e(91327),D=e(84474),B=e(91963),z=e(13390),X=e(44272),W=e(7599),j=e(92765),N=e(10438),Y=e(39745),F=e(31468);u.setDecomp(e(81084));var G=new o({initialize:function(V){this.scene=V,this.systems=V.sys,this.config=this.getConfig(),this.world,this.add,this.bodyBounds,this.body=a,this.composite=v,this.collision=f,this.detector=x,this.pair=O,this.pairs=I,this.query=z,this.resolver=X,this.constraint=p,this.bodies=r,this.composites=m,this.axes=g,this.bounds=n,this.svg=j,this.vector=N,this.vertices=Y,this.verts=Y,this._tempVec2=N.create(),E(this.config,"plugins.collisionevents",!0)&&this.enableCollisionEventsPlugin(),E(this.config,"plugins.attractors",!1)&&this.enableAttractorPlugin(),E(this.config,"plugins.wrap",!1)&&this.enableWrapPlugin(),X._restingThresh=E(this.config,"restingThresh",4),X._restingThreshTangent=E(this.config,"restingThreshTangent",6),X._positionDampen=E(this.config,"positionDampen",.9),X._positionWarming=E(this.config,"positionWarming",.8),X._frictionNormalMultiplier=E(this.config,"frictionNormalMultiplier",5),V.sys.events.once(W.BOOT,this.boot,this),V.sys.events.on(W.START,this.start,this)},boot:function(){this.world=new F(this.scene,this.config),this.add=new P(this.world),this.bodyBounds=new h,this.systems.events.once(W.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new F(this.scene,this.config),this.add=new P(this.world));var k=this.systems.events;k.on(W.UPDATE,this.world.update,this.world),k.on(W.POST_UPDATE,this.world.postUpdate,this.world),k.once(W.SHUTDOWN,this.shutdown,this)},getConfig:function(){var k=this.systems.game.config.physics,V=this.systems.settings.physics,U=L(b(V,"matter",{}),b(k,"matter",{}));return U},enableAttractorPlugin:function(){return D.register(M),D.use(A,M),this},enableWrapPlugin:function(){return D.register(R),D.use(A,R),this},enableCollisionEventsPlugin:function(){return D.register(w),D.use(A,w),this},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},set60Hz:function(){return this.world.getDelta=this.world.update60Hz,this.world.autoUpdate=!0,this},set30Hz:function(){return this.world.getDelta=this.world.update30Hz,this.world.autoUpdate=!0,this},step:function(k,V){this.world.step(k,V)},containsPoint:function(k,V,U){k=this.getMatterBodies(k);var $=N.create(V,U),K=z.point(k,$);return K.length>0},intersectPoint:function(k,V,U){U=this.getMatterBodies(U);var $=N.create(k,V),K=[],J=z.point(U,$);return J.forEach(function(_){K.indexOf(_)===-1&&K.push(_)}),K},intersectRect:function(k,V,U,$,K,J){K===void 0&&(K=!1),J=this.getMatterBodies(J);var _={min:{x:k,y:V},max:{x:k+U,y:V+$}},tt=[],st=z.region(J,_,K);return st.forEach(function(ht){tt.indexOf(ht)===-1&&tt.push(ht)}),tt},intersectRay:function(k,V,U,$,K,J){K===void 0&&(K=1),J=this.getMatterBodies(J);for(var _=[],tt=z.ray(J,N.create(k,V),N.create(U,$),K),st=0;st<tt.length;st++)_.push(tt[st].body);return _},intersectBody:function(k,V){V=this.getMatterBodies(V);for(var U=[],$=z.collides(k,V),K=0;K<$.length;K++){var J=$[K];J.bodyA===k?U.push(J.bodyB):U.push(J.bodyA)}return U},overlap:function(k,V,U,$,K){U===void 0&&(U=null),$===void 0&&($=null),K===void 0&&(K=U),Array.isArray(k)||(k=[k]),k=this.getMatterBodies(k),V=this.getMatterBodies(V);for(var J=!1,_=0;_<k.length;_++)for(var tt=k[_],st=z.collides(tt,V),ht=0;ht<st.length;ht++){var lt=st[ht],nt=lt.bodyA.id===tt.id?lt.bodyB:lt.bodyA;if(!$||$.call(K,tt,nt,lt)){if(J=!0,U)U.call(K,tt,nt,lt);else if(!$)return!0}}return J},setCollisionCategory:function(k,V){return k=this.getMatterBodies(k),k.forEac
4407h(function(U){U.collisionFilter.category=V}),this},setCollisionGroup:function(k,V){return k=this.getMatterBodies(k),k.forEach(function(U){U.collisionFilter.group=V}),this},setCollidesWith:function(k,V){k=this.getMatterBodies(k);var U=0;if(!Array.isArray(V))U=V;else for(var $=0;$<V.length;$++)U|=V[$];return k.forEach(function(K){K.collisionFilter.mask=U}),this},getMatterBodies:function(k){if(!k)return this.world.getAllBodies();Array.isArray(k)||(k=[k]);for(var V=[],U=0;U<k.length;U++){var $=k[U].hasOwnProperty("body")?k[U].body:k[U];V.push($)}return V},setVelocity:function(k,V,U){k=this.getMatterBodies(k);var $=this._tempVec2;return $.x=V,$.y=U,k.forEach(function(K){a.setVelocity(K,$)}),this},setVelocityX:function(k,V){k=this.getMatterBodies(k);var U=this._tempVec2;return U.x=V,k.forEach(function($){U.y=$.velocity.y,a.setVelocity($,U)}),this},setVelocityY:function(k,V){k=this.getMatterBodies(k);var U=this._tempVec2;return U.y=V,k.forEach(function($){U.x=$.velocity.x,a.setVelocity($,U)}),this},setAngularVelocity:function(k,V){return k=this.getMatterBodies(k),k.forEach(function(U){a.setAngularVelocity(U,V)}),this},applyForce:function(k,V){k=this.getMatterBodies(k);var U=this._tempVec2;return k.forEach(function($){U.x=$.position.x,U.y=$.position.y,a.applyForce($,U,V)}),this},applyForceFromPosition:function(k,V,U,$){k=this.getMatterBodies(k);var K=this._tempVec2;return k.forEach(function(J){$===void 0&&($=J.angle),K.x=U*Math.cos($),K.y=U*Math.sin($),a.applyForce(J,V,K)}),this},applyForceFromAngle:function(k,V,U){k=this.getMatterBodies(k);var $=this._tempVec2;return k.forEach(function(K){U===void 0&&(U=K.angle),$.x=V*Math.cos(U),$.y=V*Math.sin(U),a.applyForce(K,{x:K.position.x,y:K.position.y},$)}),this},getConstraintLength:function(k){var V=k.pointA.x,U=k.pointA.y,$=k.pointB.x,K=k.pointB.y;return k.bodyA&&(V+=k.bodyA.position.x,U+=k.bodyA.position.y),k.bodyB&&($+=k.bodyB.position.x,K+=k.bodyB.position.y),y(V,U,$,K)},alignBody:function(k,V,U,$){k=k.hasOwnProperty("body")?k.body:k;var K;switch($){case d.TOP_LEFT:case d.LEFT_TOP:K=this.bodyBounds.getTopLeft(k,V,U);break;case d.TOP_CENTER:K=this.bodyBounds.getTopCenter(k,V,U);break;case d.TOP_RIGHT:case d.RIGHT_TOP:K=this.bodyBounds.getTopRight(k,V,U);break;case d.LEFT_CENTER:K=this.bodyBounds.getLeftCenter(k,V,U);break;case d.CENTER:K=this.bodyBounds.getCenter(k,V,U);break;case d.RIGHT_CENTER:K=this.bodyBounds.getRightCenter(k,V,U);break;case d.LEFT_BOTTOM:case d.BOTTOM_LEFT:K=this.bodyBounds.getBottomLeft(k,V,U);break;case d.BOTTOM_CENTER:K=this.bodyBounds.getBottomCenter(k,V,U);break;case d.BOTTOM_RIGHT:case d.RIGHT_BOTTOM:K=this.bodyBounds.getBottomRight(k,V,U);break}return K&&a.setPosition(k,K),this},shutdown:function(){var k=this.systems.events;this.world&&(k.off(W.UPDATE,this.world.update,this.world),k.off(W.POST_UPDATE,this.world.postUpdate,this.world)),k.off(W.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(W.START,this.start,this),this.scene=null,this.systems=null}});B.register("MatterPhysics",G,"matterPhysics"),l.exports=G},73658:(l,T,e)=>{/** 4408 * @author Richard Davey <[email protected]> 4409 * @copyright 2013-2023 Photon Storm Ltd. 4410 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4411 */var d=e(16569),g=e(56694),r=e(74527),a=e(89980),h=e(72632),n=e(58210),o=e(13747),f=e(93736),u=new g({Extends:o,Mixins:[r.Bounce,r.Collision,r.Force,r.Friction,r.Gravity,r.Mass,r.Sensor,r.SetBody,r.Sleep,r.Static,r.Transform,r.Velocity,n],initialize:function(m,p,x,y,P,b){a.call(this,m.scene,"Sprite"),this._crop=this.resetCropObject(),this.anims=new d(this),this.setTexture(y,P),this.setSizeToFrame(),this.setOrigin(),this.world=m,this._tempVec2=new f(p,x);var E=h(b,"shape",null);E?this.setBody(E,b):this.setRectangle(this.width,this.height,b),this.setPosition(p,x),this.initPipeline(),this.initPostPipeline(!0)}});l.exports=u},84720:(l,T,e)=>{/** 4412 * @author Richard Davey <[email protected]> 4413 * @copyright 2013-2023 Photon Storm Ltd. 4414 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4415 */var d=e(68516),g=e(84125),r=e(56694),a=e(74527),h=e(28699),n=e(6659),o=e(72632),f=e(19256),u=e(39745),v=new r({Extends:n,Mixins:[a.Bounce,a.Collision,a.Friction,a.Gravity,a.Mass,a.Sensor,a.Sleep,a.Static],initialize:function(p,x,y){n.call(this),this.tile=x,this.world=p,x.physics.matterBody&&x.physics.matterBody.destroy(),x.physics.matterBody=this;var P=o(y,"body",null),b=o(y,"addToWorld",!0);if(P)this.setBody(P,b);else{var E=x.getCollisionGroup(),M=o(E,"objects",[]);M.length>0?this.setFromTileCollision(y):this.setFromTileRectangle(y)}if(x.flipX||x.flipY){var w={x:x.getCenterX(),y:x.getCenterY()},A=x.flipX?-1:1,R=x.flipY?-1:1;g.scale(P,A,R,w)}},setFromTileRectangle:function(m){m===void 0&&(m={}),f(m,"isStatic")||(m.isStatic=!0),f(m,"addToWorld")||(m.addToWorld=!0);var p=this.tile.getBounds(),x=p.x+p.width/2,y=p.y+p.height/2,P=d.rectangle(x,y,p.width,p.height,m);return this.setBody(P,m.addToWorld),this},setFromTileCollision:function(m){m===void 0&&(m={}),f(m,"isStatic")||(m.isStatic=!0),f(m,"addToWorld")||(m.addToWorld=!0);for(var p=this.tile.tilemapLayer.scaleX,x=this.tile.tilemapLayer.scaleY,y=this.tile.getLeft(),P=this.tile.getTop(),b=this.tile.getCollisionGroup(),E=o(b,"objects",[]),M=[],w=0;w<E.length;w++){var A=E[w],R=y+A.x*p,L=P+A.y*x,O=A.width*p,I=A.height*x,D=null;if(A.rectangle)D=d.rectangle(R+O/2,L+I/2,O,I,m);
4415else if(A.ellipse)D=d.circle(R+O/2,L+I/2,O/2,m);else if(A.polygon||A.polyline){var B=A.polygon?A.polygon:A.polyline,z=B.map(function(N){return{x:N.x*p,y:N.y*x}}),X=u.create(z),W=u.centre(X);R+=W.x,L+=W.y,D=d.fromVertices(R,L,X,m)}D&&M.push(D)}if(M.length===1)this.setBody(M[0],m.addToWorld);else if(M.length>1){var j=h(m);j.parts=M,this.setBody(g.create(j),j.addToWorld)}return this},setBody:function(m,p){return p===void 0&&(p=!0),this.body&&this.removeBody(),this.body=m,this.body.gameObject=this,p&&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()}});l.exports=v},10998:(l,T,e)=>{/** 4416 * @author Joachim Grill <[email protected]> 4417 * @author Richard Davey <[email protected]> 4418 * @copyright 2018 CodeAndWeb GmbH 4419 * @copyright 2013-2023 Photon Storm Ltd. 4420 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4421 */var d=e(68516),g=e(84125),r=e(68758),a=e(72632),h=e(39745),n={parseBody:function(o,f,u,v){v===void 0&&(v={});for(var m=a(u,"fixtures",[]),p=[],x=0;x<m.length;x++)for(var y=this.parseFixture(m[x]),P=0;P<y.length;P++)p.push(y[P]);var b=r.clone(u,!0);r.extend(b,v,!0),delete b.fixtures,delete b.type;var E=g.create(b);return g.setParts(E,p),g.setPosition(E,{x:o,y:f}),E},parseFixture:function(o){var f=r.extend({},!1,o);delete f.circle,delete f.vertices;var u;if(o.circle){var v=a(o.circle,"x"),m=a(o.circle,"y"),p=a(o.circle,"radius");u=[d.circle(v,m,p,f)]}else o.vertices&&(u=this.parseVertices(o.vertices,f));return u},parseVertices:function(o,f){f===void 0&&(f={});for(var u=[],v=0;v<o.length;v++)h.clockwiseSort(o[v]),u.push(g.create(r.extend({position:h.centre(o[v]),vertices:o[v]},f)));return d.flagCoincidentParts(u)}};l.exports=n},72829:(l,T,e)=>{/** 4422 * @author Richard Davey <[email protected]> 4423 * @copyright 2013-2023 Photon Storm Ltd. 4424 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4425 */var d=e(68516),g=e(84125),r={parseBody:function(a,h,n,o){o===void 0&&(o={});var f,u=n.vertices;if(u.length===1)o.vertices=u[0],f=g.create(o),d.flagCoincidentParts(f.parts);else{for(var v=[],m=0;m<u.length;m++){var p=g.create({vertices:u[m]});v.push(p)}d.flagCoincidentParts(v),o.parts=v,f=g.create(o)}return f.label=n.label,g.setPosition(f,{x:a,y:h}),f}};l.exports=r},88596:(l,T,e)=>{/** 4426 * @author Richard Davey <[email protected]> 4427 * @copyright 2013-2023 Photon Storm Ltd. 4428 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4429 */var d=e(84091),g=e(56694),r=e(11299),a=e(52838),h=e(13657),n=e(35416),o=e(33963),f=e(30657),u=e(22806),v=e(93736),m=e(39745),p=new g({initialize:function(y,P,b){b===void 0&&(b={});var E={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=y,this.world=P,this.camera=null,this.pointer=null,this.active=!0,this.position=new v,this.body=null,this.part=null,this.constraint=a.create(f(b,E)),this.world.on(n.BEFORE_UPDATE,this.update,this),y.sys.input.on(o.POINTER_DOWN,this.onDown,this),y.sys.input.on(o.POINTER_UP,this.onUp,this)},onDown:function(x){this.pointer||(this.pointer=x,this.camera=x.camera)},onUp:function(x){x===this.pointer&&(this.pointer=null)},getBody:function(x){var y=this.position,P=this.constraint;this.camera.getWorldPoint(x.x,x.y,y);for(var b=r.allBodies(this.world.localWorld),E=0;E<b.length;E++){var M=b[E];if(!M.ignorePointer&&d.contains(M.bounds,y)&&h.canCollide(M.collisionFilter,P.collisionFilter)&&this.hitTestBody(M,y))return this.world.emit(n.DRAG_START,M,this.part,this),!0}return!1},hitTestBody:function(x,y){for(var P=this.constraint,b=x.parts.length,E=b>1?1:0,M=E;M<b;M++){var w=x.parts[M];if(m.contains(w.vertices,y))return P.pointA=y,P.pointB={x:y.x-x.position.x,y:y.y-x.position.y},P.bodyB=x,P.angleB=x.angle,u.set(x,!1),this.part=w,this.body=x,!0}return!1},update:function(){var x=this.pointer,y=this.body;
4429if(!this.active||!x){y&&this.stopDrag();return}if(!x.isDown&&y){this.stopDrag();return}else if(x.isDown){if(!y&&!this.getBody(x))return;y=this.body;var P=this.position,b=this.constraint;this.camera.getWorldPoint(x.x,x.y,P),b.pointA.x=P.x,b.pointA.y=P.y,u.set(y,!1),this.world.emit(n.DRAG,y,this)}},stopDrag:function(){var x=this.body,y=this.constraint;y.bodyB=null,y.pointB=null,this.pointer=null,this.body=null,this.part=null,x&&this.world.emit(n.DRAG_END,x,this)},destroy:function(){this.world.removeConstraint(this.constraint),this.pointer=null,this.constraint=null,this.body=null,this.part=null,this.world.off(n.BEFORE_UPDATE,this.update),this.scene.sys.input.off(o.POINTER_DOWN,this.onDown,this),this.scene.sys.input.off(o.POINTER_UP,this.onUp,this)}});l.exports=p},31468:(l,T,e)=>{/** 4430 * @author Richard Davey <[email protected]> 4431 * @copyright 2013-2023 Photon Storm Ltd. 4432 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4433 */var d=e(68516),g=e(84125),r=e(56694),a=e(68758),h=e(11299),n=e(45775),o=e(6659),f=e(35416),u=e(72632),v=e(10850),m=e(84125),p=e(39073),x=e(84720),y=e(72005),P=e(10438),b=new r({Extends:o,initialize:function(M,w){o.call(this),this.scene=M,this.engine=n.create(w),this.localWorld=this.engine.world;var A=v(w,"gravity",null);A?this.setGravity(A.x,A.y,A.scale):A===!1&&this.setGravity(0,0,0),this.walls={left:null,right:null,top:null,bottom:null},this.enabled=v(w,"enabled",!0),this.getDelta=v(w,"getDelta",this.update60Hz);var R=u(w,"runner",{}),L=u(R,"fps",!1),O=u(R,"fps",60),I=u(R,"delta",1e3/O),D=u(R,"deltaMin",1e3/O),B=u(R,"deltaMax",1e3/(O*.5));L||(O=1e3/I),this.runner={fps:O,deltaSampleSize:u(R,"deltaSampleSize",60),counterTimestamp:0,frameCounter:0,deltaHistory:[],timePrev:null,timeScalePrev:1,frameRequestId:null,isFixed:u(R,"isFixed",!1),delta:I,deltaMin:D,deltaMax:B},this.autoUpdate=v(w,"autoUpdate",!0);var z=v(w,"debug",!1);if(this.drawDebug=typeof z=="object"?!0:z,this.debugGraphic,this.debugConfig={showAxes:u(z,"showAxes",!1),showAngleIndicator:u(z,"showAngleIndicator",!1),angleColor:u(z,"angleColor",15208787),showBroadphase:u(z,"showBroadphase",!1),broadphaseColor:u(z,"broadphaseColor",16757760),showBounds:u(z,"showBounds",!1),boundsColor:u(z,"boundsColor",16777215),showVelocity:u(z,"showVelocity",!1),velocityColor:u(z,"velocityColor",44783),showCollisions:u(z,"showCollisions",!1),collisionColor:u(z,"collisionColor",16094476),showSeparations:u(z,"showSeparations",!1),separationColor:u(z,"separationColor",16753920),showBody:u(z,"showBody",!0),showStaticBody:u(z,"showStaticBody",!0),showInternalEdges:u(z,"showInternalEdges",!1),renderFill:u(z,"renderFill",!1),renderLine:u(z,"renderLine",!0),fillColor:u(z,"fillColor",1075465),fillOpacity:u(z,"fillOpacity",1),lineColor:u(z,"lineColor",2678297),lineOpacity:u(z,"lineOpacity",1),lineThickness:u(z,"lineThickness",1),staticFillColor:u(z,"staticFillColor",857979),staticLineColor:u(z,"staticLineColor",1255396),showSleeping:u(z,"showSleeping",!1),staticBodySleepOpacity:u(z,"staticBodySleepOpacity",.7),sleepFillColor:u(z,"sleepFillColor",4605510),sleepLineColor:u(z,"sleepLineColor",10066585),showSensors:u(z,"showSensors",!0),sensorFillColor:u(z,"sensorFillColor",857979),sensorLineColor:u(z,"sensorLineColor",1255396),showPositions:u(z,"showPositions",!0),positionSize:u(z,"positionSize",4),positionColor:u(z,"positionColor",14697178),showJoint:u(z,"showJoint",!0),jointColor:u(z,"jointColor",14737474),jointLineOpacity:u(z,"jointLineOpacity",1),jointLineThickness:u(z,"jointLineThickness",2),pinSize:u(z,"pinSize",4),pinColor:u(z,"pinColor",4382944),springColor:u(z,"springColor",14697184),anchorColor:u(z,"anchorColor",15724527),anchorSize:u(z,"anchorSize",4),showConvexHulls:u(z,"showConvexHulls",!1),hullColor:u(z,"hullColor",14091216)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy(),u(w,"setBounds",!1)){var X=w.setBounds;if(typeof X=="boolean")this.setBounds();else{var W=u(X,"x",0),j=u(X,"y",0),N=u(X,"width",M.sys.scale.width),Y=u(X,"height",M.sys.scale.height),F=u(X,"thickness",64),G=u(X,"left",!0),k=u(X,"right",!0),V=u(X,"top",!0),U=u(X,"bottom",!0);this.setBounds(W,j,N,Y,F,G,k,V,U)}}},setCompositeRenderStyle:function(E){var M=E.bodies,w=E.constraints,A=E.composites,R,L,O;for(R=0;R<M.length;R++)L=M[R],O=L.render,this.setBodyRenderStyle(L,O.lineColor,O.lineOpacity,O.lineThickness,O.fillColor,O.fillOpacity);for(R=0;R<w.length;R++)L=w[R],O=L.render,this.setConstraintRenderStyle(L,O.lineColor,O.lineOpacity,O.lineThickness,O.pinSize,O.anchorColor,O.anchorSize);for(R=0;R<A.length;R++)L=A[R],this.setCompositeRenderStyle(L);return this},setBodyRenderStyle:function(E,M,w,A,R,L){var O=E.render,I=this.debugConfig;return O?(M==null&&(M=E.isStatic?I.staticLineColor:I.lineColor),w==null&&(w=I.lineOpacity),A==null&&(A=I.lineThickness),R==null&&(R=E.isStatic?I.staticFillColor:I.fillColor),L==null&&(L=I.fillOpacity),M!==!1&&(O.lineColor=M),w!==!1&&(O.lineOpacity=w),A!==!1&&(O.lineThickness=A),R!==!1&&(O.fillColor=R),L!==!1&&(O.fillOpacity=L),this):this},setConstraintRenderStyle:function(E,M,w,A,R,L,O){var I=E.render,D=this.debugConfig;if(!I)return this;if(M==null){var B=I.type;B==="line"?M=D.jointColor:B==="pin"?M=D.pinColor:B==="spring"&&(M=D.springColor)}return w==null&&(w=D.jointLineOpacity),A==null&&(A=D.jointLineThickness),R==null&&(R=D.pinSize),L==null&&(L=D.anchorColor),O==null&&(O=D.anchorSize),M!==!1&&(I.lineColor=M),w!==!1&&(I.lineOpacity=w),A!==!1&&(I.lineThickness=A),R!==!1&&(I.pinSize=R),L!==!1&&(I.anchorColor=L),O!==!1&&(I.anchorSize=O),this},setEventsProxy:function(){var E=this,M=this.engine,w=this.localWorld;this.drawDebug&&(p.on(w,"compositeModified",function(A){E.setCompositeRenderStyle(A)}),p.on(w,"beforeAdd",function(A){for(var R=[].concat(A.object),L=0;L<R.length;L++){var O=R[L],I=O.render;O.type==="body"?E.setBodyRenderStyle(O,I.lineColor,I.lineOpacity,I.lineThickness,I.fillColor,I.fillOpacity):O.type==="composite"?E.setCompositeRenderStyle(O):O.type==="constraint"&&E.setConstraintRenderStyle(O,I.lineColor,I.lineOpacity,I.lineThickness,I.pinSize,I.anchorColor,I.anchorSize)}})),p.on(w,"beforeAdd",function(A){E.emit(f.BEFORE_ADD,A)}),p.on(w,"afterAdd",function(A){E.emit(f.AFTER_ADD,A)}),p.on(w,"beforeRemove",function(A){E.emit(f.BEFORE_REMOVE,A)}),p.on(w,"afterRemove",function(A){E.emit(f.AFTER_REMOVE,A)}),p.on(M,"beforeUpdate",function(A){E.emit(f.BEFORE_UPDATE,A)}),p.on(M,"afterUpdate",function(A){E.emit(f.AFTER_UPDATE,A)}),p.on(M,"collisionStart",function(A){var R=A.pairs,L,O;R.length>
44330&&(L=R[0].bodyA,O=R[0].bodyB),E.emit(f.COLLISION_START,A,L,O)}),p.on(M,"collisionActive",function(A){var R=A.pairs,L,O;R.length>0&&(L=R[0].bodyA,O=R[0].bodyB),E.emit(f.COLLISION_ACTIVE,A,L,O)}),p.on(M,"collisionEnd",function(A){var R=A.pairs,L,O;R.length>0&&(L=R[0].bodyA,O=R[0].bodyB),E.emit(f.COLLISION_END,A,L,O)})},setBounds:function(E,M,w,A,R,L,O,I,D){return E===void 0&&(E=0),M===void 0&&(M=0),w===void 0&&(w=this.scene.sys.scale.width),A===void 0&&(A=this.scene.sys.scale.height),R===void 0&&(R=64),L===void 0&&(L=!0),O===void 0&&(O=!0),I===void 0&&(I=!0),D===void 0&&(D=!0),this.updateWall(L,"left",E-R,M-R,R,A+R*2),this.updateWall(O,"right",E+w,M-R,R,A+R*2),this.updateWall(I,"top",E,M-R,w,R),this.updateWall(D,"bottom",E,M+A,w,R),this},updateWall:function(E,M,w,A,R,L){var O=this.walls[M];E?(O&&y.remove(this.localWorld,O),w+=R/2,A+=L/2,this.walls[M]=this.create(w,A,R,L,{isStatic:!0,friction:0,frictionStatic:0})):(O&&y.remove(this.localWorld,O),this.walls[M]=null)},createDebugGraphic:function(){var E=this.scene.sys.add.graphics({x:0,y:0});return E.setDepth(Number.MAX_VALUE),this.debugGraphic=E,this.drawDebug=!0,E},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(E,M,w){return E===void 0&&(E=0),M===void 0&&(M=1),w===void 0&&(w=.001),this.localWorld.gravity.x=E,this.localWorld.gravity.y=M,this.localWorld.gravity.scale=w,this},create:function(E,M,w,A,R){var L=d.rectangle(E,M,w,A,R);return y.add(this.localWorld,L),L},add:function(E){return y.add(this.localWorld,E),this},remove:function(E,M){Array.isArray(E)||(E=[E]);for(var w=0;w<E.length;w++){var A=E[w],R=A.body?A.body:A;h.remove(this.localWorld,R,M)}return this},removeConstraint:function(E,M){return h.remove(this.localWorld,E,M),this},convertTilemapLayer:function(E,M){var w=E.layer,A=E.getTilesWithin(0,0,w.width,w.height,{isColliding:!0});return this.convertTiles(A,M),this},convertTiles:function(E,M){if(E.length===0)return this;for(var w=0;w<E.length;w++)new x(this,E[w],M);return this},nextGroup:function(E){return m.nextGroup(E)},nextCategory:function(){return m.nextCategory()},pause:function(){return this.enabled=!1,this.emit(f.PAUSE),this},resume:function(){return this.enabled=!0,this.emit(f.RESUME),this},update:function(E,M){if(!(!this.enabled||!this.autoUpdate)){var w=this.engine,A=this.runner,R=w.timing;A.isFixed?M=this.getDelta(E,M):(M=E-A.timePrev||A.delta,A.timePrev=E,A.deltaHistory.push(M),A.deltaHistory=A.deltaHistory.slice(-A.deltaSampleSize),M=Math.min.apply(null,A.deltaHistory),M=M<A.deltaMin?A.deltaMin:M,M=M>A.deltaMax?A.deltaMax:M,A.delta=M),A.timeScalePrev=R.timeScale,A.frameCounter+=1,E-A.counterTimestamp>=1e3&&(A.fps=A.frameCounter*((E-A.counterTimestamp)/1e3),A.counterTimestamp=E,A.frameCounter=0),n.update(w,M)}},step:function(E){n.update(this.engine,E)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(E){var M=E.hasOwnProperty("body")?E.body:E;return h.get(this.localWorld,M.id,M.type)!==null},getAllBodies:function(){return h.allBodies(this.localWorld)},getAllConstraints:function(){return h.allConstraints(this.localWorld)},getAllComposites:function(){return h.allComposites(this.localWorld)},postUpdate:function(){if(this.drawDebug){var E=this.debugConfig,M=this.engine,w=this.debugGraphic,A=h.allBodies(this.localWorld);this.debugGraphic.clear(),E.showBroadphase&&M.broadphase.controller&&this.renderGrid(M.broadphase,w,E.broadphaseColor,.5),E.showBounds&&this.renderBodyBounds(A,w,E.boundsColor,.5),(E.showBody||E.showStaticBody)&&this.renderBodies(A),E.showJoint&&this.renderJoints(),(E.showAxes||E.showAngleIndicator)&&this.renderBodyAxes(A,w,E.showAxes,E.angleColor,.5),E.showVelocity&&this.renderBodyVelocity(A,w,E.velocityColor,1,2),E.showSeparations&&this.renderSeparations(M.pairs.list,w,E.separationColor),E.showCollisions&&this.renderCollisions(M.pairs.list,w,E.collisionColor)}},renderGrid:function(E,M,w,A){M.lineStyle(1,w,A);for(var R=a.keys(E.buckets),L=0;L<R.length;L++){var O=R[L];if(!(E.buckets[O].length<2)){var I=O.split(/C|R/);M.strokeRect(parseInt(I[1],10)*E.bucketWidth,parseInt(I[2],10)*E.bucketHeight,E.bucketWidth,E.bucketHeight)}}return this},renderSeparations:function(E,M,w){M.lineStyle(1,w,1);for(var A=0;A<E.length;A++){var R=E[A];if(R.isActive){var L=R.collision,O=L.bodyA,I=L.bodyB,D=O.position,B=I.position,z=L.penetration,
4433X=!O.isStatic&&!I.isStatic?4:1;I.isStatic&&(X=0),M.lineBetween(B.x,B.y,B.x-z.x*X,B.y-z.y*X),X=!O.isStatic&&!I.isStatic?4:1,O.isStatic&&(X=0),M.lineBetween(D.x,D.y,D.x-z.x*X,D.y-z.y*X)}}return this},renderCollisions:function(E,M,w){M.lineStyle(1,w,.5),M.fillStyle(w,1);var A,R;for(A=0;A<E.length;A++)if(R=E[A],!!R.isActive)for(var L=0;L<R.activeContacts.length;L++){var O=R.activeContacts[L],I=O.vertex;M.fillRect(I.x-2,I.y-2,5,5)}for(A=0;A<E.length;A++)if(R=E[A],!!R.isActive){var D=R.collision,B=R.activeContacts;if(B.length>0){var z=B[0].vertex.x,X=B[0].vertex.y;B.length===2&&(z=(B[0].vertex.x+B[1].vertex.x)/2,X=(B[0].vertex.y+B[1].vertex.y)/2),D.bodyB===D.supports[0].body||D.bodyA.isStatic?M.lineBetween(z-D.normal.x*8,X-D.normal.y*8,z,X):M.lineBetween(z+D.normal.x*8,X+D.normal.y*8,z,X)}}return this},renderBodyBounds:function(E,M,w,A){M.lineStyle(1,w,A);for(var R=0;R<E.length;R++){var L=E[R];if(L.render.visible){var O=L.bounds;if(O)M.strokeRect(O.min.x,O.min.y,O.max.x-O.min.x,O.max.y-O.min.y);else for(var I=L.parts,D=I.length>1?1:0;D<I.length;D++){var B=I[D];M.strokeRect(B.bounds.min.x,B.bounds.min.y,B.bounds.max.x-B.bounds.min.x,B.bounds.max.y-B.bounds.min.y)}}}return this},renderBodyAxes:function(E,M,w,A,R){M.lineStyle(1,A,R);for(var L=0;L<E.length;L++){var O=E[L],I=O.parts;if(O.render.visible){var D,B,z;if(w)for(B=I.length>1?1:0;B<I.length;B++)for(D=I[B],z=0;z<D.axes.length;z++){var X=D.axes[z];M.lineBetween(D.position.x,D.position.y,D.position.x+X.x*20,D.position.y+X.y*20)}else for(B=I.length>1?1:0;B<I.length;B++)for(D=I[B],z=0;z<D.axes.length;z++)M.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(E,M,w,A,R){M.lineStyle(R,w,A);for(var L=0;L<E.length;L++){var O=E[L];O.render.visible&&M.lineBetween(O.position.x,O.position.y,O.position.x+(O.position.x-O.positionPrev.x)*2,O.position.y+(O.position.y-O.positionPrev.y)*2)}return this},renderBodies:function(E){for(var M=this.debugGraphic,w=this.debugConfig,A=w.showBody,R=w.showStaticBody,L=w.showSleeping,O=w.showInternalEdges,I=w.showConvexHulls,D=w.renderFill,B=w.renderLine,z=w.staticBodySleepOpacity,X=w.sleepFillColor,W=w.sleepLineColor,j=w.hullColor,N=0;N<E.length;N++){var Y=E[N];if(Y.render.visible&&!(!R&&Y.isStatic||!A&&!Y.isStatic)){var F=Y.render.lineColor,G=Y.render.lineOpacity,k=Y.render.lineThickness,V=Y.render.fillColor,U=Y.render.fillOpacity;L&&Y.isSleeping&&(Y.isStatic?(G*=z,U*=z):(F=W,V=X)),D||(V=null),B||(F=null),this.renderBody(Y,M,O,F,G,k,V,U);var $=Y.parts.length;I&&$>1&&this.renderConvexHull(Y,M,j,k)}}},renderBody:function(E,M,w,A,R,L,O,I){A===void 0&&(A=null),R===void 0&&(R=null),L===void 0&&(L=1),O===void 0&&(O=null),I===void 0&&(I=null);for(var D=this.debugConfig,B=D.sensorFillColor,z=D.sensorLineColor,X=E.parts,W=X.length,j=W>1?1:0;j<W;j++){var N=X[j],Y=N.render,F=Y.opacity;if(!(!Y.visible||F===0||N.isSensor&&!D.showSensors)){var G=N.circleRadius;if(M.beginPath(),N.isSensor?(O!==null&&M.fillStyle(B,I*F),A!==null&&M.lineStyle(L,z,R*F)):(O!==null&&M.fillStyle(O,I*F),A!==null&&M.lineStyle(L,A,R*F)),G)M.arc(N.position.x,N.position.y,G,0,2*Math.PI);else{var k=N.vertices,V=k.length;M.moveTo(k[0].x,k[0].y);for(var U=1;U<V;U++){var $=k[U];if(!k[U-1].isInternal||w?M.lineTo($.x,$.y):M.moveTo($.x,$.y),U<V&&$.isInternal&&!w){var K=(U+1)%V;M.moveTo(k[K].x,k[K].y)}}M.closePath()}O!==null&&M.fillPath(),A!==null&&M.strokePath()}}if(D.showPositions&&!E.isStatic){var J=E.position.x,_=E.position.y,tt=Math.ceil(D.positionSize/2);M.fillStyle(D.positionColor,1),M.fillRect(J-tt,_-tt,D.positionSize,D.positionSize)}return this},renderConvexHull:function(E,M,w,A){A===void 0&&(A=1);var R=E.parts,L=R.length;if(L>1){var O=E.vertices;M.lineStyle(A,w),M.beginPath(),M.moveTo(O[0].x,O[0].y);for(var I=1;I<O.length;I++)M.lineTo(O[I].x,O[I].y);M.lineTo(O[0].x,O[0].y),M.strokePath()}return this},renderJoints:function(){for(var E=this.debugGraphic,M=h.allConstraints(this.localWorld),w=0;w<M.length;w++){var A=M[w].render,R=A.lineColor,L=A.lineOpacity,O=A.lineThickness,I=A.pinSize,D=A.anchorColor,B=A.anchorSize;this.renderConstraint(M[w],E,R,L,O,I,D,B)}},renderConstraint:function(E,M,w,A,R,L,O,I){var D=E.render;if(!D.visible||!E.pointA||!E.pointB)return this;M.lineStyle(R,w,A);var B=E.bodyA,z=E.bodyB,X,W;if(B?X=P.add(B.position,E.pointA):X=E.pointA,D.type==="pin")M.strokeCircle(X.x,X.y,L);else{if(z?W=P.add(z.position,E.pointB):W=E.pointB,M.beginPath(),M.moveTo(X.x,X.y),D.type==="spring")for(var j=P.sub(W,X),N=P.perp(P.normalise(j)),Y=Math.ceil(a.clamp(E.length/5,12,20)),F,G=1;G<Y;G+=1)F=G%2===0?1:-1,M.lineTo(X.x+j.x*(G/Y)+N.x*F*4,X.y+j.y*(G/Y)+N.y*F*4);M.lineTo(W.x,W.y)}return M.strokePath(),D.anchors&&I>0&&(M.fillStyle(O),M.fillCircle(X.x,X.y,I),M.fillCircle(W.x,W.y,I)),this},resetCollisionIDs:function(){return g._nextCollidingGroupId=1,g._nextNonCollidingGroupId=-1,g._nextCategory=1,this},shutdown:function(){p.off(this.engine),this.removeAllListeners(),y.clear(this.localWorld,!1),n.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});l.exports=b},95349:l=>{/** 4434 * @author Richard Davey <[email protected]> 4435 * @copyright 2013-2023 Photon Storm Ltd. 4436 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4437 */var T={setBounce:function(e){return this.body.restitution=e,this}};l.exports=T},70679:l=>{/** 4438 * @author Richard Davey <[email protected]> 4439 * @copyright 2013-2023 Photon Storm Ltd. 4440 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4441 */var T={setCollisionCategory:function(e){return this.body.collisionFilter.category=e,this},setCollisionGroup:function(e){return this.body.collisionFilter.group=e,this},setCollidesWith:function(e){var d=0;if(!Array.isArray(e))d=e;else for(var g=0;g<e.length;g++)d|=e[g];return this.body.collisionFilter.mask=d,this},setOnCollide:function(e){return this.body.onCollideCallback=e,this},setOnCollideEnd:function(e){return this.body.onCollideEndCallback=e,this},setOnCollideActive:function(e){return this.body.onCollideActiveCallback=e,this},setOnCollideWith:function(e,d){Array.isArray(e)||(e=[e]);for(var g=0;g<e.length;g++){var r=e[g].hasOwnProperty("body")?e[g].body:e[g];this.body.setOnCollideWith(r,d)}return this}};l.exports=T},77178:(l,T,e)=>{/** 4442 * @author Richard Davey <[email protected]> 4443 * @copyright 2013-2023 Photon Storm Ltd. 4444 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4445 */var d=e(84125),g={applyForce:function(r){return this._tempVec2.set(this.body.position.x,this.body.position.y),d.applyForce(this.body,this._tempVec2,r),this},applyForceFrom:function(r,a){return d.applyForce(this.body,r,a),this},thrust:function(r){var a=this.body.angle;return this._tempVec2.set(r*Math.cos(a),r*Math.sin(a)),d.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustLeft:function(r){var a=this.body.angle-Math.PI/2;return this._tempVec2.set(r*Math.cos(a),r*Math.sin(a)),d.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustRight:function(r){var a=this.body.angle+Math.PI/2;return this._tempVec2.set(r*Math.cos(a),r*Math.sin(a)),d.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustBack:function(r){var a=this.body.angle-Math.PI;return this._tempVec2.set(r*Math.cos(a),r*Math.sin(a)),d.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this}};l.exports=g},74015:l=>{/** 4446 * @author Richard Davey <[email protected]> 4447 * @copyright 2013-2023 Photon Storm Ltd. 4448 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4449 */var T={setFriction:function(e,d,g){return this.body.friction=e,d!==void 0&&(this.body.frictionAir=d),g!==void 0&&(this.body.frictionStatic=g),this},setFrictionAir:function(e){return this.body.frictionAir=e,this},setFrictionStatic:function(e){return this.body.frictionStatic=e,this}};l.exports=T},11535:l=>{/** 4450 * @author Richard Davey <[email protected]> 4451 * @copyright 2013-2023 Photon Storm Ltd. 4452 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4453 */var T={setIgnoreGravity:function(e){return this.body.ignoreGravity=e,this}};l.exports=T},74497:(l,T,e)=>{/** 4454 * @author Richard Davey <[email protected]> 4455 * @copyright 2013-2023 Photon Storm Ltd. 4456 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4457 */var d=e(84125),g=e(93736),r={setMass:function(a){return d.setMass(this.body,a),this},setDensity:function(a){return d.setDensity(this.body,a),this},centerOfMass:{get:function(){return new g(this.body.centerOfMass.x,this.body.centerOfMass.y)}}};l.exports=r},75529:l=>{/** 4458 * @author Richard Davey <[email protected]> 4459 * @copyright 2013-2023 Photon Storm Ltd. 4460 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4461 */var T={setSensor:function(e){return this.body.isSensor=e,this},isSensor:function(){return this.body.isSensor}};l.exports=T},64024:(l,T,e)=>{/** 4462 * @author Richard Davey <[email protected]> 4463 * @copyright 2013-2023 Photon Storm Ltd. 4464 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4465 */var d=e(68516),g=e(84125),r=e(88456),a=e(72632),h=e(10998),n=e(72829),o=e(39745),f={setRectangle:function(u,v,m){return this.setBody({type:"rectangle",width:u,height:v},m)},setCircle:function(u,v){return this.setBody({type:"circle",radius:u},v)},setPolygon:function(u,v,m){return this.setBody({type:"polygon",sides:v,radiu
4465s:u},m)},setTrapezoid:function(u,v,m,p){return this.setBody({type:"trapezoid",width:u,height:v,slope:m},p)},setExistingBody:function(u,v){v===void 0&&(v=!0),this.body&&this.world.remove(this.body,!0),this.body=u;for(var m=0;m<u.parts.length;m++)u.parts[m].gameObject=this;var p=this;if(u.destroy=function(){p.world.remove(p.body,!0),p.body.gameObject=null},v&&(this.world.has(u)&&this.world.remove(u,!0),this.world.add(u)),this._originComponent){var x=u.render.sprite.xOffset,y=u.render.sprite.yOffset,P=u.centerOfMass.x,b=u.centerOfMass.y;if(r(P,.5)&&r(b,.5))this.setOrigin(x+.5,y+.5);else{var E=u.centerOffset.x,M=u.centerOffset.y;this.setOrigin(x+E/this.displayWidth,y+M/this.displayHeight)}}return this},setBody:function(u,v){if(!u)return this;var m;typeof u=="string"&&(u={type:u});var p=a(u,"type","rectangle"),x=a(u,"x",this._tempVec2.x),y=a(u,"y",this._tempVec2.y),P=a(u,"width",this.width),b=a(u,"height",this.height);switch(p){case"rectangle":m=d.rectangle(x,y,P,b,v);break;case"circle":var E=a(u,"radius",Math.max(P,b)/2),M=a(u,"maxSides",25);m=d.circle(x,y,E,v,M);break;case"trapezoid":var w=a(u,"slope",.5);m=d.trapezoid(x,y,P,b,w,v);break;case"polygon":var A=a(u,"sides",5),R=a(u,"radius",Math.max(P,b)/2);m=d.polygon(x,y,A,R,v);break;case"fromVertices":case"fromVerts":var L=a(u,"verts",null);if(L)if(typeof L=="string"&&(L=o.fromPath(L)),this.body&&!this.body.hasOwnProperty("temp"))g.setVertices(this.body,L),m=this.body;else{var O=a(u,"flagInternal",!1),I=a(u,"removeCollinear",.01),D=a(u,"minimumArea",10);m=d.fromVertices(x,y,L,v,O,I,D)}break;case"fromPhysicsEditor":m=h.parseBody(x,y,u,v);break;case"fromPhysicsTracer":m=n.parseBody(x,y,u,v);break}return m&&this.setExistingBody(m,u.addToWorld),this}};l.exports=f},25106:(l,T,e)=>{/** 4466 * @author Richard Davey <[email protected]> 4467 * @copyright 2013-2023 Photon Storm Ltd. 4468 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4469 */var d=e(35416),g=e(22806),r=e(39073),a={setToSleep:function(){return g.set(this.body,!0),this},setAwake:function(){return g.set(this.body,!1),this},setSleepThreshold:function(h){return h===void 0&&(h=60),this.body.sleepThreshold=h,this},setSleepEvents:function(h,n){return this.setSleepStartEvent(h),this.setSleepEndEvent(n),this},setSleepStartEvent:function(h){if(h){var n=this.world;r.on(this.body,"sleepStart",function(o){n.emit(d.SLEEP_START,o,this)})}else r.off(this.body,"sleepStart");return this},setSleepEndEvent:function(h){if(h){var n=this.world;r.on(this.body,"sleepEnd",function(o){n.emit(d.SLEEP_END,o,this)})}else r.off(this.body,"sleepEnd");return this}};l.exports=a},82884:(l,T,e)=>{/** 4470 * @author Richard Davey <[email protected]> 4471 * @copyright 2013-2023 Photon Storm Ltd. 4472 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4473 */var d=e(84125),g={setStatic:function(r){return d.setStatic(this.body,r),this},isStatic:function(){return this.body.isStatic}};l.exports=g},4753:(l,T,e)=>{/** 4474 * @author Richard Davey <[email protected]> 4475 * @copyright 2013-2023 Photon Storm Ltd. 4476 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4477 */var d=e(84125),g=e(83392),r=e(35786),a=e(62138),h=4,n={x:{get:function(){return this.body.position.x},set:function(o){this._tempVec2.set(o,this.y),d.setPosition(this.body,this._tempVec2)}},y:{get:function(){return this.body.position.y},set:function(o){this._tempVec2.set(this.x,o),d.setPosition(this.body,this._tempVec2)}},scaleX:{get:function(){return this._scaleX},set:function(o){var f=1/this._scaleX,u=1/this._scaleY;this._scaleX=o,this._scaleX===0?this.renderFlags&=~h:this.renderFlags|=h,d.scale(this.body,f,u),d.scale(this.body,o,this._scaleY)}},scaleY:{get:function(){return this._scaleY},set:function(o){var f=1/this._scaleX,u=1/this._scaleY;this._scaleY=o,this._scaleY===0?this.renderFlags&=~h:this.renderFlags|=h,d.scale(this.body,f,u),d.scale(this.body,this._scaleX,o)}},angle:{get:function(){return a(this.body.angle*g.RAD_TO_DEG)},set:function(o){this.rotation=a(o)*g.DEG_TO_RAD}},rotation:{get:function(){return this.body.angle},set:function(o){this._rotation=r(o),d.setAngle(this.body,this._rotation)}},setPosition:function(o,f){return o===void 0&&(o=0),f===void 0&&(f=o),this._tempVec2.set(o,f),d.setPosition(this.body,this._tempVec2),this},setRotation:function(o){return o===void 0&&(o=0),this._rotation=r(o),d.setAngle(this.body,o),this},setFixedRotation:function(){return d.setInertia(this.body,1/0),this},setAngle:function(o){return o===void 0&&(o=0),this.angle=o,d.setAngle(this.body,this.rotation),this},setScale:function(o,f,u){o===void 0&&(o=1),f===void 0&&(f=o);var v=1/this._scaleX,m=1/this._scaleY;return this._scaleX=o,this._scaleY=f,d.scale(this.body,v,m,u),d.scale(this.body,o,f,u),this}};l.exports=n},37268:(l,T,e)=>{/** 4478 * @author Richard Davey <[email protected]> 4479 * @copyright 2013-2023 Photon Storm Ltd. 4480 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4481 */var d=e(84125),g={setVelocityX:function(r){return this._tempVec2.set(r,this.body.velocity.y),d.setVelocity(this.body,this._tempVec2),this},setVelocityY:function(r){return this._tempVec2.set(this.body.velocity.x,r),d.setVelocity(this.body,this._tempVec2),this},setVelocity:function(r,a){return this._tempVec2.set(r,a),d.setVelocity(this.body,this._tempVec2),this},getVelocity:function(){return d.getVelocity(this.body)},setAngularVelocity:function(r){return d.setAngularVelocity(this.body,r),this},getAngularVelocity:function(){return d.getAngularVelocity(this.body)},setAngularSpeed:function(r){return d.setAngularSpeed(this.body,r),this},getAngularSpeed:function(){return d.getAngularSpeed(this.body)}};l.exports=g},74527:(l,T,e)=>{/** 4482 * @author Richard Davey <[email protected]> 4483 * @copyright 2013-2023 Photon Storm Ltd. 4484 * @license {@link https://opensource.org/licenses/MIT|MIT License}
4485 */l.exports={Bounce:e(95349),Collision:e(70679),Force:e(77178),Friction:e(74015),Gravity:e(11535),Mass:e(74497),Sensor:e(75529),SetBody:e(64024),Sleep:e(25106),Static:e(82884),Transform:e(4753),Velocity:e(37268)}},63201:l=>{/** 4486 * @author Richard Davey <[email protected]> 4487 * @copyright 2013-2023 Photon Storm Ltd. 4488 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4489 */l.exports="afteradd"},30474:l=>{/** 4490 * @author Richard Davey <[email protected]> 4491 * @copyright 2013-2023 Photon Storm Ltd. 4492 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4493 */l.exports="afterremove"},44822:l=>{/** 4494 * @author Richard Davey <[email protected]> 4495 * @copyright 2013-2023 Photon Storm Ltd. 4496 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4497 */l.exports="afterupdate"},88820:l=>{/** 4498 * @author Richard Davey <[email protected]> 4499 * @copyright 2013-2023 Photon Storm Ltd. 4500 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4501 */l.exports="beforeadd"},94849:l=>{/** 4502 * @author Richard Davey <[email protected]> 4503 * @copyright 2013-2023 Photon Storm Ltd. 4504 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4505 */l.exports="beforeremove"},6391:l=>{/** 4506 * @author Richard Davey <[email protected]> 4507 * @copyright 2013-2023 Photon Storm Ltd. 4508 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4509 */l.exports="beforeupdate"},96738:l=>{/** 4510 * @author Richard Davey <[email protected]> 4511 * @copyright 2013-2023 Photon Storm Ltd. 4512 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4513 */l.exports="collisionactive"},7916:l=>{/** 4514 * @author Richard Davey <[email protected]> 4515 * @copyright 2013-2023 Photon Storm Ltd. 4516 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4517 */l.exports="collisionend"},59529:l=>{/** 4518 * @author Richard Davey <[email protected]> 4519 * @copyright 2013-2023 Photon Storm Ltd. 4520 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4521 */l.exports="collisionstart"},10219:l=>{/** 4522 * @author Richard Davey <[email protected]> 4523 * @copyright 2013-2023 Photon Storm Ltd. 4524 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4525 */l.exports="dragend"},183:l=>{/** 4526 * @author Richard Davey <[email protected]> 4527 * @copyright 2013-2023 Photon Storm Ltd. 4528 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4529 */l.exports="drag"},39143:l=>{/** 4530 * @author Richard Davey <[email protected]> 4531 * @copyright 2013-2023 Photon Storm Ltd. 4532 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4533 */l.exports="dragstart"},16483:l=>{/** 4534 * @author Richard Davey <[email protected]> 4535 * @copyright 2013-2023 Photon Storm Ltd. 4536 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4537 */l.exports="pause"},35806:l=>{/** 4538 * @author Richard Davey <[email protected]> 4539 * @copyright 2013-2023 Photon Storm Ltd. 4540 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4541 */l.exports="resume"},22106:l=>{/** 4542 * @author Richard Davey <[email protected]> 4543 * @copyright 2013-2023 Photon Storm Ltd. 4544 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4545 */l.exports="sleepend"},5803:l=>{/** 4546 * @author Richard Davey <[email protected]> 4547 * @copyright 2013-2023 Photon Storm Ltd. 4548 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4549 */l.exports="sleepstart"},35416:(l,T,e)=>{/** 4550 * @author Richard Davey <[email protected]> 4551 * @copyright 2013-2023 Photon Storm Ltd. 4552 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4553 */l.exports={AFTER_ADD:e(63201),AFTER_REMOVE:e(30474),AFTER_UPDATE:e(44822),BEFORE_ADD:e(88820),BEFORE_REMOVE:e(94849),BEFORE_UPDATE:e(6391),COLLISION_ACTIVE:e(96738),COLLISION_END:e(7916),COLLISION_START:e(59529),DRAG_END:e(10219),DRAG:e(183),DRAG_START:e(39143),PAUSE:e(16483),RESUME:e(35806),SLEEP_END:e(22106),SLEEP_START:e(5803)}},45949:(l,T,e)=>{/** 4554 * @author Richard Davey <[email protected]> 4555 * @copyright 2013-2023 Photon Storm Ltd. 4556 * @license {@link https://opensource.org/licenses/MIT|MIT License}
4557 */l.exports={BodyBounds:e(63568),Components:e(74527),Events:e(35416),Factory:e(72653),MatterGameObject:e(3860),Image:e(7030),Matter:e(18171),MatterPhysics:e(50583),PolyDecomp:e(81084),Sprite:e(73658),TileBody:e(84720),PhysicsEditorParser:e(10998),PhysicsJSONParser:e(72829),PointerConstraint:e(88596),World:e(31468)}},84125:(l,T,e)=>{var d={};l.exports=d;var g=e(39745),r=e(10438),a=e(22806),h=e(68758),n=e(84091),o=e(50658);(function(){d._timeCorrection=!0,d._inertiaScale=4,d._nextCollidingGroupId=1,d._nextNonCollidingGroupId=-1,d._nextCategory=1,d._baseDelta=16.666666666666668,d.create=function(u){var v={id:h.nextId(),type:"body",label:"Body",parts:[],plugin:{},angle:0,vertices:null,position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},constraintImpulse:{x:0,y:0,angle:0},totalContacts:0,speed:0,angularSpeed:0,velocity:{x:0,y:0},angularVelocity:0,isSensor:!1,isStatic:!1,isSleeping:!1,motion:0,sleepThreshold:60,density:.001,restitution:0,friction:.1,frictionStatic:.5,frictionAir:.01,collisionFilter:{category:1,mask:4294967295,group:0},slop:.05,timeScale:1,events:null,bounds:null,chamfer:null,circleRadius:0,positionPrev:null,anglePrev:0,parent:null,axes:null,area:0,mass:0,inverseMass:0,inertia:0,deltaTime:16.666666666666668,inverseInertia:0,_original:null,render:{visible:!0,opacity:1,sprite:{xOffset:0,yOffset:0},fillColor:null,fillOpacity:null,lineColor:null,lineOpacity:null,lineThickness:null},gameObject:null,scale:{x:1,y:1},centerOfMass:{x:0,y:0},centerOffset:{x:0,y:0},gravityScale:{x:1,y:1},ignoreGravity:!1,ignorePointer:!1,onCollideCallback:null,onCollideEndCallback:null,onCollideActiveCallback:null,onCollideWith:{}};!u.hasOwnProperty("position")&&u.hasOwnProperty("vertices")?u.position=g.centre(u.vertices):u.hasOwnProperty("vertices")||(v.vertices=g.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var m=h.extend(v,u);return f(m,u),m.setOnCollideWith=function(p,x){return x?this.onCollideWith[p.id]=x:delete this.onCollideWith[p.id],this},m},d.nextGroup=function(u){return u?d._nextNonCollidingGroupId--:d._nextCollidingGroupId++},d.nextCategory=function(){return d._nextCategory=d._nextCategory<<1,d._nextCategory};var f=function(u,v){if(v=v||{},d.set(u,{bounds:u.bounds||n.create(u.vertices),positionPrev:u.positionPrev||r.clone(u.position),anglePrev:u.anglePrev||u.angle,vertices:u.vertices,parts:u.parts||[u],isStatic:u.isStatic,isSleeping:u.isSleeping,parent:u.parent||u}),g.rotate(u.vertices,u.angle,u.position),o.rotate(u.axes,u.angle),n.update(u.bounds,u.vertices,u.velocity),d.set(u,{axes:v.axes||u.axes,area:v.area||u.area,mass:v.mass||u.mass,inertia:v.inertia||u.inertia}),u.parts.length===1){var m=u.bounds,p=u.centerOfMass,x=u.centerOffset,y=m.max.x-m.min.x,P=m.max.y-m.min.y;p.x=-(m.min.x-u.position.x)/y,p.y=-(m.min.y-u.position.y)/P,x.x=y*p.x,x.y=P*p.y}};d.set=function(u,v,m){var p;typeof v=="string"&&(p=v,v={},v[p]=m);for(p in v)if(Object.prototype.hasOwnProperty.call(v,p))switch(m=v[p],p){case"isStatic":d.setStatic(u,m);break;case"isSleeping":a.set(u,m);break;case"mass":d.setMass(u,m);break;case"density":d.setDensity(u,m);break;case"inertia":d.setInertia(u,m);break;case"vertices":d.setVertices(u,m);break;case"position":d.setPosition(u,m);break;case"angle":d.setAngle(u,m);break;case"velocity":d.setVelocity(u,m);break;case"angularVelocity":d.setAngularVelocity(u,m);break;case"speed":d.setSpeed(u,m);break;case"angularSpeed":d.setAngularSpeed(u,m);break;case"parts":d.setParts(u,m);break;case"centre":d.setCentre(u,m);break;default:u[p]=m}},d.setStatic=function(u,v){for(var m=0;m<u.parts.length;m++){var p=u.parts[m];v?(p.isStatic||(p._original={restitution:p.restitution,friction:p.friction,mass:p.mass,inertia:p.inertia,density:p.density,inverseMass:p.inverseMass,inverseInertia:p.inverseInertia}),p.restitution=0,p.friction=1,p.mass=p.inertia=p.density=1/0,p.inverseMass=p.inverseInertia=0,p.positionPrev.x=p.position.x,p.positionPrev.y=p.position.y,p.anglePrev=p.angle,p.angularVelocity=0,p.speed=0,p.angularSpeed=0,p.motion=0):p._original&&(p.restitution=p._original.restitution,p.friction=p._original.friction,p.mass=p._original.mass,p.inertia=p._original.inertia,p.density=p._original.density,p.inverseMass=p._original.inverseMass,p.inverseInertia=p._original.inverseInertia,p._original=null),p.isStatic=v}},d.setMass=function(u,v){var m=u.inertia/(u.mass/6);u.inertia=m*(v/6),u.inverseInertia=1/u.inertia,u.mass=v,u.inverseMass=1/u.mass,u.density=u.mass/u.area},d.setDensity=function(u,v){d.setMass(u,v*u.area),u.density=v},d.setInertia=function(u,v){u.inertia=v,u.inverseInertia=1/u.inertia},d.setVertices=function(u,v){v[0].body===u?u.vertices=v:u.vertices=g.create(v,u),u.axes=o.fromVertices(u.vertices),u.area=g.area(u.vertices),d.setMass(u,u.density
4557*u.area);var m=g.centre(u.vertices);g.translate(u.vertices,m,-1),d.setInertia(u,d._inertiaScale*g.inertia(u.vertices,u.mass)),g.translate(u.vertices,u.position),n.update(u.bounds,u.vertices,u.velocity)},d.setParts=function(u,v,m){var p;for(v=v.slice(0),u.parts.length=0,u.parts.push(u),u.parent=u,p=0;p<v.length;p++){var x=v[p];x!==u&&(x.parent=u,u.parts.push(x))}if(u.parts.length!==1){if(m=typeof m<"u"?m:!0,m){var y=[];for(p=0;p<v.length;p++)y=y.concat(v[p].vertices);g.clockwiseSort(y);var P=g.hull(y),b=g.centre(P);d.setVertices(u,P),g.translate(u.vertices,b)}var E=d._totalProperties(u),M=E.centre.x,w=E.centre.y,A=u.bounds,R=u.centerOfMass,L=u.centerOffset;n.update(A,u.vertices,u.velocity),R.x=-(A.min.x-M)/(A.max.x-A.min.x),R.y=-(A.min.y-w)/(A.max.y-A.min.y),L.x=M,L.y=w,u.area=E.area,u.parent=u,u.position.x=M,u.position.y=w,u.positionPrev.x=M,u.positionPrev.y=w,d.setMass(u,E.mass),d.setInertia(u,E.inertia),d.setPosition(u,E.centre)}},d.setCentre=function(u,v,m){m?(u.positionPrev.x+=v.x,u.positionPrev.y+=v.y,u.position.x+=v.x,u.position.y+=v.y):(u.positionPrev.x=v.x-(u.position.x-u.positionPrev.x),u.positionPrev.y=v.y-(u.position.y-u.positionPrev.y),u.position.x=v.x,u.position.y=v.y)},d.setPosition=function(u,v,m){var p=r.sub(v,u.position);m?(u.positionPrev.x=u.position.x,u.positionPrev.y=u.position.y,u.velocity.x=p.x,u.velocity.y=p.y,u.speed=r.magnitude(p)):(u.positionPrev.x+=p.x,u.positionPrev.y+=p.y);for(var x=0;x<u.parts.length;x++){var y=u.parts[x];y.position.x+=p.x,y.position.y+=p.y,g.translate(y.vertices,p),n.update(y.bounds,y.vertices,u.velocity)}},d.setAngle=function(u,v,m){var p=v-u.angle;m?(u.anglePrev=u.angle,u.angularVelocity=p,u.angularSpeed=Math.abs(p)):u.anglePrev+=p;for(var x=0;x<u.parts.length;x++){var y=u.parts[x];y.angle+=p,g.rotate(y.vertices,p,u.position),o.rotate(y.axes,p),n.update(y.bounds,y.vertices,u.velocity),x>0&&r.rotateAbout(y.position,p,u.position,y.position)}},d.setVelocity=function(u,v){var m=u.deltaTime/d._baseDelta;u.positionPrev.x=u.position.x-v.x*m,u.positionPrev.y=u.position.y-v.y*m,u.velocity.x=(u.position.x-u.positionPrev.x)/m,u.velocity.y=(u.position.y-u.positionPrev.y)/m,u.speed=r.magnitude(u.velocity)},d.getVelocity=function(u){var v=d._baseDelta/u.deltaTime;return{x:(u.position.x-u.positionPrev.x)*v,y:(u.position.y-u.positionPrev.y)*v}},d.getSpeed=function(u){return r.magnitude(d.getVelocity(u))},d.setSpeed=function(u,v){d.setVelocity(u,r.mult(r.normalise(d.getVelocity(u)),v))},d.setAngularVelocity=function(u,v){var m=u.deltaTime/d._baseDelta;u.anglePrev=u.angle-v*m,u.angularVelocity=(u.angle-u.anglePrev)/m,u.angularSpeed=Math.abs(u.angularVelocity)},d.getAngularVelocity=function(u){return(u.angle-u.anglePrev)*d._baseDelta/u.deltaTime},d.getAngularSpeed=function(u){return Math.abs(d.getAngularVelocity(u))},d.setAngularSpeed=function(u,v){d.setAngularVelocity(u,h.sign(d.getAngularVelocity(u))*v)},d.translate=function(u,v,m){d.setPosition(u,r.add(u.position,v),m)},d.rotate=function(u,v,m,p){if(!m)d.setAngle(u,u.angle+v,p);else{var x=Math.cos(v),y=Math.sin(v),P=u.position.x-m.x,b=u.position.y-m.y;d.setPosition(u,{x:m.x+(P*x-b*y),y:m.y+(P*y+b*x)},p),d.setAngle(u,u.angle+v,p)}},d.scale=function(u,v,m,p){var x=0,y=0;p=p||u.position;for(var P=0;P<u.parts.length;P++){var b=u.parts[P];b.scale.x=v,b.scale.y=m,g.scale(b.vertices,v,m,p),b.axes=o.fromVertices(b.vertices),b.area=g.area(b.vertices),d.setMass(b,u.density
4557*b.area),g.translate(b.vertices,{x:-b.position.x,y:-b.position.y}),d.setInertia(b,d._inertiaScale*g.inertia(b.vertices,b.mass)),g.translate(b.vertices,{x:b.position.x,y:b.position.y}),P>0&&(x+=b.area,y+=b.inertia),b.position.x=p.x+(b.position.x-p.x)*v,b.position.y=p.y+(b.position.y-p.y)*m,n.update(b.bounds,b.vertices,u.velocity)}u.parts.length>1&&(u.area=x,u.isStatic||(d.setMass(u,u.density*x),d.setInertia(u,y))),u.circleRadius&&(v===m?u.circleRadius*=v:u.circleRadius=null)},d.update=function(u,v){v=(typeof v<"u"?v:16.666666666666668)*u.timeScale;var m=v*v,p=d._timeCorrection?v/(u.deltaTime||v):1,x=1-u.frictionAir*(v/h._baseDelta),y=(u.position.x-u.positionPrev.x)*p,P=(u.position.y-u.positionPrev.y)*p;u.velocity.x=y*x+u.force.x/u.mass*m,u.velocity.y=P*x+u.force.y/u.mass*m,u.positionPrev.x=u.position.x,u.positionPrev.y=u.position.y,u.position.x+=u.velocity.x,u.position.y+=u.velocity.y,u.deltaTime=v,u.angularVelocity=(u.angle-u.anglePrev)*x*p+u.torque/u.inertia*m,u.anglePrev=u.angle,u.angle+=u.angularVelocity,u.speed=r.magnitude(u.velocity),u.angularSpeed=Math.abs(u.angularVelocity);for(var b=0;b<u.parts.length;b++){var E=u.parts[b];g.translate(E.vertices,u.velocity),b>0&&(E.position.x+=u.velocity.x,E.position.y+=u.velocity.y),u.angularVelocity!==0&&(g.rotate(E.vertices,u.angularVelocity,u.position),o.rotate(E.axes,u.angularVelocity),b>0&&r.rotateAbout(E.position,u.angularVelocity,u.position,E.position)),n.update(E.bounds,E.vertices,u.velocity)}},d.updateVelocities=function(u){var v=d._baseDelta/u.deltaTime,m=u.velocity;m.x=(u.position.x-u.positionPrev.x)*v,m.y=(u.position.y-u.positionPrev.y)*v,u.speed=Math.sqrt(m.x*m.x+m.y*m.y),u.angularVelocity=(u.angle-u.anglePrev)*v,u.angularSpeed=Math.abs(u.angularVelocity)},d.applyForce=function(u,v,m){var p={x:v.x-u.position.x,y:v.y-u.position.y};u.force.x+=m.x,u.force.y+=m.y,u.torque+=p.x*m.y-p.y*m.x},d._totalProperties=function(u){for(var v={mass:0,area:0,inertia:0,centre:{x:0,y:0}},m=u.parts.length===1?0:1;m<u.parts.length;m++){var p=u.parts[m],x=p.mass!==1/0?p.mass:1;v.mass+=x,v.area+=p.area,v.inertia+=p.inertia,v.centre=r.add(v.centre,r.mult(p.position,x))}return v.centre=r.div(v.centre,v.mass),v}})()},11299:(l,T,e)=>{var d={};l.exports=d;var g=e(39073),r=e(68758),a=e(84091),h=e(84125);(function(){d.create=function(n){return r.extend({id:r.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{},cache:{allBodies:null,allConstraints:null,allComposites:null}},n)},d.setModified=function(n,o,f,u){if(g.trigger(n,"compositeModified",n),n.isModified=o,o&&n.cache&&(n.cache.allBodies=null,n.cache.allConstraints=null,n.cache.allComposites=null),f&&n.parent&&d.setModified(n.parent,o,f,u),u)for(var v=0;v<n.composites.length;v++){var m=n.composites[v];d.setModified(m,o,f,u)}},d.add=function(n,o){var f=[].concat(o);g.trigger(n,"beforeAdd",{object:o});for(var u=0;u<f.length;u++){var v=f[u];switch(v.type){case"body":if(v.parent!==v){r.warn("Composite.add: skipped adding a compound body part (you must add its parent instead)");break}d.addBody(n,v);break;case"constraint":d.addConstraint(n,v);break;case"composite":d.addComposite(n,v);break;case"mouseConstraint":d.addConstraint(n,v.constraint);break}}return g.trigger(n,"afterAdd",{object:o}),n},d.remove=function(n,o,f){var u=[].concat(o);g.trigger(n,"beforeRemove",{object:o});for(var v=0;v<u.length;v++){var m=u[v];switch(m.type){case"body":d.removeBody(n,m,f);break;case"constraint":d.removeConstraint(n,m,f);break;case"composite":d.removeComposite(n,m,f);break;case"mouseConstraint":d.removeConstraint(n,m.constraint);break}}return g.trigger(n,"afterRemove",{object:o}),n},d.addComposite=function(n,o){return n.composites.push(o),o.parent=n,d.setModified(n,!0,!0,!1),n},d.removeComposite=function(n,o,f){var u=r.indexOf(n.composites,o);if(u!==-1&&d.removeCompositeAt(n,u),f)for(var v=0;v<n.composites.length;v++)d.removeComposite(n.composites[v],o,!0);return n},d.removeCompositeAt=function(n,o){return n.composites.splice(o,1),d.setModified(n,!0,!0,!1),n},d.addBody=function(n,o){return n.bodies.push(o),d.setModified(n,!0,!0,!1),n},d.removeBody=function(n,o,f){var u=r.indexOf(n.bodies,o);if(u!==-1&&d.removeBodyAt(n,u),f)for(var v=0;v<n.composites.length;v++)d.removeBody(n.composites[v],o,!0);return n},d.removeBodyAt=function(n,o){return n.bodies.splice(o,1),d.setModified(n,!0,!0,!1),n},d.addConstraint=function(n,o){return n.constraints.push(o),d.setModified(n,!0,!0,!1),n},d.removeConstraint=function(n,o,f){var u=r.indexOf(n.constraints,o);if(u!==-1&&d.removeConstraintAt(n,u),f)for(var v=0;v<n.composites.length;v++)d.removeConstraint(n.composites[v],o,!0);return n},d.removeConstraintAt=function(n,o){return n.constraints.splice(o,1),d.setModified(n,!0,!0,!1),n},d.clear=function(n,o,f){if(f)for(var u=0;u<n.composites.length;u++)d.clear(n.composites[u],o,!0);return o?n.bodies=n.bodies.filter(function(v){return v.isStatic}):n.bodies.length=0,n.constraints.length=0,n.composites.length=0,d.setModified(n,!0,!0,!1),n},d.allBodies=function(n){if(n.cache&&n.cache.allBodies)return n.cache.allBodies;for(var o=[].concat(n.bodies),f=0;f<n.composites.length;f++)o=o.concat(d.allBodies(n.composites[f]));return n.cache&&(n.cache.allBodies=o),o},d.allConstraints=function(n){if(n.cache&&n.cache.allConstraints)return n.cache.allConstraints;for(var o=[].concat(n.constraints),f=0;f<n.composites.length;f++)o=o.concat(d.allConstraints(n.composites[f]));return n.cache&&(n.cache.allConstraints=o),o},d.allComposites=function(n){if(n.cache&&n.cache.allComposites)return n.cache.allComposites;for(var o=[].concat(n.composites),f=0;f<n.composites.length;f++)o=o.concat(d.allComposites(n.composites[f]));return n.cache&&(n.cache.allComposites=o),o},d.get=function(n,o,f){var u,v;switch(f){case"body":u=d.allBodies(n);break;case"constraint":u=d.allConstraints(n);break;case"composite":u=d.allComposites(n).concat(n);break}return u?(v=u.filter(function(m){return m.id.toString()===o.toString()}),v.length===0?null:v[0]):null},d.move=function(n,o,f){return d.remove(n,o),d.add(f,o),n},d.rebase=function(n){for(var o=d.allBodies(n).concat(d.allConstraints(n)).concat(d.allComposites(n)),f=0;f<o.length;f++)o[f].id=r.nextId();return n},d.translate=function(n,o,f){for(var u=f?d.allBodies(n):n.bodies,v=0;v<u.length;v++)h.translate(u[v],o);return n},d.rotate=function(n,o,f,u){for(var v=Math.cos(o),m=Math.sin(o),p=u?d.allBodies(n):n.bodies,x=0;x<p.length;x++){var y=p[x],P=y.position.x-f.x,b=y.position.y-f.y;h.setPosition(y,{x:f.x+(P*v-b*m),y:f.y+(P*m+b*v)}),h.rotate(y,o)}return n},d.scale=function(n,o,f,u,v){for(var m=v?d.allBodies(n):n.bodies,p=0;p<m.length;p++){var x=m[p],y=x.position.x-u.x,P=x.position.y-u.y;h.setPosition(x,{x:u.x+y*o,y:u.y+P*f}),h.scale(x,o,f)}return n},d.bounds=function(n){for(var o=d.allBodies(n),f=[],u=0;u<o.length;u+=1){var v=o[u];f.push(v.bounds.min,v.bounds.max)}return a.create(f)}})()},72005:(l,T,e)=>{var d={};l.exports=d;var g=e(11299);(function(){d.create=g.create,d.add=g.add,d.remove=g.remove,d.clear=g.clear,d.addComposite=g.addComposite,d.addBody=g.addBody,d.addConstraint=g.addConstraint})()},63454:(l,T,e)=>{var d={};l.exports=d;var g=e(39745),r=e(70584);(function(){var a=[],h={overlap:0,axis:null},n={overlap:0,axis:null};d.create=function(o,f){return{pair:null,collided:!1,bodyA:o,bodyB:f,parentA:o.parent,parentB:f.parent,depth:0,normal:{x:0,y:0},tangent:{x:0,y:0}
4557,penetration:{x:0,y:0},supports:[]}},d.collides=function(o,f,u){if(d._overlapAxes(h,o.vertices,f.vertices,o.axes),h.overlap<=0||(d._overlapAxes(n,f.vertices,o.vertices,f.axes),n.overlap<=0))return null;var v=u&&u.table[r.id(o,f)],m;v?m=v.collision:(m=d.create(o,f),m.collided=!0,m.bodyA=o.id<f.id?o:f,m.bodyB=o.id<f.id?f:o,m.parentA=m.bodyA.parent,m.parentB=m.bodyB.parent),o=m.bodyA,f=m.bodyB;var p;h.overlap<n.overlap?p=h:p=n;var x=m.normal,y=m.supports,P=p.axis,b=P.x,E=P.y;b*(f.position.x-o.position.x)+E*(f.position.y-o.position.y)<0?(x.x=b,x.y=E):(x.x=-b,x.y=-E),m.tangent.x=-x.y,m.tangent.y=x.x,m.depth=p.overlap,m.penetration.x=x.x*m.depth,m.penetration.y=x.y*m.depth;var M=d._findSupports(o,f,x,1),w=0;if(g.contains(o.vertices,M[0])&&(y[w++]=M[0]),g.contains(o.vertices,M[1])&&(y[w++]=M[1]),w<2){var A=d._findSupports(f,o,x,-1);g.contains(f.vertices,A[0])&&(y[w++]=A[0]),w<2&&g.contains(f.vertices,A[1])&&(y[w++]=A[1])}return w===0&&(y[w++]=M[0]),y.length=w,m},d._overlapAxes=function(o,f,u,v){var m=f.length,p=u.length,x=f[0].x,y=f[0].y,P=u[0].x,b=u[0].y,E=v.length,M=Number.MAX_VALUE,w=0,A,R,L,O,I,D;for(I=0;I<E;I++){var B=v[I],z=B.x,X=B.y,W=x*z+y*X,j=P*z+b*X,N=W,Y=j;for(D=1;D<m;D+=1)O=f[D].x*z+f[D].y*X,O>N?N=O:O<W&&(W=O);for(D=1;D<p;D+=1)O=u[D].x*z+u[D].y*X,O>Y?Y=O:O<j&&(j=O);if(R=N-j,L=Y-W,A=R<L?R:L,A<M&&(M=A,w=I,A<=0))break}o.axis=v[w],o.overlap=M},d._projectToAxis=function(o,f,u){for(var v=f[0].x*u.x+f[0].y*u.y,m=v,p=1;p<f.length;p+=1){var x=f[p].x*u.x+f[p].y*u.y;x>m?m=x:x<v&&(v=x)}o.min=v,o.max=m},d._findSupports=function(o,f,u,v){var m=f.vertices,p=m.length,x=o.position.x,y=o.position.y,P=u.x*v,b=u.y*v,E=Number.MAX_VALUE,M,w,A,R,L;for(L=0;L<p;L+=1)w=m[L],R=P*(x-w.x)+b*(y-w.y),R<E&&(E=R,M=w);return A=m[(p+M.index-1)%p],E=P*(x-A.x)+b*(y-A.y),w=m[(M.index+1)%p],P*(x-w.x)+b*(y-w.y)<E?(a[0]=M,a[1]=w,a):(a[0]=M,a[1]=A,a)}})()},17319:l=>{var T={};l.exports=T,function(){T.create=function(e){return{vertex:e,normalImpulse:0,tangentImpulse:0}}}()},13657:(l,T,e)=>{var d={};l.exports=d;var g=e(68758),r=e(63454);(function(){d.create=function(a){var h={bodies:[],pairs:null};return g.extend(h,a)},d.setBodies=function(a,h){a.bodies=h.slice(0)},d.clear=function(a){a.bodies=[]},d.collisions=function(a){var h=[],n=a.pairs,o=a.bodies,f=o.length,u=d.canCollide,v=r.collides,m,p;for(o.sort(d._compareBoundsX),m=0;m<f;m++){var x=o[m],y=x.bounds,P=x.bounds.max.x,b=x.bounds.max.y,E=x.bounds.min.y,M=x.isStatic||x.isSleeping,w=x.parts.length,A=w===1;for(p=m+1;p<f;p++){var R=o[p],L=R.bounds;if(L.min.x>P)break;if(!(b<L.min.y||E>L.max.y)&&!(M&&(R.isStatic||R.isSleeping))&&u(x.collisionFilter,R.collisionFilter)){var O=R.parts.length;if(A&&O===1){var I=v(x,R,n);I&&h.push(I)}else for(var D=w>1?1:0,B=O>1?1:0,z=D;z<w;z++)for(var X=x.parts[z],y=X.bounds,W=B;W<O;W++){var j=R.parts[W],L=j.bounds;if(!(y.min.x>L.max.x||y.max.x<L.min.x||y.max.y<L.min.y||y.min.y>L.max.y)){var I=v(X,j,n);I&&h.push(I)}}}}}return h},d.canCollide=function(a,h){return a.group===h.group&&a.group!==0?a.group>0:(a.mask&h.category)!==0&&(h.mask&a.category)!==0},d._compareBoundsX=function(a,h){return a.bounds.min.x-h.bounds.min.x}})()},70584:(l,T,e)=>{var d={};l.exports=d;var g=e(17319);(function(){d.create=function(r,a){var h=r.bodyA,n=r.bodyB,o={id:d.id(h,n),bodyA:h,bodyB:n,collision:r,contacts:[],activeContacts:[],separation:0,isActive:!0,confirmedActive:!0,isSensor:h.isSensor||n.isSensor,timeCreated:a,timeUpdated:a,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return d.update(o,r,a),o},d.update=function(r,a,h){var n=r.contacts,o=a.supports,f=r.activeContacts,u=a.parentA,v=a.parentB,m=u.vertices.length;r.isActive=!0,r.timeUpdated=h,r.collision=a,r.separation=a.depth,r.inverseMass=u.inverseMass+v.inverseMass,r.friction=u.friction<v.friction?u.friction:v.friction,r.frictionStatic=u.frictionStatic>v.frictionStatic?u.frictionStatic:v.frictionStatic,r.restitution=u.restitution>v.restitution?u.restitution:v.restitution,r.slop=u.slop>v.slop?u.slop:v.slop,a.pair=r,f.length=0;for(var p=0;p<o.length;p++){var x=o[p],y=x.body===u?x.index:m+x.index,P=n[y];P?f.push(P):f.push(n[y]=g.create(x))}},d.setActive=function(r,a,h){a?(r.isActive=!0,r.timeUpdated=h):(r.isActive=!1,r.activeContacts.length=0)},d.id=function(r,a){return r.id<a.id?"A"+r.id+"B"+a.id:"A"+a.id+"B"+r.id}})()},91327:(l,T,e)=>{var d={};l.exports=d;var g=e(70584),r=e(68758);(function(){d.create=function(a){return r.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},a)},d.update=function(a,h,n){var o=a.list,f=o.length,u=a.table,v=h.length,m=a.collisionStart,p=a.collisionEnd,x=a.collisionActive,y,P,b,E;for(m.length=0,p.length=0,x.length=0,E=0;E<f;E++)o[E].confirmedActive=!1;for(E=0;E<v;E++)y=h[E],b=y.pair,b?(b.isActive?x.push(b):m.push(b),g.update(b,y,n),b.confirmedActive=!0):(b=g.create(y,n),u[b.id]=b,m.push(b),o.push(b));var M=[];for(f=o.length,E=0;E<f;E++)b=o[E],b.confirmedActive||(g.setActive(b,!1,n),p.push(b),!b.collision.bodyA.isSleeping&&!b.collision.bodyB.isSleeping&&M.push(E));for(E=0;E<M.length;E++)P=M[E]-E,b=o[P],o.splice(P,1),delete u[b.id]},d.clear=function(a){return a.table={},a.list.length=0,a.collisionStart.length=0,a.collisionActive.length=0,a.collisionEnd.length=0,a}})()},13390:(l,T,e)=>{var d={};l.exports=d;var g=e(10438),r=e(63454),a=e(84091),h=e(68516),n=e(39745);(function(){d.collides=function(o,f){for(var u=[],v=f.length,m=o.bounds,p=r.collides,x=a.overlaps,y=0;y<v;y++){var P=f[y],b=P.parts.length,E=b===1?0:1;if(o!==P&&x(P.bounds,m))for(var M=E;M<b;M++){var w=P.parts[M];if(x(w.bounds,m)){var A=p(w,o);if(A){u.push(A);break}}}}return u}
4557,d.ray=function(o,f,u,v){v=v||1e-100;for(var m=g.angle(f,u),p=g.magnitude(g.sub(f,u)),x=(u.x+f.x)*.5,y=(u.y+f.y)*.5,P=h.rectangle(x,y,p,v,{angle:m}),b=d.collides(P,o),E=0;E<b.length;E+=1){var M=b[E];M.body=M.bodyB=M.bodyA}return b},d.region=function(o,f,u){for(var v=[],m=0;m<o.length;m++){var p=o[m],x=a.overlaps(p.bounds,f);(x&&!u||!x&&u)&&v.push(p)}return v},d.point=function(o,f){for(var u=[],v=0;v<o.length;v++){var m=o[v];if(a.contains(m.bounds,f))for(var p=m.parts.length===1?0:1;p<m.parts.length;p++){var x=m.parts[p];if(a.contains(x.bounds,f)&&n.contains(x.vertices,f)){u.push(m);break}}}return u}})()},44272:(l,T,e)=>{var d={};l.exports=d;var g=e(39745),r=e(68758),a=e(84091);(function(){d._restingThresh=2,d._restingThreshTangent=Math.sqrt(6),d._positionDampen=.9,d._positionWarming=.8,d._frictionNormalMultiplier=5,d._frictionMaxStatic=Number.MAX_VALUE,d.preSolvePosition=function(h){var n,o,f,u=h.length;for(n=0;n<u;n++)o=h[n],o.isActive&&(f=o.activeContacts.length,o.collision.parentA.totalContacts+=f,o.collision.parentB.totalContacts+=f)},d.solvePosition=function(h,n,o){var f,u,v,m,p,x,y,P,b=d._positionDampen*(o||1),E=r.clamp(n/r._baseDelta,0,1),M=h.length;for(f=0;f<M;f++)u=h[f],!(!u.isActive||u.isSensor)&&(v=u.collision,m=v.parentA,p=v.parentB,x=v.normal,u.separation=x.x*(p.positionImpulse.x+v.penetration.x-m.positionImpulse.x)+x.y*(p.positionImpulse.y+v.penetration.y-m.positionImpulse.y));for(f=0;f<M;f++)u=h[f],!(!u.isActive||u.isSensor)&&(v=u.collision,m=v.parentA,p=v.parentB,x=v.normal,P=u.separation-u.slop*E,(m.isStatic||p.isStatic)&&(P*=2),m.isStatic||m.isSleeping||(y=b/m.totalContacts,m.positionImpulse.x+=x.x*P*y,m.positionImpulse.y+=x.y*P*y),p.isStatic||p.isSleeping||(y=b/p.totalContacts,p.positionImpulse.x-=x.x*P*y,p.positionImpulse.y-=x.y*P*y))},d.postSolvePosition=function(h){for(var n=d._positionWarming,o=h.length,f=g.translate,u=a.update,v=0;v<o;v++){var m=h[v],p=m.positionImpulse,x=p.x,y=p.y,P=m.velocity;if(m.totalContacts=0,x!==0||y!==0){for(var b=0;b<m.parts.length;b++){var E=m.parts[b];f(E.vertices,p),u(E.bounds,E.vertices,P),E.position.x+=x,E.position.y+=y}m.positionPrev.x+=x,m.positionPrev.y+=y,x*P.x+y*P.y<0?(p.x=0,p.y=0):(p.x*=n,p.y*=n)}}},d.preSolveVelocity=function(h){var n=h.length,o,f;for(o=0;o<n;o++){var u=h[o];if(!(!u.isActive||u.isSensor)){var v=u.activeContacts,m=v.length,p=u.collision,x=p.parentA,y=p.parentB,P=p.normal,b=p.tangent;for(f=0;f<m;f++){var E=v[f],M=E.vertex,w=E.normalImpulse,A=E.tangentImpulse;if(w!==0||A!==0){var R=P.x*w+b.x*A,L=P.y*w+b.y*A;x.isStatic||x.isSleeping||(x.positionPrev.x+=R*x.inverseMass,x.positionPrev.y+=L*x.inverseMass,x.anglePrev+=x.inverseInertia*((M.x-x.position.x)*L-(M.y-x.position.y)*R)),y.isStatic||y.isSleeping||(y.positionPrev.x-=R*y.inverseMass,y.positionPrev.y-=L*y.inverseMass,y.anglePrev-=y.inverseInertia*((M.x-y.position.x)*L-(M.y-y.position.y)*R))}}}}},d.solveVelocity=function(h,n){var o=n/r._baseDelta,f=o*o,u=f*o,v=-d._restingThresh*o,m=d._restingThreshTangent,p=d._frictionNormalMultiplier*o,x=d._frictionMaxStatic,y=h.length,P,b,E,M;for(E=0;E<y;E++){var w=h[E];if(!(!w.isActive||w.isSensor)){var A=w.collision,R=A.parentA,L=A.parentB,O=R.velocity,I=L.velocity,D=A.normal.x,B=A.normal.y,z=A.tangent.x,X=A.tangent.y,W=w.activeContacts,j=W.length,N=1/j,Y=R.inverseMass+L.inverseMass,F=w.friction*w.frictionStatic*p;for(O.x=R.position.x-R.positionPrev.x,O.y=R.position.y-R.positionPrev.y,I.x=L.position.x-L.positionPrev.x,I.y=L.position.y-L.positionPrev.y,R.angularVelocity=R.angle-R.anglePrev,L.angularVelocity=L.angle-L.anglePrev,M=0;M<j;M++){var G=W[M],k=G.vertex,V=k.x-R.position.x,U=k.y-R.position.y,$=k.x-L.position.x,K=k.y-L.position.y,J=O.x-U*R.angularVelocity,_=O.y+V*R.angularVelocity,tt=I.x-K*L.angularVelocity,st=I.y+$*L.angularVelocity,ht=J-tt,lt=_-st,nt=D*ht+B*lt,gt=z*ht+X*lt,bt=w.separation+nt,Pt=Math.min(bt,1);Pt=bt<0?0:Pt;var dt=Pt*F;gt<-dt||gt>dt?(b=gt>0?gt:-gt,P=w.friction*(gt>0?1:-1)*u,P<-b?P=-b:P>b&&(P=b)):(P=gt,b=x);var St=V*B-U*D,Tt=$*B-K*D,Vt=N/(Y+R.inverseInertia*St*St+L.inverseInertia*Tt*Tt),zt=(1+w.restitution)*nt*Vt;if(P*=Vt,nt<v)G.normalImpulse=0;else{var be=G.normalImpulse;G.normalImpulse+=zt,G.normalImpulse>
45570&&(G.normalImpulse=0),zt=G.normalImpulse-be}if(gt<-m||gt>m)G.tangentImpulse=0;else{var pe=G.tangentImpulse;G.tangentImpulse+=P,G.tangentImpulse<-b&&(G.tangentImpulse=-b),G.tangentImpulse>b&&(G.tangentImpulse=b),P=G.tangentImpulse-pe}var Qt=D*zt+z*P,Wt=B*zt+X*P;R.isStatic||R.isSleeping||(R.positionPrev.x+=Qt*R.inverseMass,R.positionPrev.y+=Wt*R.inverseMass,R.anglePrev+=(V*Wt-U*Qt)*R.inverseInertia),L.isStatic||L.isSleeping||(L.positionPrev.x-=Qt*L.inverseMass,L.positionPrev.y-=Wt*L.inverseMass,L.anglePrev-=($*Wt-K*Qt)*L.inverseInertia)}}}}})()},52838:(l,T,e)=>{var d={};l.exports=d;var g=e(39745),r=e(10438),a=e(22806),h=e(84091),n=e(50658),o=e(68758);(function(){d._warming=.4,d._torqueDampen=1,d._minLength=1e-6,d.create=function(f){var u=f;u.bodyA&&!u.pointA&&(u.pointA={x:0,y:0}),u.bodyB&&!u.pointB&&(u.pointB={x:0,y:0});var v=u.bodyA?r.add(u.bodyA.position,u.pointA):u.pointA,m=u.bodyB?r.add(u.bodyB.position,u.pointB):u.pointB,p=r.magnitude(r.sub(v,m));u.length=typeof u.length<"u"?u.length:p,u.id=u.id||o.nextId(),u.label=u.label||"Constraint",u.type="constraint",u.stiffness=u.stiffness||(u.length>0?1:.7),u.damping=u.damping||0,u.angularStiffness=u.angularStiffness||0,u.angleA=u.bodyA?u.bodyA.angle:u.angleA,u.angleB=u.bodyB?u.bodyB.angle:u.angleB,u.plugin={};var x={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return u.length===0&&u.stiffness>.1?(x.type="pin",x.anchors=!1):u.stiffness<.9&&(x.type="spring"),u.render=o.extend(x,u.render),u},d.preSolveAll=function(f){for(var u=0;u<f.length;u+=1){var v=f[u],m=v.constraintImpulse;v.isStatic||m.x===0&&m.y===0&&m.angle===0||(v.position.x+=m.x,v.position.y+=m.y,v.angle+=m.angle)}},d.solveAll=function(f,u){for(var v=o.clamp(u/o._baseDelta,0,1),m=0;m<f.length;m+=1){var p=f[m],x=!p.bodyA||p.bodyA&&p.bodyA.isStatic,y=!p.bodyB||p.bodyB&&p.bodyB.isStatic;(x||y)&&d.solve(f[m],v)}for(m=0;m<f.length;m+=1)p=f[m],x=!p.bodyA||p.bodyA&&p.bodyA.isStatic,y=!p.bodyB||p.bodyB&&p.bodyB.isStatic,!x&&!y&&d.solve(f[m],v)},d.solve=function(f,u){var v=f.bodyA,m=f.bodyB,p=f.pointA,x=f.pointB;if(!(!v&&!m)){v&&!v.isStatic&&(r.rotate(p,v.angle-f.angleA,p),f.angleA=v.angle),m&&!m.isStatic&&(r.rotate(x,m.angle-f.angleB,x),f.angleB=m.angle);var y=p,P=x;if(v&&(y=r.add(v.position,p)),m&&(P=r.add(m.position,x)),!(!y||!P)){var b=r.sub(y,P),E=r.magnitude(b);E<d._minLength&&(E=d._minLength);var M=(E-f.length)/E,w=f.stiffness>=1||f.length===0,A=w?f.stiffness*u:f.stiffness*u*u,R=f.damping*u,L=r.mult(b,M*A),O=(v?v.inverseMass:0)+(m?m.inverseMass:0),I=(v?v.inverseInertia:0)+(m?m.inverseInertia:0),D=O+I,B,z,X,W,j;if(R>0){var N=r.create();X=r.div(b,E),j=r.sub(m&&r.sub(m.position,m.positionPrev)||N,v&&r.sub(v.position,v.positionPrev)||N),W=r.dot(X,j)}v&&!v.isStatic&&(z=v.inverseMass/O,v.constraintImpulse.x-=L.x*z,v.constraintImpulse.y-=L.y*z,v.position.x-=L.x*z,v.position.y-=L.y*z,R>0&&(v.positionPrev.x-=R*X.x*W*z,v.positionPrev.y-=R*X.y*W*z),B=r.cross(p,L)/D*d._torqueDampen*v.inverseInertia*(1-f.angularStiffness),v.constraintImpulse.angle-=B,v.angle-=B),m&&!m.isStatic&&(z=m.inverseMass/O,m.constraintImpulse.x+=L.x*z,m.constraintImpulse.y+=L.y*z,m.position.x+=L.x*z,m.position.y+=L.y*z,R>0&&(m.positionPrev.x+=R*X.x*W*z,m.positionPrev.y+=R*X.y*W*z),B=r.cross(x,L)/D*d._torqueDampen*m.inverseInertia*(1-f.angularStiffness),m.constraintImpulse.angle+=B,m.angle+=B)}}},d.postSolveAll=function(f){for(var u=0;u<f.length;u++){var v=f[u],m=v.constraintImpulse;if(!(v.isStatic||m.x===0&&m.y===0&&m.angle===0)){a.set(v,!1);for(var p=0;p<v.parts.length;p++){var x=v.parts[p];g.translate(x.vertices,m),p>0&&(x.position.x+=m.x,x.position.y+=m.y),m.angle!==0&&(g.rotate(x.vertices,m.angle,v.position),n.rotate(x.axes,m.angle),p>0&&r.rotateAbout(x.position,m.angle,v.position,x.position)),h.update(x.bounds,x.vertices,v.velocity)}m.angle*=d._warming,m.x*=d._warming,m.y*=d._warming}}},d.pointAWorld=function(f){return{x:(f.bodyA?f.bodyA.position.x:0)+(f.pointA?f.pointA.x:0),y:(f.bodyA?f.bodyA.position.y:0)+(f.pointA?f.pointA.y:0)}},d.pointBWorld=function(f){return{x:(f.bodyB?f.bodyB.position.x:0)+(f.pointB?f.pointB.x:0),y:(f.bodyB?f.bodyB.position.y:0)+(f.pointB?f.pointB.y:0)}},d.currentLength=function(f){var u=(f.bodyA?f.bodyA.position.x:0)+(f.pointA?f.pointA.x:0),v=(f.bodyA?f.bodyA.position.y:0)+(f.pointA?f.pointA.y:0),m=(f.bodyB?f.bodyB.position.x:0)+(f.pointB?f.pointB.x:0),p=(f.bodyB?f.bodyB.position.y:0)+(f.pointB?f.pointB.y:0),x=u-m,y=v-p;return Math.sqrt(x*x+y*y)}})()},68758:(l,T,e)=>{var d={};l.exports=d,function(){d._baseDelta=16.666666666666668,d._nextId=0,d._seed=0,d._nowStartTime=+new Date,d._warnedOnce={},d._decomp=null,d.extend=function(r,a){var h,n;typeof a=="boolean"?(h=2,n=a):(h=1,n=!0);for(var o=h;o<arguments.length;o++){var f=arguments[o];if(f)for(var u in f)n&&f[u]&&f[u].constructor===Object&&(!r[u]||r[u].
4557constructor===Object)?(r[u]=r[u]||{},d.extend(r[u],n,f[u])):r[u]=f[u]}return r},d.clone=function(r,a){return d.extend({},a,r)},d.keys=function(r){if(Object.keys)return Object.keys(r);var a=[];for(var h in r)a.push(h);return a},d.values=function(r){var a=[];if(Object.keys){for(var h=Object.keys(r),n=0;n<h.length;n++)a.push(r[h[n]]);return a}for(var o in r)a.push(r[o]);return a},d.get=function(r,a,h,n){a=a.split(".").slice(h,n);for(var o=0;o<a.length;o+=1)r=r[a[o]];return r},d.set=function(r,a,h,n,o){var f=a.split(".").slice(n,o);return d.get(r,a,0,-1)[f[f.length-1]]=h,h},d.shuffle=function(r){for(var a=r.length-1;a>0;a--){var h=Math.floor(d.random()*(a+1)),n=r[a];r[a]=r[h],r[h]=n}return r},d.choose=function(r){return r[Math.floor(d.random()*r.length)]},d.isElement=function(r){return typeof HTMLElement<"u"?r instanceof HTMLElement:!!(r&&r.nodeType&&r.nodeName)},d.isArray=function(r){return Object.prototype.toString.call(r)==="[object Array]"},d.isFunction=function(r){return typeof r=="function"},d.isPlainObject=function(r){return typeof r=="object"&&r.constructor===Object},d.isString=function(r){return toString.call(r)==="[object String]"},d.clamp=function(r,a,h){return r<a?a:r>h?h:r},d.sign=function(r){return r<0?-1:1},d.now=function(){if(typeof window<"u"&&window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return Date.now?Date.now():new Date-d._nowStartTime},d.random=function(r,a){return r=typeof r<"u"?r:0,a=typeof a<"u"?a:1,r+g()*(a-r)};var g=function(){return d._seed=(d._seed*9301+49297)%233280,d._seed/233280};d.colorToNumber=function(r){return r=r.replace("#",""),r.length==3&&(r=r.charAt(0)+r.charAt(0)+r.charAt(1)+r.charAt(1)+r.charAt(2)+r.charAt(2)),parseInt(r,16)},d.logLevel=1,d.log=function(){console&&d.logLevel>0&&d.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},d.info=function(){console&&d.logLevel>0&&d.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},d.warn=function(){console&&d.logLevel>0&&d.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},d.warnOnce=function(){var r=Array.prototype.slice.call(arguments).join(" ");d._warnedOnce[r]||(d.warn(r),d._warnedOnce[r]=!0)},d.deprecated=function(r,a,h){r[a]=d.chain(function(){d.warnOnce("ð
deprecated ð
",h)},r[a])},d.nextId=function(){return d._nextId++},d.indexOf=function(r,a){if(r.indexOf)return r.indexOf(a);for(var h=0;h<r.length;h++)if(r[h]===a)return h;return-1},d.map=function(r,a){if(r.map)return r.map(a);for(var h=[],n=0;n<r.length;n+=1)h.push(a(r[n]));return h},d.topologicalSort=function(r){var a=[],h=[],n=[];for(var o in r)!h[o]&&!n[o]&&d._topologicalSort(o,h,n,r,a);return a},d._topologicalSort=function(r,a,h,n,o){var f=n[r]||[];h[r]=!0;for(var u=0;u<f.length;u+=1){var v=f[u];h[v]||a[v]||d._topologicalSort(v,a,h,n,o)}h[r]=!1,a[r]=!0,o.push(r)},d.chain=function(){for(var r=[],a=0;a<arguments.length;a+=1){var h=arguments[a];h._chained?r.push.apply(r,h._chained):r.push(h)}var n=function(){for(var o,f=new Array(arguments.length),u=0,v=arguments.length;u<v;u++)f[u]=arguments[u];for(u=0;u<r.length;u+=1){var m=r[u].apply(o,f);typeof m<"u"&&(o=m)}return o};return n._chained=r,n},d.chainPathBefore=function(r,a,h){return d.set(r,a,d.chain(h,d.get(r,a)))},d.chainPathAfter=function(r,a,h){return d.set(r,a,d.chain(d.get(r,a),h))},d.setDecomp=function(r){d._decomp=r},d.getDecomp=function(){var r=d._decomp;try{!r&&typeof window<"u"&&(r=window.decomp),!r&&typeof e.g<"u"&&(r=e.g.decomp)}catch{r=null}return r}}()},45775:(l,T,e)=>{var d={};l.exports=d;var g=e(22806),r=e(44272),a=e(13657),h=e(91327),n=e(39073),o=e(11299),f=e(52838),u=e(68758),v=e(84125);(function(){d.create=function(m){m=m||{};var p={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}},x=u.extend(p,m);return x.world=m.world||o.create({label:"World"}),x.pairs=m.pairs||h.create(),x.detector=m.detector||a.create(),x.grid={buckets:[]},x.world.gravity=x.gravity,x.broadphase=x.grid,x.metrics={},x},d.update=function(m,p){var x=u.now(),y=m.world,P=m.detector,b=m.pairs,E=m.timing,M=E.timestamp,w;p=typeof p<"u"?p:u._baseDelta,p*=E.timeScale,E.timestamp+=p,E.lastDelta=p;var A={timestamp:E.timestamp,delta:p};n.trigger(m,"beforeUpdate",A);var R=o.allBodies(y),L=o.allConstraints(y);
4557for(y.isModified&&(a.setBodies(P,R),o.setModified(y,!1,!1,!0)),m.enableSleeping&&g.update(R,p),d._bodiesApplyGravity(R,m.gravity),p>0&&d._bodiesUpdate(R,p),n.trigger(m,"beforeSolve",A),f.preSolveAll(R),w=0;w<m.constraintIterations;w++)f.solveAll(L,p);f.postSolveAll(R),P.pairs=m.pairs;var O=a.collisions(P);h.update(b,O,M),m.enableSleeping&&g.afterCollisions(b.list),b.collisionStart.length>0&&n.trigger(m,"collisionStart",{pairs:b.collisionStart,timestamp:E.timestamp,delta:p});var I=u.clamp(20/m.positionIterations,0,1);for(r.preSolvePosition(b.list),w=0;w<m.positionIterations;w++)r.solvePosition(b.list,p,I);for(r.postSolvePosition(R),f.preSolveAll(R),w=0;w<m.constraintIterations;w++)f.solveAll(L,p);for(f.postSolveAll(R),r.preSolveVelocity(b.list),w=0;w<m.velocityIterations;w++)r.solveVelocity(b.list,p);return d._bodiesUpdateVelocities(R),b.collisionActive.length>0&&n.trigger(m,"collisionActive",{pairs:b.collisionActive,timestamp:E.timestamp,delta:p}),b.collisionEnd.length>0&&n.trigger(m,"collisionEnd",{pairs:b.collisionEnd,timestamp:E.timestamp,delta:p}),d._bodiesClearForces(R),n.trigger(m,"afterUpdate",A),m.timing.lastElapsed=u.now()-x,m},d.merge=function(m,p){if(u.extend(m,p),p.world){m.world=p.world,d.clear(m);for(var x=o.allBodies(m.world),y=0;y<x.length;y++){var P=x[y];g.set(P,!1),P.id=u.nextId()}}},d.clear=function(m){h.clear(m.pairs),a.clear(m.detector)},d._bodiesClearForces=function(m){for(var p=m.length,x=0;x<p;x++){var y=m[x];y.force.x=0,y.force.y=0,y.torque=0}},d._bodiesApplyGravity=function(m,p){var x=typeof p.scale<"u"?p.scale:.001,y=m.length;if(!(p.x===0&&p.y===0||x===0))for(var P=0;P<y;P++){var b=m[P];b.isStatic||b.isSleeping||(b.force.y+=b.mass*p.y*x,b.force.x+=b.mass*p.x*x)}},d._bodiesUpdate=function(m,p){for(var x=m.length,y=0;y<x;y++){var P=m[y];P.isStatic||P.isSleeping||v.update(P,p)}},d._bodiesUpdateVelocities=function(m){for(var p=m.length,x=0;x<p;x++)v.updateVelocities(m[x])}})()},39073:(l,T,e)=>{var d={};l.exports=d;var g=e(68758);(function(){d.on=function(r,a,h){for(var n=a.split(" "),o,f=0;f<n.length;f++)o=n[f],r.events=r.events||{},r.events[o]=r.events[o]||[],r.events[o].push(h);return h},d.off=function(r,a,h){if(!a){r.events={};return}typeof a=="function"&&(h=a,a=g.keys(r.events).join(" "));for(var n=a.split(" "),o=0;o<n.length;o++){var f=r.events[n[o]],u=[];if(h&&f)for(var v=0;v<f.length;v++)f[v]!==h&&u.push(f[v]);r.events[n[o]]=u}},d.trigger=function(r,a,h){var n,o,f,u,v=r.events;if(v&&g.keys(v).length>0){h||(h={}),n=a.split(" ");for(var m=0;m<n.length;m++)if(o=n[m],f=v[o],f){u=g.clone(h,!1),u.name=o,u.source=r;for(var p=0;p<f.length;p++)f[p].apply(r,[u])}}}})()},16929:(l,T,e)=>{var d={};l.exports=d;var g=e(84474),r=e(68758);(function(){d.name="matter-js",d.version="0.19.0",d.uses=[],d.used=[],d.use=function(){g.use(d,Array.prototype.slice.call(arguments))},d.before=function(a,h){return a=a.replace(/^Matter./,""),r.chainPathBefore(d,a,h)},d.after=function(a,h){return a=a.replace(/^Matter./,""),r.chainPathAfter(d,a,h)}})()},84474:(l,T,e)=>{var d={};l.exports=d;var g=e(68758);(function(){d._registry={},d.register=function(r){if(d.isPlugin(r)||g.warn("Plugin.register:",d.toString(r),"does not implement all required fields."),r.name in d._registry){var a=d._registry[r.name],h=d.versionParse(r.version).number,n=d.versionParse(a.version).number;h>n?(g.warn("Plugin.register:",d.toString(a),"was upgraded to",d.toString(r)),d._registry[r.name]=r):h<n?g.warn("Plugin.register:",d.toString(a),"can not be downgraded to",d.toString(r)):r!==a&&g.warn("Plugin.register:",d.toString(r),"is already registered to different plugin object")}else d._registry[r.name]=r;return r},d.resolve=function(r){return d._registry[d.dependencyParse(r).name]},d.toString=function(r){return typeof r=="string"?r:(r.name||"anonymous")+"@"+(r.version||r.range||"0.0.0")},d.isPlugin=function(r){return r&&r.name&&r.version&&r.install},d.isUsed=function(r,a){return r.used.indexOf(a)>-1},d.isFor=function(r,a){var h=r.for&&d.dependencyParse(r.for);return!r.for||a.name===h.name&&d.versionSatisfies(a.version,h.range)},d.use=function(r,a){if(r.uses=(r.uses||[]).concat(a||[]),r.uses.length===0){g.warn("Plugin.use:",d.toString(r),"does not specify any dependencies to install.");return}
4557for(var h=d.dependencies(r),n=g.topologicalSort(h),o=[],f=0;f<n.length;f+=1)if(n[f]!==r.name){var u=d.resolve(n[f]);if(!u){o.push("â "+n[f]);continue}d.isUsed(r,u.name)||(d.isFor(u,r)||(g.warn("Plugin.use:",d.toString(u),"is for",u.for,"but installed on",d.toString(r)+"."),u._warned=!0),u.install?u.install(r):(g.warn("Plugin.use:",d.toString(u),"does not specify an install function."),u._warned=!0),u._warned?(o.push("ð¶ "+d.toString(u)),delete u._warned):o.push("â
"+d.toString(u)),r.used.push(u.name))}o.length>0&&!u.silent&&g.info(o.join(" "))},d.dependencies=function(r,a){var h=d.dependencyParse(r),n=h.name;if(a=a||{},!(n in a)){r=d.resolve(r)||r,a[n]=g.map(r.uses||[],function(f){d.isPlugin(f)&&d.register(f);var u=d.dependencyParse(f),v=d.resolve(f);return v&&!d.versionSatisfies(v.version,u.range)?(g.warn("Plugin.dependencies:",d.toString(v),"does not satisfy",d.toString(u),"used by",d.toString(h)+"."),v._warned=!0,r._warned=!0):v||(g.warn("Plugin.dependencies:",d.toString(f),"used by",d.toString(h),"could not be resolved."),r._warned=!0),u.name});for(var o=0;o<a[n].length;o+=1)d.dependencies(a[n][o],a);return a}},d.dependencyParse=function(r){if(g.isString(r)){var a=/^[\w-]+(@(\*|[\^~]?\d+\.\d+\.\d+(-[0-9A-Za-z-+]+)?))?$/;return a.test(r)||g.warn("Plugin.dependencyParse:",r,"is not a valid dependency string."),{name:r.split("@")[0],range:r.split("@")[1]||"*"}}return{name:r.name,range:r.range||r.version}},d.versionParse=function(r){var a=/^(\*)|(\^|~|>=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/;a.test(r)||g.warn("Plugin.versionParse:",r,"is not a valid version or range.");var h=a.exec(r),n=Number(h[4]),o=Number(h[5]),f=Number(h[6]);return{isRange:!!(h[1]||h[2]),version:h[3],range:r,operator:h[1]||h[2]||"",major:n,minor:o,patch:f,parts:[n,o,f],prerelease:h[7],number:n*1e8+o*1e4+f}},d.versionSatisfies=function(r,a){a=a||"*";var h=d.versionParse(a),n=d.versionParse(r);if(h.isRange){if(h.operator==="*"||r==="*")return!0;if(h.operator===">")return n.number>h.number;if(h.operator===">=")return n.number>=h.number;if(h.operator==="~")return n.major===h.major&&n.minor===h.minor&&n.patch>=h.patch;if(h.operator==="^")return h.major>0?n.major===h.major&&n.number>=h.number:h.minor>0?n.minor===h.minor&&n.patch>=h.patch:n.patch===h.patch}return r===a||r==="*"}})()},22806:(l,T,e)=>{var d={};l.exports=d;var g=e(84125),r=e(39073),a=e(68758);(function(){d._motionWakeThreshold=.18,d._motionSleepThreshold=.08,d._minBias=.9,d.update=function(h,n){for(var o=n/a._baseDelta,f=d._motionSleepThreshold,u=0;u<h.length;u++){var v=h[u],m=g.getSpeed(v),p=g.getAngularSpeed(v),x=m*m+p*p;if(v.force.x!==0||v.force.y!==0){d.set(v,!1);continue}var y=Math.min(v.motion,x),P=Math.max(v.motion,x);v.motion=d._minBias*y+(1-d._minBias)*P,v.sleepThreshold>0&&v.motion<f?(v.sleepCounter+=1,v.sleepCounter>=v.sleepThreshold/o&&d.set(v,!0)):v.sleepCounter>0&&(v.sleepCounter-=1)}},d.afterCollisions=function(h){for(var n=d._motionSleepThreshold,o=0;o<h.length;o++){var f=h[o];if(f.isActive){var u=f.collision,v=u.bodyA.parent,m=u.bodyB.parent;if(!(v.isSleeping&&m.isSleeping||v.isStatic||m.isStatic)&&(v.isSleeping||m.isSleeping)){var p=v.isSleeping&&!v.isStatic?v:m,x=p===v?m:v;!p.isStatic&&x.motion>n&&d.set(p,!1)}}}},d.set=function(h,n){var o=h.isSleeping;n?(h.isSleeping=!0,h.sleepCounter=h.sleepThreshold,h.positionImpulse.x=0,h.positionImpulse.y=0,h.positionPrev.x=h.position.x,h.positionPrev.y=h.position.y,h.anglePrev=h.angle,h.speed=0,h.angularSpeed=0,h.motion=0,o||r.trigger(h,"sleepStart")):(h.isSleeping=!1,h.sleepCounter=0,o&&r.trigger(h,"sleepEnd"))}})()},68516:(l,T,e)=>{var d={};l.exports=d;var g=e(39745),r=e(68758),a=e(84125),h=e(84091),n=e(10438);(function(){d.rectangle=function(o,f,u,v,m){m=m||{};var p={label:"Rectangle Body",position:{x:o,y:f},vertices:g.fromPath("L 0 0 L "+u+" 0 L "+u+" "+v+" L 0 "+v)};if(m.chamfer){var x=m.chamfer;p.vertices=g.chamfer(p.vertices,x.radius,x.quality,x.qualityMin,x.qualityMax),delete m.chamfer}return a.create(r.extend({},p,m))},d.trapezoid=function(o,f,u,v,m,p){p=p||{},m*=.5;var x=(1-m*2)*u,y=u*m,P=y+x,b=P+y,E;m<.5?E="L 0 0 L "+y+" "+-v+" L "+P+" "+-v+" L "+b+" 0":E="L 0 0 L "+P+" "+-v+" L "+b+" 0";var M={label:"Trapezoid Body",position:{x:o,y:f},vertices:g.fromPath(E)};if(p.chamfer){var w=p.chamfer;M.vertices=g.chamfer(M.vertices,w.radius,w.quality,w.qualityMin,w.qualityMax),delete p.chamfer}return a.create(r.extend({},M,p))},d.circle=function(o,f,u,v,m){v=v||{};var p={label:"Circle Body",circleRadius:u};m=m||25;var x=Math.ceil(Math.max(10,Math.min(m,u)));return x%2===1&&(x+=1),d.polygon(o,f,x,u,r.extend({},p,v))},d.polygon=function(o,f,u,v,m){if(m=m||{},u<3)return d.circle(o,f,v,m);for(var p=2*Math.PI/u,x="",y=p*.5,P=0;P<u;P+=1){var b=y+P*p,E=Math.cos(b)*v,M=Math.sin(b)*v;x+="L "+E.toFixed(3)+" "+M.toFixed(3)+" "}var w={label:"Polygon Body",position:{x:o,y:f},vertices:g.fromPath(x)};if(m.chamfer){var A=m.chamfer;w.vertices=g.chamfer(w.vertices,A.radius,A.quality,A.qualityMin,A.qualityMax),delete m.chamfer}return a.create(r.extend({},w,m))},d.fromVertices=function(o,f,u,v,m,p,x,y){var P=r.getDecomp(),b,E,M,w,A,R,L,O,I,D,B;for(b=!!(P&&P.quickDecomp),v=v||{},M=[],m=typeof m<"u"?m:!1,p=typeof p<"u"?p:.01,x=typeof x<"u"?x:10,y=typeof y<"u"?y:.01,r.isArray(u[0])||(u=[u]),D=0;D<u.length;D+=1)if(R=u[D],w=g.isConvex(R),A=!w,A&&!b&&r.warnOnce("Bodies.fromVertices: Install the 'poly-decomp' library and use Common.setDecomp or provide 'decomp' as a global to decompose concave vertices."),w||!b)w?R=g.clockwiseSort(R):R=g.hull(R),M.push({position:{x:o,y:f},vertices:R});else{var z=R.map(function($){return[$.x,$.y]});P.makeCCW(z),p!==!1&&P.removeCollinearPoints(z,p),y!==!1&&P.removeDuplicatePoints&&P.removeDuplicatePoints(z,y);var X=P.quickDecomp(z);for(L=0;L<X.length;L++){var W=X[L],j=W.map(function($){return{x:$[0],y:$[1]}});x>0&&g.area(j)<x||M.push({position:g.centre(j),vertices:j})}}for(L=0;L<M.length;L++)M[L]=a.create(r.extend(M[L],v));if(m){var N=5;for(L=0;L<M.length;L++){var Y=M[L];for(O=L+1;O<M.length;O++){var F=M[O];if(h.overlaps(Y.bounds,F.bounds)){var G=Y.vertices,k=F.vertices;for(I=0;I<Y.vertices.length;I++)for(B=0;B<F.vertices.length;B++){var V=n.magnitudeSquared(n.sub(G[(I+1)%G.length],k[B])),U=n.magnitudeSquared(n.sub(G[I],k[(B+1)%k.length]));V<N&&U<N&&(G[I].isInternal=!0,k[B].isInternal=!0)}}}}}return M.length>1?(E=a.create(r.extend({parts:M.slice(0)},v)),a.setPosition(E,{x:o,y:f}),E):M[0]},d.flagCoincidentParts=function(o,f){f===void 0&&(f=5);for(var u=0;u<o.length;u++)for(var v=o[u],m=u+1;m<o.length;m++){var p=o[m];if(h.overlaps(v.bounds,p.bounds))for(var x=v.vertices,y=p.vertices,P=0;P<v.vertices.length;P++)for(var b=0;b<p.vertices.length;b++){var E=n.magnitudeSquared(n.sub(x[(P+1)%x.length],y[b])),M=n.magnitudeSquared(n.sub(x[P],y[(b+1)%y.length]));E<f&&M<f&&(x[P].isInternal=!0,y[b].isInternal=!0)}}return o}})()},56643:(l,T,e)=>{var d={};l.exports=d;var g=e(11299),r=e(52838),a=e(68758),h=e(84125),n=e(68516);(function(){d.stack=function(o,f,u,v,m,p,x){for(var y=g.create({label:"Stack"}),P=o,b=f,E,M=0,w=0;w<v;w++){for(var A=0,R=0;R<u;R++){var L=x(P,b,R,w,E,M);if(L){var O=L.bounds.max.y-L.bounds.min.y,I=L.bounds.max.x-L.bounds.min.x;O>A&&(A=O),h.translate(L,{x:I*.5,y:O*.5}),P=L.bounds.max.x+m,g.addBody(y,L),E=L,M+=1}else P+=m}b+=A+p,P=o}return y},d.chain=function(o,f,u,v,m,p){for(var x=o.bodies,y=1;y<x.length;y++){var P=x[y-1],b=x[y],E=P.bounds.max.y-P.bounds.min.y,M=P.bounds.max.x-P.bounds.min.x,w=b.bounds.max.y-b.bounds.min.y,A=b.boun
4557ds.max.x-b.bounds.min.x,R={bodyA:P,pointA:{x:M*f,y:E*u},bodyB:b,pointB:{x:A*v,y:w*m}},L=a.extend(R,p);g.addConstraint(o,r.create(L))}return o.label+=" Chain",o},d.mesh=function(o,f,u,v,m){var p=o.bodies,x,y,P,b,E;for(x=0;x<u;x++){for(y=1;y<f;y++)P=p[y-1+x*f],b=p[y+x*f],g.addConstraint(o,r.create(a.extend({bodyA:P,bodyB:b},m)));if(x>0)for(y=0;y<f;y++)P=p[y+(x-1)*f],b=p[y+x*f],g.addConstraint(o,r.create(a.extend({bodyA:P,bodyB:b},m))),v&&y>0&&(E=p[y-1+(x-1)*f],g.addConstraint(o,r.create(a.extend({bodyA:E,bodyB:b},m)))),v&&y<f-1&&(E=p[y+1+(x-1)*f],g.addConstraint(o,r.create(a.extend({bodyA:E,bodyB:b},m))))}return o.label+=" Mesh",o},d.pyramid=function(o,f,u,v,m,p,x){return d.stack(o,f,u,v,m,p,function(y,P,b,E,M,w){var A=Math.min(v,Math.ceil(u/2)),R=M?M.bounds.max.x-M.bounds.min.x:0;if(!(E>A)){E=A-E;var L=E,O=u-1-E;if(!(b<L||b>O)){w===1&&h.translate(M,{x:(b+(u%2===1?1:-1))*R,y:0});var I=M?b*R:0;return x(o+I+b*m,P,b,E,M,w)}}})},d.newtonsCradle=function(o,f,u,v,m){for(var p=g.create({label:"Newtons Cradle"}),x=0;x<u;x++){var y=1.9,P=n.circle(o+x*(v*y),f+m,v,{inertia:1/0,restitution:1,friction:0,frictionAir:1e-4,slop:1}),b=r.create({pointA:{x:o+x*(v*y),y:f},bodyB:P});g.addBody(p,P),g.addConstraint(p,b)}return p},d.car=function(o,f,u,v,m){var p=h.nextGroup(!0),x=20,y=-u*.5+x,P=u*.5-x,b=0,E=g.create({label:"Car"}),M=n.rectangle(o,f,u,v,{collisionFilter:{group:p},chamfer:{radius:v*.5},density:2e-4}),w=n.circle(o+y,f+b,m,{collisionFilter:{group:p},friction:.8}),A=n.circle(o+P,f+b,m,{collisionFilter:{group:p},friction:.8}),R=r.create({bodyB:M,pointB:{x:y,y:b},bodyA:w,stiffness:1,length:0}),L=r.create({bodyB:M,pointB:{x:P,y:b},bodyA:A,stiffness:1,length:0});return g.addBody(E,M),g.addBody(E,w),g.addBody(E,A),g.addConstraint(E,R),g.addConstraint(E,L),E},d.softBody=function(o,f,u,v,m,p,x,y,P,b){P=a.extend({inertia:1/0},P),b=a.extend({stiffness:.2,render:{type:"line",anchors:!1}},b);var E=d.stack(o,f,u,v,m,p,function(M,w){return n.circle(M,w,y,P)});return d.mesh(E,u,v,x,b),E.label="Soft Body",E}})()},50658:(l,T,e)=>{var d={};l.exports=d;var g=e(10438),r=e(68758);(function(){d.fromVertices=function(a){for(var h={},n=0;n<a.length;n++){var o=(n+1)%a.length,f=g.normalise({x:a[o].y-a[n].y,y:a[n].x-a[o].x}),u=f.y===0?1/0:f.x/f.y;u=u.toFixed(3).toString(),h[u]=f}return r.values(h)},d.rotate=function(a,h){if(h!==0)for(var n=Math.cos(h),o=Math.sin(h),f=0;f<a.length;f++){var u=a[f],v;v=u.x*n-u.y*o,u.y=u.x*o+u.y*n,u.x=v}}})()},84091:l=>{var T={};l.exports=T,function(){T.create=function(e){var d={min:{x:0,y:0},max:{x:0,y:0}};return e&&T.update(d,e),d},T.update=function(e,d,g){e.min.x=1/0,e.max.x=-1/0,e.min.y=1/0,e.max.y=-1/0;for(var r=0;r<d.length;r++){var a=d[r];a.x>e.max.x&&(e.max.x=a.x),a.x<e.min.x&&(e.min.x=a.x),a.y>e.max.y&&(e.max.y=a.y),a.y<e.min.y&&(e.min.y=a.y)}g&&(g.x>0?e.max.x+=g.x:e.min.x+=g.x,g.y>0?e.max.y+=g.y:e.min.y+=g.y)},T.contains=function(e,d){return d.x>=e.min.x&&d.x<=e.max.x&&d.y>=e.min.y&&d.y<=e.max.y},T.overlaps=function(e,d){return e.min.x<=d.max.x&&e.max.x>=d.min.x&&e.max.y>=d.min.y&&e.min.y<=d.max.y},T.translate=function(e,d){e.min.x+=d.x,e.max.x+=d.x,e.min.y+=d.y,e.max.y+=d.y},T.shift=function(e,d){var g=e.max.x-e.min.x,r=e.max.y-e.min.y;e.min.x=d.x,e.max.x=d.x+g,e.min.y=d.y,e.max.y=d.y+r}}()},92765:(l,T,e)=>{var d={};l.exports=d,e(84091);var g=e(68758);(function(){d.pathToVertices=function(r,a){typeof window<"u"&&!("SVGPathSeg"in window)&&g.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var h,n,o,f,u,v,m,p,x,y,P=[],b,E,M=0,w=0,A=0;a=a||15;var R=function(O,I,D){var B=D%2===1&&D>1;if(!x||O!=x.x||I!=x.y){x&&B?(b=x.x,E=x.y):(b=0,E=0);var z={x:b+O,y:E+I};(B||!x)&&(x=z),P.push(z),w=b+O,A=E+I}},L=function(O){var I=O.pathSegTypeAsLetter.toUpperCase();if(I!=="Z"){switch(I){case"M":case"L":case"T":case"C":case"S":case"Q":w=O.x,A=O.y;break;case"H":w=O.x;break;case"V":A=O.y;break}R(w,A,O.pathSegType)}};for(d._svgPathToAbsolute(r),o=r.getTotalLength(),v=[],h=0;h<r.pathSegList.numberOfItems;h+=1)v.push(r.pathSegList.getItem(h));for(m=v.concat();M<o;){if(y=r.getPathSegAtLength(M),u=v[y],u!=p){for(;m.length&&m[0]!=u;)L(m.shift());p=u}switch(u.pathSegTypeAsLetter.toUpperCase()){case"C":case"T":case"S":case"Q":case"A":f=r.getPointAtLength(M),R(f.x,f.y,0);break}M+=a}for(h=0,n=m.length;h<n;++h)L(m[h]);return P},d._svgPathToAbsolute=function(r){for(var a,h,n,o,f,u,v=r.pathSegList,m=0,p=0,x=v.numberOfItems,y=0;y<x;++y){var P=v.getItem(y),b=P.pathSegTypeAsLetter;if(/[MLHVCSQTA]/.test(b))"x"in P&&(m=P.x),"y"in P&&(p=P.y);else switch("x1"in P&&(n=m+P.x1),"x2"in P&&(f=m+P.x2),"y1"in P&&(o=p+P.y1),"y2"in P&&(u=p+P.y2),"x"in P&&(m+=P.x),"y"in P&&(p+=P.y),b){case"m":v.replaceItem(r.createSVGPathSegMovetoAbs(m,p),y);break;case"l":v.replaceItem(r.createSVGPathSegLinetoAbs(m,p),y);break;case"h":v.replaceItem(r.createSVGPathSegLinetoHorizontalAbs(m),y);break;case"v":v.replaceItem(r.createSVGPathSegLinetoVerticalAbs(p),y);break;case"c":v.replaceItem(r.createSVGPathSegCurvetoCubicAbs(m,p,n,o,f,u),y);break;case"s":v.replaceItem(r.createSVGPathSegCurvetoCubicSmoothAbs(m,p,f,u),y);break;case"q":v.replaceItem(r.createSVGPathSegCurvetoQuadraticAbs(m,p,n,o),y);break;case"t":v.replaceItem(r.createSVGPathSegCurvetoQuadraticSmoothAbs(m,p),y);break;case"a":v.replaceItem(r.createSVGPathSegArcAbs(m,p,P.r1,P.r2,P.angle,P.largeArcFlag,P.sweepFlag),y);break;case"z":case"Z":m=a,p=h;break}(b=="M"||b=="m")&&(a=m,h=p)}}})()},10438:l=>{var T={};l.exports=T,function(){T.create=function(e,d){return{x:e||0,y:d||0}},T.clone=function(e){return{x:e.x,y:e.y}},T.magnitude=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},T.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y},T.rotate=function(e,d,g){var r=Math.cos(d),a=Math.sin(d);g||(g={});var h=e.x*r-e.y*a;return g.y=e.x*a+e.y*r,g.x=h,g},T.rotateAbout=function(e,d,g,r){var a=Math.cos(d),h=Math.sin(d);r||(r={});var n=g.x+((e.x-g.x)*a-(e.y-g.y)*h);return r.y=g.y+((e.x-g.x)*h+(e.y-g.y)*a),r.x=n,r},T.normalise=function(e){var d=T.magnitude(e);return d===0?{x:0,y:0}:{x:e.x/d,y:e.y/d}},T.dot=function(e,d){return e.x*d.x+e.y*d.y},T.cross=function(e,d){return e.x*d.y-e.y*d.x},T.cross3=function(e,d,g){return(d.x-e.x)*(g.y-e.y)-(d.y-e.y)*(g.x-e.x)},T.add=function(e,d,g){return g||(g={}),g.x=e.x+d.x,g.y=e.y+d.y,g},T.sub=function(e,d,g){return g||(g={}),g.x=e.x-d.x,g.y=e.y-d.y,g},T.mult=function(e,d){return{x:e.x*d,y:e.y*d}},T.div=function(e,d){return{x:e.x/d,y:e.y/d}},T.perp=function(e,d){return d=d===!0?-1:1,{x:d*-e.y,y:d*e.x}},T.neg=function(e){return{x:-e.x,y:-e.y}},T.angle=function(e,d){return Math.atan2(d.y-e.y,d.x-e.x)},T._temp=[T.create(),T.create(),T.create(),T.create(),T.create(),T.create()]}()},39745:(l,T,e)=>{var d={};l.exports=d;var g=e(10438),r=e(68758);(function(){d.create=function(a,h){for(var n=[],o=0;o<a.length;o++){var f=a[o],u={x:f.x,y:f.y,index:o,body:h,isInternal:!1};n.push(u)}return n},d.fromPath=function(a,h){var n=/L?\s*([-\d.e]+)[\s,]*([-\d.e]+)*/ig,o=[];return a.replace(n,function(f,u,v){o.push({x:parseFloat(u),y:parseFloat(v)})}),d.create(o,h)},d.centre=function(a){for(var h=d.area(a,!0),n={x:0,y:0},o,f,u,v=0;v<a.length;v++)u=(v+1)%a.length,o=g.cross(a[v],a[u]),f=g.mult(g.add(a[v],a[u]),o),n=g.add(n,f);return g.div(n,6*h)},d.mean=function(a){for(var h={x:0,y:0},n=0;n<a.length;n++)h.x+=a[n].x,h.y+=a[n].y;return g.div(h,a.length)},d.area=function(a,h){for(var n=0,o=a.length-1,f=0;f<a.length;f++)n+=(a[o].x-a[f].x)*(a[o].y+a[f].y),o=f;return h?n/2:Math.abs(n)/2},d.inertia=function(a,h){for(var n=0,o=0,f=a,u,v,m=0;m<f.length;m++)v=(m+1)%f.length,u=Math.abs(g.cross(f[v],f[m])),n+=u*(g.dot(f[v],f[v])+g.dot(f[v],f[m])+g.dot(f[m],f[m])),o+=u;return h/6*(n/o)},d.translate=function(a,h,n){n=typeof n<"u"?n:1;var o=a.length,f=h.x*n,u=h.y*n,v;for(v=0;v<o;v++)a[v].x+=f,a[v].y+=u;return a},d.rotate=function(a,h,n){if(h!==0){var o=Math.cos(h),f=Math.sin(h),u=n.x,v=n.y,m=a.length,p,x,y,P;for(P=0;P<m;P++)p=a[P],x=p.x-u,y=p.y-v,p.x=u+(x*o-y*f),p.y=v+(x*f+y*o);return a}},d.contains=function(a,h){for(var n=h.x,o=h.y,f=a.length,u=a[f-1],v,m=0;m<f;m++){if(v=a[m],(n-u.x)*(v.y-u.y)+(o-u.y)*(u.x-v.x)>0)return!1;u=v}return!0},d.scale=function(a,h,n,o){if(h===1&&n===1)return a;o=o||d.centre(a);for(var f,u,v=0;v<a.length;v++)f=a[v],u=g.sub(f,o),a[v].x=o.x+u.x*h,a[v].y=o.y+u.y*n;return a},d.chamfer=function(a,h,n,o,f){typeof h=="number"?h=[h]:h=h||[8],n=typeof n<"u"?n:-1,o=o||2,f=f||14;for(var u=[],v=0;v<a.length;v++){var m=a[v-1>=0?v-1:a.length-1],p=a[v],x=a[(v+1)%a.length],y=h[v<h.length?v:h.length-1];if(y===0){u.push(p);continue}var P=g.normalise({x:p.y-m.y,y:m.x-p.x}),b=g.normalise({x:x.y-p.y,y:p.x-x.x}),E=Math.sqrt(2*Math.pow(y,2)),M=g.mult(r.clone(P),y),w=g.normalise(g.mult(g.add(P,b),.5)),A=g.sub(p,g.mult(w,E)),R=n;n===-1&&(R=Math.pow(y,.32)*1.75),R=r.clamp(R,o,f),R%2===1&&(R+=1);for(var L=Math.acos(g.dot(P,b)),O=L/R,I=0;I<R;I++)u.push(g.add(g.rotate(M,O*I),A))}return u},d.clockwiseSort=function(a){var h=d.mean(a);return a.sort(function(n,o){return g.angle(h,n)-g.angle(h,o)}),a},d.isConvex=function(a){var h=0,n=a.length,o,f,u,v;if(n<3)return null;for(o=0;o<n;o++)if(f=(o+1)%n,u=(o+2)%n,v=(a[f].x-a[o].x)*(a[u].y-a[f].y),v-=(a[f].y-a[o].y)*(a[u].x-a[f].x),v<0?h|=1:v>0&&(h|=2),h===3)return!1;return h!==0?!0:null},d.hull=function(a){var h=[],n=[],o,f;for(a=a.slice(0),a.sort(function(u,v){var m=u.x-v.x;return m!==0?m:u.y-v.y}),f=0;f<a.length;f+=1){for(o=a[f];n.length>=2&&g.cross3(n[n.length-2],n[n.length-1],o)<=0;)n.pop();n.push(o)}for(f=a.length-1;f>=0;f-=1){for(o=a[f];h.length>=2&&g.cross3(h[h.length-2],h[h.length-1],o)<=0;)h.pop();h.push(o)}return h.pop(),n.pop(),h.concat(n)}})()},1675:(l,T,e)=>{var d=e(18171),g={name:"matter-attractors",version:"0.1.7",for:"matter-js@^0.19.0",silent:!0,install:function(r){r.after("Body.create",function(){g.Body.init(this)}),r.before("Engine.update",function(a){g.Engine.update(a)})},Body:{init:function(r){r.plugin.attractors=r.plugin.attractors||[]}},Engine:{update:function(r){for(var a=d.Composite.allBodies(r.world),h=0;h<a.length;h++){var n=a[h],o=n.plugin.attractors;if(o&&o.length>0)for(var f=0;f<a.length;f++){var u=a[f];if(h!==f)for(var v=0;v<o.length;v++){var m=o[v],p=m;d.Common.isFunction(m)&&(p=m(n,u)),p&&d.Body.applyForce(u,u.position,p)}}}}},Attractors:{gravityConstant:.001,gravity:function(r,a){var h=d.Vector.sub(a.position,r.position),n=d.Vector.magnitudeSquared(h)||1e-4,o=d.Vector.normalise(h),f=-g.Attractors.gravityConstant*(r.mass*a.mass/n),u=d.Vector.mult(o,f);d.Body.applyForce(r,r.position,d.Vector.neg(u)),d.Body.applyForce(a,a.position,u)}}};l.exports=g},80391:l=>{/** 4558 * @author @dxu https://github.com/dxu/matter-collision-events 4559 * @author Richard Davey <[email protected]> 4560 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4561 */var T={name:"matter-collision-events",version:"0.1.6",for:"matter-js@^0.19.0",silent:!0,install:function(e){e.after("Engine.create",function(){e.Events.on(this,"collisionStart",function(d){d.pairs.map(function(g){var r=g.bodyA,a=g.bodyB;r.gameObject&&r.gameObject.emit("collide",r,a,g),a.gameObject&&a.gameObject.emit("collide",a,r,g),e.Events.trigger(r,"onCollide",{pair:g}),e.Events.trigger(a,"onCollide",{pair:g}),r.onCollideCallback&&r.onCollideCallback(g),a.onCollideCallback&&a.onCollideCallback(g),r.onCollideWith[a.id]&&r.onCollideWith[a.id](a,g),a.onCollideWith[r.id]&&a.onCollideWith[r.id](r,g)})}),e.Events.on(this,"collisionActive",function(d){d.pairs.map(function(g){var r=g.bodyA,a=g.bodyB;r.gameObject&&r.gameObject.emit("collideActive",r,a,g),a.gameObject&&a.gameObject.emit("collideActive",a,r,g),e.Events.trigger(r,"onCollideActive",{pair:g}),e.Events.trigger(a,"onCollideActive",{pair:g}),r.onCollideActiveCallback&&r.onCollideActiveCallback(g),a.onCollideActiveCallback&&a.onCollideActiveCallback(g)})}),e.Events.on(this,"collisionEnd",function(d){d.pairs.map(function(g){var r=g.bodyA,a=g.bodyB;r.gameObject&&r.gameObject.emit("collideEnd",r,a,g),a.gameObject&&a.gameObject.emit("collideEnd",a,r,g),e.Events.trigger(r,"onCollideEnd",{pair:g}),e.Events.trigger(a,"onCollideEnd",{pair:g}),r.onCollideEndCallback&&r.onCollideEndCallback(g),a.onCollideEndCallback&&a.onCollideEndCallback(g)})})})}};l.exports=T},44097:(l,T,e)=>
4561{var d=e(18171),g={name:"matter-wrap",version:"0.1.4",for:"matter-js@^0.19.0",silent:!0,install:function(r){r.after("Engine.update",function(){g.Engine.update(this)})},Engine:{update:function(r){for(var a=r.world,h=d.Composite.allBodies(a),n=d.Composite.allComposites(a),o=0;o<h.length;o+=1){var f=h[o];f.plugin.wrap&&g.Body.wrap(f,f.plugin.wrap)}for(o=0;o<n.length;o+=1){var u=n[o];u.plugin.wrap&&g.Composite.wrap(u,u.plugin.wrap)}}},Bounds:{wrap:function(r,a){var h=null,n=null;if(typeof a.min.x<"u"&&typeof a.max.x<"u"&&(r.min.x>a.max.x?h=a.min.x-r.max.x:r.max.x<a.min.x&&(h=a.max.x-r.min.x)),typeof a.min.y<"u"&&typeof a.max.y<"u"&&(r.min.y>a.max.y?n=a.min.y-r.max.y:r.max.y<a.min.y&&(n=a.max.y-r.min.y)),h!==null||n!==null)return{x:h||0,y:n||0}}},Body:{wrap:function(r,a){var h=g.Bounds.wrap(r.bounds,a);return h&&d.Body.translate(r,h),h}},Composite:{bounds:function(r){for(var a=d.Composite.allBodies(r),h=[],n=0;n<a.length;n+=1){var o=a[n];h.push(o.bounds.min,o.bounds.max)}return d.Bounds.create(h)},wrap:function(r,a){var h=g.Bounds.wrap(g.Composite.bounds(r),a);return h&&d.Composite.translate(r,h),h}}};l.exports=g},81084:l=>{/** 4562 * @author Stefan Hedman <[email protected]> (http://steffe.se) 4563 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4564 */l.exports={decomp:L,quickDecomp:B,isSimple:I,removeCollinearPoints:z,removeDuplicatePoints:X,makeCCW:x};function T(N,Y,F){F=F||0;var G=[0,0],k,V,U,$,K,J,_;return k=N[1][1]-N[0][1],V=N[0][0]-N[1][0],U=k*N[0][0]+V*N[0][1],$=Y[1][1]-Y[0][1],K=Y[0][0]-Y[1][0],J=$*Y[0][0]+K*Y[0][1],_=k*K-$*V,W(_,0,F)||(G[0]=(K*U-V*J)/_,G[1]=(k*J-$*U)/_),G}function e(N,Y,F,G){var k=Y[0]-N[0],V=Y[1]-N[1],U=G[0]-F[0],$=G[1]-F[1];if(U*V-$*k===0)return!1;var K=(k*(F[1]-N[1])+V*(N[0]-F[0]))/(U*V-$*k),J=(U*(N[1]-F[1])+$*(F[0]-N[0]))/($*k-U*V);return K>=0&&K<=1&&J>=0&&J<=1}function d(N,Y,F){return(Y[0]-N[0])*(F[1]-N[1])-(F[0]-N[0])*(Y[1]-N[1])}function g(N,Y,F){return d(N,Y,F)>0}function r(N,Y,F){return d(N,Y,F)>=0}function a(N,Y,F){return d(N,Y,F)<0}function h(N,Y,F){return d(N,Y,F)<=0}var n=[],o=[];function f(N,Y,F,G){if(G){var k=n,V=o;k[0]=Y[0]-N[0],k[1]=Y[1]-N[1],V[0]=F[0]-Y[0],V[1]=F[1]-Y[1];var U=k[0]*V[0]+k[1]*V[1],$=Math.sqrt(k[0]*k[0]+k[1]*k[1]),K=Math.sqrt(V[0]*V[0]+V[1]*V[1]),J=Math.acos(U/($*K));return J<G}else return d(N,Y,F)===0}function u(N,Y){var F=Y[0]-N[0],G=Y[1]-N[1];return F*F+G*G}function v(N,Y){var F=N.length;return N[Y<0?Y%F+F:Y%F]}function m(N){N.length=0}function p(N,Y,F,G){for(var k=F;k<G;k++)N.push(Y[k])}function x(N){for(var Y=0,F=N,G=1;G<N.length;++G)(F[G][1]<F[Y][1]||F[G][1]===F[Y][1]&&F[G][0]>F[Y][0])&&(Y=G);return g(v(N,Y-1),v(N,Y),v(N,Y+1))?!1:(y(N),!0)}function y(N){for(var Y=[],F=N.length,G=0;G!==F;G++)Y.push(N.pop());for(var G=0;G!==F;G++)N[G]=Y[G]}function P(N,Y){return a(v(N,Y-1),v(N,Y),v(N,Y+1))}var b=[],E=[];function M(N,Y,F){var G,k,V=b,U=E;if(r(v(N,Y+1),v(N,Y),v(N,F))&&h(v(N,Y-1),v(N,Y),v(N,F)))return!1;k=u(v(N,Y),v(N,F));for(var $=0;$!==N.length;++$)if(!(($+1)%N.length===Y||$===Y)&&r(v(N,Y),v(N,F),v(N,$+1))&&h(v(N,Y),v(N,F),v(N,$))&&(V[0]=v(N,Y),V[1]=v(N,F),U[0]=v(N,$),U[1]=v(N,$+1),G=T(V,U),u(v(N,Y),G)<k))return!1;return!0}function w(N,Y,F){for(var G=0;G!==N.length;++G)if(!(G===Y||G===F||(G+1)%N.length===Y||(G+1)%N.length===F)&&e(v(N,Y),v(N,F),v(N,G),v(N,G+1)))return!1;return!0}function A(N,Y,F,G){var k=G||[];if(m(k),Y<F)for(var V=Y;V<=F;V++)k.push(N[V]);else{for(var V=0;V<=F;V++)k.push(N[V]);for(var V=Y;V<N.length;V++)k.push(N[V])}return k}function R(N){for(var Y=[],F=[],G=[],k=[],V=Number.MAX_VALUE,U=0;U<N.length;++U)if(P(N,U)){for(var $=0;$<N.length;++$)if(M(N,U,$)){F=R(A(N,U,$,k)),G=R(A(N,$,U,k));for(var K=0;K<G.length;K++)F.push(G[K]);F.length<V&&(Y=F,V=F.length,Y.push([v(N,U),v(N,$)]))}}return Y}function L(N){var Y=R(N);return Y.length>0?O(N,Y):[N]}function O(N,Y){if(Y.length===0)return[N];if(Y instanceof Array&&Y.length&&Y[0]instanceof Array&&Y[0].length===2&&Y[0][0]instanceof Array){for(var F=[N],G=0;G<Y.length;G++)for(var k=Y[G],V=0;V<F.length;V++){var U=F[V],$=O(U,k);if($){F.splice(V,1),F.push($[0],$[1]);break}}return F}else{var k=Y,G=N.indexOf(k[0]),V=N.indexOf(k[1]);return G!==-1&&V!==-1?[A(N,G,V),A(N,V,G)]:!1}}function I(N){var Y=N,F;for(F=0;F<Y.length-1;F++)for(var G=0;G<F-1;G++)if(e(Y[F],Y[F+1],Y[G],Y[G+1]))return!1;for(F=1;F<Y.length-2;F++)if(e(Y[0],Y[Y.length-1],Y[F],Y[F+1]))return!1;return!0}function D(N,Y,F,G,k){k=k||0;var V=Y[1]-N[1],U=N[0]-Y[0],$=V*N[0]+U*N[1],K=G[1]-F[1],J=F[0]-G[0],_=K*F[0]+J*F[1],tt=V*J-K*U;return W(tt,0,k)?[0,0]:[(J*$-U*_)/tt,(V*_-K*$)/tt]}function B(N,Y,F,G,k,V,U){V=V||100,U=U||0,k=k||25,Y=typeof Y<"u"?Y:[],F=F||[],G=G||[];var $=[0,0],K=[0,0],J=[0,0],_=0,tt=0,st=0,ht=0,lt=0,nt=0,gt=0,bt=[],Pt=[],dt=N,St=N;if(St.length<3)return Y;if(U++,U>V)return console.warn("quickDecomp: max level ("+V+") reached."),Y;for(var Tt=0;Tt<N.length;++Tt)if(P(dt,Tt)){F.push(dt[Tt]),_=tt=Number.MAX_VALUE;for(var Vt=0;Vt<N.length;++Vt)g(v(dt,Tt-1),v(dt,Tt),v(dt,Vt))&&h(v(dt,Tt-1),v(dt,Tt),v(dt,Vt-1))&&(J=D(v(dt,Tt-1),v(dt,Tt),v(dt,Vt),v(dt,Vt-1)),a(v(dt,Tt+1),v(dt,Tt),J)&&(st=u(dt[Tt],J),st<tt&&(tt=st,K=J,nt=Vt))),g(v(dt,Tt+1),v(dt,Tt),v(dt,Vt+1))&&h(v(dt,Tt+1),v(dt,Tt),v(dt,Vt))&&(J=D(v(dt,Tt+1),v(dt,Tt),v(dt,Vt),v(dt,Vt+1)),g(v(dt,Tt-1),v(dt,Tt),J)&&(st=u(dt[Tt],J),st<_&&(_=st,$=J,lt=Vt)));if(nt===(lt+1)%N.length)J[0]=(K[0]+$[0])/2,J[1]=(K[1]+$[1])/2,G.push(J),Tt<lt?(p(bt,dt,Tt,lt+1),bt.push(J),Pt.push(J),nt
4564!==0&&p(Pt,dt,nt,dt.length),p(Pt,dt,0,Tt+1)):(Tt!==0&&p(bt,dt,Tt,dt.length),p(bt,dt,0,lt+1),bt.push(J),Pt.push(J),p(Pt,dt,nt,Tt+1));else{if(nt>lt&&(lt+=N.length),ht=Number.MAX_VALUE,lt<nt)return Y;for(var Vt=nt;Vt<=lt;++Vt)r(v(dt,Tt-1),v(dt,Tt),v(dt,Vt))&&h(v(dt,Tt+1),v(dt,Tt),v(dt,Vt))&&(st=u(v(dt,Tt),v(dt,Vt)),st<ht&&w(dt,Tt,Vt)&&(ht=st,gt=Vt%N.length));Tt<gt?(p(bt,dt,Tt,gt+1),gt!==0&&p(Pt,dt,gt,St.length),p(Pt,dt,0,Tt+1)):(Tt!==0&&p(bt,dt,Tt,St.length),p(bt,dt,0,gt+1),p(Pt,dt,gt,Tt+1))}return bt.length<Pt.length?(B(bt,Y,F,G,k,V,U),B(Pt,Y,F,G,k,V,U)):(B(Pt,Y,F,G,k,V,U),B(bt,Y,F,G,k,V,U)),Y}return Y.push(N),Y}function z(N,Y){for(var F=0,G=N.length-1;N.length>3&&G>=0;--G)f(v(N,G-1),v(N,G),v(N,G+1),Y)&&(N.splice(G%N.length,1),F++);return F}function X(N,Y){for(var F=N.length-1;F>=1;--F)for(var G=N[F],k=F-1;k>=0;--k)if(j(G,N[k],Y)){N.splice(F,1);continue}}function W(N,Y,F){return F=F||0,Math.abs(N-Y)<=F}function j(N,Y,F){return W(N[0],Y[0],F)&&W(N[1],Y[1],F)}},88257:(l,T,e)=>{/** 4565* @author Richard Davey <[email protected]> 4566* @copyright 2013-2023 Photon Storm Ltd. 4567* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} 4568*/var d=e(56694),g=new d({initialize:function(a){this.pluginManager=a,this.game=a.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});l.exports=g},18360:l=>{/** 4569 * @author Richard Davey <[email protected]> 4570 * @copyright 2013-2023 Photon Storm Ltd. 4571 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4572 */var T={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"]};l.exports=T},91963:l=>{/** 4573 * @author Richard Davey <[email protected]> 4574 * @copyright 2013-2023 Photon Storm Ltd. 4575 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4576 */var T={},e={},d={};d.register=function(g,r,a,h){h===void 0&&(h=!1),T[g]={plugin:r,mapping:a,custom:h}},d.registerCustom=function(g,r,a,h){e[g]={plugin:r,mapping:a,data:h}},d.hasCore=function(g){return T.hasOwnProperty(g)},d.hasCustom=function(g){return e.hasOwnProperty(g)},d.getCore=function(g){return T[g]},d.getCustom=function(g){return e[g]},d.getCustomClass=function(g){return e.hasOwnProperty(g)?e[g].plugin:null},d.remove=function(g){T.hasOwnProperty(g)&&delete T[g]},d.removeCustom=function(g){e.hasOwnProperty(g)&&delete e[g]},d.destroyCorePlugins=function(){for(var g in T)T.hasOwnProperty(g)&&delete T[g]},d.destroyCustomPlugins=function(){for(var g in e)e.hasOwnProperty(g)&&delete e[g]},l.exports=d},49274:(l,T,e)=>{/** 4577 * @author Richard Davey <[email protected]> 4578 * @copyright 2013-2023 Photon Storm Ltd. 4579 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4580 */var d=e(56694),g=e(97081),r=e(6659),a=e(76846),h=e(99325),n=e(61286),o=e(72632),f=e(91963),u=e(66458),v=new d({Extends:r,initialize:function(p){r.call(this),this.game=p,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],p.isBooted?this.boot():p.events.once(g.BOOT,this.boot,this)},boot:function(){var m,p,x,y,P,b,E,M=this.game.config,w=M.installGlobalPlugins;for(w=w.concat(this._pendingGlobal),m=0;m<w.length;m++)p=w[m],x=o(p,"key",null),y=o(p,"plugin",null),P=o(p,"start",!1),b=o(p,"mapping",null),E=o(p,"data",null),x&&(y?this.install(x,y,P,b,E):console.warn("Missing `plugin` for key: "+x));for(w=M.installScenePlugins,w=w.concat(this._pendingScene),m=0;m<w.length;m++)p=w[m],x=o(p,"key",null),y=o(p,"plugin",null),b=o(p,"mapping",null),x&&(y?this.installScenePlugin(x,y,b):console.warn("Missing `plugin` for key: "+x));this._pendingGlobal=[],this._pendingScene=[],this.game.events.once(g.DESTROY,this.destroy,this)},addToScene:function(m,p,x){var y,P,b,E=this.game,M=m.scene,w=m.settings.map,A=m.settings.isBooted;for(y=0;y<p.length;y++)P=p[y],E[P]?(m[P]=E[P],w.hasOwnProperty(P)&&(M[w[P]]=m[P])):P==="game"&&w.hasOwnProperty(P)&&(M[w[P]]=E);for(var R=0;R<x.length;R++)for(b=x[R],y=0;y<b.length;y++)if(P=b[y],!!f.hasCore(P)){var L=f.getCore(P),O=L.mapping,I=new L.plugin(M,this,O);m[O]=I,L.custom?M[O]=I:w.hasOwnProperty(O)&&(M[w[O]]=I),A&&I.boot()}for(b=this.plugins,y=0;y<b.length;y++){var D=b[y];D.mapping&&(M[D.mapping]=D.plugin)}},getDefaultScenePlugins:function(){var m=this.game.config.defaultPlugins;return m=m.concat(this.scenePlugins),m},installScenePlugin:function(m,p,x,y,P){if(P===void 0&&(P=!1),typeof p!="function"){console.warn("Invalid Scene Plugin: "+m);return}if(f.hasCore(m)||f.register(m,p,x,!0),this.scenePlugins.indexOf(m)===-1)this.scenePlugins.push(m);else if(!P&&f.hasCore(m)){console.warn("Scene Plugin key in use: "+m);return}if(y){var b=new p(y,this,m);y.sys[m]=b,x&&x!==""&&(y[x]=b),b.boot()}},install:function(m,p,x,y,P){if(x===void 0&&(x=!1),y===void 0&&(y=null),P===void 0&&(P=null),typeof p!="function")return console.warn("Invalid Plugin: "+m),null;if(f.hasCustom(m))return console.warn("Plugin key in use: "+m),null;
4580if(y!==null&&(x=!0),!this.game.isBooted)this._pendingGlobal.push({key:m,plugin:p,start:x,mapping:y,data:P});else if(f.registerCustom(m,p,y,P),x)return this.start(m);return null},getIndex:function(m){for(var p=this.plugins,x=0;x<p.length;x++){var y=p[x];if(y.key===m)return x}return-1},getEntry:function(m){var p=this.getIndex(m);if(p!==-1)return this.plugins[p]},isActive:function(m){var p=this.getEntry(m);return p&&p.active},start:function(m,p){p===void 0&&(p=m);var x=this.getEntry(p);return x&&!x.active?(x.active=!0,x.plugin.start()):x||(x=this.createEntry(m,p)),x?x.plugin:null},createEntry:function(m,p){var x=f.getCustom(m);if(x){var y=new x.plugin(this);x={key:p,plugin:y,active:!0,mapping:x.mapping,data:x.data},this.plugins.push(x),y.init(x.data),y.start()}return x},stop:function(m){var p=this.getEntry(m);return p&&p.active&&(p.active=!1,p.plugin.stop()),this},get:function(m,p){p===void 0&&(p=!0);var x=this.getEntry(m);if(x)return x.plugin;var y=this.getClass(m);return y&&p?(x=this.createEntry(m,m),x?x.plugin:null):y||null},getClass:function(m){return f.getCustomClass(m)},removeGlobalPlugin:function(m){var p=this.getEntry(m);p&&u(this.plugins,p),f.removeCustom(m)},removeScenePlugin:function(m){u(this.scenePlugins,m),f.remove(m)},registerGameObject:function(m,p,x){return p&&n.register(m,p),x&&h.register(m,x),this},removeGameObject:function(m,p,x){return p===void 0&&(p=!0),x===void 0&&(x=!0),p&&n.remove(m),x&&h.remove(m),this},registerFileType:function(m,p,x){a.register(m,p),x&&x.sys.load&&(x.sys.load[m]=p)},destroy:function(){for(var m=0;m<this.plugins.length;m++)this.plugins[m].plugin.destroy();f.destroyCustomPlugins(),this.game.noReturn&&f.destroyCorePlugins(),this.game=null,this.plugins=[],this.scenePlugins=[]}});l.exports=v},39283:(l,T,e)=>{/** 4581* @author Richard Davey <[email protected]> 4582* @copyright 2013-2023 Photon Storm Ltd. 4583* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} 4584*/var d=e(88257),g=e(56694),r=e(7599),a=new g({Extends:d,initialize:function(n,o,f){d.call(this,o),this.scene=n,this.systems=n.sys,this.pluginKey=f,n.sys.events.once(r.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});l.exports=a},45615:(l,T,e)=>{/** 4585 * @author Richard Davey <[email protected]> 4586 * @copyright 2013-2023 Photon Storm Ltd. 4587 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4588 */l.exports={BasePlugin:e(88257),DefaultPlugins:e(18360),PluginCache:e(91963),PluginManager:e(49274),ScenePlugin:e(39283)}},75205:()=>{!("requestVideoFrameCallback"in HTMLVideoElement.prototype)&&"getVideoPlaybackQuality"in HTMLVideoElement.prototype&&(HTMLVideoElement.prototype._rvfcpolyfillmap={},HTMLVideoElement.prototype.requestVideoFrameCallback=function(l){const T=performance.now(),e=this.getVideoPlaybackQuality(),d=this.mozPresentedFrames||this.mozPaintedFrames||e.totalVideoFrames-e.droppedVideoFrames,g=(r,a)=>{const h=this.getVideoPlaybackQuality(),n=this.mozPresentedFrames||this.mozPaintedFrames||h.totalVideoFrames-h.droppedVideoFrames;if(n>d){const o=this.mozFrameDelay||h.totalFrameDelay-e.totalFrameDelay||0,f=a-r;l(a,{presentationTime:a+o*1e3,expectedDisplayTime:a+f,width:this.videoWidth,height:this.videoHeight,mediaTime:Math.max(0,this.currentTime||0)+f/1e3,presentedFrames:n,processingDuration:o}),delete this._rvfcpolyfillmap[T]}else this._rvfcpolyfillmap[T]=requestAnimationFrame(o=>g(a,o))};return this._rvfcpolyfillmap[T]=requestAnimationFrame(r=>g(T,r)),T},HTMLVideoElement.prototype.cancelVideoFrameCallback=function(l){cancelAnimationFrame(this._rvfcpolyfillmap[l]),delete this._rvfcpolyfillmap[l]})},95723:l=>{/** 4589 * @author Richard Davey <[email protected]> 4590 * @copyright 2013-2023 Photon Storm Ltd. 4591 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4592 */l.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:2
45926,XOR:27}},27394:l=>{/** 4593 * @author Richard Davey <[email protected]> 4594 * @copyright 2013-2023 Photon Storm Ltd. 4595 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4596 */var T={DEFAULT:0,LINEAR:0,NEAREST:1};l.exports=T},91135:(l,T,e)=>{/** 4597 * @author Richard Davey <[email protected]> 4598 * @author Felipe Alfonso <@bitnenfer> 4599 * @copyright 2013-2023 Photon Storm Ltd. 4600 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4601 */var d=e(89787),g=e(61840),r=e(56694),a=e(86459),h=e(6659),n=e(81044),o=e(32834),f=e(40444),u=e(38203),v=e(69360),m=new r({Extends:h,initialize:function(x){h.call(this);var y=x.config;this.config={clearBeforeRender:y.clearBeforeRender,backgroundColor:y.backgroundColor,antialias:y.antialias,roundPixels:y.roundPixels},this.game=x,this.type=a.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=x.canvas;var P={alpha:x.config.transparent,desynchronized:x.config.desynchronized,willReadFrequently:!1};this.gameContext=y.context?y.context:this.gameCanvas.getContext("2d",P),this.currentContext=this.gameContext,this.antialias=x.config.antialias,this.blendModes=o(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new v,this._tempMatrix2=new v,this._tempMatrix3=new v,this.isBooted=!1,this.init()},init:function(){this.game.textures.once(u.READY,this.boot,this)},boot:function(){var p=this.game,x=p.scale.baseSize;this.width=x.width,this.height=x.height,this.isBooted=!0,p.scale.on(f.RESIZE,this.onResize,this),this.resize(x.width,x.height)},onResize:function(p,x){(x.width!==this.width||x.height!==this.height)&&this.resize(x.width,x.height)},resize:function(p,x){this.width=p,this.height=x,this.emit(n.RESIZE,p,x)},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,x=this.config,y=this.width,P=this.height;p.globalAlpha=1,p.globalCompositeOperation="source-over",p.setTransform(1,0,0,1,0,0),x.clearBeforeRender&&(p.clearRect(0,0,y,P),x.transparent||(p.fillStyle=x.backgroundColor.rgba,p.fillRect(0,0,y,P))),p.save(),this.drawCount=0,this.emit(n.PRE_RENDER)},render:function(p,x,y){var P=x.length;this.emit(n.RENDER,p,y);var b=y.x,E=y.y,M=y.width,w=y.height,A=y.renderToTexture?y.context:p.sys.context;A.save(),this.game.scene.customViewports&&(A.beginPath(),A.rect(b,E,M,w),A.clip()),y.emit(d.PRE_RENDER,y),this.currentContext=A;var R=y.mask;R&&R.preRenderCanvas(this,null,y._maskCamera),y.transparent||(A.fillStyle=y.backgroundColor.rgba,A.fillRect(b,E,M,w)),A.globalAlpha=y.alpha,A.globalCompositeOperation="source-over",this.drawCount+=P,y.renderToTexture&&y.emit(d.PRE_RENDER,y),y.matrix.copyToContext(A);for(var L=0;L<P;L++){var O=x[L];O.mask&&O.mask.preRenderCanvas(this,O,y),O.renderCanvas(this,O,y),O.mask&&O.mask.postRenderCanvas(this,O,y)}A.setTransform(1,0,0,1,0,0),A.globalCompositeOperation="source-over",A.globalAlpha=1,y.flashEffect.postRenderCanvas(A),y.fadeEffect.postRenderCanvas(A),y.dirty=!1,R&&R.postRenderCanvas(this),A.restore(),y.renderToTexture&&(y.emit(d.POST_RENDER,y),y.renderToGame&&p.sys.context.drawImage(y.canvas,b,E)),y.emit(d.POST_RENDER,y)},postRender:function(){var p=this.gameContext;p.restore(),this.emit(n.POST_RENDER);var x=this.snapshotState;x.callback&&(g(this.gameCanvas,x),x.callback=null)},snapshotCanvas:function(p,x,y,P,b,E,M,w,A){y===void 0&&(y=!1),this.snapshotArea(P,b,E,M,x,w,A);var R=this.snapshotState;return R.getPixel=y,g(p,R),R.callback=null,this},snapshot:function(p,x,y){return this.snapshotArea(0,0,this.gameCanvas.width,this.gameCanvas.height,p,x,y)},snapshotArea:function(p,x,y,P,b,E,M){var w=this.snapshotState;return w.callback=b,w.type=E,w.encoder=M,w.getPixel=!1,w.x=p,w.y=x,w.width=Math.min(y,this.gameCanvas.width),w.height=Math.min(P,this.gameCanvas.height),this},snapshotPixel:function(p,x,y){return this.snapshotArea(p,x,1,1,y),this.snapshotState.getPixel=!0,this},batchSprite:function(p,x,y,P){var b=y.alpha*p.alpha;if(b!==0){var E=this.currentContext,M=this._tempMatrix1,w=this._tempMatrix2,A=x.canvasData,R=A.x,L=A.y,O=x.cutWidth,I=x.cutHeight,D=x.customPivot,B=x.source.resolution,z=p.displayOriginX,X=p.displayOriginY,W=-z+x.x,j=-X+x.y;if(p.isCropped){var N=p._crop;(N.flipX!==p.flipX||N.flipY!==p.flipY)&&x.updateCropUVs(N,p.flipX,p.flipY),O=N.cw,I=N.ch,R=N.cx,L=N.cy,W=-z+N.x,j=-X+N.y,p.flipX&&(W>=0?W=-(W+O):W<0&&(W=Math.abs(W)-O)),p.flipY&&(j>=0?j=-(j+I):j<0&&(j=Math.abs(j)-I))}var Y=1,F=1;p.flipX&&(D||(W+=-x.realWidth+z*2),Y=-1),p.flipY&&(D||(j+=-x.realHeight+X*2),F=-1);var G=p.x,k=p.y;y.roundPixels&&(G=Math.floor(G),k=Math.floor(k)),w.applyITRS(G,k,p.rotation,p.scaleX*Y,p.scaleY*F),M.copyFrom(y.matrix
4601),P?(M.multiplyWithOffset(P,-y.scrollX*p.scrollFactorX,-y.scrollY*p.scrollFactorY),w.e=G,w.f=k):(w.e-=y.scrollX*p.scrollFactorX,w.f-=y.scrollY*p.scrollFactorY),M.multiply(w),y.roundPixels&&(M.e=Math.round(M.e),M.f=Math.round(M.f)),E.save(),M.setToContext(E),E.globalCompositeOperation=this.blendModes[p.blendMode],E.globalAlpha=b,E.imageSmoothingEnabled=!x.source.scaleMode,p.mask&&p.mask.preRenderCanvas(this,p,y),O>0&&I>0&&E.drawImage(x.source.image,R,L,O,I,W,j,O/B,I/B),p.mask&&p.mask.postRenderCanvas(this,p,y),E.restore()}},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}});l.exports=m},6046:(l,T,e)=>{/** 4602 * @author Richard Davey <[email protected]> 4603 * @copyright 2013-2023 Photon Storm Ltd. 4604 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4605 */l.exports={CanvasRenderer:e(91135),GetBlendModes:e(32834),SetTransform:e(49584)}},32834:(l,T,e)=>{/** 4606 * @author Richard Davey <[email protected]> 4607 * @copyright 2013-2023 Photon Storm Ltd. 4608 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4609 */var d=e(95723),g=e(98581),r=function(){var a=[],h=g.supportNewBlendModes,n="source-over";return a[d.NORMAL]=n,a[d.ADD]="lighter",a[d.MULTIPLY]=h?"multiply":n,a[d.SCREEN]=h?"screen":n,a[d.OVERLAY]=h?"overlay":n,a[d.DARKEN]=h?"darken":n,a[d.LIGHTEN]=h?"lighten":n,a[d.COLOR_DODGE]=h?"color-dodge":n,a[d.COLOR_BURN]=h?"color-burn":n,a[d.HARD_LIGHT]=h?"hard-light":n,a[d.SOFT_LIGHT]=h?"soft-light":n,a[d.DIFFERENCE]=h?"difference":n,a[d.EXCLUSION]=h?"exclusion":n,a[d.HUE]=h?"hue":n,a[d.SATURATION]=h?"saturation":n,a[d.COLOR]=h?"color":n,a[d.LUMINOSITY]=h?"luminosity":n,a[d.ERASE]="destination-out",a[d.SOURCE_IN]="source-in",a[d.SOURCE_OUT]="source-out",a[d.SOURCE_ATOP]="source-atop",a[d.DESTINATION_OVER]="destination-over",a[d.DESTINATION_IN]="destination-in",a[d.DESTINATION_OUT]="destination-out",a[d.DESTINATION_ATOP]="destination-atop",a[d.LIGHTER]="lighter",a[d.COPY]="copy",a[d.XOR]="xor",a};l.exports=r},49584:(l,T,e)=>{/** 4610 * @author Richard Davey <[email protected]> 4611 * @copyright 2013-2023 Photon Storm Ltd. 4612 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4613 */var d=e(73329),g=function(r,a,h,n,o){var f=n.alpha*h.alpha;if(f<=0)return!1;var u=d(h,n,o).calc;return a.globalCompositeOperation=r.blendModes[h.blendMode],a.globalAlpha=f,a.save(),u.setToContext(a),a.imageSmoothingEnabled=h.frame?!h.frame.source.scaleMode:r.antialias,!0};l.exports=g},70936:l=>{/** 4614 * @author Richard Davey <[email protected]> 4615 * @copyright 2013-2023 Photon Storm Ltd. 4616 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4617 */l.exports="postrender"},99298:l=>{/** 4618 * @author Richard Davey <[email protected]> 4619 * @copyright 2013-2023 Photon Storm Ltd. 4620 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4621 */l.exports="prerender"},7743:l=>{/** 4622 * @author Richard Davey <[email protected]> 4623 * @copyright 2013-2023 Photon Storm Ltd. 4624 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4625 */l.exports="render"},99519:l=>{/** 4626 * @author Richard Davey <[email protected]> 4627 * @copyright 2013-2023 Photon Storm Ltd. 4628 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4629 */l.exports="resize"},81044:(l,T,e)=>{/** 4630 * @author Richard Davey <[email protected]> 4631 * @copyright 2013-2023 Photon Storm Ltd. 4632 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4633 */l.exports={POST_RENDER:e(70936),PRE_RENDER:e(99298),RENDER:e(7743),RESIZE:e(99519)}},42069:(l,T,e)=>{/** 4634 * @author Richard Davey <[email protected]> 4635 * @copyright 2013-2023 Photon Storm Ltd. 4636 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4637 */l.exports={Canvas:e(6046),Events:e(81044),Snapshot:e(95528),WebGL:e(55478)}},61840:(l,T,e)=>{/** 4638 * @author Richard Davey <[email protected]> 4639 * @copyright 2013-2023 Photon Storm Ltd. 4640 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4641 */var d=e(61068),g=e(27119),r=e(72632),a=function(h,n){var o=r(n,"callback"),f=r(n,"type","image/png"),u=r(n,"encoder",.92),v=Math.abs(Math.round(r(n,"x",0))),m=Math.abs(Math.round(r(n,"y",0))),p=Math.floor(r(n,"width",h.width)),x=Math.floor(r(n,"height",h.height)),y=r(n,"getPixel",!1);if(y){var P=h.getContext("2d",{willReadFrequently:!1}),b=P.getImageData(v,m,1,1),E=b.data;o.call(null,new g(E[0],E[1],E[2],E[3]))}else if(v!==0||m!==0||p!==h.width||x!==h.height){var M=d.createWebGL(this,p,x),w=M.getContext("2d",{willReadFrequently:!0});p>0&&x>0&&w.drawImage(h,v,m,p,x,0,0,p,x);var A=new Image;A.onerror=function(){o.call(null),d.remove(M)},A.onload=function(){o.call(null,A),d.remove(M)},A.src=M.toDataURL(f,u)}else{var R=new Image;R.onerror=function(){o.call(null)},R.onload=function(){o.call(null,R)},R.src=h.toDataURL(f,u)}};l.exports=a},1217:(l,T,e)=>{/** 4642 * @author Richard Davey <[email protected]> 4643 * @copyright 2013-2023 Photon Storm Ltd. 4644 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4645 */var d=e(61068),g=e(27119),r=e(72632),a=function(h,n){var o=h,f=r(n,"callback"),u=r(n,"type","image/png"),v=r(n,"encoder",.92),m=Math.abs(Math.round(r(n,"x",0))),p=Math.abs(Math.round(r(n,"y",0))),x=r(n,"getPixel",!1),y=r(n,"isFramebuffer",!1),P=y?r(n,"bufferWidth",1):o.drawingBufferWidth,b=y?r(n,"bufferHeight",1):o.drawingBufferHeight;if(x){var E=new Uint8Array(4),M=y?p:b-p;o.readPixels(m,M,1,1,o.RGBA,o.UNSIGNED_BYTE,E),f.call(null,new g(E[0],E[1],E[2],E[3]))}else{var w=Math.floor(r(n,"width",P)),A=Math.floor(r(n,"height",b)),R=w*A*4,L=new Uint8Array(R);o.readPixels(m,b-p-A,w,A,o.RGBA,o.UNSIGNED_BYTE,L);for(var O=d.createWebGL(this,w,A),I=O.getContext("2d",{willReadFrequently:!0}),D=I.getImageData(0,0,w,A),B=D.data,z=0;z<A;z++)for(var X=0;X<w;X++){var W=((A-z-1)*w+X)*4,j=y?R-(z*w+(w-X))*4:(z*w+X)*4;B[j+0]=L[W+0],B[j+1]=L[W+1],B[j+2]=L[W+2],B[j+3]=L[W+3]}I.putImageData(D,0,0);var N=new Image;N.onerror=function(){f.call(null),d.remove(O)},N.onload=function(){f.call(null,N),d.remove(O)},N.src=O.toDataURL(u,v)}};l.exports=a},95528:(l,T,e)=>{/** 4646 * @author Richard Davey <[email protected]> 4647 * @copyright 2013-2023 Photon Storm Ltd. 4648 * @license {@link https://opensource.org/licenses/MIT|MIT License}
4649 */l.exports={Canvas:e(61840),WebGL:e(1217)}},35217:(l,T,e)=>{/** 4650 * @author Richard Davey <[email protected]> 4651 * @copyright 2013-2023 Photon Storm Ltd. 4652 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4653 */var d=e(56694),g=e(65641),r=e(33885),a=e(77290),h=e(72632),n=e(37410),o=e(82127),f=e(5583),u=e(58136),v=e(47406),m=e(81828),p=e(66901),x=e(71264),y=e(77310),P=e(10919),b=e(21213),E=e(51212),M=e(60848),w=new d({initialize:function(R){this.game=R.game,this.renderer=R,this.classes=new r([[g.UTILITY_PIPELINE,M],[g.MULTI_PIPELINE,y],[g.BITMAPMASK_PIPELINE,f],[g.SINGLE_PIPELINE,E],[g.ROPE_PIPELINE,b],[g.LIGHT_PIPELINE,p],[g.POINTLIGHT_PIPELINE,P],[g.MOBILE_PIPELINE,x],[g.FX_PIPELINE,m]]),this.postPipelineClasses=new r([[String(v.BARREL),u.Barrel],[String(v.BLOOM),u.Bloom],[String(v.BLUR),u.Blur],[String(v.BOKEH),u.Bokeh],[String(v.CIRCLE),u.Circle],[String(v.COLOR_MATRIX),u.ColorMatrix],[String(v.DISPLACEMENT),u.Displacement],[String(v.GLOW),u.Glow],[String(v.GRADIENT),u.Gradient],[String(v.PIXELATE),u.Pixelate],[String(v.SHADOW),u.Shadow],[String(v.SHINE),u.Shine],[String(v.VIGNETTE),u.Vignette],[String(v.WIPE),u.Wipe]]),this.pipelines=new r,this.default=null,this.current=null,this.previous=null,this.MULTI_PIPELINE=null,this.BITMAPMASK_PIPELINE=null,this.UTILITY_PIPELINE=null,this.MOBILE_PIPELINE=null,this.FX_PIPELINE=null,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderTargets=[],this.maxDimension=0,this.frameInc=32,this.targetIndex=0},boot:function(A,R,L){var O=this.renderer,I=this.renderTargets;this.frameInc=Math.floor(h(A,"frameInc",32));for(var D=O.width,B=O.height,z=Math.min(D,B),X=Math.ceil(z/this.frameInc),W=1;W<X;W++){var j=W*this.frameInc;I.push(new n(O,j,j)),I.push(new n(O,j,j)),I.push(new n(O,j,j)),this.maxDimension=j}I.push(new n(O,D,B,1,0,!0,!0)),I.push(new n(O,D,B,1,0,!0,!0)),I.push(new n(O,D,B,1,0,!0,!0));var N,Y,F=this,G=this.game;if(this.classes.each(function(V,U){N=F.add(V,new U({game:G})),V===g.UTILITY_PIPELINE&&(F.UTILITY_PIPELINE=N,F.fullFrame1=N.fullFrame1,F.fullFrame2=N.fullFrame2,F.halfFrame1=N.halfFrame1,F.halfFrame2=N.halfFrame2)}),this.MULTI_PIPELINE=this.get(g.MULTI_PIPELINE),this.BITMAPMASK_PIPELINE=this.get(g.BITMAPMASK_PIPELINE),this.MOBILE_PIPELINE=this.get(g.MOBILE_PIPELINE),this.FX_PIPELINE=this.get(g.FX_PIPELINE),A)for(Y in A){var k=A[Y];N=new k(G),N.name=Y,N.isPostFX?this.postPipelineClasses.set(Y,k):this.has(Y)||(this.classes.set(Y,k),this.add(Y,N))}this.default=this.get(R),L&&!a.os.desktop&&(this.default=this.MOBILE_PIPELINE)},setDefaultPipeline:function(A){var R=this.get(A);return R&&(this.default=R),R},add:function(A,R){if(R.isPostFX){console.warn(A+" is a Post Pipeline. Use `addPostPipeline` instead");return}var L=this.pipelines,O=this.renderer;return L.has(A)?console.warn("Pipeline exists: "+A):(R.name=A,R.manager=this,L.set(A,R)),R.hasBooted||R.boot(),O.width!==0&&O.height!==0&&!R.isPreFX&&R.resize(O.width,O.height),R},addPostPipeline:function(A,R){this.postPipelineClasses.has(A)||this.postPipelineClasses.set(A,R)},flush:function(){this.current&&this.current.flush()},has:function(A){var R=this.pipelines;return typeof A=="string"?R.has(A):!!R.contains(A)},get:function(A){var R=this.pipelines;if(typeof A=="string")return R.get(A);if(R.contains(A))return A},getPostPipeline:function(A,R,L){var O=this.postPipelineClasses,I,D="",B=typeof A;if(B==="string"||B==="number"?(I=O.get(A),D=A):B==="function"?(O.contains(A)&&(I=A),D=A.name):B==="object"&&(I=O.get(A.name),D=A.name),I){var z=new I(this.game,L);return z.name=D,R&&(z.gameObject=R),z}},remove:function(A,R,L){R===void 0&&(R=!0),L===void 0&&(L=!0),this.pipelines.delete(A),R&&this.classes.delete(A),L&&this.postPipelineClasses.delete(A)},set:function(A,R,L){if(!A.isPostFX)return this.isCurrent(A,L)||(this.flush(),this.current&&this.current.unbind(),this.current=A,A.bind(L)),A.updateProjectionMatrix(),A.onBind(R),A},preBatch:function(A){if(A.hasPostPipeline){this.flush();for(var R=A.postPipelines,L=R.length-1;L>=0;L--){var O=R[L];O.active&&O.preBatch(A)}}},postBatch:function(A){if(A.hasPostPipeline){this.flush();for(var R=A.postPipelines,L=0;L<R.length;L++){var O=R[L];O.active&&O.postBatch(A)}}},preBatchCamera:function(A){if(A.hasPostPipeline){this.flush();for(var R=A.postPipelines,L=R.length-1;L>=0;L--){var O=R[L];O.active&&O.preBatch(A)}}},postBatchCamera:function(A){if(A.hasPostPipeline){this.flush();for(var R=A.postPipelines,L=0;L<R.length;L++){var O=R[L];O.active&&O.postBatch(A)}}},isCurrent:function(A,R){var L=this.renderer,O=this.current;return O&&!R&&(R=O.currentShader),!(O!==A||R.program!==L.currentProgram)},copyFrame:function(A,R,L,O,I){return this.setUtility(this.UTILITY_PIPELINE.copyShader).copyFrame(A,R,L,O,I),this},copyToGame:function(A){return this.setUtility(this.UTILITY_PIPELINE.copyShader).copyToGame(A),this},drawFrame:function(A,R,L,O){return this.setUtility(this.UTILITY_PIPELINE.colorMatrixShader).drawFrame(A,R,L,O),this},blendFrames:function(A,R,L,O,I){return this.setUtility(this.UTILITY_PIPELINE.linearShader).blendFrames(A,R,L,O,I),this},blendFramesAdditive:function(A,R,L,O,I){return this.setUtility(this.UTILITY_PIPELINE.addShader).blendFramesAdditive(A,R,L,O,I),this},clearFrame:function(A,R){return this.UTILITY_PIPELINE.clearFrame(A,R),this},blitFrame:function(A,R,L,O,I,D){return this.setUtility(this.UTILITY_PIPELINE.copyShader).blitFrame(A,R,L,O,I,D),this},copyFrameRect:function(A,R,L,O,I,D,B,z){return this.UTILITY_PIPELINE.copyFrameRect(A,R,L,O,I,D,B,z),this},forceZero:function(){return this.current&&this.current.forceZero},setMulti:function(){return this.set(this.MULTI_PIPELINE)},setUtility:function(A){return this.UTILITY_PIPELINE.bind(A)},setFX:function(){return this.set(this.FX_PIPELINE)},rebind:function(A){A===void 0&&this.previous&&(A=this.previous);var R=this.renderer,L=R.gl;L.disable(L.DEPTH_TEST),L.disable(L.CULL_FACE),R.hasActiveStencilMask()?L.clear(L.DEPTH_BUFFER_BIT):(L.disable(L.STENCIL_TEST),L.clear(L.DEPTH_BUFFER_BIT|L.STENCIL_BUFFER_BIT)),L.viewport(0,0,R.width,R.height),R.currentProgram=null,R.setBlendMode(0,!0);var O=R.vaoExtension;O&&O.bindVertexArrayOES(null);
4653var I=this.pipelines.entries;for(var D in I)I[D].glReset=!0;A&&(this.current=A,A.rebind())},clear:function(){var A=this.renderer;this.flush(),this.current?(this.current.unbind(),this.previous=this.current,this.current=null):this.previous=null,A.currentProgram=null,A.setBlendMode(0,!0);var R=A.vaoExtension;R&&R.bindVertexArrayOES(null)},getRenderTarget:function(A){var R=this.renderTargets,L=3;if(A>this.maxDimension)return this.targetIndex=R.length-L,R[this.targetIndex];var O=(o(A,this.frameInc,0,!0)-1)*L;return this.targetIndex=O,R[O]},getSwapRenderTarget:function(){return this.renderTargets[this.targetIndex+1]},getAltSwapRenderTarget:function(){return this.renderTargets[this.targetIndex+2]},destroy:function(){this.flush(),this.classes.clear(),this.postPipelineClasses.clear(),this.pipelines.clear(),this.renderer=null,this.game=null,this.classes=null,this.postPipelineClasses=null,this.pipelines=null,this.default=null,this.current=null,this.previous=null}});l.exports=w},37410:(l,T,e)=>{/** 4654 * @author Richard Davey <[email protected]> 4655 * @copyright 2013-2023 Photon Storm Ltd. 4656 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4657 */var d=e(56694),g=e(81044),r=new d({initialize:function(h,n,o,f,u,v,m,p,x){f===void 0&&(f=1),u===void 0&&(u=0),v===void 0&&(v=!0),m===void 0&&(m=!1),p===void 0&&(p=!0),x===void 0&&(x=!0),this.renderer=h,this.framebuffer=null,this.texture=null,this.width=0,this.height=0,this.scale=f,this.minFilter=u,this.autoClear=v,this.autoResize=!0,this.hasDepthBuffer=p,this.forceClamp=x,this.resize(n,o),m?this.setAutoResize(!0):this.autoResize=!1},setAutoResize:function(a){return a&&!this.autoResize?(this.renderer.on(g.RESIZE,this.resize,this),this.autoResize=!0):!a&&this.autoResize&&(this.renderer.off(g.RESIZE,this.resize,this),this.autoResize=!1),this},resize:function(a,h){var n=a*this.scale,o=h*this.scale;if(this.autoResize&&(n!==this.width||o!==this.height)){var f=this.renderer;f.deleteFramebuffer(this.framebuffer),f.deleteTexture(this.texture),a*=this.scale,h*=this.scale,a=Math.round(a),h=Math.round(h),a<=0&&(a=1),h<=0&&(h=1),this.texture=f.createTextureFromSource(null,a,h,this.minFilter,this.forceClamp),this.framebuffer=f.createFramebuffer(a,h,this.texture,this.hasDepthBuffer),this.width=a,this.height=h}return this},bind:function(a,h,n){a===void 0&&(a=!1);var o=this.renderer;if(a&&o.flush(),h&&n&&this.resize(h,n),o.pushFramebuffer(this.framebuffer,!1,!1),a&&this.adjustViewport(),this.autoClear){var f=this.renderer.gl;f.clearColor(0,0,0,0),f.clear(f.COLOR_BUFFER_BIT)}o.clearStencilMask()},adjustViewport:function(){var a=this.renderer.gl;a.viewport(0,0,this.width,this.height),a.disable(a.SCISSOR_TEST)},clear:function(){var a=this.renderer,h=a.gl;a.pushFramebuffer(this.framebuffer),h.disable(h.SCISSOR_TEST),h.clearColor(0,0,0,0),h.clear(h.COLOR_BUFFER_BIT),a.popFramebuffer(),a.resetScissor()},unbind:function(a){a===void 0&&(a=!1);var h=this.renderer;return a&&h.flush(),h.popFramebuffer()},destroy:function(){var a=this.renderer;a.deleteFramebuffer(this.framebuffer),a.deleteTexture(this.texture),a.off(g.RESIZE,this.resize,this),this.renderer=null,this.framebuffer=null,this.texture=null}});l.exports=r},75512:l=>{/** 4658 * @author Richard Davey <[email protected]> 4659 * @author Felipe Alfonso <@bitnenfer> 4660 * @author Matthew Groves <@doormat> 4661 * @copyright 2013-2023 Photon Storm Ltd. 4662 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4663 */l.exports={getTintFromFloats:function(T,e,d,g){var r=(T*255|0)&255,a=(e*255|0)&255,h=(d*255|0)&255,n=(g*255|0)&255;return(n<<24|r<<16|a<<8|h)>>>0},getTintAppendFloatAlpha:function(T,e){var d=(e*255|0)&255;return(d<<24|T)>>>0},getTintAppendFloatAlphaAndSwap:function(T,e){var d=(T>>16|0)&255,g=(T>>8|0)&255,r=(T|0)&255,a=(e*255|0)&255;return(a<<24|r<<16|g<<8|d)>>>0},getFloatsFromUintRGB:function(T){var e=(T>>16|0)&255,d=(T>>8|0)&255,g=(T|0)&255;return[e/255,d/255,g/255]},checkShaderMax:function(T,e){var d=Math.min(16,T.getParameter(T.MAX_TEXTURE_IMAGE_UNITS));return!e||e===-1?d:Math.min(d,e)},parseFragmentShaderMaxTextures:function(T,e){if(!T)return"";for(var d="",g=0;g<e;g++)g>0&&(d+=` 4664 else `),g<e-1&&(d+="if (outTexId < "+g+".5)"),d+=` 4665 {`,d+=` 4666 texture = texture2D(uMainSampler[`+g+"], outTexCoord);",d+=` 4667 }`;return T=T.replace(/%count%/gi,e.toString()),T.replace(/%forloop%/gi,d)},setGlowQuality:function(T,e,d,g){return d===void 0&&(d=e.config.glowFXQuality),g===void 0&&(g=e.config.glowFXDistance),T=T.replace(/__SIZE__/gi,(1/d/g).toFixed(7)),T=T.replace(/__DIST__/gi,g.toFixed(0)+".0"),T}}},44775:(l,T,e)=>{/** 4668 * @author Richard Davey <[email protected]> 4669 * @copyright 2013-2023 Photon Storm Ltd. 4670 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4671 */var d=e(56694),g=e(28699),r=e(6659),a=e(18970),h=e(72632),n=e(16650),o=e(81044),f=e(37410),u=e(75512),v=e(71305),m=new d({Extends:r,initialize:function(x){r.call(this);var y=x.game,P=y.renderer,b=P.gl;this.name=h(x,"name","WebGLPipeline"),this.game=y,this.renderer=P,this.manager,this.gl=b,this.view=y.canvas,this.width=0,this.height=0,this.vertexCount=0,this.vertexCapacity=0,this.vertexData,this.vertexBuffer,this.activeBuffer,this.topology=h(x,"topology",b.TRIANGLES),this.bytes,this.vertexViewF32,this.vertexViewU32,this.active=!0,this.forceZero=h(x,"forceZero",!1),this.hasBooted=!1,this.isPostFX=!1,this.isPreFX=!1,this.renderTargets=[],this.currentRenderTarget,this.shaders=[],this.currentShader,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.config=x,this.glReset=!1,this.batch=[],this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,this.activeTextures=[]},boot:function(){var p,x=this.gl,y=this.config,P=this.renderer;this.isPostFX||(this.projectionMatrix=new n().identity());var b=this.renderTargets,E=h(y,"renderTarget",!1);typeof E=="boolean"&&E&&(E=1);var M=P.width,w=P.height;if(typeof E=="number")for(p=0;p<E;p++)b.push(new f(P,M,w,1,0,!0));else if(Array.isArray(E))for(p=0;p<E.length;p++){var A=h(E[p],"scale",1),R=h(E[p],"minFilter",0),L=h(E[p],"autoClear",1),O=h(E[p],"width",null),I=h(E[p],"height",O);O?b.push(new f(P,O,I,1,R,L)):b.push(new f(P,M,w,A,R,L))}b.length&&(this.currentRenderTarget=b[0]),this.setShadersFromConfig(y);var D=this.shaders,B=0;for(p=0;p<D.length;p++)D[p].vertexSize>B&&(B=D[p].vertexSize);var z=h(y,"batchSize",P.config.batchSize);this.vertexCapacity=z*6;var X=new ArrayBuffer(this.vertexCapacity*B);this.vertexData=X,this.bytes=new Uint8Array(X),this.vertexViewF32=new Float32Array(X),this.vertexViewU32=new Uint32Array(X);var W=h(y,"vertices",null);for(W?(this.vertexViewF32.set(W),this.vertexBuffer=P.createVertexBuffer(X,x.STATIC_DRAW)):this.vertexBuffer=P.createVertexBuffer(X.byteLength,x.DYNAMIC_DRAW),this.setVertexBuffer(),p=D.length-1;p>=0;p--)D[p].rebind();this.hasBooted=!0,P.on(o.RESIZE,this.resize,this),P.on(o.PRE_RENDER,this.onPreRender,this),P.on(o.RENDER,this.onRender,this),P.on(o.POST_RENDER,this.onPostRender,this),this.emit
4671(a.BOOT,this),this.onBoot()},onBoot:function(){},onResize:function(){},setShader:function(p,x,y){var P=this.renderer;if(p!==this.currentShader||P.currentProgram!==this.currentShader.program){this.flush();var b=this.setVertexBuffer(y);b&&!x&&(x=!0),p.bind(x,!1),this.currentShader=p}return this},getShaderByName:function(p){for(var x=this.shaders,y=0;y<x.length;y++)if(x[y].name===p)return x[y]},setShadersFromConfig:function(p){var x,y=this.shaders,P=this.renderer;for(x=0;x<y.length;x++)y[x].destroy();var b="vertShader",E="fragShader",M="attributes",w=h(p,b,null),A=u.parseFragmentShaderMaxTextures(h(p,E,null),P.maxTextures),R=h(p,M,null),L=h(p,"shaders",[]),O=L.length;if(O===0)w&&A&&(this.shaders=[new v(this,"default",w,A,g(R))]);else{var I=[];for(x=0;x<O;x++){var D=L[x],B,z,X,W;if(typeof D=="string"?(B="default",z=w,X=u.parseFragmentShaderMaxTextures(D,P.maxTextures),W=R):(B=h(D,"name","default"),z=h(D,b,w),X=u.parseFragmentShaderMaxTextures(h(D,E,A),P.maxTextures),W=h(D,M,R)),B==="default"){var j=X.split(` 4672`),N=j[0].trim();N.indexOf("#define SHADER_NAME")>-1&&(B=N.substring(20))}z&&X&&I.push(new v(this,B,z,X,g(W)))}this.shaders=I}return this.shaders.length===0?console.warn("Pipeline: "+this.name+" - Invalid shader config"):this.currentShader=this.shaders[0],this},createBatch:function(p){return this.currentBatch={start:this.vertexCount,count:0,texture:[p],unit:0,maxUnit:0},this.currentUnit=0,this.currentTexture=p,this.batch.push(this.currentBatch),0},addTextureToBatch:function(p){var x=this.currentBatch;x&&(x.texture.push(p),x.unit++,x.maxUnit++)},pushBatch:function(p){if(!this.currentBatch||this.forceZero&&p!==this.currentTexture)return this.createBatch(p);if(p===this.currentTexture)return this.currentUnit;var x=this.currentBatch,y=x.texture.indexOf(p);return y===-1?x.texture.length===this.renderer.maxTextures?this.createBatch(p):(x.unit++,x.maxUnit++,x.texture.push(p),this.currentUnit=x.unit,this.currentTexture=p,x.unit):(this.currentUnit=y,this.currentTexture=p,y)},setGameObject:function(p,x){return x===void 0&&(x=p.frame),this.pushBatch(x.source.glTexture)},shouldFlush:function(p){return p===void 0&&(p=0),this.vertexCount+p>this.vertexCapacity},vertexAvailable:function(){return this.vertexCapacity-this.vertexCount},resize:function(p,x){(p!==this.width||x!==this.height)&&this.flush(),this.width=p,this.height=x;for(var y=this.renderTargets,P=0;P<y.length;P++)y[P].resize(p,x);return this.setProjectionMatrix(p,x),this.emit(a.RESIZE,p,x,this),this.onResize(p,x),this},setProjectionMatrix:function(p,x){var y=this.projectionMatrix;if(!y)return this;this.projectionWidth=p,this.projectionHeight=x,y.ortho(0,p,x,0,-1e3,1e3);for(var P=this.shaders,b="uProjectionMatrix",E=0;E<P.length;E++){var M=P[E];M.hasUniform(b)&&(M.resetUniform(b),M.setMatrix4fv(b,!1,y.val,M))}return this},flipProjectionMatrix:function(p){p===void 0&&(p=!0);var x=this.projectionMatrix;if(!x)return this;var y=this.projectionWidth,P=this.projectionHeight;p?x.ortho(0,y,0,P,-1e3,1e3):x.ortho(0,y,P,0,-1e3,1e3),this.setMatrix4fv("uProjectionMatrix",!1,x.val)},updateProjectionMatrix:function(){if(this.projectionMatrix){var p=this.renderer.projectionWidth,x=this.renderer.projectionHeight;(this.projectionWidth!==p||this.projectionHeight!==x)&&this.setProjectionMatrix(p,x)}},bind:function(p){if(p===void 0&&(p=this.currentShader),this.glReset)return this.rebind(p);var x=!1,y=this.gl;return y.getParameter(y.ARRAY_BUFFER_BINDING)!==this.vertexBuffer&&(y.bindBuffer(y.ARRAY_BUFFER,this.vertexBuffer),this.activeBuffer=this.vertexBuffer,x=!0),p.bind(x),this.currentShader=p,this.activeTextures.length=0,this.emit(a.BIND,this,p),this.onActive(p),this},rebind:function(p){this.activeBuffer=null,this.setVertexBuffer();for(var x=this.shaders,y=x.length-1;y>=0;y--){var P=x[y].rebind();(!p||P===p)&&(this.currentShader=P)}return this.activeTextures.length=0,this.emit(a.REBIND,this.currentShader),this.onActive(this.currentShader),this.onRebind(),this.glReset=!1,this},setVertexBuffer:function(p){if(p===void 0&&(p=this.vertexBuffer),p!==this.activeBuffer){var x=this.gl;return this.gl.bindBuffer(x.ARRAY_BUFFER,p),this.activeBuffer=p,!0}return!1},preBatch:function(p){return this.currentRenderTarget&&this.currentRenderTarget.bind(),this.onPreBatch(p),this},postBatch:function(p){return this.onDraw(this.currentRenderTarget),this.onPostBatch(p),this},onDraw:function(){},unbind:function(){this.currentRenderTarget&&this.currentRenderTarget.unbind()},flush:function(p){if(p===void 0&&(p=!1),this.vertexCount>
46720){this.emit(a.BEFORE_FLUSH,this,p),this.onBeforeFlush(p);var x=this.gl,y=this.vertexCount,P=this.currentShader.vertexSize,b=this.topology;if(this.active){this.setVertexBuffer(),y===this.vertexCapacity?x.bufferData(x.ARRAY_BUFFER,this.vertexData,x.DYNAMIC_DRAW):x.bufferSubData(x.ARRAY_BUFFER,0,this.bytes.subarray(0,y*P));var E,M,w,A=this.batch,R=this.activeTextures;if(this.forceZero)for(R[0]||x.activeTexture(x.TEXTURE0),E=0;E<A.length;E++)M=A[E],w=M.texture[0],R[0]!==w&&(x.bindTexture(x.TEXTURE_2D,w),R[0]=w),x.drawArrays(b,M.start,M.count);else for(E=0;E<A.length;E++){M=A[E];for(var L=0;L<=M.maxUnit;L++)w=M.texture[L],R[L]!==w&&(x.activeTexture(x.TEXTURE0+L),x.bindTexture(x.TEXTURE_2D,w),R[L]=w);x.drawArrays(b,M.start,M.count)}}this.vertexCount=0,this.batch.length=0,this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,this.emit(a.AFTER_FLUSH,this,p),this.onAfterFlush(p)}return this},onActive:function(){},onBind:function(){},onRebind:function(){},onBatch:function(){},onPreBatch:function(){},onPostBatch:function(){},onPreRender:function(){},onRender:function(){},onPostRender:function(){},onBeforeFlush:function(){},onAfterFlush:function(){},batchVert:function(p,x,y,P,b,E,M){var w=this.vertexViewF32,A=this.vertexViewU32,R=this.vertexCount*this.currentShader.vertexComponentCount-1;w[++R]=p,w[++R]=x,w[++R]=y,w[++R]=P,w[++R]=b,w[++R]=E,A[++R]=M,this.vertexCount++,this.currentBatch.count=this.vertexCount-this.currentBatch.start},batchQuad:function(p,x,y,P,b,E,M,w,A,R,L,O,I,D,B,z,X,W,j,N){N===void 0&&(N=this.currentUnit);var Y=!1;this.shouldFlush(6)&&(this.flush(),Y=!0),this.currentBatch||(N=this.setTexture2D(j));var F=this.vertexViewF32,G=this.vertexViewU32,k=this.vertexCount*this.currentShader.vertexComponentCount-1;return F[++k]=x,F[++k]=y,F[++k]=R,F[++k]=L,F[++k]=N,F[++k]=W,G[++k]=D,F[++k]=P,F[++k]=b,F[++k]=R,F[++k]=I,F[++k]=N,F[++k]=W,G[++k]=z,F[++k]=E,F[++k]=M,F[++k]=O,F[++k]=I,F[++k]=N,F[++k]=W,G[++k]=X,F[++k]=x,F[++k]=y,F[++k]=R,F[++k]=L,F[++k]=N,F[++k]=W,G[++k]=D,F[++k]=E,F[++k]=M,F[++k]=O,F[++k]=I,F[++k]=N,F[++k]=W,G[++k]=X,F[++k]=w,F[++k]=A,F[++k]=O,F[++k]=L,F[++k]=N,F[++k]=W,G[++k]=B,this.vertexCount+=6,this.currentBatch.count=this.vertexCount-this.currentBatch.start,this.onBatch(p),Y},batchTri:function(p,x,y,P,b,E,M,w,A,R,L,O,I,D,B,z,X){X===void 0&&(X=this.currentUnit);var W=!1;this.shouldFlush(3)&&(this.flush(),W=!0),this.currentBatch||(X=this.setTexture2D(z));var j=this.vertexViewF32,N=this.vertexViewU32,Y=this.vertexCount*this.currentShader.vertexComponentCount-1;return j[++Y]=x,j[++Y]=y,j[++Y]=w,j[++Y]=A,j[++Y]=X,j[++Y]=B,N[++Y]=O,j[++Y]=P,j[++Y]=b,j[++Y]=w,j[++Y]=L,j[++Y]=X,j[++Y]=B,N[++Y]=I,j[++Y]=E,j[++Y]=M,j[++Y]=R,j[++Y]=L,j[++Y]=X,j[++Y]=B,N[++Y]=D,this.vertexCount+=3,this.currentBatch.count=this.vertexCount-this.currentBatch.start,this.onBatch(p),W},drawFillRect:function(p,x,y,P,b,E,M,w){M===void 0&&(M=this.renderer.whiteTexture),w===void 0&&(w=!0),p=Math.floor(p),x=Math.floor(x);var A=Math.floor(p+y),R=Math.floor(x+P),L=this.setTexture2D(M),O=u.getTintAppendFloatAlphaAndSwap(b,E),I=0,D=0,B=1,z=1;w&&(D=1,z=0),this.batchQuad(null,p,x,p,R,A,R,A,x,I,D,B,z,O,O,O,O,0,M,L)},setTexture2D:function(p){return p===void 0&&(p=this.renderer.whiteTexture),this.pushBatch(p)},bindTexture:function(p,x){x===void 0&&(x=0);var y=this.gl;return y.activeTexture(y.TEXTURE0+x),y.bindTexture(y.TEXTURE_2D,p),this},bindRenderTarget:function(p,x){return this.bindTexture(p.texture,x)},setTime:function(p,x){return this.set1f(p,this.game.loop.getDuration(),x),this},setBoolean:function(p,x,y){return y===void 0&&(y=this.currentShader),y.setBoolean(p,x),this},set1f:function(p,x,y){return y===void 0&&(y=this.currentShader),y.set1f(p,x),this},set2f:function(p,x,y,P){return P===void 0&&(P=this.currentShader),P.set2f(p,x,y),this},set3f:function(p,x,y,P,b){return b===void 0&&(b=this.currentShader),b.set3f(p,x,y,P),this},set4f:function(p,x,y,P,b,E){return E===void 0&&(E=this.currentShader),E.set4f(p,x,y,P,b),this},set1fv:function(p,x,y){return y===void 0&&(y=this.currentShader),y.set1fv(p,x),this},set2fv:function(p,x,y){return y===void 0&&(y=this.currentShader),y.set2fv(p,x),this},set3fv:function(p,x,y){return y===void 0&&(y=this.currentShader),y.set3fv(p,x),this},set4fv:function(p,x,y){return y===void 0&&(y=this.currentShader),y.set4fv(p,x),this},set1iv:function(p,x,y){return y===void 0&&(y=this.currentShader),y.set1iv(p,x),this},set2iv:function(p,x,y){return y===void 0&&(y=this.currentShader),y.set2iv(p,x),this},set3iv:function(p,x,y){return y===void 0&&(y=this.currentShader),y.set3iv(p,x),this},set4iv:function(p,x,y){return y===void 0&&(y=this.currentShader),y.set4iv(p,x),this},set1i:function(p,x,y){return y===void 0&&(y=this.currentShader),y.set1i(p,x),this},set2i:function(p,x,y,P){return P===void 0&&(P=this.currentShader),P.set2i(p,x,y),this},set3i:function(p,x,y,P,b){return b===void 0&&(b=this.currentShader),b.set3i(p,x,y,P),this},set4i:function(p,x,y,P,b,E){return E===void 0&&(E=this.currentShader),E.set4i(p,x,y,P,b),this},setMatrix2fv:function(p,x,y,P){return P===void 0&&(P=this.currentShader),P.setMatr
4672ix2fv(p,x,y),this},setMatrix3fv:function(p,x,y,P){return P===void 0&&(P=this.currentShader),P.setMatrix3fv(p,x,y),this},setMatrix4fv:function(p,x,y,P){return P===void 0&&(P=this.currentShader),P.setMatrix4fv(p,x,y),this},destroy:function(){this.emit(a.DESTROY,this);var p,x=this.shaders;for(p=0;p<x.length;p++)x[p].destroy();var y=this.renderTargets;for(p=0;p<y.length;p++)y[p].destroy();this.gl.deleteBuffer(this.vertexBuffer);var P=this.renderer;return P.off(o.RESIZE,this.resize,this),P.off(o.PRE_RENDER,this.onPreRender,this),P.off(o.RENDER,this.onRender,this),P.off(o.POST_RENDER,this.onPostRender,this),this.removeAllListeners(),this.game=null,this.renderer=null,this.manager=null,this.gl=null,this.view=null,this.shaders=null,this.renderTargets=null,this.bytes=null,this.vertexViewF32=null,this.vertexViewU32=null,this.vertexData=null,this.vertexBuffer=null,this.currentShader=null,this.currentRenderTarget=null,this.activeTextures=null,this}});l.exports=m},11857:(l,T,e)=>{/** 4673 * @author Richard Davey <[email protected]> 4674 * @author Felipe Alfonso <@bitnenfer> 4675 * @copyright 2013-2023 Photon Storm Ltd. 4676 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4677 */var d=e(66458),g=e(89787),r=e(56694),a=e(86459),h=e(6659),n=e(81044),o=e(28621),f=e(16650),u=e(72283),v=e(35217),m=e(37410),p=e(40444),x=e(38203),y=e(75512),P=e(1217),b=new r({Extends:h,initialize:function(M){h.call(this);var w=M.config,A={alpha:w.transparent,desynchronized:w.desynchronized,depth:!0,antialias:w.antialiasGL,premultipliedAlpha:w.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:w.failIfMajorPerformanceCaveat,powerPreference:w.powerPreference,preserveDrawingBuffer:w.preserveDrawingBuffer,willReadFrequently:!1};this.config={clearBeforeRender:w.clearBeforeRender,antialias:w.antialias,backgroundColor:w.backgroundColor,contextCreation:A,roundPixels:w.roundPixels,maxTextures:w.maxTextures,maxTextureSize:w.maxTextureSize,batchSize:w.batchSize,maxLights:w.maxLights,mipmapFilter:w.mipmapFilter},this.game=M,this.type=a.WEBGL,this.pipelines=null,this.width=0,this.height=0,this.canvas=M.canvas,this.blendModes=[],this.contextLost=!1,this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92,isFramebuffer:!1,bufferWidth:0,bufferHeight:0},this.maxTextures=0,this.textureIndexes,this.currentFramebuffer=null,this.fboStack=[],this.currentProgram=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.contextLostHandler=u,this.contextRestoredHandler=u,this.gl=null,this.supportedExtensions=null,this.instancedArraysExtension=null,this.vaoExtension=null,this.extensions={},this.glFormats,this.compression,this.drawingBufferHeight=0,this.blankTexture=null,this.whiteTexture=null,this.maskCount=0,this.maskStack=[],this.currentMask={mask:null,camera:null},this.currentCameraMask={mask:null,camera:null},this.glFuncMap=null,this.currentType="",this.newType=!1,this.nextTypeMatch=!1,this.finalType=!1,this.mipmapFilter=null,this.defaultScissor=[0,0,0,0],this.isBooted=!1,this.renderTarget=null,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.maskSource=null,this.maskTarget=null,this.spector=null,this._debugCapture=!1,this.init(this.config)},init:function(E){var M,w=this.game,A=this.canvas,R=E.backgroundColor;if(w.config.context?M=w.config.context:M=A.getContext("webgl",E.contextCreation)||A.getContext("experimental-webgl",E.contextCreation),!M||M.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=M;var L=this;this.contextLostHandler=function(W){L.contextLost=!0,console&&console.warn("WebGL Context lost. Renderer disabled"),W.preventDefault()},A.addEventListener("webglcontextlost",this.contextLostHandler,!1),w.context=M;for(var O=0;O<=27;O++)this.blendModes.push({func:[M.ONE,M.ONE_MINUS_SRC_ALPHA],equation:M.FUNC_ADD});this.blendModes[1].func=[M.ONE,M.DST_ALPHA],this.blendModes[2].func=[M.DST_COLOR,M.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[M.ONE,M.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[M.ZERO,M.ONE_MINUS_SRC_ALPHA],equation:M.FUNC_REVERSE_SUBTRACT},this.glFormats=[M.BYTE,M.SHORT,M.UNSIGNED_BYTE,M.UNSIGNED_SHORT,M.FLOAT],this.glFuncMap={mat2:{func:M.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:M.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:M.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:M.uniform1f,length:1},"1fv":{func:M.uniform1fv,length:1},"1i":{func:M.uniform1i,length:1},"1iv":{func:M.uniform1iv,length:1},"2f":{func:M.uniform2f,length:2},"2fv":{func:M.uniform2fv,length:1},"2i":{func:M.uniform2i,length:2},"2iv":{func:M.uniform2iv,length:1},"3f":{func:M.uniform3f,length:3},"3fv":{func:M.uniform3fv,length:1},"3i":{func:M.uniform3i,length:3},"3iv":{func:M.uniform3iv,length:1},"4f":{func:M.uniform4f,length:4},"4fv":{func:M.uniform4fv,length:1},"4i":{func:M.uniform4i,length:4},"4iv":{func:M.uniform4iv,length:1}};var I=M.getSupportedExtensions();(!E.maxTextures||E.maxTextures===-1)&&(E.maxTextures=M.getParameter(
4677M.MAX_TEXTURE_IMAGE_UNITS)),E.maxTextureSize||(E.maxTextureSize=M.getParameter(M.MAX_TEXTURE_SIZE)),this.compression=this.getCompressedTextures(),this.supportedExtensions=I;var D="ANGLE_instanced_arrays";this.instancedArraysExtension=I.indexOf(D)>-1?M.getExtension(D):null;var B="OES_vertex_array_object";this.vaoExtension=I.indexOf(B)>-1?M.getExtension(B):null,M.disable(M.DEPTH_TEST),M.disable(M.CULL_FACE),M.enable(M.BLEND),M.clearColor(R.redGL,R.greenGL,R.blueGL,R.alphaGL),E.mipmapFilter!==""&&(this.mipmapFilter=M[E.mipmapFilter]),this.maxTextures=y.checkShaderMax(M,E.maxTextures),this.textureIndexes=[];for(var z=0;z<this.maxTextures;z++){var X=M.createTexture();M.activeTexture(M.TEXTURE0+z),M.bindTexture(M.TEXTURE_2D,X),M.texImage2D(M.TEXTURE_2D,0,M.RGBA,1,1,0,M.RGBA,M.UNSIGNED_BYTE,new Uint8Array([0,0,255,255])),this.textureIndexes.push(z)}return this.pipelines=new v(this),this.setBlendMode(a.BlendModes.NORMAL),this.projectionMatrix=new f().identity(),w.textures.once(x.READY,this.boot,this),this},boot:function(){var E=this.game,M=this.pipelines,w=E.scale.baseSize,A=w.width,R=w.height;this.width=A,this.height=R,this.isBooted=!0,this.renderTarget=new m(this,A,R,1,0,!0,!0),this.maskTarget=new m(this,A,R,1,0,!0,!0),this.maskSource=new m(this,A,R,1,0,!0,!0);var L=E.config;M.boot(L.pipeline,L.defaultPipeline,L.autoMobilePipeline),this.blankTexture=E.textures.getFrame("__DEFAULT").glTexture,this.whiteTexture=E.textures.getFrame("__WHITE").glTexture;var O=this.gl;O.bindFramebuffer(O.FRAMEBUFFER,null),O.enable(O.SCISSOR_TEST),E.scale.on(p.RESIZE,this.onResize,this),this.resize(A,R)},captureFrame:function(E,M){},captureNextFrame:function(){},getFps:function(){},log:function(){},startCapture:function(E,M,w){},stopCapture:function(){},onCapture:function(E){},onResize:function(E,M){(M.width!==this.width||M.height!==this.height)&&this.resize(M.width,M.height)},beginCapture:function(E,M){E===void 0&&(E=this.width),M===void 0&&(M=this.height),this.renderTarget.bind(!0,E,M),this.setProjectionMatrix(E,M)},endCapture:function(){return this.renderTarget.unbind(!0),this.resetProjectionMatrix(),this.renderTarget},resize:function(E,M){var w=this.gl;return this.width=E,this.height=M,this.setProjectionMatrix(E,M),w.viewport(0,0,E,M),this.drawingBufferHeight=w.drawingBufferHeight,w.scissor(0,w.drawingBufferHeight-M,E,M),this.defaultScissor[2]=E,this.defaultScissor[3]=M,this.emit(n.RESIZE,E,M),this},getCompressedTextures:function(){var E="WEBGL_compressed_texture_",M="WEBKIT_"+E,w=function(R,L){var O=R.getExtension(E+L)||R.getExtension(M+L);if(O){var I={};for(var D in O)I[O[D]]=D;return I}},A=this.gl;return{ETC:w(A,"etc"),ETC1:w(A,"etc1"),ATC:w(A,"atc"),ASTC:w(A,"astc"),BPTC:w(A,"bptc"),RGTC:w(A,"rgtc"),PVRTC:w(A,"pvrtc"),S3TC:w(A,"s3tc"),S3TCSRGB:w(A,"s3tc_srgb"),IMG:!0}},getCompressedTextureName:function(E,M){var w=this.compression[E.toUpperCase()];if(M in w)return w[M]},supportsCompressedTexture:function(E,M){var w=this.compression[E.toUpperCase()];return w?M?M in w:!0:!1},getAspectRatio:function(){return this.width/this.height},setProjectionMatrix:function(E,M){return(E!==this.projectionWidth||M!==this.projectionHeight)&&(this.projectionWidth=E,this.projectionHeight=M,this.projectionMatrix.ortho(0,E,M,0,-1e3,1e3)),this},resetProjectionMatrix:function(){return this.setProjectionMatrix(this.width,this.height)},hasExtension:function(E){return this.supportedExtensions?this.supportedExtensions.indexOf(E):!1},getExtension:function(E){return this.hasExtension(E)?(E in this.extensions||(this.extensions[E]=this.gl.getExtension(E)),this.extensions[E]):null},flush:function(){this.pipelines.flush()},pushScissor:function(E,M,w,A,R){R===void 0&&(R=this.drawingBufferHeight);var L=this.scissorStack,O=[E,M,w,A];return L.push(O),this.setScissor(E,M,w,A,R),this.currentScissor=O,O},setScissor:function(E,M,w,A,R){R===void 0&&(R=this.drawingBufferHeight);var L=this.gl,O=this.currentScissor,I=w>0&&A>0;if(O&&I){var D=O[0],B=O[1],z=O[2],X=O[3];I=D!==E||B!==M||z!==w||X!==A}I&&(this.flush(),L.scissor(E,R-M-A,w,A))},resetScissor:function(){var E=this.gl;E.enable(E.SCISSOR_TEST);var M=this.currentScissor;if(M){var w=M[0],A=M[1],R=M[2],L=M[3];R>0&&L>0&&E.scissor(w,this.drawingBufferHeight-A-L,R,L)}},popScissor:function(){var E=this.scissorStack;E.pop();var M=E[E.length-1];M&&this.setScissor(M[0],M[1],M[2],M[3]),this.currentScissor=M},hasActiveStencilMask:function(){var E=this.currentMask.mask,M=this.currentCameraMask.mask;return E&&E.isStencil||M&&M.isStencil},resetViewport:function(){var E=this.gl;E.viewport(0,0,this.width,this.height),this.drawingBufferHeight=E.drawingBufferHeight},setBlendMode:function(E,M){M===void 0&&(M=!1);var w=this.gl,A=this.blendModes[E];return M||E!==a.BlendModes.SKIP_CHECK&&this.currentBlendMode!==E?(this.flush(),w.enable(w.BLEND),w.blendEquation(A.equation),A.func.length>2?w.blendFuncSeparate(A.func[0],A.func[1],A.func[2],A.func[3]):w.blendFunc(A.func[0],A.func[1]),this.currentBlendMode=E,!0):!1},addBlendMode:function(E,M){var w=this.blendModes.push({func:E,equation:M});return w-1},updateBlendMode:function(E,M,w){return this.blendModes[E]&&(this.blendModes[E].func=M,w&&(this.blendModes[E].equation=w)),this},removeBlendMode:function(E){return E>17&&this.blendModes[E]&&this.blendModes.splice(E,1),this},pushFramebuffer:function(E,M,w,A,R){return E===this.currentFramebuffer?this:(this.fboStack.push(E),this.setFramebuffer(E,M,w,A,R))},setFramebuffer:function(E,M,w,A,R){if(M===void 0&&(M=!1),w===void 0&&(w=!0),A===void 0&&(A=null),R===void 0&&(R=!1),E===this.currentFramebuffer)return this;var L=this.gl,O=this.width,I=this.height;return E&&E.renderTexture&&w?(O=E.renderTexture.width,I=E.renderTexture.height):this.flush(),L.bindFramebuffer(L.FRAMEBUFFER,E),w&&L.viewport(0,0,O,I),A&&L.framebufferTexture2D(L.FRAMEBUFFER,L.COLOR_ATTACHMENT0,L.TEXTURE_2D,A,0),R&&(L.clearColor(0,0,0,0),L.clear(L.COLOR_BUFFER_BIT)),M&&(E?(this.drawingBufferHeight=I,this.pushScissor(0,0,O,I)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=E,this},popFramebuffer:function(E,M){E===void 0&&(E=!1),M===void 0&&(M=!0);var w=this.fboStack;w.pop();var A=w[w.length-1];return A||(A=null),this.setFramebuffer(A,E,M),A},restoreFramebuffer:function(E,M){E===void 0&&(E=!1),M===void 0&&(M=!0);var w=this.fboStack,A=w[w.length-1];A||(A=null),this.currentFramebuffer=null,this.setFramebuffer(A,E,M)},setProgram:function(E){return E!==this.currentProgram?(this.flush(),this.gl.useProgram(E),this.currentProgram=E,!0):!1},resetProgram:function(){return this.gl.useProgram(this.currentProgram),this},createTextureFromSource:function(E,M,w,A,R){R===void 0&&(R=!1);var L=this.gl,O=L.NEAREST,I=L.NEAREST,D=L.CLAMP_TO_EDGE,B=null;M=E?E.width:M,w=E?E.height:w;var z=o(M,w);return z&&!R&&(D=L.REPEAT),A===a.ScaleModes.LINEAR&&this.config.antialias&&(O=z&&this.mipmapFilter?this.mipmapFilter:L.LINEAR,I=L.LINEAR),E&&E.c
4677ompressed&&(O=L.LINEAR,I=L.LINEAR),!E&&typeof M=="number"&&typeof w=="number"?B=this.createTexture2D(0,O,I,D,D,L.RGBA,null,M,w):B=this.createTexture2D(0,O,I,D,D,L.RGBA,E),B},createTexture2D:function(E,M,w,A,R,L,O,I,D,B,z,X){B=B??!0,z===void 0&&(z=!1),X===void 0&&(X=!1);var W=this.gl,j=W.createTexture();W.activeTexture(W.TEXTURE0);var N=W.getParameter(W.TEXTURE_BINDING_2D);W.bindTexture(W.TEXTURE_2D,j),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_MIN_FILTER,M),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_MAG_FILTER,w),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_WRAP_S,R),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_WRAP_T,A),W.pixelStorei(W.UNPACK_PREMULTIPLY_ALPHA_WEBGL,B),X&&W.pixelStorei(W.UNPACK_FLIP_Y_WEBGL,!0);var Y=!1;if(O==null)W.texImage2D(W.TEXTURE_2D,E,L,I,D,0,L,W.UNSIGNED_BYTE,null),Y=o(I,D);else if(O.compressed){I=O.width,D=O.height,Y=O.generateMipmap;for(var F=0;F<O.mipmaps.length;F++)W.compressedTexImage2D(W.TEXTURE_2D,F,O.internalFormat,O.mipmaps[F].width,O.mipmaps[F].height,0,O.mipmaps[F].data)}else z||(I=O.width,D=O.height),W.texImage2D(W.TEXTURE_2D,E,L,L,W.UNSIGNED_BYTE,O),Y=o(I,D);return Y&&W.generateMipmap(W.TEXTURE_2D),N&&W.bindTexture(W.TEXTURE_2D,N),j.isAlphaPremultiplied=B,j.isRenderTexture=!1,j.width=I,j.height=D,j},createFramebuffer:function(E,M,w,A){A===void 0&&(A=!0);var R=this.gl,L=R.createFramebuffer(),O=0;if(this.setFramebuffer(L),w.isRenderTexture=!0,w.isAlphaPremultiplied=!1,R.framebufferTexture2D(R.FRAMEBUFFER,R.COLOR_ATTACHMENT0,R.TEXTURE_2D,w,0),O=R.checkFramebufferStatus(R.FRAMEBUFFER),O!==R.FRAMEBUFFER_COMPLETE){var I={36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"};throw new Error("Framebuffer status: "+(I[O]||O))}if(L.renderTexture=w,A){var D=R.createRenderbuffer();R.bindRenderbuffer(R.RENDERBUFFER,D),R.renderbufferStorage(R.RENDERBUFFER,R.DEPTH_STENCIL,E,M),R.framebufferRenderbuffer(R.FRAMEBUFFER,R.DEPTH_STENCIL_ATTACHMENT,R.RENDERBUFFER,D)}return this.setFramebuffer(null),L},beginBitmapMask:function(E,M){var w=this.gl;w&&(this.flush(),this.maskTarget.bind(),this.currentCameraMask.mask!==E&&(this.currentMask.mask=E,this.currentMask.camera=M))},drawBitmapMask:function(E,M,w){this.flush(),this.maskSource.bind(),this.setBlendMode(0,!0),E.renderWebGL(this,E,M),this.maskSource.unbind(!0),this.maskTarget.unbind();var A=this.gl,R=this.getCurrentStencilMask();R?(A.enable(A.STENCIL_TEST),R.mask.applyStencil(this,R.camera,!0)):this.currentMask.mask=null,this.pipelines.set(w),A.activeTexture(A.TEXTURE0),A.bindTexture(A.TEXTURE_2D,this.maskTarget.texture),A.activeTexture(A.TEXTURE1),A.bindTexture(A.TEXTURE_2D,this.maskSource.texture)},createProgram:function(E,M){var w=this.gl,A=w.createProgram(),R=w.createShader(w.VERTEX_SHADER),L=w.createShader(w.FRAGMENT_SHADER);w.shaderSource(R,E),w.shaderSource(L,M),w.compileShader(R),w.compileShader(L);var O=`Shader failed: 4678`;if(!w.getShaderParameter(R,w.COMPILE_STATUS))throw new Error("Vertex "+O+w.getShaderInfoLog(R));if(!w.getShaderParameter(L,w.COMPILE_STATUS))throw new Error("Fragment "+O+w.getShaderInfoLog(L));if(w.attachShader(A,R),w.attachShader(A,L),w.linkProgram(A),!w.getProgramParameter(A,w.LINK_STATUS))throw new Error("Link "+O+w.getProgramInfoLog(A));return w.useProgram(A),A},createVertexBuffer:function(E,M){var w=this.gl,A=w.createBuffer();return w.bindBuffer(w.ARRAY_BUFFER,A),w.bufferData(w.ARRAY_BUFFER,E,M),w.bindBuffer(w.ARRAY_BUFFER,null),A},createIndexBuffer:function(E,M){var w=this.gl,A=w.createBuffer();return w.bindBuffer(w.ELEMENT_ARRAY_BUFFER,A),w.bufferData(w.ELEMENT_ARRAY_BUFFER,E,M),w.bindBuffer(w.ELEMENT_ARRAY_BUFFER,null),A},deleteTexture:function(E){return E&&this.gl.deleteTexture(E),this},deleteFramebuffer:function(E){if(E){var M=this.gl;M.bindFramebuffer(M.FRAMEBUFFER,E);var w=M.getParameter(M.RENDERBUFFER_BINDING);w&&M.deleteRenderbuffer(w),M.bindFramebuffer(M.FRAMEBUFFER,null),M.deleteFramebuffer(E),d(this.fboStack,E),this.currentFramebuffer===E&&(this.currentFramebuffer=null)}return this},deleteProgram:function(E){return E&&this.gl.deleteProgram(E),this},deleteBuffer:function(E){return this.gl.deleteBuffer(E),this},preRenderCamera:function(E){var M=E.x,w=E.y,A=E.width,R=E.height,L=E.backgroundColor;if(E.emit(g.PRE_RENDER,E),this.pipelines.preBatchCamera(E),this.pushScissor(M,w,A,R),E.mask&&(this.currentCameraMask.mask=E.mask,this.currentCameraMask.camera=E._maskCamera,E.mask.preRenderWebGL(this,E,E._maskCamera)),L.alphaGL>0){var O=this.pipelines.setMulti();O.drawFillRect(M,w,A,R,y.getTintFromFloats(L.blueGL,L.greenGL,L.redGL,1),L.alphaGL)}},getCurrentStencilMask:function(){var E=null,M=this.maskStack,w=this.currentCameraMask;return M.length>0?E=M[M.length-1]:w.mask&&w.mask.isStencil&&(E=w),E},postRenderCamera:function(E){var M=E.flashEffect,w=E.fadeEffect;if(M.isRunning||w.isRunning||w.isComplete){var A=this.pipelines.setMulti();M.postRenderWebGL(A,y.getTintFromFloats),w.postRenderWebGL(A,y.getTintFromFloats)}E.dirty=!1,this.popScissor(),E.mask&&(this.currentCameraMask.mask=null,E.mask.postRenderWebGL(this,E._maskCamera)),this.pipelines.postBatchCamera(E),E.emit(g.POST_RENDER,E)},preRender:function(){if(!this.contextLost){var E=this.gl;if(E.bindFramebuffer(E.FRAMEBUFFER,null),this.config.clearBeforeRender){var M=this.config.backgroundColor;E.clearColor(M.redGL,M.greenGL,M.blueGL,M.alphaGL),E.clear(E.COLOR_BUFFER_BIT|E.DEPTH_BUFFER_BIT|E.STENCIL_BUFFER_BIT)}E.enable(E.SCISSOR_TEST),this.currentScissor=this.defaultScissor,this.scissorStack.length=0,this.scissorStack.push(this.currentScissor),this.game.scene.customViewports&&E.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.emit
4678(n.PRE_RENDER)}},render:function(E,M,w){if(!this.contextLost){var A=M.length;if(this.emit(n.RENDER,E,w),this.preRenderCamera(w),A===0){this.setBlendMode(a.BlendModes.NORMAL),this.postRenderCamera(w);return}this.currentType="";for(var R=this.currentMask,L=0;L<A;L++){this.finalType=L===A-1;var O=M[L],I=O.mask;R=this.currentMask,R.mask&&R.mask!==I&&R.mask.postRenderWebGL(this,R.camera),I&&R.mask!==I&&I.preRenderWebGL(this,O,w),O.blendMode!==this.currentBlendMode&&this.setBlendMode(O.blendMode);var D=O.type;D!==this.currentType&&(this.newType=!0,this.currentType=D),this.finalType?this.nextTypeMatch=!1:this.nextTypeMatch=M[L+1].type===this.currentType,O.renderWebGL(this,O,w),this.newType=!1}R=this.currentMask,R.mask&&R.mask.postRenderWebGL(this,R.camera),this.setBlendMode(a.BlendModes.NORMAL),this.postRenderCamera(w)}},postRender:function(){if(!this.contextLost){this.flush(),this.emit(n.POST_RENDER);var E=this.snapshotState;E.callback&&(P(this.gl,E),E.callback=null)}},clearStencilMask:function(){this.gl.disable(this.gl.STENCIL_TEST)},restoreStencilMask:function(){var E=this.gl,M=this.getCurrentStencilMask();if(M){var w=M.mask;E.enable(E.STENCIL_TEST),w.invertAlpha?E.stencilFunc(E.NOTEQUAL,w.level,255):E.stencilFunc(E.EQUAL,w.level,255)}},snapshot:function(E,M,w){return this.snapshotArea(0,0,this.gl.drawingBufferWidth,this.gl.drawingBufferHeight,E,M,w)},snapshotArea:function(E,M,w,A,R,L,O){var I=this.snapshotState;return I.callback=R,I.type=L,I.encoder=O,I.getPixel=!1,I.x=E,I.y=M,I.width=w,I.height=A,this},snapshotPixel:function(E,M,w){return this.snapshotArea(E,M,1,1,w),this.snapshotState.getPixel=!0,this},snapshotFramebuffer:function(E,M,w,A,R,L,O,I,D,B,z){R===void 0&&(R=!1),L===void 0&&(L=0),O===void 0&&(O=0),I===void 0&&(I=M),D===void 0&&(D=w),B==="pixel"&&(R=!0,B="image/png");var X=this.currentFramebuffer;this.snapshotArea(L,O,I,D,A,B,z);var W=this.snapshotState;return W.getPixel=R,W.isFramebuffer=!0,W.bufferWidth=M,W.bufferHeight=w,W.width=Math.min(W.width,M),W.height=Math.min(W.height,w),this.setFramebuffer(E),P(this.gl,W),this.setFramebuffer(X),W.callback=null,W.isFramebuffer=!1,this},canvasToTexture:function(E,M,w,A){return w===void 0&&(w=!1),A===void 0&&(A=!1),M?this.updateCanvasTexture(E,M,A):this.createCanvasTexture(E,w,A)},createCanvasTexture:function(E,M,w){M===void 0&&(M=!1),w===void 0&&(w=!1);var A=this.gl,R=A.NEAREST,L=A.NEAREST,O=E.width,I=E.height,D=A.CLAMP_TO_EDGE,B=o(O,I);return!M&&B&&(D=A.REPEAT),this.config.antialias&&(R=B&&this.mipmapFilter?this.mipmapFilter:A.LINEAR,L=A.LINEAR),this.createTexture2D(0,R,L,D,D,A.RGBA,E,O,I,!0,!1,w)},updateCanvasTexture:function(E,M,w){w===void 0&&(w=!1);var A=this.gl,R=E.width,L=E.height;if(R>0&&L>0){A.activeTexture(A.TEXTURE0);var O=A.getParameter(A.TEXTURE_BINDING_2D);A.bindTexture(A.TEXTURE_2D,M),w&&A.pixelStorei(A.UNPACK_FLIP_Y_WEBGL,!0),A.pixelStorei(A.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),A.texImage2D(A.TEXTURE_2D,0,A.RGBA,A.RGBA,A.UNSIGNED_BYTE,E),M.width=R,M.height=L,O&&A.bindTexture(A.TEXTURE_2D,O)}return M},createVideoTexture:function(E,M,w){M===void 0&&(M=!1),w===void 0&&(w=!1);var A=this.gl,R=A.NEAREST,L=A.NEAREST,O=E.videoWidth,I=E.videoHeight,D=A.CLAMP_TO_EDGE,B=o(O,I);return!M&&B&&(D=A.REPEAT),this.config.antialias&&(R=B&&this.mipmapFilter?this.mipmapFilter:A.LINEAR,L=A.LINEAR),this.createTexture2D(0,R,L,D,D,A.RGBA,E,O,I,!0,!0,w)},updateVideoTexture:function(E,M,w){w===void 0&&(w=!1);var A=this.gl,R=E.videoWidth,L=E.videoHeight;if(R>0&&L>0){A.activeTexture(A.TEXTURE0);var O=A.getParameter(A.TEXTURE_BINDING_2D);A.bindTexture(A.TEXTURE_2D,M),A.pixelStorei(A.UNPACK_FLIP_Y_WEBGL,w),A.texImage2D(A.TEXTURE_2D,0,A.RGBA,A.RGBA,A.UNSIGNED_BYTE,E),M.width=R,M.height=L,O&&A.bindTexture(A.TEXTURE_2D,O)}return M},setTextureFilter:function(E,M){var w=this.gl,A=[w.LINEAR,w.NEAREST][M];w.activeTexture(w.TEXTURE0);var R=w.getParameter(w.TEXTURE_BINDING_2D);return w.bindTexture(w.TEXTURE_2D,E),w.texParameteri(w.TEXTURE_2D,w.TEXTURE_MIN_FILTER,A),w.texParameteri(w.TEXTURE_2D,w.TEXTURE_MAG_FILTER,A),R&&w.bindTexture(w.TEXTURE_2D,R),this},getMaxTextureSize:function(){return this.config.maxTextureSize},destroy:function(){this.canvas.removeEventListener("webglcontextlost",this.contextLostHandler,!1),this.maskTarget.destroy(),this.maskSource.destroy(),this.pipelines.destroy(),this.removeAllListeners(),this.fboStack=[],this.maskStack=[],this.extensions={},this.textureIndexes=[],this.gl=null,this.game=null,this.canvas=null,this.contextLost=!0,this.currentMask=null,this.currentCameraMask=null}});l.exports=b},71305:(l,T,e)=>{/** 4679 * @author Richard Davey <[email protected]> 4680 * @copyright 2013-2023 Photon Storm Ltd. 4681 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4682 */var d=e(56694),g=e(72632),r=e(71402),a=new d({initialize:function(n,o,f,u,v){this.pipeline=n,this.name=o,this.renderer=n.renderer,this.gl=this.renderer.gl,this.fragSrc=u,this.vertSrc=f,this.program=this.renderer.createProgram(f,u),this.attributes,this.vertexComponentCount=0,this.vertexSize=0,this.uniforms={},this.createAttributes(v),this.createUniforms()},createAttributes:function(h){var n=0,o=0,f=[];this.vertexComponentCount=0;for(var u=0;u<h.length;u++){var v=h[u],m=v.name,p=g(v,"size",1),x=g(v,"type",r.FLOAT),y=x.enum,P=x.size,b=!!v.normalized;f.push({name:m,size:p,type:y,normalized:b,offset:o,enabled:!1,location:-1}),P===4?n+=p:n++,o+=p*P}this.vertexSize=o,this.vertexComponentCount=n,this.attributes=f},bind:function(h,n){return h===void 0&&(h=!1),n===void 0&&(n=!1),n&&this.pipeline.flush(),this.renderer.setProgram(this.program),h&&this.setAttribPointers(),this},rebind:function(){return this.renderer.setProgram(this.program),this.setAttribPointers(!0),this},setAttribPointers:function(h){h===void 0&&(h=!1);for(var n=this.gl,o=this.vertexSize,f=this.attributes,u=this.program,v=0;v<f.length;v++){var m=f[v],p=m.size,x=m.type,y=m.offset,P=m.enabled,b=m.location,E=!!m.normalized;if(h){var M=n.getAttribLocation(u,m.name);M>=0?(n.enableVertexAttribArray(M),n.vertexAttribPointer(M,p,x,E,o,y),m.enabled=!0,m.location=M):M!==-1&&n.disableVertexAttribArray(M)}else P?n.vertexAttribPointer(b,p,x,E,o,y):!P&&b>-1&&(n.disableVertexAttribArray(b),m.location=-1)}return this},createUniforms:function(){var h=this.gl,n=this.program,o=this.uniforms,f,u,v,m=h.getProgramParameter(n,h.ACTIVE_UNIFORMS);for(f=0;f<m;f++){var p=h.getActiveUniform(n,f);if(p){u=p.name,v=h.getUniformLocation(n,u),v!==null&&(o[u]={name:u,location:v,value1:null,value2:null,value3:null,value4:null});var x=u.indexOf("[");x>0&&(u=u.substr(0,x),o.hasOwnProperty(u)||(v=h.getUniformLocation(n,u),v!==null&&(o[u]={name:u,location:v,value1:null,value2:null,value3:null,value4:null})))}}return this},hasUniform:function(h){return this.uniforms.hasOwnProperty(h)},resetUniform:function(h){var n=this.uniforms[h];return n&&(n.value1=null,n.value2=null,n.value3=null,n.value4=null),this},setUniform1:function(h,n,o,f){var u=this.uniforms[n];return u?((f||u.value1!==o)&&(u.value1=o,this.renderer.setProgram(this.program),h.call(this.gl,u.location,o),this.pipeline.currentShader=this),this):this},setUniform2:function(h,n,o,f,u){var v=this.uniforms[n];return v?((u||v.value1!==o||v.value2!==f)&&(v.value1=o,v.value2=f,this.renderer.setProgram(this.program),h.call(this.gl,v.location,o,f),this.pipeline.currentShader=this),this):this},setUniform3:function(h,n,o,f,u,v){var m=this.uniforms[n];return m?((v||m.value1!==o||m.value2!==f||m.value3!==u)&&(m.value1=o,m.value2=f,m.value3=u,this.renderer.setProgram(this.program),h.call(this.gl,m.location,o,f,u),this.pipeline.currentShader=this),this):this},setUniform4:function(h,n,o,f,u,v,m){var p=this.uniforms[n];return p?((m||p.value1!==o||p.value2!==f||p.value3!==u||p.value4!==v)&&(p.value1=o,p.value2=f,p.value3=u,p.value4=v,this.renderer.setProgram(this.program),h.call(this.gl,p.location,o,f,u,v),this.pipeline.currentShader=this),this):this},setBoolean:function(h,n){return this.setUniform1(this.gl.uniform1i,h,Number(n))},set1f:function(h,n){return this.setUniform1(this.gl.uniform1f,h,n)},set2f:function(h,n,o){return this.setUniform2(this.gl.uniform2f,h,n,o)},set3f:function(h,n,o,f){return this.setUniform3(this.gl.uniform3f,h,n,o,f)},set4f:function(h,n,o,f,u){return this.setUniform4(this.gl.uniform4f,h,n,o,f,u)},set1fv:function(h,n){return this.setUniform1(this.gl.uniform1fv,h,n,!0)},set2fv:function(h,n){return this.setUniform1(this.gl.uniform2fv,h,n,!0)},set3fv:function(h,n){return this.setUniform1(this.gl.uniform3fv,h,n,!0)},set4fv:function(h,n){return this.setUniform1(this.gl.uniform4fv,h,n,!0)},set1iv:function(h,n){return this.setUniform1(this.gl.uniform1iv,h,n,!0)},set2iv:function(h,n){return this.setUniform1(this.gl.uniform2iv,h,n,!0)},set3iv:function(h,n){return this.setUniform1(this.gl.uniform3iv,h,n,!0)},set4iv:function(h,n){return this.setUniform1(this.gl.uniform4iv,h,n,!0)},set1i:function(h,n){return this.setUniform1(this.gl.uniform1i,h,n)},set2i:function(h,n,o){return this.setUniform2(this.gl.uniform2i,h,n,o)},set3i:function(h,n,o,f){return this.setUniform3(this.gl.uniform3i,h,n,o,f)},set4i:function(h,n,o,f,u){return this.setUniform4(this.gl.uniform4i,h,n,o,f,u)},setMatrix2fv:function(h,n,o){return this.setUniform2(this.gl.uniformMatrix2fv,h,n,o,!0)},setMatrix3fv:function(h,n,o){return this.setUniform2(this.gl.uniformMatrix3fv,h,n,o,!0)},setMatrix4fv:function(h,n,o){return this.setUniform2(this.gl.uniformMatrix4fv,h,n,o,!0)},createProgram:function(h,n){h===void 0&&(h=this.vertSrc),n===void 0&&(n=this.fragSrc);var o=this.gl;return this.program&&o.deleteProgram(this.program),this.vertSrc=h,this.fragSrc=n,this.program=this.renderer.createProgram(h,n),this.createUniforms(),this.rebind()},destroy:function(){this.gl.deleteProgram(this.program),this.pipeline=null,this.renderer=null,this.gl=null,this.program=null,this.attributes=null,this.uniforms=null}});l.exports=a},71402:l=>{/** 4683 * @author Richard Davey <[email protected]> 4684 * @copyright 2013-2023 Photon Storm Ltd. 4685 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4686 */var T={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}};l.exports=T},55478:(l,T,e)=>{/** 4687 * @author Richard Davey <[email protected]> 4688 * @copyright 2013-2023 Photon Storm Ltd. 4689 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4690 */var d=e(71402),g=e(98611),r={PipelineManager:e(35217),Pipelines:e(62253),RenderTarget:e(37410),Utils:e(75512),WebGLPipeline:e(44775),WebGLRenderer:e(11857),WebGLShader:e(71305)};r=g(!1,r,d),l.exports=r},5583:(l,T,e)=>{/** 4691 * @author Richard Davey <[email protected]> 4692 * @author Felipe Alfonso <@bitnenfer> 4693 * @copyright 2013-2023 Photon Storm Ltd. 4694 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4695 */var d=e(56694),g=e(72632),r=e(91679),a=e(89053),h=e(71402),n=e(44775),o=new d({Extends:n,initialize:function(u){u.fragShader=g(u,"fragShader",r),u.vertShader=g(u,"vertShader",a),u.batchSize=g(u,"batchSize",1),u.vertices=g(u,"vertices",[-1,1,-1,-7,7,1]),u.attributes=g(u,"attributes",[{name:"inPosition",size:2,type:h.FLOAT}]),n.call(this,u)},boot:function(){n.prototype.boot.call(this),this.set1i("uMainSampler",0),this.set1i("uMaskSampler",1)},resize:function(f,u){n.prototype.resize.call(this,f,u),this.set2f("uResolution",f,u)},beginMask:function(f,u,v){this.renderer.beginBitmapMask(f,v)},endMask:function(f,u,v){var m=this.gl,p=this.renderer,x=f.bitmapMask;x&&m&&(p.drawBitmapMask(x,u,this),v&&this.set2f("uResolution",v.width,v.height),this.set1i("uInvertMaskAlpha",f.invertAlpha),m.drawArrays(this.topology,0,3),v&&this.set2f("uResolution",this.width,this.height),m.bindTexture(m.TEXTURE_2D,null))}});l.exports=o},81828:(l,T,e)=>{/** 4696 * @author Richard Davey <[email protected]> 4697 * @copyright 2013-2023 Photon Storm Ltd. 4698 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4699 */var d=e(56694),g=e(58136),r=e(47406),a=e(72632),h=e(87228),n=e(92462),o=e(75512),f=new d({Extends:h,initialize:function(v){v.shaders=[o.setGlowQuality(n.FXGlowFrag,v.game),n.FXShadowFrag,n.FXPixelateFrag,n.FXVignetteFrag,n.FXShineFrag,n.FXBlurLowFrag,n.FXBlurMedFrag,
4699n.FXBlurHighFrag,n.FXGradientFrag,n.FXBloomFrag,n.ColorMatrixFrag,n.FXCircleFrag,n.FXBarrelFrag,n.FXDisplacementFrag,n.FXWipeFrag,n.FXBokehFrag],h.call(this,v);var m=this.game;this.glow=new g.Glow(m),this.shadow=new g.Shadow(m),this.pixelate=new g.Pixelate(m),this.vignette=new g.Vignette(m),this.shine=new g.Shine(m),this.gradient=new g.Gradient(m),this.circle=new g.Circle(m),this.barrel=new g.Barrel(m),this.wipe=new g.Wipe(m),this.bokeh=new g.Bokeh(m);var p=[];p[r.GLOW]=this.onGlow,p[r.SHADOW]=this.onShadow,p[r.PIXELATE]=this.onPixelate,p[r.VIGNETTE]=this.onVignette,p[r.SHINE]=this.onShine,p[r.BLUR]=this.onBlur,p[r.GRADIENT]=this.onGradient,p[r.BLOOM]=this.onBloom,p[r.COLOR_MATRIX]=this.onColorMatrix,p[r.CIRCLE]=this.onCircle,p[r.BARREL]=this.onBarrel,p[r.DISPLACEMENT]=this.onDisplacement,p[r.WIPE]=this.onWipe,p[r.BOKEH]=this.onBokeh,this.fxHandlers=p,this.source,this.target,this.swap},onDraw:function(u,v,m){this.source=u,this.target=v,this.swap=m;var p=u.width,x=u.height,y=this.tempSprite,P=this.fxHandlers;if(y&&y.preFX)for(var b=y.preFX.list,E=0;E<b.length;E++){var M=b[E];M.active&&P[M.type].call(this,M,p,x)}this.drawToGame(this.source)},runDraw:function(){var u=this.source,v=this.target;this.copy(u,v),this.source=v,this.target=u},onGlow:function(u,v,m){var p=this.shaders[r.GLOW];this.setShader(p),this.glow.onPreRender(u,p,v,m),this.runDraw()},onShadow:function(u){var v=this.shaders[r.SHADOW];this.setShader(v),this.shadow.onPreRender(u,v),this.runDraw()},onPixelate:function(u,v,m){var p=this.shaders[r.PIXELATE];this.setShader(p),this.pixelate.onPreRender(u,p,v,m),this.runDraw()},onVignette:function(u){var v=this.shaders[r.VIGNETTE];this.setShader(v),this.vignette.onPreRender(u,v),this.runDraw()},onShine:function(u,v,m){var p=this.shaders[r.SHINE];this.setShader(p),this.shine.onPreRender(u,p,v,m),this.runDraw()},onBlur:function(u,v,m){var p=a(u,"quality"),x=this.shaders[r.BLUR+p];this.setShader(x),this.set1i("uMainSampler",0),this.set2f("resolution",v,m),this.set1f("strength",a(u,"strength")),this.set3fv("color",a(u,"glcolor"));for(var y=a(u,"x"),P=a(u,"y"),b=a(u,"steps"),E=0;E<b;E++)this.set2f("offset",y,0),this.runDraw(),this.set2f("offset",0,P),this.runDraw()},onGradient:function(u){var v=this.shaders[r.GRADIENT];this.setShader(v),this.gradient.onPreRender(u,v),this.runDraw()},onBloom:function(u,v,m){var p=this.shaders[r.BLOOM];this.copySprite(this.source,this.swap),this.setShader(p),this.set1i("uMainSampler",0),this.set1f("strength",a(u,"blurStrength")),this.set3fv("color",a(u,"glcolor"));for(var x=2/v*a(u,"offsetX"),y=2/m*a(u,"offsetY"),P=a(u,"steps"),b=0;b<P;b++)this.set2f("offset",x,0),this.runDraw(),this.set2f("offset",0,y),this.runDraw();this.blendFrames(this.swap,this.source,this.target,a(u,"strength")),this.copySprite(this.target,this.source)},onColorMatrix:function(u){this.setShader(this.colorMatrixShader),this.set1fv("uColorMatrix",u.getData()),this.set1f("uAlpha",u.alpha),this.runDraw()},onCircle:function(u,v,m){var p=this.shaders[r.CIRCLE];this.setShader(p),this.circle.onPreRender(u,p,v,m),this.runDraw()},onBarrel:function(u){var v=this.shaders[r.BARREL];this.setShader(v),this.barrel.onPreRender(u,v),this.runDraw()},onDisplacement:function(u){this.setShader(this.shaders[r.DISPLACEMENT]),this.set1i("uDisplacementSampler",1),this.set2f("amount",u.x,u.y),this.bindTexture(u.glTexture,1),this.runDraw()},onWipe:function(u){var v=this.shaders[r.WIPE];this.setShader(v),this.wipe.onPreRender(u,v),this.runDraw()},onBokeh:function(u,v,m){var p=this.shaders[r.BOKEH];this.setShader(p),this.bokeh.onPreRender(u,p,v,m),this.runDraw()},destroy:function(){return this.glow.destroy(),this.shadow.destroy(),this.pixelate.destroy(),this.vignette.destroy(),this.shine.destroy(),this.gradient.destroy(),this.circle.destroy(),this.barrel.destroy(),this.wipe.destroy(),this.bokeh.destroy(),this.fxHandlers=null,this.source=null,this.target=null,this.swap=null,h.prototype.destroy.call(this),this}});l.exports=f},66901:(l,T,e)=>{/** 4700 * @author Richard Davey <[email protected]> 4701 * @author Felipe Alfonso <@bitnenfer> 4702 * @copyright 2013-2023 Photon Storm Ltd. 4703 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4704 */var d=e(56694),g=e(72632),r=e(65045),a=e(77310),h=e(69360),n=e(93736),o=e(44775),f=new d({Extends:a,initialize:function(v){var m=g(v,"fragShader",r);v.fragShader=m.replace("%LIGHT_COUNT%",v.game.renderer.config.maxLights),a.call(this,v),this.inverseRotationMatrix=new Float32Array([1,0,0,0,1,0,0,0,1]),this.defaultNormalMap,this.currentNormalMap,this.lightsActive=!0,this.tempVec2=new n,this._tempMatrix=new h,this._tempMatrix2=new h},boot:function(){o.prototype.boot.call(this);var u=this.gl,v=u.createTexture();u.activeTexture(u.TEXTURE0),u.bindTexture(u.TEXTURE_2D,v),u.texImage2D(u.TEXTURE_2D,0,u.RGBA,1,1,0,u.RGBA,u.UNSIGNED_BYTE,new Uint8Array([127,127,255,255])),this.defaultNormalMap={glTexture:v}},onRender:function(u,v){var m=u.sys.lights;if(this.lightsActive=!1,!(!m||!m.active)){var p=m.getLights(v),x=p.length;this.lightsActive=!0;var y,P=this.renderer,b=P.height,E=v.matrix,M=this.tempVec2;for(this.set1i("uMainSampler",0),this.set1i("uNormSampler",1),this.set2f("uResolution",this.width/2,this.height/2),this.set4f("uCamera",v.x,v.y,v.rotation,v.zoom),this.set3f("uAmbientLightColor",m.ambientColor.r,m.ambientColor.g,m.ambientColor.b),this.set1i("uLightCount",x),y=0;y<x;y++){var w=p[y].light,A=w.color,R="uLights["+y+"].";E.transformPoint(w.x,w.y,M),this.set2f(R+"position",M.x-v.scrollX*w.scrollFactorX*v.zoom,b-(M.y-v.scrollY*w.scrollFactorY*v.zoom)),this.set3f(R+"color",A.r,A.g,A.b),this.set1f(R+"intensity",w.intensity),this.set1f(R+"radius",w.radius)}this.currentNormalMapRotation=null}},setNormalMapRotation:function(u){if(u!==this.currentNormalMapRotation||this.vertexCount===0){this.vertexCount>0&&this.flush();var v=this.inverseRotationMatrix;if(u){var m=-u,p=Math.cos(m),x=Math.sin(m);v[1]=x,v[3]=-x,v[0]=v[4]=p}else v[0]=v[4]=1,v[1]=v[3]=0;this.setMatrix3fv("uInverseRotationMatrix",!1,v),this.currentNormalMapRotation=u}},setTexture2D:function(u,v){var m=this.renderer;u===void 0&&(u=m.whiteTexture);var p=this.getNormalMap(v);this.isNewNormalMap(u,p)&&(this.flush(),this.createBatch(u),this.addTextureToBatch(p),this.currentNormalMap=p);var x=0;if(v&&v.parentContainer){var y=v.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);x=y.rotationNormalized}else v&&(x=v.rotation);return this.setNormalMapRotation(x),0},setGameObject:function(u,v){v===void 0&&(v=u.frame);var m=v.glTexture,p=this.getNormalMap(u);if(this.isNewNormalMap(m,p)&&(this.flush(),this.createBatch(m),this.addTextureToBatch(p),this.currentNormalMap=p),u.parentContainer){var x=u.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);this.setNormalMapRotation(x.rotationNormalized)}else this.setNormalMapRotation(u.rotation);return 0},isNewNormalMap:function(u,v){return this.currentTexture!==u||this.currentNormalMap!==v},getNormalMap:function(u){var v;return u?u.displayTexture?v=u.displayTexture.dataSource[u.displayFrame.sourceIndex]:u.texture?v=u.texture.dataSource[u.frame.sourceIndex]:u.tileset&&(Array.isArray(u.tileset)?v=u.tileset[0].image.dataSource[0]:v=u.tileset.image.dataSource[0]):v=this.defaultNormalMap,v||(v=this.defaultNormalMap),v.glTexture},batchSprite:function(u,v,m){this.lightsActive&&a.prototype.batchSprite.call(this,u,v,m)},batchTexture:function(u,v,m,p,x,y,P,b,E,M,w,A,R,L,O,I,D,B,z,X,W,j,N,Y,F,G,k,V,U,$,K,J){this.lightsActive&&a.prototype.batchTexture.call(this,u,v,m,p,x,y,P,b,E,M,w,A,R,L,O,I,D,B,z,X,W,j,N,Y,F,G,k,V,U,$,K,J)},batchTextureFrame:function(u,v,m,p,x,y,P){this.lightsActive&&a.prototype.batchTextureFrame.call(this,u,v,m,p,x,y,P)}});l.exports=f},71264:(l,T,e)=>{/** 4705 * @author Richard Davey <[email protected]> 4706 * @copyright 2013-2023 Photon Storm Ltd. 4707 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4708 */var d=e(56694),g=e(72632),r=e(77310),a=e(85060),h=e(18166),n=e(71402),o=e(44775),f=new d({Extends:r,initialize:function(v){v.fragShader=g(v,"fragShader",a),v.vertShader=g(v,"vertShader",h),v.attributes=g(v,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:n.UNSIGNED_BYTE,normalized:!0}]),v.forceZero=!0,r.call(this,v)},boot:function(){o.prototype.boot.call(this),this.set1i("uMainSampler",0)}});l.exports=f},77310:(l,T,e)=>{/** 4709 * @author Richard Davey <[email protected]> 4710 * @author Felipe Alfonso <@bitnenfer> 4711 * @copyright 2013-2023 Photon Storm Ltd. 4712 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4713 */var d=e(56694),g=e(11117),r=e(72632),a=e(53787),h=e(15968),n=e(69360),o=e(75512),f=e(71402),u=e(44775),v=new d({Extends:u,initialize:function(p){var x=p.game.renderer,y=r(p,"fragShader",a);p.fragShader=o.parseFragmentShaderMaxTextures(y,x.maxTextures),p.vertShader=r(p,"vertShader",h),p.attributes=r(p,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:f.UNSIGNED_BYTE,normalized:!0}]),u.call(this,p),this._tempMatrix1=new n,this._tempMatrix2=new n,this._tempMatrix3=new n,this.calcMatrix=new n,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0}
4713,this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},boot:function(){u.prototype.boot.call(this),this.currentShader.set1iv("uMainSampler",this.renderer.textureIndexes)},batchSprite:function(m,p,x){this.manager.set(this,m);var y=this._tempMatrix1,P=this._tempMatrix2,b=this._tempMatrix3,E=m.frame,M=E.glTexture,w=E.u0,A=E.v0,R=E.u1,L=E.v1,O=E.x,I=E.y,D=E.cutWidth,B=E.cutHeight,z=E.customPivot,X=m.displayOriginX,W=m.displayOriginY,j=-X+O,N=-W+I;if(m.isCropped){var Y=m._crop;(Y.flipX!==m.flipX||Y.flipY!==m.flipY)&&E.updateCropUVs(Y,m.flipX,m.flipY),w=Y.u0,A=Y.v0,R=Y.u1,L=Y.v1,D=Y.width,B=Y.height,O=Y.x,I=Y.y,j=-X+O,N=-W+I}var F=1,G=1;m.flipX&&(z||(j+=-E.realWidth+X*2),F=-1),(m.flipY||E.source.isGLTexture&&!M.flipY)&&(z||(N+=-E.realHeight+W*2),G=-1);var k=m.x,V=m.y;P.applyITRS(k,V,m.rotation,m.scaleX*F,m.scaleY*G),y.copyFrom(p.matrix),x?(y.multiplyWithOffset(x,-p.scrollX*m.scrollFactorX,-p.scrollY*m.scrollFactorY),P.e=k,P.f=V):(P.e-=p.scrollX*m.scrollFactorX,P.f-=p.scrollY*m.scrollFactorY),y.multiply(P,b);var U=b.setQuad(j,N,j+D,N+B,p.roundPixels),$=o.getTintAppendFloatAlpha,K=p.alpha,J=$(m.tintTopLeft,K*m._alphaTL),_=$(m.tintTopRight,K*m._alphaTR),tt=$(m.tintBottomLeft,K*m._alphaBL),st=$(m.tintBottomRight,K*m._alphaBR);this.shouldFlush(6)&&this.flush();var ht=this.setGameObject(m,E);this.manager.preBatch(m),this.batchQuad(m,U[0],U[1],U[2],U[3],U[4],U[5],U[6],U[7],w,A,R,L,J,_,tt,st,m.tintFill,M,ht),this.manager.postBatch(m)},batchTexture:function(m,p,x,y,P,b,E,M,w,A,R,L,O,I,D,B,z,X,W,j,N,Y,F,G,k,V,U,$,K,J,_,tt){this.manager.set(this,m);var st=this._tempMatrix1,ht=this._tempMatrix2,lt=this._tempMatrix3,nt=X/x+U,gt=W/y+$,bt=(X+j)/x+U,Pt=(W+N)/y+$,dt=E,St=M,Tt=-B,Vt=-z;if(m.isCropped){var zt=m._crop,be=zt.width,pe=zt.height;dt=be,St=pe,E=be,M=pe,X=zt.x,W=zt.y;var Qt=X,Wt=W;L&&(Qt=j-zt.x-be),O&&(Wt=N-zt.y-pe),nt=Qt/x+U,gt=Wt/y+$,bt=(Qt+be)/x+U,Pt=(Wt+pe)/y+$,Tt=-B+X,Vt=-z+W}O=O^(!_&&p.isRenderTexture?1:0),L&&(dt*=-1,Tt+=E),O&&(St*=-1,Vt+=M),ht.applyITRS(P,b,R,w,A),st.copyFrom(K.matrix),J?(st.multiplyWithOffset(J,-K.scrollX*I,-K.scrollY*D),ht.e=P,ht.f=b):(ht.e-=K.scrollX*I,ht.f-=K.scrollY*D),st.multiply(ht,lt);var me=lt.setQuad(Tt,Vt,Tt+dt,Vt+St,K.roundPixels);tt===void 0&&(tt=this.setTexture2D(p)),m&&this.manager.preBatch(m),this.batchQuad(m,me[0],me[1],me[2],me[3],me[4],me[5],me[6],me[7],nt,gt,bt,Pt,Y,F,G,k,V,p,tt),m&&this.manager.postBatch(m)},batchTextureFrame:function(m,p,x,y,P,b,E){this.manager.set(this);var M=this._tempMatrix1.copyFrom(b),w=this._tempMatrix2;E?M.multiply(E,w):w=M;var A=w.setQuad(p,x,p+m.width,x+m.height,!1),R=this.setTexture2D(m.source.glTexture);y=o.getTintAppendFloatAlpha(y,P),this.batchQuad(null,A[0],A[1],A[2],A[3],A[4],A[5],A[6],A[7],m.u0,m.v0,m.u1,m.v1,y,y,y,y,0,m.glTexture,R)},batchFillRect:function(m,p,x,y,P,b){this.renderer.pipelines.set(this);var E=this.calcMatrix;b&&b.multiply(P,E);var M=E.setQuad(m,p,m+x,p+y,!1),w=this.fillTint;this.batchQuad(null,M[0],M[1],M[2],M[3],M[4],M[5],M[6],M[7],0,0,1,1,w.TL,w.TR,w.BL,w.BR,2)},batchFillTriangle:function(m,p,x,y,P,b,E,M){this.renderer.pipelines.set(this);var w=this.calcMatrix;M&&M.multiply(E,w);var A=w.getX(m,p),R=w.getY(m,p),L=w.getX(x,y),O=w.getY(x,y),I=w.getX(P,b),D=w.getY(P,b),B=this.fillTint;this.batchTri(null,A,R,L,O,I,D,0,0,1,1,B.TL,B.TR,B.BL,2)},batchStrokeTriangle:function(m,p,x,y,P,b,E,M,w){var A=this.tempTriangle;A[0].x=m,A[0].y=p,A[0].width=E,A[1].x=x,A[1].y=y,A[1].width=E,A[2].x=P,A[2].y=b,A[2].width=E,A[3].x=m,A[3].y=p,A[3].width=E,this.batchStrokePath(A,E,!1,M,w)},batchFillPath:function(m,p,x){this.renderer.pipelines.set(this);var y=this.calcMatrix;x&&x.multiply(p,y);for(var P=m.length,b=this.polygonCache,E,M,w=this.fillTint.TL,A=this.fillTint.TR,R=this.fillTint.BL,L=0;L<P;++L)M=m[L],b.push(M.x,M.y);E=g(b),P=E.length;for(var O=0;O<P;O+=3){var I=E[O+0]*2,D=E[O+1]*2,B=E[O+2]*2,z=b[I+0],X=b[I+1],W=b[D+0],j=b[D+1],N=b[B+0],Y=b[B+1],F=y.getX(z,X),G=y.getY(z,X),k=y.getX(W,j),V=y.getY(W,j),U=y.getX(N,Y),$=y.getY(N,Y);this.batchTri(null,F,G,k,V,U,$,0,0,1,1,w,A,R,2)}b.length=0},batchStrokePath:function(m,p,x,y,P){this.renderer.pipelines.set(this),this.prevQuad[4]=0,this.firstQuad[4]=0;for(var b=m.length-1,E=0;E<b;E++){var M=m[E],w=m[E+1];this.batchLine(M.x,M.y,w.x,w.y,M.width/2,w.width/2,p,E,!x&&E===b-1,y,P)}},batchLine:function(m,p,x,y,P,b,E,M,w,A,R){this.renderer.pipelines.set(this);var L=this.calcMatrix;R&&R.multiply(A,L);var O=x-m,I=y-p,D=Math.sqrt(O*O+I*I);if(D!==0){var B=P*(y-p)/D,z=P*(m-x)/D,X=b*(y-p)/D,W=b*(m-x)/D,j=x-X,N=y-W,Y=m-B,F=p-z,G=x+X,k=y+W,V=m+B,U=p+z,$=L.getX(j,N),K=L.getY(j,N),J=L.getX(Y,F),_=L.getY(Y,F),tt=L.getX(G,k),st=L.getY(G,k),ht=L.getX(V,U),lt=L.getY(V,U),nt=this.strokeTint,gt=nt.TL,bt=nt.TR,Pt=nt.BL,dt=nt.BR;if(this.batchQuad(null,ht,lt,J,_,$,K,tt,st,0,0,1,1,gt,bt,Pt,dt,2),!(E<=2)){var St=this.prevQuad,Tt=this.firstQuad;M>
47130&&St[4]?this.batchQuad(null,ht,lt,J,_,St[0],St[1],St[2],St[3],0,0,1,1,gt,bt,Pt,dt,2):(Tt[0]=ht,Tt[1]=lt,Tt[2]=J,Tt[3]=_,Tt[4]=1),w&&Tt[4]?this.batchQuad(null,$,K,tt,st,Tt[0],Tt[1],Tt[2],Tt[3],0,0,1,1,gt,bt,Pt,dt,2):(St[0]=$,St[1]=K,St[2]=tt,St[3]=st,St[4]=1)}}},destroy:function(){return this._tempMatrix1.destroy(),this._tempMatrix2.destroy(),this._tempMatrix3.destroy(),this._tempMatrix1=null,this._tempMatrix1=null,this._tempMatrix1=null,u.prototype.destroy.call(this),this}});l.exports=v},10919:(l,T,e)=>{/** 4714 * @author Richard Davey <[email protected]> 4715 * @copyright 2013-2023 Photon Storm Ltd. 4716 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4717 */var d=e(56694),g=e(72632),r=e(83327),a=e(54677),h=e(44775),n=new d({Extends:h,initialize:function(f){f.vertShader=g(f,"vertShader",a),f.fragShader=g(f,"fragShader",r),f.attributes=g(f,"attributes",[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius"},{name:"inLightAttenuation"},{name:"inLightColor",size:4}]),h.call(this,f)},onRender:function(o,f){this.set2f("uResolution",this.width,this.height),this.set1f("uCameraZoom",f.zoom)},batchPointLight:function(o,f,u,v,m,p,x,y,P,b,E,M){var w=o.color,A=o.intensity,R=o.radius,L=o.attenuation,O=w.r*A,I=w.g*A,D=w.b*A,B=f.alpha*o.alpha;this.shouldFlush(6)&&this.flush(),this.currentBatch||this.setTexture2D(),this.batchLightVert(u,v,E,M,R,L,O,I,D,B),this.batchLightVert(m,p,E,M,R,L,O,I,D,B),this.batchLightVert(x,y,E,M,R,L,O,I,D,B),this.batchLightVert(u,v,E,M,R,L,O,I,D,B),this.batchLightVert(x,y,E,M,R,L,O,I,D,B),this.batchLightVert(P,b,E,M,R,L,O,I,D,B),this.currentBatch.count=this.vertexCount-this.currentBatch.start},batchLightVert:function(o,f,u,v,m,p,x,y,P,b){var E=this.vertexViewF32,M=this.vertexCount*this.currentShader.vertexComponentCount-1;E[++M]=o,E[++M]=f,E[++M]=u,E[++M]=v,E[++M]=m,E[++M]=p,E[++M]=x,E[++M]=y,E[++M]=P,E[++M]=b,this.vertexCount++}});l.exports=n},80486:(l,T,e)=>{/** 4718 * @author Richard Davey <[email protected]> 4719 * @copyright 2013-2023 Photon Storm Ltd. 4720 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4721 */var d=e(56694),g=e(65246),r=e(72632),a=e(12569),h=e(99365),n=e(44775),o=new d({Extends:n,initialize:function(u){u.renderTarget=r(u,"renderTarget",1),u.fragShader=r(u,"fragShader",a),u.vertShader=r(u,"vertShader",h),u.attributes=r(u,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),u.batchSize=1,u.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],n.call(this,u),this.isPostFX=!0,this.gameObject,this.controller,this.colorMatrix=new g,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){n.prototype.boot.call(this);var f=this.manager.UTILITY_PIPELINE;this.fullFrame1=f.fullFrame1,this.fullFrame2=f.fullFrame2,this.halfFrame1=f.halfFrame1,this.halfFrame2=f.halfFrame2,this.set1i("uMainSampler",0)},onDraw:function(f){this.bindAndDraw(f)},getController:function(f){return f!==void 0?f:this.controller?this.controller:this},copySprite:function(f,u,v){v===void 0&&(v=!1);var m=this.gl;m.activeTexture(m.TEXTURE0),m.bindTexture(m.TEXTURE_2D,f.texture);var p=m.getParameter(m.FRAMEBUFFER_BINDING);m.bindFramebuffer(m.FRAMEBUFFER,u.framebuffer),m.framebufferTexture2D(m.FRAMEBUFFER,m.COLOR_ATTACHMENT0,m.TEXTURE_2D,u.texture,0),m.clearColor(0,0,0,0),m.clear(m.COLOR_BUFFER_BIT),m.bufferData(m.ARRAY_BUFFER,this.vertexData,m.STATIC_DRAW),m.drawArrays(m.TRIANGLES,0,6),v&&(m.bindTexture(m.TEXTURE_2D,null),m.bindFramebuffer(m.FRAMEBUFFER,p))},copyFrame:function(f,u,v,m,p){this.manager.copyFrame(f,u,v,m,p)},copyToGame:function(f){this.manager.copyToGame(f)},drawFrame:function(f,u,v){this.manager.drawFrame(f,u,v,this.colorMatrix)},blendFrames:function(f,u,v,m,p){this.manager.blendFrames(f,u,v,m,p)},blendFramesAdditive:function(f,u,v,m,p){this.manager.blendFramesAdditive(f,u,v,m,p)},clearFrame:function(f,u){this.manager.clearFrame(f,u)},blitFrame:function(f,u,v,m,p,x){this.manager.blitFrame(f,u,v,m,p,x)},copyFrameRect:function(f,u,v,m,p,x,y,P){this.manager.copyFrameRect(f,u,v,m,p,x,y,P)},bindAndDraw:function(f,u,v,m,p){v===void 0&&(v=!0),m===void 0&&(m=!0);var x=this.gl,y=this.renderer;this.bind(p),this.set1i("uMainSampler",0),u?(x.viewport(0,0,u.width,u.height),x.bindFramebuffer(x.FRAMEBUFFER,u.framebuffer),x.framebufferTexture2D(x.FRAMEBUFFER,x.COLOR_ATTACHMENT0,x.TEXTURE_2D,u.texture,0),v&&(m?x.clearColor(0,0,0,0):x.clearColor(0,0,0,1),x.clear(x.COLOR_BUFFER_BIT))):(y.popFramebuffer(!1,!1),y.currentFramebuffer||x.viewport(0,0,y.width,y.height)),y.restoreStencilMask(),x.activeTexture(x.TEXTURE0),x.bindTexture(x.TEXTURE_2D,f.texture),x.bufferData(x.ARRAY_BUFFER,this.vertexData,x.STATIC_DRAW),x.drawArrays(x.TRIANGLES,0,6),u&&(x.bindTexture(x.TEXTURE_2D,null),x.bindFramebuffer(x.FRAMEBUFFER,y.currentFramebuffer))},destroy:function(){return this.controller&&this.controller.destroy(),this.gameObject=null,this.controller=null,this.colorMatrix=null,this.fullFrame1=null,this.fullFrame2=null,this.halfFrame1=null,this.halfFrame2=null,n.prototype.destroy.call(this),this}});l.exports=o},87228:(l,T,e)=>{/** 4722 * @author Richard Davey <[email protected]> 4723 * @copyright 2013-2023 Photon Storm Ltd. 4724 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4725 */var d=e(95723),g=e(79993),r=e(56694),a=e(37486),h=e(72632),n=e(77310),o=e(12569),f=e(74118),u=e(37410),v=e(85060),m=e(18166),p=e(44775),x=new r({Extends:n,initialize:function(P){var b=h(P,"fragShader",o),E=h(P,"vertShader",m),M=h(P,"drawShader",o),w=[{name:"DrawSprite",fragShader:v,vertShader:m},{name:"CopySprite",fragShader:b,vertShader:E},{name:"DrawGame",fragShader:M,vertShader:m},{name:"ColorMatrix",fragShader:a}],A=h(P,"shaders",[]);P.shaders=w.concat(A),P.vertShader||(P.vertShader=E),P.batchSize=1,n.call(this,P),this.isPreFX=!0,this.customMainSampler=null,this.drawSpriteShader,this.copyShader,this.gameShader,this.colorMatrixShader,this.quadVertexData,this.quadVertexBuffer,this.quadVertexViewF32,this.spriteBounds=new f,this.targetBounds=new f,this.fsTarget,this.tempSprite,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){p.prototype.boot.call(this);var y=this.shaders,P=this.renderer;this.drawSpriteShader=y[0],this.copyShader=y[1],this.gameShader=y[2],this.colorMatrixShader=y[3],this.fsTarget=new u(P,P.width,P.height,1,0,!0,!0),this.renderTargets=this.manager.renderTargets.concat(this.fsTarget);var b=new ArrayBuffer(168);this.quadVertexData=b,this.quadVertexViewF32=new Float32Array(b),this.quadVertexBuffer=P.createVertexBuffer(b,this.gl.STATIC_DRAW),this.onResize(P.width,P.height),this.currentShader=this.copyShader},onResize:function(y,P){var b=this.quadVertexViewF32;b[1]=P,b[22]=P,b[14]=y,b[28]=y,b[35]=y,b[36]=P},batchQuad:function(y,P,b,E,M,w,A,R,L,O,I,D,B,z,X,W,j,N,Y){var F=Math.min(P,E,w,R),G=Math.min(b,M,A,L),k=Math.max(P,E,w,R),V=Math.max(b,M,A,L),U=k-F,$=V-G,K=this.spriteBounds.setTo(F,G,U,$),J=y?y.preFX.padding:0,_=U+J*2,tt=$+J*2,st=Math.abs(Math.max(_,tt)),ht=this.manager.getRenderTarget(st),lt=this.targetBounds.setTo(0,0,ht.width,ht.height);g(lt,K.centerX,K.centerY),this.tempSprite=y;var nt=this.gl,gt=this.renderer;gt.clearStencilMask(),this.setShader(this.drawSpriteShader),this.set1i("uMainSampler",0),this.flipProjectionMatrix(!0),y&&(this.onDrawSprite(y,ht),y.preFX.onFX(this));var bt=this.fsTarget;return this.flush(),nt.viewport(0,0,gt.width,gt.height),nt.bindFramebuffer(nt.FRAMEBUFFER,bt.framebuffer),nt.framebufferTexture2D(nt.FRAMEBUFFER,nt.COLOR_ATTACHMENT0,nt.TEXTURE_2D,bt.texture,0),nt.clearColor(0,0,0,0),nt.clear(nt.COLOR_BUFFER_BIT),this.setTexture2D(Y),this.batchVert(P,b,O,I,0,N,z),this.batchVert(E,M,O,B,0,N,W),this.batchVert(w,A,D,B,0,N,j),this.batchVert(P,b,O,I,0,N,z),this.batchVert(w,A,D,B,0,N,j),this.batchVert(R,L,D,I,0,N,X),this.flush(),this.flipProjectionMatrix(!1),nt.activeTexture(nt.TEXTURE0),nt.bindTexture(nt.TEXTURE_2D,ht.texture),nt.copyTexSubImage2D(nt.TEXTURE_2D,0,0,0,lt.x,lt.y,lt.width,lt.height),nt.bindFramebuffer(nt.FRAMEBUFFER,null),nt.bindTexture(nt.TEXTURE_2D,null),this.onBatch(y),this.currentShader=this.copyShader,this.onDraw(ht,this.manager.getSwapRenderTarget(),this.manager.getAltSwapRenderTarget()),!0},onDrawSprite:function(){},onCopySprite:function(){},copySprite:function(y,P,b,E,M,w,A){b===void 0&&(b=!0),E===void 0&&(E=!0),M===void 0&&(M=!1),A===void 0&&(A=this.copyShader);var R=this.gl,L=this.tempSprite;w&&(A=this.colorMatrixShader),this.currentShader=A;var O=this.setVertexBuffer(this.quadVertexBuffer);if(A.bind(O,!1),this.set1i("uMainSampler",0),L.preFX.onFXCopy(this),this.onCopySprite(y,P,L),w&&(this.set1fv("uColorMatrix",w.getData()),this.set1f("uAlpha",w.alpha)),R.activeTexture(R.TEXTURE0),R.bindTexture(R.TEXTURE_2D,y.texture),y.height>P.height)R.viewport(0,0,y.width,y.height),this.setTargetUVs(y,P);else{var I=P.height-y.height;R.viewport(0,I,y.width,y.height),this.resetUVs()}if(R.bindFramebuffer(R.FRAMEBUFFER,P.framebuffer),R.framebufferTexture2D(R.FRAMEBUFFER,R.COLOR_ATTACHMENT0,R.TEXTURE_2D,P.texture,0),b&&(R.clearColor(0,0,0,+!E),R.clear(R.COLOR_BUFFER_BIT)),M){var D=this.renderer.currentBlendMode;this.renderer.setBlendMode(d.ERASE)}R.bufferData(R.ARRAY_BUFFER,this.quadVertexData,R.STATIC_DRAW),R.drawArrays(R.TRIANGLES,0,6),M&&this.renderer.setBlendMode(D),R.bindFramebuffer(R.FRAMEBUFFER,null)},copy:function(y,P){var b=this.gl;this.set1i("uMainSampler",0),b.activeTexture(b.TEXTURE0),b.bindTexture(b.TEXTURE_2D,y.texture),b.viewport(0,0,y.width,y.height),this.setUVs(0,0,0,1,1,1,1,0),b.bindFramebuffer(b.FRAMEBUFFER,P.framebuffer),b.framebufferTexture2D(b.FRAMEBUFFER,b.COLOR_ATTACHMENT0,b.TEXTURE_2D,P.texture,0),b.clearColor(0,0,0,0),b.clear(b.COLOR_BUFFER_BIT),b.bufferData(b.ARRAY_BUFFER,this.quadVertexData,b.STATIC_DRAW),b.drawArrays(b.TRIANGLES,0,6),b.bindFramebuffer(b.FRAMEBUFFER,null)},blendFrames:function(y,P,b,E,M){this.manager.blendFrames(y,P,b,E,M)},blendFramesAdditive:function(y,P,b,E,M){this.manager.blendFramesAdditive(y,P,b,E,M)},drawToGame:function(y){this.currentShader=null,this.setShader(this.copyShader),this.bindAndDraw(y)},copyToGame:function(y){this.currentShader=null,this.setShader(this.gameShader),this.bindAndDraw(y)},bindAndDraw:function(y){var P=this.gl,b=this.renderer;this.set1i("uMainSampler",0),this.customMainSampler?this.setTexture2D(this.customMainSampler):this.setTexture2D(y.texture);var E=this._tempMatrix1.loadIdentity(),M=this.targetBounds.x,w=this.targetBounds.y,A=M+y.width,R=w+y.height,L=E.getX(M,w),O=E.getX(M,R),I=E.getX(A,R),D=E.getX(A,w),B=E.getY(M,w),z=E.getY(M,R),X=E.getY(A,R),W=E.getY(A,w),j=16777215;this.batchVert(L,B,0,0,0,0,j),this.batchVert(O,z,0,1,0,0,j),this.batchVert(I,X,1,1,0,0,j),this.batchVert(L,B,0,0,0,0,j),this.batchVert(I,X,1,1,0,0,j),this.batchVert(D,W,1,0,0,0,j),b.restoreFramebuffer(!1,!0),b.currentFramebuffer||P.viewport(0,0,b.width,b.height),b.restoreStencilMask(),this.flush(),this.tempSprite=null},onDraw:function(y){this.drawToGame(y)},setUVs:function(y,P,b,E,M,w,A,R){var L=this.quadVertexViewF32;
4725L[2]=y,L[3]=P,L[9]=b,L[10]=E,L[16]=M,L[17]=w,L[23]=y,L[24]=P,L[30]=M,L[31]=w,L[37]=A,L[38]=R},setTargetUVs:function(y,P){var b=P.height/y.height;b>.5?b=.5-(b-.5):b=.5+(.5-b),this.setUVs(0,b,0,1+b,1,1+b,1,b)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)},destroy:function(){return this.gl.deleteBuffer(this.quadVertexBuffer),this.drawSpriteShader=null,this.copyShader=null,this.gameShader=null,this.colorMatrixShader=null,this.quadVertexData=null,this.quadVertexBuffer=null,this.quadVertexViewF32=null,this.fsTarget=null,this.tempSprite=null,n.prototype.destroy.call(this),this}});l.exports=x},21213:(l,T,e)=>{/** 4726 * @author Richard Davey <[email protected]> 4727 * @copyright 2013-2023 Photon Storm Ltd. 4728 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4729 */var d=e(56694),g=e(72632),r=e(77310),a=new d({Extends:r,initialize:function(n){n.topology=5,n.batchSize=g(n,"batchSize",256),r.call(this,n)}});l.exports=a},51212:(l,T,e)=>{/** 4730 * @author Richard Davey <[email protected]> 4731 * @copyright 2013-2023 Photon Storm Ltd. 4732 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4733 */var d=e(56694),g=e(72632),r=e(77310),a=e(85060),h=e(18166),n=e(44775),o=new d({Extends:r,initialize:function(u){u.fragShader=g(u,"fragShader",a),u.vertShader=g(u,"vertShader",h),u.forceZero=!0,r.call(this,u)},boot:function(){n.prototype.boot.call(this),this.set1i("uMainSampler",0)}});l.exports=o},60848:(l,T,e)=>{/** 4734 * @author Richard Davey <[email protected]> 4735 * @copyright 2013-2023 Photon Storm Ltd. 4736 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4737 */var d=e(2529),g=e(95723),r=e(56694),a=e(65246),h=e(37486),n=e(79060),o=e(72632),f=e(98921),u=e(99365),v=e(44775),m=new r({Extends:v,initialize:function(x){x.renderTarget=o(x,"renderTarget",[{scale:1},{scale:1},{scale:.5},{scale:.5}]),x.vertShader=o(x,"vertShader",u),x.shaders=o(x,"shaders",[{name:"Copy",fragShader:n},{name:"AddBlend",fragShader:d},{name:"LinearBlend",fragShader:f},{name:"ColorMatrix",fragShader:h}]),x.attributes=o(x,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),x.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],x.batchSize=1,v.call(this,x),this.colorMatrix=new a,this.copyShader,this.addShader,this.linearShader,this.colorMatrixShader,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2},boot:function(){v.prototype.boot.call(this);var p=this.shaders,x=this.renderTargets;this.copyShader=p[0],this.addShader=p[1],this.linearShader=p[2],this.colorMatrixShader=p[3],this.fullFrame1=x[0],this.fullFrame2=x[1],this.halfFrame1=x[2],this.halfFrame2=x[3]},copyFrame:function(p,x,y,P,b){y===void 0&&(y=1),P===void 0&&(P=!0),b===void 0&&(b=!0);var E=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",y),E.activeTexture(E.TEXTURE0),E.bindTexture(E.TEXTURE_2D,p.texture),x?(E.viewport(0,0,x.width,x.height),E.bindFramebuffer(E.FRAMEBUFFER,x.framebuffer),E.framebufferTexture2D(E.FRAMEBUFFER,E.COLOR_ATTACHMENT0,E.TEXTURE_2D,x.texture,0)):E.viewport(0,0,p.width,p.height),P&&(b?E.clearColor(0,0,0,0):E.clearColor(0,0,0,1),E.clear(E.COLOR_BUFFER_BIT)),E.bufferData(E.ARRAY_BUFFER,this.vertexData,E.STATIC_DRAW),E.drawArrays(E.TRIANGLES,0,6),E.bindFramebuffer(E.FRAMEBUFFER,null),E.bindTexture(E.TEXTURE_2D,null)},blitFrame:function(p,x,y,P,b,E,M){y===void 0&&(y=1),P===void 0&&(P=!0),b===void 0&&(b=!0),E===void 0&&(E=!1),M===void 0&&(M=!1);var w=this.gl;if(this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",y),w.activeTexture(w.TEXTURE0),w.bindTexture(w.TEXTURE_2D,p.texture),p.height>x.height)w.viewport(0,0,p.width,p.height),this.setTargetUVs(p,x);else{var A=x.height-p.height;w.viewport(0,A,p.width,p.height)}if(w.bindFramebuffer(w.FRAMEBUFFER,x.framebuffer),w.framebufferTexture2D(w.FRAMEBUFFER,w.COLOR_ATTACHMENT0,w.TEXTURE_2D,x.texture,0),P&&(b?w.clearColor(0,0,0,0):w.clearColor(0,0,0,1),w.clear(w.COLOR_BUFFER_BIT)),E){var R=this.renderer.currentBlendMode;this.renderer.setBlendMode(g.ERASE)}M&&this.flipY(),w.bufferData(w.ARRAY_BUFFER,this.vertexData,w.STATIC_DRAW),w.drawArrays(w.TRIANGLES,0,6),E&&this.renderer.setBlendMode(R
4737),w.bindFramebuffer(w.FRAMEBUFFER,null),w.bindTexture(w.TEXTURE_2D,null),this.resetUVs()},copyFrameRect:function(p,x,y,P,b,E,M,w){M===void 0&&(M=!0),w===void 0&&(w=!0);var A=this.gl;A.bindFramebuffer(A.FRAMEBUFFER,p.framebuffer),A.framebufferTexture2D(A.FRAMEBUFFER,A.COLOR_ATTACHMENT0,A.TEXTURE_2D,p.texture,0),M&&(w?A.clearColor(0,0,0,0):A.clearColor(0,0,0,1),A.clear(A.COLOR_BUFFER_BIT)),A.activeTexture(A.TEXTURE0),A.bindTexture(A.TEXTURE_2D,x.texture),A.copyTexSubImage2D(A.TEXTURE_2D,0,0,0,y,P,b,E),A.bindFramebuffer(A.FRAMEBUFFER,null),A.bindTexture(A.TEXTURE_2D,null)},copyToGame:function(p){var x=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",1),this.renderer.popFramebuffer(),x.activeTexture(x.TEXTURE0),x.bindTexture(x.TEXTURE_2D,p.texture),x.bufferData(x.ARRAY_BUFFER,this.vertexData,x.STATIC_DRAW),x.drawArrays(x.TRIANGLES,0,6)},drawFrame:function(p,x,y,P){y===void 0&&(y=!0),P===void 0&&(P=this.colorMatrix);var b=this.gl;this.setShader(this.colorMatrixShader),this.set1i("uMainSampler",0),this.set1fv("uColorMatrix",P.getData()),this.set1f("uAlpha",P.alpha),b.activeTexture(b.TEXTURE0),b.bindTexture(b.TEXTURE_2D,p.texture),x?(b.viewport(0,0,x.width,x.height),b.bindFramebuffer(b.FRAMEBUFFER,x.framebuffer),b.framebufferTexture2D(b.FRAMEBUFFER,b.COLOR_ATTACHMENT0,b.TEXTURE_2D,x.texture,0)):b.viewport(0,0,p.width,p.height),y?b.clearColor(0,0,0,0):b.clearColor(0,0,0,1),b.clear(b.COLOR_BUFFER_BIT),b.bufferData(b.ARRAY_BUFFER,this.vertexData,b.STATIC_DRAW),b.drawArrays(b.TRIANGLES,0,6),b.bindFramebuffer(b.FRAMEBUFFER,null),b.bindTexture(b.TEXTURE_2D,null)},blendFrames:function(p,x,y,P,b,E){P===void 0&&(P=1),b===void 0&&(b=!0),E===void 0&&(E=this.linearShader);var M=this.gl;this.setShader(E),this.set1i("uMainSampler1",0),this.set1i("uMainSampler2",1),this.set1f("uStrength",P),M.activeTexture(M.TEXTURE0),M.bindTexture(M.TEXTURE_2D,p.texture),M.activeTexture(M.TEXTURE1),M.bindTexture(M.TEXTURE_2D,x.texture),y?(M.bindFramebuffer(M.FRAMEBUFFER,y.framebuffer),M.framebufferTexture2D(M.FRAMEBUFFER,M.COLOR_ATTACHMENT0,M.TEXTURE_2D,y.texture,0),M.viewport(0,0,y.width,y.height)):M.viewport(0,0,p.width,p.height),b?M.clearColor(0,0,0,0):M.clearColor(0,0,0,1),M.clear(M.COLOR_BUFFER_BIT),M.bufferData(M.ARRAY_BUFFER,this.vertexData,M.STATIC_DRAW),M.drawArrays(M.TRIANGLES,0,6),M.bindFramebuffer(M.FRAMEBUFFER,null),M.bindTexture(M.TEXTURE_2D,null)},blendFramesAdditive:function(p,x,y,P,b){this.blendFrames(p,x,y,P,b,this.addShader)},clearFrame:function(p,x){x===void 0&&(x=!0);var y=this.gl;y.viewport(0,0,p.width,p.height),y.bindFramebuffer(y.FRAMEBUFFER,p.framebuffer),x?y.clearColor(0,0,0,0):y.clearColor(0,0,0,1),y.clear(y.COLOR_BUFFER_BIT);var P=this.renderer.currentFramebuffer;y.bindFramebuffer(y.FRAMEBUFFER,P)},setUVs:function(p,x,y,P,b,E,M,w){var A=this.vertexViewF32;A[2]=p,A[3]=x,A[6]=y,A[7]=P,A[10]=b,A[11]=E,A[14]=p,A[15]=x,A[18]=b,A[19]=E,A[22]=M,A[23]=w},setTargetUVs:function(p,x){var y=x.height/p.height;y>.5?y=.5-(y-.5):y=.5+(.5-y),this.setUVs(0,y,0,1+y,1,1+y,1,y)},flipX:function(){this.setUVs(1,0,1,1,0,1,0,0)},flipY:function(){this.setUVs(0,1,0,0,1,0,1,1)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)}});l.exports=m},65641:l=>{/** 4738 * @author Richard Davey <[email protected]> 4739 * @copyright 2013-2023 Photon Storm Ltd. 4740 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4741 */var T={BITMAPMASK_PIPELINE:"BitmapMaskPipeline",LIGHT_PIPELINE:"Light2D",POINTLIGHT_PIPELINE:"PointLightPipeline",SINGLE_PIPELINE:"SinglePipeline",MULTI_PIPELINE:"MultiPipeline",ROPE_PIPELINE:"RopePipeline",GRAPHICS_PIPELINE:"GraphicsPipeline",POSTFX_PIPELINE:"PostFXPipeline",UTILITY_PIPELINE:"UtilityPipeline",MOBILE_PIPELINE:"MobilePipeline",FX_PIPELINE:"FxPipeline"};l.exports=T},68726:l=>{/** 4742 * @author Richard Davey <[email protected]> 4743 * @copyright 2013-2023 Photon Storm Ltd. 4744 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4745 */l.exports="pipelineafterflush"},67186:l=>{/** 4746 * @author Richard Davey <[email protected]> 4747 * @copyright 2013-2023 Photon Storm Ltd. 4748 * @license {@link https://opensource.org/licenses/MIT|MIT License}
4749 */l.exports="pipelinebeforeflush"},22709:l=>{/** 4750 * @author Richard Davey <[email protected]> 4751 * @copyright 2013-2023 Photon Storm Ltd. 4752 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4753 */l.exports="pipelinebind"},74469:l=>{/** 4754 * @author Richard Davey <[email protected]> 4755 * @copyright 2013-2023 Photon Storm Ltd. 4756 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4757 */l.exports="pipelineboot"},93953:l=>{/** 4758 * @author Richard Davey <[email protected]> 4759 * @copyright 2013-2023 Photon Storm Ltd. 4760 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4761 */l.exports="pipelinedestroy"},51687:l=>{/** 4762 * @author Richard Davey <[email protected]> 4763 * @copyright 2013-2023 Photon Storm Ltd. 4764 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4765 */l.exports="pipelinerebind"},25034:l=>{/** 4766 * @author Richard Davey <[email protected]> 4767 * @copyright 2013-2023 Photon Storm Ltd. 4768 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4769 */l.exports="pipelineresize"},18970:(l,T,e)=>{/** 4770 * @author Richard Davey <[email protected]> 4771 * @copyright 2013-2023 Photon Storm Ltd. 4772 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4773 */l.exports={AFTER_FLUSH:e(68726),BEFORE_FLUSH:e(67186),BIND:e(22709),BOOT:e(74469),DESTROY:e(93953),REBIND:e(51687),RESIZE:e(25034)}},32469:(l,T,e)=>{/** 4774 * @author Richard Davey <[email protected]> 4775 * @copyright 2013-2023 Photon Storm Ltd. 4776 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4777 */var d=e(56694),g=e(87751),r=e(80486),a=new d({Extends:r,initialize:function(n){r.call(this,{game:n,fragShader:g}),this.amount=1},onPreRender:function(h,n){h=this.getController(h),this.set1f("amount",h.amount,n)}});l.exports=a},2134:(l,T,e)=>{/** 4778 * @author Richard Davey <[email protected]> 4779 * @copyright 2013-2023 Photon Storm Ltd. 4780 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4781 */var d=e(56694),g=e(88222),r=e(80486),a=new d({Extends:r,initialize:function(n){r.call(this,{game:n,fragShader:g}),this.steps=4,this.offsetX=1,this.offsetY=1,this.blurStrength=1,this.strength=1,this.glcolor=[1,1,1]},onPreRender:function(h){h=this.getController(h),this.set1f("strength",h.blurStrength),this.set3fv("color",h.glcolor)},onDraw:function(h){var n=this.getController(),o=this.fullFrame1,f=this.fullFrame2;this.copyFrame(h,f);for(var u=2/h.width*n.offsetX,v=2/h.height*n.offsetY,m=0;m<n.steps;m++)this.set2f("offset",u,0),this.copySprite(h,o),this.set2f("offset",0,v),this.copySprite(o,h);this.blendFrames(f,h,o,n.strength),this.copyToGame(o)}});l.exports=a},63377:(l,T,e)=>{/** 4782 * @author Richard Davey <[email protected]> 4783 * @copyright 2013-2023 Photon Storm Ltd. 4784 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4785 */var d=e(56694),g=e(35491),r=e(75568),a=e(44481),h=e(80486),n=new d({Extends:h,initialize:function(f){h.call(this,{game:f,shaders:[{name:"Gaussian5",fragShader:g},{name:"Gaussian9",fragShader:r},{name:"Gaussian13",fragShader:a}]}),this.activeShader=this.shaders[0],this.x=2,this.y=2,this.steps=4,this.strength=1,this.glcolor=[1,1,1]},setQualityLow:function(){return this.activeShader=this.shaders[0],this},setQualityMedium:function(){return this.activeShader=this.shaders[1],this},setQualityHigh:function(){return this.activeShader=this.shaders[2],this},onDraw:function(o){var f=this.getController(),u=this.gl,v=this.fullFrame1,m=u.getParameter(u.FRAMEBUFFER_BINDING);this.bind(this.activeShader),u.activeTexture(u.TEXTURE0),u.viewport(0,0,o.width,o.height),this.set1i("uMainSampler",0),this.set2f("resolution",o.width,o.height),this.set1f("strength",f.strength),this.set3fv("color",f.glcolor);for(var p=0;p<f.steps;p++)this.set2f("offset",f.x,0),this.copySprite(o,v),this.set2f("offset",0,f.y),this.copySprite(v,o);u.bindFramebuffer(u.FRAMEBUFFER,m),u.bindTexture(u.TEXTURE_2D,null),this.copyToGame(o)}});l.exports=n},49745:(l,T,e)=>{/** 4786 * @author Richard Davey <[email protected]> 4787 * @copyright 2013-2023 Photon Storm Ltd. 4788 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4789 */var d=e(56694),g=e(69960),r=e(80486),a=new d({Extends:r,initialize:function(n){r.call(this,{game:n,fragShader:g}),this.isTiltShift=!1,this.strength=1,this.blurX=1,this.blurY=1,this.radius=.5,this.amount=1,this.contrast=.2},onPreRender:function(h,n,o,f){h=this.getController(h),this.set1f("radius",h.radius,n),this.set1f("amount",h.amount,n),this.set1f("contrast",h.contrast,n),this.set1f("strength",h.strength,n),this.set2f("blur",h.blurX,h.blurY,n),this.setBoolean("isTiltShift",h.isTiltShift,n),o&&f&&this.set2f("resolution",o,f,n)},onDraw:function(h){this.set2f("resolution",h.width,h.height),this.bindAndDraw(h)}});l.exports=a},4323:(l,T,e)=>{/** 4790 * @author Richard Davey <[email protected]> 4791 * @copyright 2013-2023 Photon Storm Ltd. 4792 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4793 */var d=e(56694),g=e(33754),r=e(80486),a=new d({Extends:r,initialize:function(n){r.call(this,{game:n,fragShader:g}),this.scale=1,this.feather=.005,this.thickness=8,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4]},onPreRender:function(h,n,o,f){h=this.getController(h),this.set1f("scale",h.scale,n),this.set1f("feather",h.feather,n),this.set1f("thickness",h.thickness,n),this.set3fv("color",h.glcolor,n),this.set4fv("backgroundColor",h.glcolor2,n),o&&f&&this.set2f("resolution",o,f,n)},onDraw:function(h){this.set2f("resolution",h.width,h.height),this.bindAndDraw(h)}});l.exports=a},92066:(l,T,e)=>{/** 4794 * @author Richard Davey <[email protected]> 4795 * @copyright 2013-2023 Photon Storm Ltd. 4796 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4797 */var d=e(56694),g=e(80486),r=new d({Extends:g,initialize:function(h){g.call(this,{game:h})},onDraw:function(a){var h=this.fullFrame1;this.controller?this.manager.drawFrame(a,h,!0,this.controller):this.drawFrame(a,h),this.copyToGame(h)}});l.exports=r},89581:(l,T,e)=>{/** 4798 * @author Richard Davey <[email protected]> 4799 * @copyright 2013-2023 Photon Storm Ltd. 4800 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4801 */var d=e(56694),g=e(35668),r=e(80486),a=new d({Extends:r,initialize:function(n){r.call(this,{game:n,fragShader:g}),this.x=.005,this.y=.005,this.glTexture},onBoot:function(){this.setTexture("__WHITE")},setTexture:function(h){var n=this.game.textures.getFrame(h);n&&(this.glTexture=n.glTexture)},onDraw:function(h){var n=this.getController(),o=this.fullFrame1;this.bind(),this.set1i("uMainSampler",0),this.set1i("uDisplacementSampler",1),this.set2f("amount",n.x,n.y),this.bindTexture(n.glTexture,1),this.copySprite(h,o),this.copyToGame(o)}});l.exports=a},55084:(l,T,e)=>{/** 4802 * @author Richard Davey <[email protected]> 4803 * @copyright 2013-2023 Photon Storm Ltd. 4804 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4805 */var d=e(56694),g=e(72632),r=e(69675),a=e(80486),h=e(75512),n=new d({Extends:a,initialize:function(f,u){var v=g(u,"quality",.1),m=g(u,"distance",10);a.call(this,{game:f,fragShader:h.setGlowQuality(r,f,v,m)}),this.outerStrength=4,this.innerStrength=0,this.knockout=!1,this.glcolor=[1,1,1,1]},onPreRender:function(o,f,u,v){o=this.getController(o),this.set1f("outerStrength",o.outerStrength,f),this.set1f("innerStrength",o.innerStrength,f),this.set4fv("glowColor",o.glcolor,f),this.setBoolean("knockout",o.knockout,f),u&&v&&this.set2f("resolution",u,v,f)},onDraw:function(o){this.set2f("resolution",o.width,o.height),this.bindAndDraw(o)}});l.exports=n},41653:(l,T,e)=>{/** 4806 * @author Richard Davey <[email protected]> 4807 * @copyright 2013-2023 Photon Storm Ltd. 4808 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4809 */var d=e(56694),g=e(90993),r=e(80486),a=new d({Extends:r,initialize:function(n){r.call(this,{game:n,fragShader:g}),this.alpha=.2,this.size=0,this.fromX=0,this.fromY=0,this.toX=0,this.toY=1,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0]},onPreRender:function(h,n){h=this.getController(h),this.set1f("alpha",h.alpha,n),this.set1i("size",h.size,n),this.set3fv("color1",h.glcolor1,n),this.set3fv("color2",h.glcolor2,n),this.set2f("positionFrom",h.fromX,h.fromY,n),this.set2f("positionTo",h.toX,h.toY,n)}});l.exports=a},73416:(l,T,e)=>{/** 4810 * @author Richard Davey <[email protected]> 4811 * @copyright 2013-2023 Photon Storm Ltd. 4812 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4813 */var d=e(56694),g=e(37945),r=e(80486),a=new d({Extends:r,initialize:function(n){r.call(this,{game:n,fragShader:g}),this.amount=1},onPreRender:function(h,n,o,f){h=this.getController(h),this.set1f("amount",h.amount,n),o&&f&&this.set2f("resolution",o,f,n)},onDraw:function(h){this.set2f("resolution",h.width,h.height),this.bindAndDraw(h)}});l.exports=a},58049:(l,T,e)=>{/** 4814 * @author Richard Davey <[email protected]> 4815 * @copyright 2013-2023 Photon Storm Ltd. 4816 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4817 */var d=e(56694),g=e(85718),r=e(80486),a=new d({Extends:r,initialize:function(n){r.call(this,{game:n,fragShader:g}),this.x=0,this.y=0,this.decay=.1,this.power=1,this.glcolor=[0,0,0,1],this.samples=6,this.intensity=1},onPreRender:function(h,n){h=this.getController(h);var o=h.samples;this.set1i("samples",o,n),this.set1f("intensity",h.intensity,n),this.set1f("decay",h.decay,n),this.set1f("power",h.power/o,n),this.set2f("lightPosition",h.x,h.y,n),this.set4fv("color",h.glcolor,n)}});l.exports=a},18026:(l,T,e)=>{/** 4818 * @author Richard Davey <[email protected]> 4819 * @copyright 2013-2023 Photon Storm Ltd. 4820 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4821 */var d=e(56694),g=e(13740),r=e(80486),a=new d({Extends:r,initialize:function(n){r.call(this,{game:n,fragShader:g}),this.speed=.5,this.lineWidth=.5,this.gradient=3,this.reveal=!1},onPreRender:function(h,n,o,f){h=this.getController(h),this.setTime("time",n),this.set1f("speed",h.speed,n),this.set1f("lineWidth",h.lineWidth,n),this.set1f("gradient",h.gradient,n),this.setBoolean("reveal",h.reveal,n),o&&f&&this.set2f("resolution",o,f,n)},onDraw:function(h){this.set2f("resolution",h.width,h.height),this.bindAndDraw(h)}});l.exports=a},72381:(l,T,e)=>{/** 4822 * @author Richard Davey <[email protected]> 4823 * @copyright 2013-2023 Photon Storm Ltd. 4824 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4825 */var d=e(56694),g=e(80617),r=e(80486),a=new d({Extends:r,initialize:function(n){r.call(this,{game:n,fragShader:g}),this.x=.5,this.y=.5,this.radius=.5,this.strength=.5},onPreRender:function(h,n){h=this.getController(h),this.set1f("radius",h.radius,n),this.set1f("strength",h.strength,n),this.set2f("position",h.x,h.y,n)}});l.exports=a},80542:(l,T,e)=>{/** 4826 * @author Richard Davey <[email protected]> 4827 * @copyright 2013-2023 Photon Storm Ltd. 4828 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4829 */var d=e(56694),g=e(62879),r=e(80486),a=new d({Extends:r,initialize:function(n){r.call(this,{game:n,fragShader:g}),this.progress=0,this.wipeWidth=.1,this.direction=0,this.axis=0,this.reveal=!1},onPreRender:function(h,n){h=this.getController(h);var o=h.progress,f=h.wipeWidth,u=h.direction,v=h.axis;this.set4f("config",o,f,u,v,n),this.setBoolean("reveal",h.reveal,n)}});l.exports=a},58136:(l,T,e)=>{/** 4830 * @author Richard Davey <[email protected]> 4831 * @copyright 2013-2023 Photon Storm Ltd. 4832 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4833 */var d={Barrel:e(32469),Bloom:e(2134),Blur:e(63377),Bokeh:e(49745),Circle:e(4323),ColorMatrix:e(92066),Displacement:e(89581),Glow:e(55084),Gradient:e(41653),Pixelate:e(73416),Shadow:e(58049),Shine:e(18026),Vignette:e(72381),Wipe:e(80542)};l.exports=d},62253:(l,T,e)=>{/** 4834 * @author Richard Davey <[email protected]> 4835 * @copyright 2013-2023 Photon Storm Ltd. 4836 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4837 */var d=e(65641),g=e(98611),r={FX:e(58136),BitmapMaskPipeline:e(5583),Events:e(18970),FXPipeline:e(81828),LightPipeline:e(66901),MobilePipeline:e(71264),MultiPipeline:e(77310),PointLightPipeline:e(10919),PostFXPipeline:e(80486),PreFXPipeline:e(87228),RopePipeline:e(21213),SinglePipeline:e(51212),UtilityPipeline:e(60848)};r=g(!1,r,d),l.exports=r},2529:l=>{l.exports=["#define SHADER_NAME PHASER_ADD_BLEND_FS","precision mediump float;","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","varying vec2 outTexCoord;","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);"," gl_FragColor = frame1 + frame2 * uStrength;","}"].join(` 4838`)},91679:l=>{l.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_FS","precision mediump float;","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool uInvertMaskAlpha;","void main ()","{"," vec2 uv = gl_FragCoord.xy / uResolution;"," vec4 mainColor = texture2D(uMainSampler, uv);"," vec4 maskColor = texture2D(uMaskSampler, uv);"," if (!uInvertMaskAlpha)"," {"," mainColor *= maskColor.a;"," }"," else"," {"," mainColor *= (1.0 - maskColor.a);"," }"," gl_FragColor = mainColor;","}"].join(` 4839`)},89053:l=>{l.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","precision mediump float;","attribute vec2 inPosition;","void main ()","{"," gl_Position = vec4(inPosition, 0.0, 1.0);","}"].join(` 4840`)},37486:l=>{l.exports=["#define SHADER_NAME PHASER_COLORMATRIX_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float uColorMatrix[20];","uniform float uAlpha;","varying vec2 outTexCoord;","void main ()","{"," vec4 c = texture2D(uMainSampler, outTexCoord);"," if (uAlpha == 0.0)"," {"," gl_FragColor = c;"," return;"," }"," if (c.a > 0.0)"," {"," c.rgb /= c.a;"," }"," vec4 result;"," result.r = (uColorMatrix[0] * c.r) + (uColorMatrix[1] * c.g) + (uColorMatrix[2] * c.b) + (uColorMatrix[3] * c.a) + uColorMatrix[4];"," result.g = (uColorMatrix[5] * c.r) + (uColorMatrix[6] * c.g) + (uColorMatrix[7] * c.b) + (uColorMatrix[8] * c.a) + uColorMatrix[9];"," result.b = (uColorMatrix[10] * c.r) + (uColorMatrix[11] * c.g) + (uColorMatrix[12] * c.b) + (uColorMatrix[13] * c.a) + uColorMatrix[14];"," result.a = (uColorMatrix[15] * c.r) + (uColorMatrix[16] * c.g) + (uColorMatrix[17] * c.b) + (uColorMatrix[18] * c.a) + uColorMatrix[19];"," vec3 rgb = mix(c.rgb, result.rgb, uAlpha);"," rgb *= result.a;"," gl_FragColor = vec4(rgb, result.a);","}"].join(` 4841`)},79060:l=>{l.exports=["#define SHADER_NAME PHASER_COPY_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float uBrightness;","varying vec2 outTexCoord;","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord) * uBrightness;","}"].join(` 4842`)},87751:l=>{l.exports=["#define SHADER_NAME BARREL_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float amount;","varying vec2 outTexCoord;","vec2 Distort(vec2 p)","{"," float theta = atan(p.y, p.x);"," float radius = length(p);"," radius = pow(radius, amount);
4842"," p.x = radius * cos(theta);"," p.y = radius * sin(theta);"," return 0.5 * (p + 1.0);","}","void main()","{"," vec2 xy = 2.0 * outTexCoord - 1.0;"," vec2 texCoord = outTexCoord;"," if (length(xy) < 1.0)"," {"," texCoord = Distort(xy);"," }"," gl_FragColor = texture2D(uMainSampler, texCoord);","}"].join(` 4843`)},88222:l=>{l.exports=["#define SHADER_NAME BLOOM_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec4 sum = texture2D(uMainSampler, outTexCoord) * 0.204164 * strength;"," sum = sum + texture2D(uMainSampler, outTexCoord + offset * 1.407333) * 0.304005;"," sum = sum + texture2D(uMainSampler, outTexCoord - offset * 1.407333) * 0.304005;"," sum = sum + texture2D(uMainSampler, outTexCoord + offset * 3.294215) * 0.093913;"," gl_FragColor = (sum + texture2D(uMainSampler, outTexCoord - offset * 3.294215) * 0.093913) * vec4(color, 1);","}"].join(` 4844`)},44481:l=>{l.exports=["#define SHADER_NAME BLUR_HIGH_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 off1 = vec2(1.411764705882353) * offset * strength;"," vec2 off2 = vec2(3.2941176470588234) * offset * strength;"," vec2 off3 = vec2(5.176470588235294) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.1964825501511404;"," col += texture2D(uMainSampler, uv + (off1 / resolution)) * 0.2969069646728344;"," col += texture2D(uMainSampler, uv - (off1 / resolution)) * 0.2969069646728344;"," col += texture2D(uMainSampler, uv + (off2 / resolution)) * 0.09447039785044732;"," col += texture2D(uMainSampler, uv - (off2 / resolution)) * 0.09447039785044732;"," col += texture2D(uMainSampler, uv + (off3 / resolution)) * 0.010381362401148057;"," col += texture2D(uMainSampler, uv - (off3 / resolution)) * 0.010381362401148057;"," gl_FragColor = col * vec4(color, 1.0);","}"].join(` 4845`)},35491:l=>{l.exports=["#define SHADER_NAME BLUR_LOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 offset = vec2(1.333) * strength;"," col += texture2D(uMainSampler, uv) * 0.29411764705882354;"," col += texture2D(uMainSampler, uv + (offset / resolution)) * 0.35294117647058826;"," col += texture2D(uMainSampler, uv - (offset / resolution)) * 0.35294117647058826;"," gl_FragColor = col * vec4(color, 1.0);","}"].join(` 4846`)},75568:l=>{l.exports=["#define SHADER_NAME BLUR_MED_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 off1 = vec2(1.3846153846) * offset * strength;"," vec2 off2 = vec2(3.2307692308) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.2270270270;"," col += texture2D(uMainSampler, uv + (off1 / resolution)) * 0.3162162162;"," col += texture2D(uMainSampler, uv - (off1 / resolution)) * 0.3162162162;"," col += texture2D(uMainSampler, uv + (off2 / resolution)) * 0.0702702703;"," col += texture2D(uMainSampler, uv - (off2 / resolution)) * 0.0702702703;"," gl_FragColor = col * vec4(color, 1.0);","}"].join(` 4847`)},69960:l=>{l.exports=["#define SHADER_NAME BOKEH_FS","precision mediump float;","#define ITERATIONS 100.0","#define ONEOVER_ITR 1.0 / ITERATIONS","#define PI 3.141596","#define GOLDEN_ANGLE 2.39996323","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform float radius;","uniform float amount;","uniform float contrast;","uniform bool isTiltShift;","uniform float strength;","uniform vec2 blur;","varying vec2 outTexCoord;","vec2 Sample (in float theta, inout float r)","{"," r += 1.0 / r;"," return (r - 1.0) * vec2(cos(theta), sin(theta)) * 0.06;","}","vec3 Bokeh (sampler2D tex, vec2 uv, float radius)","{"," vec3 acc = vec3(0.0);"," vec3 div = vec3(0.0);"," vec2 pixel = vec2(resolution.y / resolution.x, 1.0) * radius * .025;"," float r = 1.0;"," for (float j = 0.0; j < GOLDEN_ANGLE * ITERATIONS; j += GOLDEN_ANGLE)"," {"," vec3 col = texture2D(tex, uv + pixel * Sample(j, r)).xyz;"," col = contrast > 0.0 ? col * col * (1.0 + contrast) : col;"," vec3 bokeh = vec3(0.5) + pow(col, vec3(10.0)) * amount;"," acc += col * bokeh;"," div += bokeh;"," }"," return acc / div;","}","void main ()","{"," float shift = 1.0;"," if (isTiltShift)"," {"," vec2 uv = vec2(gl_FragCoord.xy / resolution + vec2(-0.5, -0.5)) * 2.0;"," float centerStrength = 1.0;"," shift = length(uv * blur * strength) * centerStrength;"," }"," gl_FragColor = vec4(Bokeh(uMainSampler, outTexCoord * vec2(1.0, 1.0), radius * shift), 0.0
4847);","}"].join(` 4848`)},33754:l=>{l.exports=["#define SHADER_NAME CIRCLE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec3 color;","uniform vec4 backgroundColor;","uniform float thickness;","uniform float scale;","uniform float feather;","varying vec2 outTexCoord;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec2 position = (gl_FragCoord.xy / resolution.xy) * 2.0 - 1.0;"," float aspectRatio = resolution.x / resolution.y;"," position.x *= aspectRatio;"," float grad = length(position);"," float outer = aspectRatio;"," float inner = outer - (thickness * 2.0 / resolution.y);"," if (aspectRatio >= 1.0)"," {"," float f = 2.0 + (resolution.y / resolution.x);"," outer = 1.0;"," inner = 1.0 - (thickness * f / resolution.x);"," }"," outer *= scale;"," inner *= scale;"," float circle = smoothstep(outer, outer - 0.01, grad);"," float ring = circle - smoothstep(inner, inner - feather, grad);"," texture = mix(backgroundColor * backgroundColor.a, texture, texture.a);"," texture = (texture * (circle - ring));"," gl_FragColor = vec4(texture.rgb + (ring * color), texture.a);","}"].join(` 4849`)},35668:l=>{l.exports=["#define SHADER_NAME DISPLACEMENT_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform sampler2D uDisplacementSampler;","uniform vec2 amount;","varying vec2 outTexCoord;","void main ()","{"," vec2 disp = (-vec2(0.5, 0.5) + texture2D(uDisplacementSampler, outTexCoord).rr) * amount;"," gl_FragColor = texture2D(uMainSampler, outTexCoord + disp).rgba;","}"].join(` 4850`)},69675:l=>{l.exports=["#define SHADER_NAME GLOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","uniform float outerStrength;","uniform float innerStrength;","uniform vec2 resolution;","uniform vec4 glowColor;","uniform bool knockout;","const float PI = 3.14159265358979323846264;","const float DIST = __DIST__;","const float SIZE = min(__SIZE__, PI * 2.0);","const float STEP = ceil(PI * 2.0 / SIZE);","const float MAX_ALPHA = STEP * DIST * (DIST + 1.0) / 2.0;","void main ()","{"," vec2 px = vec2(1.0 / resolution.x, 1.0 / resolution.y);"," float totalAlpha = 0.0;"," vec2 direction;"," vec2 displaced;"," vec4 color;"," for (float angle = 0.0; angle < PI * 2.0; angle += SIZE)"," {"," direction = vec2(cos(angle), sin(angle)) * px;"," for (float curDistance = 0.0; curDistance < DIST; curDistance++)"," {"," displaced = outTexCoord + direction * (curDistance + 1.0);"," color = texture2D(uMainSampler, displaced);"," totalAlpha += (DIST - curDistance) * color.a;"," }"," }"," color = texture2D(uMainSampler, outTexCoord);"," float alphaRatio = (totalAlpha / MAX_ALPHA);"," float innerGlowAlpha = (1.0 - alphaRatio) * innerStrength * color.a;"," float innerGlowStrength = min(1.0, innerGlowAlpha);"," vec4 innerColor = mix(color, glowColor, innerGlowStrength);"," float outerGlowAlpha = alphaRatio * outerStrength * (1.0 - color.a);"," float outerGlowStrength = min(1.0 - innerColor.a, outerGlowAlpha);"," vec4 outerGlowColor = outerGlowStrength * glowColor.rgba;"," if (knockout)"," {"," float resultAlpha = outerGlowAlpha + innerGlowAlpha;"," gl_FragColor = vec4(glowColor.rgb * resultAlpha, resultAlpha);"," }"," else"," {"," gl_FragColor = innerColor + outerGlowColor;"," }","}"].join(` 4851`)},90993:l=>{l.exports=["#define SHADER_NAME GRADIENT_FS","#define SRGB_TO_LINEAR(c) pow((c), vec3(2.2))","#define LINEAR_TO_SRGB(c) pow((c), vec3(1.0 / 2.2))","#define SRGB(r, g, b) SRGB_TO_LINEAR(vec3(float(r), float(g), float(b)) / 255.0)","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 positionFrom;","uniform vec2 positionTo;","uniform vec3 color1;","uniform vec3 color2;","uniform float alpha;","uniform int size;","varying vec2 outTexCoord;","float gradientNoise(in vec2 uv)","{"," const vec3 magic = vec3(0.06711056, 0.00583715, 52.9829189);"," return fract(magic.z * fract(dot(uv, magic.xy)));","}","float stepped (in float s, in float scale, in int steps)","{"," return steps > 0 ? floor( s / ((1.0 * scale) / float(steps))) * 1.0 / float(steps - 1) : s;","}","void main ()","{"," vec2 a = positionFrom;"," vec2 b = positionTo;"," vec2 ba = b - a;"," float d = dot(outTexCoord - a, ba) / dot(ba, ba);"," float t = size > 0 ? stepped(d, 1.0, size) : d;"," t = smoothstep(0.0, 1.0, clamp(t, 0.0, 1.0));"," vec3 color = mix(SRGB(color1.r, color1.g, color1.b), SRGB(color2.r, color2.g, color2.b), t);"," color = LINEAR_TO_SRGB(color);"," color += (1.0 / 255.0) * gradientNoise(outTexCoord) - (0.5 / 255.0);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," gl_FragColor = vec4(mix(color.rgb, texture.rgb, alpha), 1.0) * texture.a;","}"].join(` 4852`)},37945:l=>{l.exports=["#define SHADER_NAME PIXELATE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform float amount;","varying vec2 outTexCoord;","void main ()","{"," float pixelSize = floor(2.0 + amount);"," vec2 center = pixelSize * floor(outTexCoord * resolution / pixelSize) + pixelSize * vec2(0.5, 0.5);"," vec2 corner1 = center + pixelSize * vec2(-0.5, -0.5);"," vec2 corner2 = center + pixelSize * vec2(+0.5, -0.5);"," vec2 corner3 = center + pixelSize * vec2(+0.5, +0.5);"," vec2 corner4 = center + pixelSize * vec2(-0.5, +0.5);"," vec4 pixel = 0.4 * texture2D(uMainSampler, center / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner1 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner2 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner3 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner4 / resolution);"," gl_FragColor = pixel;","}"].join(` 4853`)},85718:l=>{l.exports=["#define SHADER_NAME SHADOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","uniform vec2 lightPosition;","uniform vec4 color;","uniform float decay;","uniform float power;","uniform float intensity;","uniform int samples;","const int MAX = 12;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec2 pc = (lightPosition - outTexCoord) * intensity;"," float shadow = 0.0;"," float limit = max(float(MAX), float(samples));"," for (int i = 0; i < MAX; ++i)"," {"," if (i >= samples)"," {"," break;"," }"," shadow += texture2D(uMainSampler, outTexCoord + float(i) * decay / limit * pc).a * power;"," }"," float mask = 1.0 - texture.a;"," gl_FragColor = mix(texture, color, shadow * mask);","}"].join(` 4854`)},13740:l=>{l.exports=["#define SHADER_NAME SHINE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform bool reveal;","uniform float speed;","uniform float time;","uniform float lineWidth;","uniform float gradient;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = gl_FragCoord.xy / resolution.xy;"," vec4 tex = texture2D(uMainSampler, outTexCoord);"," vec4 col1 = vec4(0.3, 0.0, 0.0, 1.0);"," vec4 col2 = vec4(0.85, 0.85, 0.85, 1.0);"," uv.x = uv.x - mod(time * speed, 2.0) + 0.5;"," float y = uv.x * gradient;"," float s = smoothstep(y - lineWidth, y, uv.y) - smoothstep(y, y + lineWidth, uv.y);"," gl_FragColor = (((s * col1) + (s * col2)) * tex);"," if (!reveal)"," {"," gl_FragColor += tex;"," }","}"].join(` 4855`)},80617:l=>{l.exports=["#define SHADER_NAME VIGNETTE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float radius;","uniform float strength;","uniform vec2 position;","varying vec2 outTexCoord;","void main ()","{"," vec4 col = vec4(1.0);"," float d = length(outTexCoord - position);"," if (d <= radius)"," {"," float g = d / radius;"," g = sin(g * 3.14 * strength);"," col = vec4(g * g * g);"," }"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," gl_FragColor = texture * (1.0 - col);","}"].join(` 4856`)},62879:l=>{l.exports=["#define SHADER_NAME WIPE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec4 config;","uniform bool reveal;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 color0;"," vec4 color1;"," if (reveal)"," {"," color0 = vec4(0);"," color1 = texture2D(uMainSampler, uv);"," }"," else"," {"," color0 = texture2D(uMainSampler, uv);"," color1 = vec4(0);"," }"," float distance = config.x;"," float width = config.y;"," float direction = config.z;"," float axis = uv.x;"," if (config.w == 1.0)"," {"," axis = uv.y;"," }
4856"," float adjust = mix(width, -width, distance);"," float value = smoothstep(distance - width, distance + width, abs(direction - axis) + adjust);"," gl_FragColor = mix(color1, color0, value);","}"].join(` 4857`)},65045:l=>{l.exports=["#define SHADER_NAME PHASER_LIGHT_FS","precision mediump float;","struct Light","{"," vec2 position;"," vec3 color;"," float intensity;"," float radius;","};","const int kMaxLights = %LIGHT_COUNT%;","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform mat3 uInverseRotationMatrix;","uniform int uLightCount;","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec3 finalColor = vec3(0.0, 0.0, 0.0);"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;"," vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));"," vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;"," for (int index = 0; index < kMaxLights; ++index)"," {"," if (index < uLightCount)"," {"," Light light = uLights[index];"," vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);"," vec3 lightNormal = normalize(lightDir);"," float distToSurf = length(lightDir) * uCamera.w;"," float diffuseFactor = max(dot(normal, lightNormal), 0.0);"," float radius = (light.radius / res.x * uCamera.w) * uCamera.w;"," float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);"," vec3 diffuse = light.color * diffuseFactor;"," finalColor += (attenuation * diffuse) * light.intensity;"," }"," }"," vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);"," gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);","}"].join(` 4858`)},98921:l=>{l.exports=["#define SHADER_NAME PHASER_LINEAR_BLEND_FS","precision mediump float;","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","varying vec2 outTexCoord;","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);"," gl_FragColor = mix(frame1, frame2 * uStrength, 0.5);","}"].join(` 4859`)},25005:l=>{l.exports=["#define SHADER_NAME PHASER_MESH_FS","precision mediump float;","uniform vec3 uLightPosition;","uniform vec3 uLightAmbient;","uniform vec3 uLightDiffuse;","uniform vec3 uLightSpecular;","uniform vec3 uFogColor;","uniform float uFogNear;","uniform float uFogFar;","uniform vec3 uMaterialAmbient;","uniform vec3 uMaterialDiffuse;","uniform vec3 uMaterialSpecular;","uniform float uMaterialShine;","uniform vec3 uCameraPosition;","uniform sampler2D uTexture;","varying vec2 vTextureCoord;","varying vec3 vNormal;","varying vec3 vPosition;","void main (void)","{"," vec4 color = texture2D(uTexture, vTextureCoord);"," vec3 ambient = uLightAmbient * uMaterialAmbient;"," vec3 norm = normalize(vNormal);"," vec3 lightDir = normalize(uLightPosition - vPosition);"," float diff = max(dot(norm, lightDir), 0.0);"," vec3 diffuse = uLightDiffuse * (diff * uMaterialDiffuse);"," vec3 viewDir = normalize(uCameraPosition - vPosition);"," vec3 reflectDir = reflect(-lightDir, norm);"," float spec = pow(max(dot(viewDir, reflectDir), 0.0), uMaterialShine);"," vec3 specular = uLightSpecular * (spec * uMaterialSpecular);"," vec3 result = (ambient + diffuse + specular) * color.rgb;"," float depth = gl_FragCoord.z / gl_FragCoord.w;"," float fogFactor = smoothstep(uFogNear, uFogFar, depth);"," gl_FragColor.rgb = mix(result.rgb, uFogColor, fogFactor);"," gl_FragColor.a = color.a;","}"].join(` 4860`)},94914:l=>{l.exports=["#define SHADER_NAME PHASER_MESH_VS","precision mediump float;","attribute vec3 aVertexPosition;","attribute vec3 aVertexNormal;","attribute vec2 aTextureCoord;","uniform mat4 uViewProjectionMatrix;","uniform mat4 uModelMatrix;","uniform mat4 uNormalMatrix;","varying vec2 vTextureCoord;","varying vec3 vNormal;","varying vec3 vPosition;","void main ()","{"," vTextureCoord = aTextureCoord;"," vPosition = vec3(uModelMatrix * vec4(aVertexPosition, 1.0
4860));"," vNormal = vec3(uNormalMatrix * vec4(aVertexNormal, 1.0));"," gl_Position = uViewProjectionMatrix * uModelMatrix * vec4(aVertexPosition, 1.0);","}"].join(` 4861`)},11263:l=>{l.exports=["#define SHADER_NAME PHASER_MOBILE_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join(` 4862`)},51852:l=>{l.exports=["#define SHADER_NAME PHASER_MOBILE_VS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform mat4 uProjectionMatrix;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join(` 4863`)},53787:l=>{l.exports=["#define SHADER_NAME PHASER_MULTI_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler[%count%];","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texture;"," %forloop%"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join(` 4864`)},15968:l=>{l.exports=["#define SHADER_NAME PHASER_MULTI_VS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform mat4 uProjectionMatrix;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," outTexCoord = inTexCoord;"," outTexId = inTexId;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join(` 4865`)},83327:l=>{l.exports=["#define SHADER_NAME PHASER_POINTLIGHT_FS","precision mediump float;","uniform vec2 uResolution;","uniform float uCameraZoom;","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","void main ()","{"," vec2 center = (lightPosition.xy + 1.0) * (uResolution.xy * 0.5);"," float distToSurf = length(center - gl_FragCoord.xy);"," float radius = 1.0 - distToSurf / (lightRadius * uCameraZoom);"," float intensity = smoothstep(0.0, 1.0, radius * lightAttenuation);"," vec4 color = vec4(intensity, intensity, intensity, 0.0) * lightColor;"," gl_FragColor = vec4(color.rgb * lightColor.a, color.a);","}"].join(` 4866`)},54677:l=>{l.exports=["#define SHADER_NAME PHASER_POINTLIGHT_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","attribute vec2 inPosition;","attribute vec2 inLightPosition;","attribute vec4 inLightColor;","attribute float inLightRadius;","attribute float inLightAttenuation;","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","void main ()","{"," lightColor = inLightColor;"," lightRadius = inLightRadius;"," lightAttenuation = inLightAttenuation;"," lightPosition = uProjectionMatrix * vec4(inLightPosition, 1.0, 1.0);"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);","}"].join(` 4867`)},12569:l=>{l.exports=["#define SHADER_NAME PHASER_POSTFX_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord);","}"].join(` 4868`)},99365:l=>{l.exports=["#define SHADER_NAME PHASER_QUAD_VS","precision mediump float;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","varying vec2 outFragCoord;","varying vec2 outTexCoord;","void main ()","{"," outFragCoord = inPosition.xy * 0.5 + 0.5;"," outTexCoord = inTexCoord;"," gl_Position = vec4(inPosition, 0, 1);","}"].join(` 4869`)},85060:l=>{l.exports=["#define SHADER_NAME PHASER_SINGLE_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;
4869","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join(` 4870`)},18166:l=>{l.exports=["#define SHADER_NAME PHASER_SINGLE_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join(` 4871`)},92462:(l,T,e)=>{/** 4872 * @author Richard Davey <[email protected]> 4873 * @copyright 2013-2023 Photon Storm Ltd. 4874 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4875 */l.exports={AddBlendFrag:e(2529),BitmapMaskFrag:e(91679),BitmapMaskVert:e(89053),ColorMatrixFrag:e(37486),CopyFrag:e(79060),FXBarrelFrag:e(87751),FXBloomFrag:e(88222),FXBlurHighFrag:e(44481),FXBlurLowFrag:e(35491),FXBlurMedFrag:e(75568),FXBokehFrag:e(69960),FXCircleFrag:e(33754),FXDisplacementFrag:e(35668),FXGlowFrag:e(69675),FXGradientFrag:e(90993),FXPixelateFrag:e(37945),FXShadowFrag:e(85718),FXShineFrag:e(13740),FXVignetteFrag:e(80617),FXWipeFrag:e(62879),LightFrag:e(65045),LinearBlendFrag:e(98921),MeshFrag:e(25005),MeshVert:e(94914),MobileFrag:e(11263),MobileVert:e(51852),MultiFrag:e(53787),MultiVert:e(15968),PointLightFrag:e(83327),PointLightVert:e(54677),PostFXFrag:e(12569),QuadVert:e(99365),SingleFrag:e(85060),SingleVert:e(18166)}},756:(l,T,e)=>{/** 4876 * @author Richard Davey <[email protected]> 4877 * @copyright 2013-2023 Photon Storm Ltd. 4878 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4879 */var d=e(55301),g=e(56694),r=e(6659),a=e(40444),h=e(97081),n=e(74181),o=e(2893),f=e(9229),u=e(72283),v=e(74118),m=e(90881),p=e(84314),x=e(93736),y=e(47751),P=new g({Extends:r,initialize:function(E){r.call(this),this.game=E,this.canvas,this.canvasBounds=new v,this.parent=null,this.parentIsWindow=!1,this.parentSize=new m,this.gameSize=new m,this.baseSize=new m,this.displaySize=new m,this.scaleMode=d.SCALE_MODE.NONE,this.zoom=1,this._resetZoom=!1,this.displayScale=new x(1,1),this.autoRound=!1,this.autoCenter=d.CENTER.NO_CENTER,this.orientation=d.ORIENTATION.LANDSCAPE,this.fullscreen,this.fullscreenTarget=null,this._createdFullscreenTarget=!1,this.dirty=!1,this.resizeInterval=500,this._lastCheck=0,this._checkOrientation=!1,this.domlisteners={orientationChange:u,windowResize:u,fullScreenChange:u,fullScreenError:u}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(h.BOOT,this.boot,this)},boot:function(){var b=this.game;this.canvas=b.canvas,this.fullscreen=b.device.fullscreen,this.scaleMode!==d.SCALE_MODE.RESIZE&&this.displaySize.setAspectMode(this.scaleMode),this.scaleMode===d.SCALE_MODE.NONE?this.resize(this.width,this.height):(this.getParentBounds(),this.parentSize.width>0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),b.events.on(h.PRE_STEP,this.step,this),b.events.once(h.READY,this.refresh,this),b.events.once(h.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(b){this.getParent(b),this.getParentBounds();var E=b.width,M=b.height,w=b.scaleMode,A=b.zoom,R=b.autoRound;if(typeof E=="string"){var L=this.parentSize.width;L===0&&(L=window.innerWidth);var O=parseInt(E,10)/100;E=Math.floor(L*O)}if(typeof M=="string"){var I=this.parentSize.height;I===0&&(I=window.innerHeight);var D=parseInt(M,10)/100;M=Math.floor(I*D)}this.scaleMode=w,this.autoRound=R,this.autoCenter=b.autoCenter,this.resizeInterval=b.resizeInterval,R&&(E=Math.floor(E),M=Math.floor(M)),this.gameSize.setSize(E,M),A===d.ZOOM.MAX_ZOOM&&(A=this.getMaxZoom()),this.zoom=A,A!==1&&(this._resetZoom=!0),this.baseSize.setSize(E,M),R&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),b.minWidth>0&&this.displaySize.setMin(b.minWidth*A,b.minHeight*A),b.maxWidth>0&&this.displaySize.setMax(b.maxWidth*A,b.maxHeight*A),this.displaySize.setSize(E,M),this.orientation=f(E,M)},getParent:function(b){var E=b.parent;if(E!==null){if(this.parent=o(E),this.parentIsWindow=this.parent===document.body,b.expandParent&&b.scaleMode!==d.SCALE_MODE.NONE){var M=this.parent.getBoundingClientRect();(this.parentIsWindow||M.height===0)&&(document.documentElement.style.height="100%",document.body.style.height="100%",M=this.parent.getBoundingClientRect(),!this.parentIsWindow&&M.height===0&&(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}b.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=o(b.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var b=this.parentSize,E=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(E.height=n(!0));var M=E.width,w=E.height;if(b.width!==M||b.height!==w)return b.setSize(M,w),!0;if(this.canvas){var A=this.canvasBounds,R=this.canvas.getBoundingClientRect();if(R.x!==A.x||R.y!==A.y)return!0}return!1},lockOrientation:function(b){var E=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return E?E.call(screen,b):!1},setParentSize:function(b,E){return this.parentSize.setSize(b,E),this.refresh()},setGameSize:function(b,E){var M=this.autoRound;M&&(b=Math.floor(b),E=Math.floor(E));var w=this.width,A=this.height;return this.gameSize.resize(b,E),this.baseSize.resize(b,E),M&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setAspectRatio(b/E),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(w,A)},resize:function(b,E){var M=this.zoom,w=this.autoRound;w&&(b=Math.floor(b),E=Math.floor(E));var A=this.width,R=this.height;this.gameSize.resize(b,E),this.baseSize.resize(b,E),w&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(b*M,E*M),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var L=this.canvas.style,O=b*M,I=E*M;return w&&(O=Math.floor(O),I=Math.floor(I)),(O!==b||I!==E)&&(L.width=O+"px",L.height=I+"px"),this.refresh(A,R)},setZoom:function(b){return this.zoom=b,this._resetZoom=!0,this.refresh()}
4879,setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},refresh:function(b,E){b===void 0&&(b=this.width),E===void 0&&(E=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var M=this.game.domContainer;if(M){this.baseSize.setCSS(M);var w=this.canvas.style,A=M.style;A.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",A.marginLeft=w.marginLeft,A.marginTop=w.marginTop}return this.emit(a.RESIZE,this.gameSize,this.baseSize,this.displaySize,b,E),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var b=f(this.width,this.height);b!==this.orientation&&(this.orientation=b,this.emit(a.ORIENTATION_CHANGE,b))}},updateScale:function(){var b=this.canvas.style,E=this.gameSize.width,M=this.gameSize.height,w,A,R=this.zoom,L=this.autoRound;this.scaleMode===d.SCALE_MODE.NONE?(this.displaySize.setSize(E*R,M*R),w=this.displaySize.width,A=this.displaySize.height,L&&(w=Math.floor(w),A=Math.floor(A)),this._resetZoom&&(b.width=w+"px",b.height=A+"px",this._resetZoom=!1)):this.scaleMode===d.SCALE_MODE.RESIZE?(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(this.displaySize.width,this.displaySize.height),w=this.displaySize.width,A=this.displaySize.height,L&&(w=Math.floor(w),A=Math.floor(A)),this.canvas.width=w,this.canvas.height=A):(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),w=this.displaySize.width,A=this.displaySize.height,L&&(w=Math.floor(w),A=Math.floor(A)),b.width=w+"px",b.height=A+"px"),this.getParentBounds(),this.updateCenter()},getMaxZoom:function(){var b=p(this.parentSize.width,this.gameSize.width,0,!0),E=p(this.parentSize.height,this.gameSize.height,0,!0);return Math.max(Math.min(b,E),1)},updateCenter:function(){var b=this.autoCenter;if(b!==d.CENTER.NO_CENTER){var E=this.canvas,M=E.style,w=E.getBoundingClientRect(),A=w.width,R=w.height,L=Math.floor((this.parentSize.width-A)/2),O=Math.floor((this.parentSize.height-R)/2);b===d.CENTER.CENTER_HORIZONTALLY?O=0:b===d.CENTER.CENTER_VERTICALLY&&(L=0),M.marginLeft=L+"px",M.marginTop=O+"px"}},updateBounds:function(){var b=this.canvasBounds,E=this.canvas.getBoundingClientRect();b.x=E.left+(window.pageXOffset||0)-(document.documentElement.clientLeft||0),b.y=E.top+(window.pageYOffset||0)-(document.documentElement.clientTop||0),b.width=E.width,b.height=E.height},transformX:function(b){return(b-this.canvasBounds.left)*this.displayScale.x},transformY:function(b){return(b-this.canvasBounds.top)*this.displayScale.y},startFullscreen:function(b){b===void 0&&(b={navigationUI:"hide"});var E=this.fullscreen;if(!E.available){this.emit(a.FULLSCREEN_UNSUPPORTED);return}if(!E.active){var M=this.getFullscreenTarget();E.keyboard?M[E.request](Element.ALLOW_KEYBOARD_INPUT):M[E.request](b)}},fullscreenSuccessHandler:function(){this.getParentBounds(),this.refresh(),this.emit(a.ENTER_FULLSCREEN)},fullscreenErrorHandler:function(b){this.removeFullscreenTarget(),this.emit(a.FULLSCREEN_FAILED,b)},getFullscreenTarget:function(){if(!this.fullscreenTarget){var b=document.createElement("div");b.style.margin="0",b.style.padding="0",b.style.width="100%",b.style.height="100%",this.fullscreenTarget=b,this._createdFullscreenTarget=!0}if(this._createdFullscreenTarget){var E=this.canvas.parentNode;E.insertBefore(this.fullscreenTarget,this.canvas),this.fullscreenTarget.appendChild(this.canvas)}return this.fullscreenTarget},removeFullscreenTarget:function(){if(this._createdFullscreenTarget){var b=this.fullscreenTarget;if(b&&b.parentNode){var E=b.parentNode;E.insertBefore(this.canvas,b),E.removeChild(b)}}},stopFullscreen:function(){var b=this.fullscreen;if(!b.available)return this.emit(a.FULLSCREEN_UNSUPPORTED),!1;b.active&&document[b.cancel](),this.removeFullscreenTarget(),this.getParentBounds(),this.emit(a.LEAVE_FULLSCREEN),this.refresh()},toggleFullscreen:function(b){this.fullscreen.active?this.stopFullscreen():this.startFullscreen(b)},startListeners:function(){var b=this,E=this.domlisteners;if(E.orientationChange=function(){b.updateBounds(),b._checkOrientation=!0,b.dirty=!0},E.windowResize=function(){b.updateBounds(),b.dirty=!0},window.addEventListener("orientationchange",E.orientationChange,!1),window.addEventListener("resize",E.windowResize,!1),this.fullscreen.available){E.fullScreenChange=function(w){return b.onFullScreenChange(w)},E.fullScreenError=function(w){return b.onFullScreenError(w)};var M=["webkit","moz",""];M.forEach(function(w){document.addEventListener(w+"fullscreenchange",E.fullScreenChange,!1),document.addEventListener(w+"fullscreenerror",E.fullScreenError,!1)}),document.addEventListener("MSFullscreenChange",E.fullScreenChange,!1),document.addEventListener("MSFullscreenError",E.fullScreenError,!1)}},onFullScreenChange:function(){document.fullscreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.mozFullScreenElement?this.fullscreenSuccessHandler():this.stopFullscreen()},onFullScreenError:function(){this.removeFullscreenTarget()},getViewPort:function(b,E){b instanceof y||(E=b,b=void 0),E===void 0&&(E=new v);var M=this.baseSize,w=this.parentSize,A=this.canvasBounds,R=this.displayScale,L=A.x>=0?0:-(A.x*R.x),O=A.y>=0?0:-(A.y*R.y),I;w.width>
4879=A.width?I=M.width:I=M.width-(A.width-w.width)*R.x;var D;return w.height>=A.height?D=M.height:D=M.height-(A.height-w.height)*R.y,E.setTo(L,O,I,D),b&&(E.width/=b.zoomX,E.height/=b.zoomY,E.centerX=b.centerX+b.scrollX,E.centerY=b.centerY+b.scrollY),E},step:function(b,E){this.parent&&(this._lastCheck+=E,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var b=this.domlisteners;window.removeEventListener("orientationchange",b.orientationChange,!1),window.removeEventListener("resize",b.windowResize,!1);var E=["webkit","moz",""];E.forEach(function(M){document.removeEventListener(M+"fullscreenchange",b.fullScreenChange,!1),document.removeEventListener(M+"fullscreenerror",b.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",b.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",b.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===d.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===d.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});l.exports=P},35098:l=>{/** 4880 * @author Richard Davey <[email protected]> 4881 * @copyright 2013-2023 Photon Storm Ltd. 4882 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4883 */l.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},53539:l=>{/** 4884 * @author Richard Davey <[email protected]> 4885 * @copyright 2013-2023 Photon Storm Ltd. 4886 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4887 */l.exports={LANDSCAPE:"landscape-primary",PORTRAIT:"portrait-primary"}},12637:l=>{/** 4888 * @author Richard Davey <[email protected]> 4889 * @copyright 2013-2023 Photon Storm Ltd. 4890 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4891 */l.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5}},10217:l=>{/** 4892 * @author Richard Davey <[email protected]> 4893 * @copyright 2013-2023 Photon Storm Ltd. 4894 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4895 */l.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},55301:(l,T,e)=>{/** 4896 * @author Richard Davey <[email protected]> 4897 * @copyright 2013-2023 Photon Storm Ltd. 4898 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4899 */var d={CENTER:e(35098),ORIENTATION:e(53539),SCALE_MODE:e(12637),ZOOM:e(10217)};l.exports=d},82085:l=>{/** 4900 * @author Richard Davey <[email protected]> 4901 * @copyright 2013-2023 Photon Storm Ltd. 4902 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4903 */l.exports="enterfullscreen"},11826:l=>{/** 4904 * @author Richard Davey <[email protected]> 4905 * @copyright 2013-2023 Photon Storm Ltd. 4906 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4907 */l.exports="fullscreenfailed"},56691:l=>{/** 4908 * @author Richard Davey <[email protected]> 4909 * @copyright 2013-2023 Photon Storm Ltd. 4910 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4911 */l.exports="fullscreenunsupported"},34739:l=>{/** 4912 * @author Richard Davey <[email protected]> 4913 * @copyright 2013-2023 Photon Storm Ltd. 4914 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4915 */l.exports="leavefullscreen"},26681:l=>{/** 4916 * @author Richard Davey <[email protected]> 4917 * @copyright 2013-2023 Photon Storm Ltd. 4918 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4919 */l.exports="orientationchange"},11428:l=>{/** 4920 * @author Richard Davey <[email protected]> 4921 * @copyright 2013-2023 Photon Storm Ltd. 4922 * @license {@link https://opensource.org/licenses/MIT|MIT License}
4923 */l.exports="resize"},40444:(l,T,e)=>{/** 4924 * @author Richard Davey <[email protected]> 4925 * @copyright 2013-2023 Photon Storm Ltd. 4926 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4927 */l.exports={ENTER_FULLSCREEN:e(82085),FULLSCREEN_FAILED:e(11826),FULLSCREEN_UNSUPPORTED:e(56691),LEAVE_FULLSCREEN:e(34739),ORIENTATION_CHANGE:e(26681),RESIZE:e(11428)}},86754:(l,T,e)=>{/** 4928 * @author Richard Davey <[email protected]> 4929 * @copyright 2013-2023 Photon Storm Ltd. 4930 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4931 */var d=e(98611),g=e(55301),r={Center:e(35098),Events:e(40444),Orientation:e(53539),ScaleManager:e(756),ScaleModes:e(12637),Zoom:e(10217)};r=d(!1,r,g.CENTER),r=d(!1,r,g.ORIENTATION),r=d(!1,r,g.SCALE_MODE),r=d(!1,r,g.ZOOM),l.exports=r},47736:(l,T,e)=>{/** 4932 * @author Richard Davey <[email protected]> 4933 * @copyright 2013-2023 Photon Storm Ltd. 4934 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4935 */var d=e(72632),g=e(40587),r=function(a){var h=a.game.config.defaultPhysicsSystem,n=d(a.settings,"physics",!1);if(!(!h&&!n)){var o=[];if(h&&o.push(g(h+"Physics")),n)for(var f in n)f=g(f.concat("Physics")),o.indexOf(f)===-1&&o.push(f);return o}};l.exports=r},91088:(l,T,e)=>{/** 4936 * @author Richard Davey <[email protected]> 4937 * @copyright 2013-2023 Photon Storm Ltd. 4938 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4939 */var d=e(72632),g=function(r){var a=r.plugins.getDefaultScenePlugins(),h=d(r.settings,"plugins",!1);return Array.isArray(h)?h:a||[]};l.exports=g},90415:l=>{/** 4940 * @author Richard Davey <[email protected]> 4941 * @copyright 2013-2023 Photon Storm Ltd. 4942 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4943 */var T={game:"game",renderer:"renderer",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"};l.exports=T},87157:(l,T,e)=>{/** 4944 * @author Richard Davey <[email protected]> 4945 * @copyright 2013-2023 Photon Storm Ltd. 4946 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4947 */var d=e(56694),g=e(63946),r=new d({initialize:function(h){this.sys=new g(this,h),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(){}});l.exports=r},13553:(l,T,e)=>{/** 4948 * @author Richard Davey <[email protected]> 4949 * @copyright 2013-2023 Photon Storm Ltd. 4950 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4951 */var d=e(56694),g=e(92980),r=e(7599),a=e(97081),h=e(10850),n=e(683),o=e(72283),f=e(87157),u=e(63946),v=new d({initialize:function(p,x){if(this.game=p,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,this.systemScene,x){Array.isArray(x)||(x=[x]);for(var y=0;y<x.length;y++)this._pending.push({key:"default",scene:x[y],autoStart:y===0,data:{}})}p.events.once(a.READY,this.bootQueue,this)},bootQueue:function(){if(!this.isBooted){this.systemScene=this.createSceneFromInstance("__SYSTEM",new f);var m,p,x,y;for(m=0;m<this._pending.length;m++){p=this._pending[m],x=p.key,y=p.scene;var P;y instanceof f?P=this.createSceneFromInstance(x,y):typeof y=="object"?P=this.createSceneFromObject(x,y):typeof y=="function"&&(P=this.createSceneFromFunction(x,y)),x=P.sys.settings.key,this.keys[x]=P,this.scenes.push(P),this._data[x]&&(P.sys.settings.data=this._data[x].data,this._data[x].autoStart&&(p.autoStart=!0)),(p.autoStart||P.sys.settings.active)&&this._start.push(x)}for(this._pending.length=0,this._data={},this.isBooted=!0,m=0;m<this._start.length;m++)p=this._start[m],this.start(p);this._start.length=0}}
4951,processQueue:function(){var m=this._pending.length,p=this._queue.length;if(!(m===0&&p===0)){var x,y;if(m){for(x=0;x<m;x++)y=this._pending[x],this.add(y.key,y.scene,y.autoStart,y.data);for(x=0;x<this._start.length;x++)y=this._start[x],this.start(y);this._start.length=0,this._pending.length=0}for(x=0;x<this._queue.length;x++)y=this._queue[x],this[y.op](y.keyA,y.keyB);this._queue.length=0}},add:function(m,p,x,y){if(x===void 0&&(x=!1),y===void 0&&(y={}),this.isProcessing||!this.isBooted)return this._pending.push({key:m,scene:p,autoStart:x,data:y}),this.isBooted||(this._data[m]={data:y}),null;m=this.getKey(m,p);var P;return p instanceof f?P=this.createSceneFromInstance(m,p):typeof p=="object"?(p.key=m,P=this.createSceneFromObject(m,p)):typeof p=="function"&&(P=this.createSceneFromFunction(m,p)),P.sys.settings.data=y,m=P.sys.settings.key,this.keys[m]=P,this.scenes.push(P),(x||P.sys.settings.active)&&(this._pending.length?this._start.push(m):this.start(m)),P},remove:function(m){if(this.isProcessing)this._queue.push({op:"remove",keyA:m,keyB:null});else{var p=this.getScene(m);if(!p||p.sys.isTransitioning())return this;var x=this.scenes.indexOf(p),y=p.sys.settings.key;x>-1&&(delete this.keys[y],this.scenes.splice(x,1),this._start.indexOf(y)>-1&&(x=this._start.indexOf(y),this._start.splice(x,1)),p.sys.destroy())}return this},bootScene:function(m){var p=m.sys,x=p.settings;p.sceneUpdate=o,m.init&&(m.init.call(m,x.data),x.status=g.INIT,x.isTransition&&p.events.emit(r.TRANSITION_INIT,x.transitionFrom,x.transitionDuration));var y;p.load&&(y=p.load,y.reset()),y&&m.preload?(m.preload.call(m),x.status=g.LOADING,y.once(n.COMPLETE,this.loadComplete,this),y.start()):this.create(m)},loadComplete:function(m){this.game.sound&&this.game.sound.onBlurPausedSounds&&this.game.sound.unlock(),this.create(m.scene)},payloadComplete:function(m){this.bootScene(m.scene)},update:function(m,p){this.processQueue(),this.isProcessing=!0;for(var x=this.scenes.length-1;x>=0;x--){var y=this.scenes[x].sys;y.settings.status>g.START&&y.settings.status<=g.RUNNING&&y.step(m,p),y.scenePlugin._target&&y.scenePlugin.step(m,p)}},render:function(m){for(var p=0;p<this.scenes.length;p++){var x=this.scenes[p].sys;x.settings.visible&&x.settings.status>=g.LOADING&&x.settings.status<g.SLEEPING&&x.render(m)}this.isProcessing=!1},create:function(m){var p=m.sys,x=p.settings;m.create&&(x.status=g.CREATING,m.create.call(m,x.data),x.status===g.DESTROYED)||(x.isTransition&&p.events.emit(r.TRANSITION_START,x.transitionFrom,x.transitionDuration),m.update&&(p.sceneUpdate=m.update),x.status=g.RUNNING,p.events.emit(r.CREATE,m))},createSceneFromFunction:function(m,p){var x=new p;if(x instanceof f){var y=x.sys.settings.key;if(y!==""&&(m=y),this.keys.hasOwnProperty(m))throw new Error("Cannot add a Scene with duplicate key: "+m);return this.createSceneFromInstance(m,x)}else return x.sys=new u(x),x.sys.settings.key=m,x.sys.init(this.game),x},createSceneFromInstance:function(m,p){var x=p.sys.settings.key;return x===""&&(p.sys.settings.key=m),p.sys.init(this.game),p},createSceneFromObject:function(m,p){var x=new f(p),y=x.sys.settings.key;y!==""?m=y:x.sys.settings.key=m,x.sys.init(this.game);for(var P=["init","preload","create","update","render"],b=0;b<P.length;b++){var E=h(p,P[b],null);E&&(x[P[b]]=E)}if(p.hasOwnProperty("extend")){for(var M in p.extend)if(p.extend.hasOwnProperty(M)){var w=p.extend[M];M==="data"&&x.hasOwnProperty("data")&&typeof w=="object"?x.data.merge(w):M!=="sys"&&(x[M]=w)}}return x},getKey:function(m,p){if(m||(m="default"),typeof p=="function")return m;if(p instanceof f?m=p.sys.settings.key:typeof p=="object"&&p.hasOwnProperty("key")&&(m=p.key),this.keys.hasOwnProperty(m))throw new Error("Cannot add a Scene with duplicate key: "+m);return m},getScenes:function(m,p){m===void 0&&(m=!0),p===void 0&&(p=!1);for(var x=[],y=this.scenes,P=0;P<y.length;P++){var b=y[P];b&&(!m||m&&b.sys.isActive())&&x.push(b)}return p?x.reverse():x},getScene:function(m){if(typeof m=="string"){if(this.keys[m])return this.keys[m]}else for(var p=0;p<this.scenes.length;p++)if(m===this.scenes[p])return m;return null},isActive:function(m){var p=this.getScene(m);return p?p.sys.isActive():null},isPaused:function(m){var p=this.getScene(m);return p?p.sys.isPaused():null},isVisible:function(m){var p=this.getScene(m);return p?p.sys.isVisible():null},isSleeping:function(m){var p=this.getScene(m);return p?p.sys.isSleeping():null},pause:function(m,p){var x=this.getScene(m);return x&&x.sys.pause(p),this},resume:function(m,p){var x=this.getScene(m);return x&&x.sys.resume(p),this},sleep:function(m,p){var x=this.getScene(m);return x&&!x.sys.isTransitioning()&&x.sys.sleep(p),this},wake:function(m,p){var x=this.getScene(m);return x&&x.sys.wake(p),this},run:function(m,p){var x=this.getScene(m);
4951if(!x){for(var y=0;y<this._pending.length;y++)if(this._pending[y].key===m){this.queueOp("start",m,p);break}return this}x.sys.isSleeping()?x.sys.wake(p):x.sys.isPaused()?x.sys.resume(p):this.start(m,p)},start:function(m,p){if(!this.isBooted)return this._data[m]={autoStart:!0,data:p},this;var x=this.getScene(m);if(!x)return console.warn("Scene not found for key: "+m),this;var y=x.sys,P=y.settings.status;if(P>=g.START&&P<=g.CREATING)return this;if(P>=g.RUNNING&&P<=g.SLEEPING)y.shutdown(),y.sceneUpdate=o,y.start(p);else{y.sceneUpdate=o,y.start(p);var b;if(y.load&&(b=y.load),b&&y.settings.hasOwnProperty("pack")&&(b.reset(),b.addPack({payload:y.settings.pack})))return y.settings.status=g.LOADING,b.once(n.COMPLETE,this.payloadComplete,this),b.start(),this}return this.bootScene(x),this},stop:function(m,p){var x=this.getScene(m);if(x&&!x.sys.isTransitioning()&&x.sys.settings.status!==g.SHUTDOWN){var y=x.sys.load;y&&(y.off(n.COMPLETE,this.loadComplete,this),y.off(n.COMPLETE,this.payloadComplete,this)),x.sys.shutdown(p)}return this},switch:function(m,p){var x=this.getScene(m),y=this.getScene(p);return x&&y&&x!==y&&(this.sleep(m),this.isSleeping(p)?this.wake(p):this.start(p)),this},getAt:function(m){return this.scenes[m]},getIndex:function(m){var p=this.getScene(m);return this.scenes.indexOf(p)},bringToTop:function(m){if(this.isProcessing)this._queue.push({op:"bringToTop",keyA:m,keyB:null});else{var p=this.getIndex(m);if(p!==-1&&p<this.scenes.length){var x=this.getScene(m);this.scenes.splice(p,1),this.scenes.push(x)}}return this},sendToBack:function(m){if(this.isProcessing)this._queue.push({op:"sendToBack",keyA:m,keyB:null});else{var p=this.getIndex(m);if(p!==-1&&p>0){var x=this.getScene(m);this.scenes.splice(p,1),this.scenes.unshift(x)}}return this},moveDown:function(m){if(this.isProcessing)this._queue.push({op:"moveDown",keyA:m,keyB:null});else{var p=this.getIndex(m);if(p>0){var x=p-1,y=this.getScene(m),P=this.getAt(x);this.scenes[p]=P,this.scenes[x]=y}}return this},moveUp:function(m){if(this.isProcessing)this._queue.push({op:"moveUp",keyA:m,keyB:null});else{var p=this.getIndex(m);if(p<this.scenes.length-1){var x=p+1,y=this.getScene(m),P=this.getAt(x);this.scenes[p]=P,this.scenes[x]=y}}return this},moveAbove:function(m,p){if(m===p)return this;if(this.isProcessing)this._queue.push({op:"moveAbove",keyA:m,keyB:p});else{var x=this.getIndex(m),y=this.getIndex(p);if(x!==-1&&y!==-1&&y<x){var P=this.getAt(y);this.scenes.splice(y,1),this.scenes.splice(x+(y>x),0,P)}}return this},moveBelow:function(m,p){if(m===p)return this;if(this.isProcessing)this._queue.push({op:"moveBelow",keyA:m,keyB:p});else{var x=this.getIndex(m),y=this.getIndex(p);if(x!==-1&&y!==-1&&y>x){var P=this.getAt(y);this.scenes.splice(y,1),x===0?this.scenes.unshift(P):this.scenes.splice(x-(y<x),0,P)}}return this},queueOp:function(m,p,x){return this._queue.push({op:m,keyA:p,keyB:x}),this},swapPosition:function(m,p){if(m===p)return this;if(this.isProcessing)this._queue.push({op:"swapPosition",keyA:m,keyB:p});else{var x=this.getIndex(m),y=this.getIndex(p);if(x!==y&&x!==-1&&y!==-1){var P=this.getAt(x);this.scenes[x]=this.scenes[y],this.scenes[y]=P}}return this},dump:function(){for(var m=[],p=["pending","init","start","loading","creating","running","paused","sleeping","shutdown","destroyed"],x=0;x<this.scenes.length;x++){var y=this.scenes[x].sys,P=y.settings.visible&&(y.settings.status===g.RUNNING||y.settings.status===g.PAUSED)?"[*] ":"[-] ";P+=y.settings.key+" ("+p[y.settings.status]+")",m.push(P)}console.log(m.join(` 4952`))},destroy:function(){for(var m=0;m<this.scenes.length;m++){var p=this.scenes[m].sys;p.destroy()}this.systemScene.sys.destroy(),this.update=o,this.scenes=[],this._pending=[],this._start=[],this._queue=[],this.game=null,this.systemScene=null}});l.exports=v},64051:(l,T,e)=>{/** 4953 * @author Richard Davey <[email protected]> 4954 * @copyright 2013-2023 Photon Storm Ltd. 4955 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4956 */var d=e(82897),g=e(56694),r=e(7599),a=e(72632),h=e(91963),n=new g({initialize:function(f){this.scene=f,this.systems=f.sys,this.settings=f.sys.settings,this.key=f.sys.settings.key,this.manager=f.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,f.sys.events.once(r.BOOT,this.boot,this),f.sys.events.on(r.START,this.pluginStart,this)},boot:function(){this.systems.events.once(r.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},start:function(o,f){return o===void 0&&(o=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",o,f),this},restart:function(o){var f=this.key;return this.manager.queueOp("stop",f),this.manager.queueOp("start",f,o),this},transition:function(o){o===void 0&&(o={});var f=a(o,"target",!1),u=this.manager.getScene(f);if(!f||!this.checkValidTransition(u))return!1;var v=a(o,"duration",1e3);this._elapsed=0,this._target=u,this._duration=v,this._willSleep=a(o,"sleep",!1),this._willRemove=a(o,"remove",!1);var m=a(o,"onUpdate",null);m&&(this._onUpdate=m,this._onUpdateScope=a(o,"onUpdateScope",this.scene));var p=a(o,"allowInput",!1);this.settings.transitionAllowInput=p;var x=u.sys.settings;x.isTransition=!0,x.transitionFrom=this.scene,x.transitionDuration=v,x.transitionAllowInput=p,a(o,"moveAbove",!1)?this.manager.moveAbove(this.key,f):a(o,"moveBelow",!1)&&this.manager.moveBelow(this.key,f),u.sys.isSleeping()?u.sys.wake(a(o,"data")):this.manager.start(f,a(o,"data"));
vendor: 8,325 bytes, lines 4956-4971
4956var y=a(o,"onStart",null),P=a(o,"onStartScope",this.scene);return y&&y.call(P,this.scene,u,v),this.systems.events.emit(r.TRANSITION_OUT,u,v),!0},checkValidTransition:function(o){return!(!o||o.sys.isActive()||o.sys.isTransitioning()||o===this.scene||this.systems.isTransitioning())},step:function(o,f){this._elapsed+=f,this.transitionProgress=d(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var o=this._target.sys,f=this._target.sys.settings;o.events.emit(r.TRANSITION_COMPLETE,this.scene),f.isTransition=!1,f.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(o,f,u,v){return this.manager.add(o,f,u,v)},launch:function(o,f){return o&&o!==this.key&&this.manager.queueOp("start",o,f),this},run:function(o,f){return o&&o!==this.key&&this.manager.queueOp("run",o,f),this},pause:function(o,f){return o===void 0&&(o=this.key),this.manager.queueOp("pause",o,f),this},resume:function(o,f){return o===void 0&&(o=this.key),this.manager.queueOp("resume",o,f),this},sleep:function(o,f){return o===void 0&&(o=this.key),this.manager.queueOp("sleep",o,f),this},wake:function(o,f){return o===void 0&&(o=this.key),this.manager.queueOp("wake",o,f),this},switch:function(o){return o!==this.key&&this.manager.queueOp("switch",this.key,o),this},stop:function(o,f){return o===void 0&&(o=this.key),this.manager.queueOp("stop",o,f),this},setActive:function(o,f,u){f===void 0&&(f=this.key);var v=this.manager.getScene(f);return v&&v.sys.setActive(o,u),this},setVisible:function(o,f){f===void 0&&(f=this.key);var u=this.manager.getScene(f);return u&&u.sys.setVisible(o),this},isSleeping:function(o){return o===void 0&&(o=this.key),this.manager.isSleeping(o)},isActive:function(o){return o===void 0&&(o=this.key),this.manager.isActive(o)},isPaused:function(o){return o===void 0&&(o=this.key),this.manager.isPaused(o)},isVisible:function(o){return o===void 0&&(o=this.key),this.manager.isVisible(o)},swapPosition:function(o,f){return f===void 0&&(f=this.key),o!==f&&this.manager.swapPosition(o,f),this},moveAbove:function(o,f){return f===void 0&&(f=this.key),o!==f&&this.manager.moveAbove(o,f),this},moveBelow:function(o,f){return f===void 0&&(f=this.key),o!==f&&this.manager.moveBelow(o,f),this},remove:function(o){return o===void 0&&(o=this.key),this.manager.remove(o),this},moveUp:function(o){return o===void 0&&(o=this.key),this.manager.moveUp(o),this},moveDown:function(o){return o===void 0&&(o=this.key),this.manager.moveDown(o),this},bringToTop:function(o){return o===void 0&&(o=this.key),this.manager.bringToTop(o),this},sendToBack:function(o){return o===void 0&&(o=this.key),this.manager.sendToBack(o),this},get:function(o){return this.manager.getScene(o)},getStatus:function(o){var f=this.manager.getScene(o);if(f)return f.sys.getStatus()},getIndex:function(o){return o===void 0&&(o=this.key),this.manager.getIndex(o)},shutdown:function(){var o=this.systems.events;o.off(r.SHUTDOWN,this.shutdown,this),o.off(r.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});h.register("ScenePlugin",n,"scenePlugin"),l.exports=n},36765:(l,T,e)=>{/** 4957 * @author Richard Davey <[email protected]> 4958 * @copyright 2013-2023 Photon Storm Ltd. 4959 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4960 */var d=e(92980),g=e(10850),r=e(30657),a=e(90415),h={create:function(n){return typeof n=="string"?n={key:n}:n===void 0&&(n={}),{status:d.PENDING,key:g(n,"key",""),active:g(n,"active",!1),visible:g(n,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:g(n,"pack",!1),cameras:g(n,"cameras",null),map:g(n,"map",r(a,g(n,"mapAdd",{}))),physics:g(n,"physics",{}),loader:g(n,"loader",{}),plugins:g(n,"plugins",!1),input:g(n,"input",{})}}};l.exports=h},63946:(l,T,e)=>{/** 4961 * @author Richard Davey <[email protected]> 4962 * @copyright 2013-2023 Photon Storm Ltd. 4963 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4964 */var d=e(56694),g=e(92980),r=e(18360),a=e(7599),h=e(47736),n=e(91088),o=e(72283),f=e(36765),u=new d({initialize:function(m,p){this.scene=m,this.game,this.renderer,this.config=p,this.settings=f.create(p),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=o},init:function(v){this.settings.status=g.INIT,this.sceneUpdate=o,this.game=v,this.renderer=v.renderer,this.canvas=v.canvas,this.context=v.context;var m=v.plugins;this.plugins=m,m.addToScene(this,r.Global,[r.CoreScene,n(this),h(this)]),this.events.emit(a.BOOT,this),this.settings.isBooted=!0},step:function(v,m){var p=this.events;p.emit(a.PRE_UPDATE,v,m),p.emit(a.UPDATE,v,m),this.sceneUpdate.call(this.scene,v,m),p.emit(a.POST_UPDATE,v,m)},render:function(v){var m=this.displayList;m.depthSort(),this.events.emit(a.PRE_RENDER,v),this.cameras.render(v,m),this.events.emit(a.RENDER,v)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(v){var m=this.settings,p=this.getStatus();return p!==g.CREATING&&p!==g.RUNNING?console.warn("Cannot pause non-running Scene",m.key):this.settings.active&&(m.status=g.PAUSED,m.active=!1,this.events.emit(a.PAUSE,this,v)),this},resume:function(v){var m=this.events,p=this.settings;return this.settings.active||(p.status=g.RUNNING,p.active=!0,m.emit(a.RESUME,this,v)),this},sleep:function(v){var m=this.settings,p=this.getStatus();return p!==g.CREATING&&p!==g.RUNNING?console.warn("Cannot sleep non-running Scene",m.key):(m.status=g.SLEEPING,m.active=!1,m.visible=!1,this.events.emit(a.SLEEP,this,v)),this},wake:function(v){var m=this.events,p=this.settings;return p.status=g.RUNNING,p.active=!0,p.visible=!0,m.emit(a.WAKE,this,v),p.isTransition&&m.emit(a.TRANSITION_WAKE,p.transitionFrom,p.transitionDuration),this},getData:function(){return this.settings.data},getStatus:function(){return this.settings.status},canInput:function(){var v=this.settings.status;return v>g.PENDING&&v<=g.RUNNING},isSleeping:function(){return this.settings.status===g.SLEEPING},isActive:function(){return this.settings.status===g.RUNNING},isPaused:function(){return this.settings.status===g.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,m){return v?this.resume(m):this.pause(m)},start:function(v){var m=this.events,p=this.settings;v&&(p.data=v),p.status=g.START,p.active=!0,p.visible=!0,m.emit(a.START,this),m.emit(a.READY,this,v)},shutdown:function(v){var m=this.events,p=this.settings;m.off(a.TRANSITION_INIT),m.off(a.TRANSITION_START),m.off(a.TRANSITION_COMPLETE),m.off(a.TRANSITION_OUT),p.status=g.SHUTDOWN,p.active=!1,p.visible=!1,m.emit(a.SHUTDOWN,this,v)},destroy:function(){var v=this.events,m=this.settings;m.status=g.DESTROYED,m.active=!1,m.visible=!1,v.emit(a.DESTROY,this),v.removeAllListeners();for(var p=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],x=0;x<p.length;x++)this[p[x]]=null}});l.exports=u},92980:l=>{/** 4965 * @author Richard Davey <[email protected]> 4966 * @copyright 2013-2023 Photon Storm Ltd. 4967 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4968 */var T={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9};l.exports=T},31803:l=>{/** 4969 * @author Richard Davey <[email protected]> 4970 * @copyright 2013-2023 Photon Storm Ltd. 4971 * @license {@link https://opensource.org/licenses/MIT|MIT License}
4972 */l.exports="addedtoscene"},94817:l=>{/** 4973 * @author Richard Davey <[email protected]> 4974 * @copyright 2013-2023 Photon Storm Ltd. 4975 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4976 */l.exports="boot"},28977:l=>{/** 4977 * @author Richard Davey <[email protected]> 4978 * @copyright 2013-2023 Photon Storm Ltd. 4979 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4980 */l.exports="create"},91959:l=>{/** 4981 * @author Richard Davey <[email protected]> 4982 * @copyright 2013-2023 Photon Storm Ltd. 4983 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4984 */l.exports="destroy"},363:l=>{/** 4985 * @author Richard Davey <[email protected]> 4986 * @copyright 2013-2023 Photon Storm Ltd. 4987 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4988 */l.exports="pause"},15643:l=>{/** 4989 * @author Richard Davey <[email protected]> 4990 * @copyright 2013-2023 Photon Storm Ltd. 4991 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4992 */l.exports="postupdate"},17058:l=>{/** 4993 * @author samme 4994 * @copyright 2021 Photon Storm Ltd. 4995 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4996 */l.exports="prerender"},77125:l=>{/** 4997 * @author Richard Davey <[email protected]> 4998 * @copyright 2013-2023 Photon Storm Ltd. 4999 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5000 */l.exports="preupdate"},76018:l=>{/** 5001 * @author Richard Davey <[email protected]> 5002 * @copyright 2013-2023 Photon Storm Ltd. 5003 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5004 */l.exports="ready"},28620:l=>{/** 5005 * @author Richard Davey <[email protected]> 5006 * @copyright 2013-2023 Photon Storm Ltd. 5007 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5008 */l.exports="removedfromscene"},41538:l=>{/** 5009 * @author Richard Davey <[email protected]> 5010 * @copyright 2013-2023 Photon Storm Ltd. 5011 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5012 */l.exports="render"},34268:l=>{/** 5013 * @author Richard Davey <[email protected]> 5014 * @copyright 2013-2023 Photon Storm Ltd. 5015 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5016 */l.exports="resume"},2342:l=>{/** 5017 * @author Richard Davey <[email protected]> 5018 * @copyright 2013-2023 Photon Storm Ltd. 5019 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5020 */l.exports="shutdown"},96541:l=>{/** 5021 * @author Richard Davey <[email protected]> 5022 * @copyright 2013-2023 Photon Storm Ltd. 5023 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5024 */l.exports="sleep"},74244:l=>{/** 5025 * @author Richard Davey <[email protected]> 5026 * @copyright 2013-2023 Photon Storm Ltd. 5027 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5028 */l.exports="start"},17046:l=>{/** 5029 * @author Richard Davey <[email protected]> 5030 * @copyright 2013-2023 Photon Storm Ltd. 5031 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5032 */l.exports="transitioncomplete"},13637:l=>{/** 5033 * @author Richard Davey <[email protected]> 5034 * @copyright 2013-2023 Photon Storm Ltd. 5035 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5036 */l.exports="transitioninit"},14733:l=>{/** 5037 * @author Richard Davey <[email protected]> 5038 * @copyright 2013-2023 Photon Storm Ltd. 5039 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5040 */l.exports="transitionout"},33899:l=>{/** 5041 * @author Richard Davey <[email protected]> 5042 * @copyright 2013-2023 Photon Storm Ltd. 5043 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5044 */l.exports="transitionstart"},52418:l=>{/** 5045 * @author Richard Davey <[email protected]> 5046 * @copyright 2013-2023 Photon Storm Ltd. 5047 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5048 */l.exports="transitionwake"},31735:l=>{/** 5049 * @author Richard Davey <[email protected]> 5050 * @copyright 2013-2023 Photon Storm Ltd. 5051 * @license {@link https://opensource.org/licenses/MIT|MIT License}
5052 */l.exports="update"},8470:l=>{/** 5053 * @author Richard Davey <[email protected]> 5054 * @copyright 2013-2023 Photon Storm Ltd. 5055 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5056 */l.exports="wake"},7599:(l,T,e)=>{/** 5057 * @author Richard Davey <[email protected]> 5058 * @copyright 2013-2023 Photon Storm Ltd. 5059 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5060 */l.exports={ADDED_TO_SCENE:e(31803),BOOT:e(94817),CREATE:e(28977),DESTROY:e(91959),PAUSE:e(363),POST_UPDATE:e(15643),PRE_RENDER:e(17058),PRE_UPDATE:e(77125),READY:e(76018),REMOVED_FROM_SCENE:e(28620),RENDER:e(41538),RESUME:e(34268),SHUTDOWN:e(2342),SLEEP:e(96541),START:e(74244),TRANSITION_COMPLETE:e(17046),TRANSITION_INIT:e(13637),TRANSITION_OUT:e(14733),TRANSITION_START:e(33899),TRANSITION_WAKE:e(52418),UPDATE:e(31735),WAKE:e(8470)}},20436:(l,T,e)=>{/** 5061 * @author Richard Davey <[email protected]> 5062 * @copyright 2013-2023 Photon Storm Ltd. 5063 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5064 */var d=e(92980),g=e(98611),r={Events:e(7599),GetPhysicsPlugins:e(47736),GetScenePlugins:e(91088),SceneManager:e(13553),ScenePlugin:e(64051),Settings:e(36765),Systems:e(63946)};r=g(!1,r,d),l.exports=r},25798:(l,T,e)=>{/** 5065 * @author Richard Davey <[email protected]> 5066 * @author Pavle Goloskokovic <[email protected]> (http://prunegames.com) 5067 * @copyright 2013-2023 Photon Storm Ltd. 5068 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5069 */var d=e(56694),g=e(6659),r=e(76038),a=e(98611),h=e(72283),n=new d({Extends:g,initialize:function(f,u,v){g.call(this),this.manager=f,this.key=u,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=a(this.config,v),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(o){return!o||!o.name||typeof o.name!="string"?!1:this.markers[o.name]?(console.error("addMarker "+o.name+" already exists in Sound"),!1):(o=a(!0,{name:"",start:0,duration:this.totalDuration-(o.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0}},o),this.markers[o.name]=o,!0)},updateMarker:function(o){return!o||!o.name||typeof o.name!="string"?!1:this.markers[o.name]?(this.markers[o.name]=a(!0,this.markers[o.name],o),!0):(console.warn("Audio Marker: "+o.name+" missing in Sound: "+this.key),!1)},removeMarker:function(o){var f=this.markers[o];return f?(this.markers[o]=null,f):null},play:function(o,f){if(o===void 0&&(o=""),typeof o=="object"&&(f=o,o=""),typeof o!="string")return!1;if(!o)this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;else{if(!this.markers[o])return console.warn("Marker: "+o+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[o],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}return this.resetConfig(),this.currentConfig=a(this.currentConfig,f),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:h,calculateRate:function(){var o=1.0005777895065548,f=this.currentConfig.detune+this.manager.detune,u=Math.pow(o,f);this.totalRate=this.currentConfig.rate*this.manager.rate*u}
5069,destroy:function(){this.pendingRemove||(this.emit(r.DESTROY,this),this.removeAllListeners(),this.pendingRemove=!0,this.manager=null,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});l.exports=n},12486:(l,T,e)=>{/** 5070 * @author Richard Davey <[email protected]> 5071 * @author Pavle Goloskokovic <[email protected]> (http://prunegames.com) 5072 * @copyright 2013-2023 Photon Storm Ltd. 5073 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5074 */var d=e(56694),g=e(32742),r=e(6659),a=e(76038),h=e(97081),n=e(71608),o=e(51463),f=e(72283),u=e(93736),v=new d({Extends:r,initialize:function(p){r.call(this),this.game=p,this.jsonCache=p.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 u,p.events.on(h.BLUR,this.onGameBlur,this),p.events.on(h.FOCUS,this.onGameFocus,this),p.events.on(h.PRE_STEP,this.update,this),p.events.once(h.DESTROY,this.destroy,this)},add:f,addAudioSprite:function(m,p){p===void 0&&(p={});var x=this.add(m,p);x.spritemap=this.jsonCache.get(m).spritemap;for(var y in x.spritemap)if(x.spritemap.hasOwnProperty(y)){var P=g(p),b=x.spritemap[y];P.loop=b.hasOwnProperty("loop")?b.loop:!1,x.addMarker({name:y,start:b.start,duration:b.end-b.start,config:P})}return x},get:function(m){return o(this.sounds,"key",m)},getAll:function(m){return m?n(this.sounds,"key",m):n(this.sounds)},getAllPlaying:function(){return n(this.sounds,"isPlaying",!0)},play:function(m,p){var x=this.add(m);return x.once(a.COMPLETE,x.destroy,x),p?p.name?(x.addMarker(p),x.play(p.name)):x.play(p):x.play()},playAudioSprite:function(m,p,x){var y=this.addAudioSprite(m);return y.once(a.COMPLETE,y.destroy,y),y.play(p,x)},remove:function(m){var p=this.sounds.indexOf(m);return p!==-1?(m.destroy(),this.sounds.splice(p,1),!0):!1},removeAll:function(){this.sounds.forEach(function(m){m.destroy()}),this.sounds.length=0},removeByKey:function(m){for(var p=0,x=this.sounds.length-1;x>=0;x--){var y=this.sounds[x];y.key===m&&(y.destroy(),this.sounds.splice(x,1),p++)}return p},pauseAll:function(){this.forEachActiveSound(function(m){m.pause()}),this.emit(a.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(m){m.resume()}),this.emit(a.RESUME_ALL,this)},setListenerPosition:f,stopAll:function(){this.forEachActiveSound(function(m){m.stop()}),this.emit(a.STOP_ALL,this)},stopByKey:function(m){var p=0;return this.getAll(m).forEach(function(x){x.stop()&&p++}),p},unlock:f,onBlur:f,onFocus:f,onGameBlur:function(){this.gameLostFocus=!0,this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.gameLostFocus=!1,this.pauseOnBlur&&this.onFocus()},update:function(m,p){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(a.UNLOCKED,this));for(var x=this.sounds.length-1;x>=0;x--)this.sounds[x].pendingRemove&&this.sounds.splice(x,1);this.sounds.forEach(function(y){y.update(m,p)})},destroy:function(){this.game.events.off(h.BLUR,this.onGameBlur,this),this.game.events.off(h.FOCUS,this.onGameFocus,this),this.game.events.off(h.PRE_STEP,this.update,this),this.removeAllListeners(),this.removeAll(),this.sounds.length=0,this.sounds=null,this.listenerPosition=null,this.game=null},forEachActiveSound:function(m,p){var x=this;this.sounds.forEach(function(y,P){y&&!y.pendingRemove&&m.call(p||x,y,P,x.sounds)})},setRate:function(m){return this.rate=m,this},rate:{get:function(){return this._rate},set:function(m){this._rate=m,this.forEachActiveSound(function(p){p.calculateRate()}),this.emit(a.GLOBAL_RATE,this,m)}},setDetune:function(m){return this.detune=m,this},detune:{get:function(){return this._detune},set:function(m){this._detune=m,this.forEachActiveSound(function(p){p.calculateRate()}),this.emit(a.GLOBAL_DETUNE,this,m)}}});l.exports=v},84191:(l,T,e)=>{/** 5075 * @author Richard Davey <[email protected]> 5076 * @author Pavle Goloskokovic <[email protected]> (http://prunegames.com) 5077 * @copyright 2013-2023 Photon Storm Ltd. 5078 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5079 */var d=e(27622),g=e(17546),r=e(55491),a={create:function(h){var n=h.config.audio,o=h.device.audio;return n.noAudio||!o.webAudio&&!o.audioData?new g(h):o.webAudio&&!n.disableWebAudio?new r(h):new d(h)}};l.exports=a},77578:l=>{/** 5080 * @author Richard Davey <[email protected]> 5081 * @copyright 2013-2023 Photon Storm Ltd. 5082 * @license {@link https://opensource.org/licenses/MIT|MIT License}
5083 */l.exports="complete"},19679:l=>{/** 5084 * @author Richard Davey <[email protected]> 5085 * @copyright 2013-2023 Photon Storm Ltd. 5086 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5087 */l.exports="decodedall"},56951:l=>{/** 5088 * @author Richard Davey <[email protected]> 5089 * @copyright 2013-2023 Photon Storm Ltd. 5090 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5091 */l.exports="decoded"},16436:l=>{/** 5092 * @author Richard Davey <[email protected]> 5093 * @copyright 2013-2023 Photon Storm Ltd. 5094 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5095 */l.exports="destroy"},55154:l=>{/** 5096 * @author Richard Davey <[email protected]> 5097 * @copyright 2013-2023 Photon Storm Ltd. 5098 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5099 */l.exports="detune"},57818:l=>{/** 5100 * @author Richard Davey <[email protected]> 5101 * @copyright 2013-2023 Photon Storm Ltd. 5102 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5103 */l.exports="detune"},57890:l=>{/** 5104 * @author Richard Davey <[email protected]> 5105 * @copyright 2013-2023 Photon Storm Ltd. 5106 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5107 */l.exports="mute"},83022:l=>{/** 5108 * @author Richard Davey <[email protected]> 5109 * @copyright 2013-2023 Photon Storm Ltd. 5110 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5111 */l.exports="rate"},99170:l=>{/** 5112 * @author Richard Davey <[email protected]> 5113 * @copyright 2013-2023 Photon Storm Ltd. 5114 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5115 */l.exports="volume"},64289:l=>{/** 5116 * @author Richard Davey <[email protected]> 5117 * @copyright 2013-2023 Photon Storm Ltd. 5118 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5119 */l.exports="looped"},67214:l=>{/** 5120 * @author Richard Davey <[email protected]> 5121 * @copyright 2013-2023 Photon Storm Ltd. 5122 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5123 */l.exports="loop"},53128:l=>{/** 5124 * @author Richard Davey <[email protected]> 5125 * @copyright 2013-2023 Photon Storm Ltd. 5126 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5127 */l.exports="mute"},73078:l=>{/** 5128 * @author pi-kei 5129 * @copyright 2013-2023 Photon Storm Ltd. 5130 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5131 */l.exports="pan"},76763:l=>{/** 5132 * @author Richard Davey <[email protected]> 5133 * @copyright 2013-2023 Photon Storm Ltd. 5134 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5135 */l.exports="pauseall"},88426:l=>{/** 5136 * @author Richard Davey <[email protected]> 5137 * @copyright 2013-2023 Photon Storm Ltd. 5138 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5139 */l.exports="pause"},13765:l=>{/** 5140 * @author Richard Davey <[email protected]> 5141 * @copyright 2013-2023 Photon Storm Ltd. 5142 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5143 */l.exports="play"},80291:l=>{/** 5144 * @author Richard Davey <[email protected]> 5145 * @copyright 2013-2023 Photon Storm Ltd. 5146 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5147 */l.exports="rate"},11124:l=>{/** 5148 * @author Richard Davey <[email protected]> 5149 * @copyright 2013-2023 Photon Storm Ltd. 5150 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5151 */l.exports="resumeall"},55382:l=>{/** 5152 * @author Richard Davey <[email protected]> 5153 * @copyright 2013-2023 Photon Storm Ltd. 5154 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5155 */l.exports="resume"},71157:l=>{/** 5156 * @author Richard Davey <[email protected]> 5157 * @copyright 2013-2023 Photon Storm Ltd. 5158 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5159 */l.exports="seek"},31776:l=>{/** 5160 * @author Richard Davey <[email protected]> 5161 * @copyright 2013-2023 Photon Storm Ltd. 5162 * @license {@link https://opensource.org/licenses/MIT|MIT License}
5163 */l.exports="stopall"},39450:l=>{/** 5164 * @author Richard Davey <[email protected]> 5165 * @copyright 2013-2023 Photon Storm Ltd. 5166 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5167 */l.exports="stop"},21939:l=>{/** 5168 * @author Richard Davey <[email protected]> 5169 * @copyright 2013-2023 Photon Storm Ltd. 5170 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5171 */l.exports="unlocked"},33019:l=>{/** 5172 * @author Richard Davey <[email protected]> 5173 * @copyright 2013-2023 Photon Storm Ltd. 5174 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5175 */l.exports="volume"},76038:(l,T,e)=>{/** 5176 * @author Richard Davey <[email protected]> 5177 * @copyright 2013-2023 Photon Storm Ltd. 5178 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5179 */l.exports={COMPLETE:e(77578),DECODED:e(56951),DECODED_ALL:e(19679),DESTROY:e(16436),DETUNE:e(55154),GLOBAL_DETUNE:e(57818),GLOBAL_MUTE:e(57890),GLOBAL_RATE:e(83022),GLOBAL_VOLUME:e(99170),LOOP:e(67214),LOOPED:e(64289),MUTE:e(53128),PAN:e(73078),PAUSE_ALL:e(76763),PAUSE:e(88426),PLAY:e(13765),RATE:e(80291),RESUME_ALL:e(11124),RESUME:e(55382),SEEK:e(71157),STOP_ALL:e(31776),STOP:e(39450),UNLOCKED:e(21939),VOLUME:e(33019)}},34350:(l,T,e)=>{/** 5180 * @author Richard Davey <[email protected]> 5181 * @author Pavle Goloskokovic <[email protected]> (http://prunegames.com) 5182 * @copyright 2013-2023 Photon Storm Ltd. 5183 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5184 */var d=e(25798),g=e(56694),r=e(76038),a=e(82897),h=new g({Extends:d,initialize:function(o,f,u){if(u===void 0&&(u={}),this.tags=o.game.cache.audio.get(f),!this.tags)throw new Error('No cached audio asset with key "'+f);this.audio=null,this.startTime=0,this.previousTime=0,this.duration=this.tags[0].duration,this.totalDuration=this.tags[0].duration,d.call(this,o,f,u)},play:function(n,o){return this.manager.isLocked(this,"play",[n,o])||!d.prototype.play.call(this,n,o)||!this.pickAndPlayAudioTag()?!1:(this.emit(r.PLAY,this),!0)},pause:function(){return this.manager.isLocked(this,"pause")||this.startTime>0||!d.prototype.pause.call(this)?!1:(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(r.PAUSE,this),!0)},resume:function(){return this.manager.isLocked(this,"resume")||this.startTime>0||!d.prototype.resume.call(this)||!this.pickAndPlayAudioTag()?!1:(this.emit(r.RESUME,this),!0)},stop:function(){return this.manager.isLocked(this,"stop")||!d.prototype.stop.call(this)?!1:(this.stopAndReleaseAudioTag(),this.emit(r.STOP,this),!0)},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var n=this.currentConfig.seek,o=this.currentConfig.delay,f=(this.currentMarker?this.currentMarker.start:0)+n;return this.previousTime=f,this.audio.currentTime=f,this.applyConfig(),o===0?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+o*1e3,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var n=0;n<this.tags.length;n++){var o=this.tags[n];if(o.dataset.used==="false")return o.dataset.used="true",this.audio=o,!0}if(!this.manager.override)return!1;var f=[];this.manager.forEachActiveSound(function(v){v.key===this.key&&v.audio&&f.push(v)},this),f.sort(function(v,m){return v.loop===m.loop?m.seek/m.duration-v.seek/v.duration:v.loop?1:-1});var u=f[0];return this.audio=u.audio,u.reset(),u.audio=null,u.startTime=0,u.previousTime=0,!0},playCatchPromise:function(){var n=this.audio.play();n&&n.catch(function(o){console.warn(o)})},stopAndReleaseAudioTag:function(){this.startTime=0,this.previousTime=0,this.audio&&(this.audio.pause(),this.audio.dataset.used="false",this.audio=null)},reset:function(){d.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(n){if(this.isPlaying){if(this.startTime>0){this.startTime<n-this.manager.audioPlayDelay&&(this.audio.currentTime+=Math.max(0,n-this.startTime)/1e3,this.startTime=0,this.previousTime=this.audio.currentTime,this.playCatchPromise());return}var o=this.currentMarker?this.currentMarker.start:0,f=o+this.duration,u=this.audio.currentTime;if(this.currentConfig.loop)u>=f-this.manager.loopEndOffset?(this.audio.currentTime=o+Math.max(0,u-f),u=this.audio.currentTime):u<o&&(this.audio.currentTime+=o,u=this.audio.currentTime),u<this.previousTime&&this.emit
5184(r.LOOPED,this);else if(u>=f){this.reset(),this.stopAndReleaseAudioTag(),this.emit(r.COMPLETE,this);return}this.previousTime=u}},destroy:function(){d.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},updateMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},updateVolume:function(){this.audio&&(this.audio.volume=a(this.currentConfig.volume*this.manager.volume,0,1))},calculateRate:function(){d.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(n){this.currentConfig.mute=n,!this.manager.isLocked(this,"mute",n)&&(this.updateMute(),this.emit(r.MUTE,this,n))}},setMute:function(n){return this.mute=n,this},volume:{get:function(){return this.currentConfig.volume},set:function(n){this.currentConfig.volume=n,!this.manager.isLocked(this,"volume",n)&&(this.updateVolume(),this.emit(r.VOLUME,this,n))}},setVolume:function(n){return this.volume=n,this},rate:{get:function(){return this.currentConfig.rate},set:function(n){this.currentConfig.rate=n,!this.manager.isLocked(this,r.RATE,n)&&(this.calculateRate(),this.emit(r.RATE,this,n))}},setRate:function(n){return this.rate=n,this},detune:{get:function(){return this.currentConfig.detune},set:function(n){this.currentConfig.detune=n,!this.manager.isLocked(this,r.DETUNE,n)&&(this.calculateRate(),this.emit(r.DETUNE,this,n))}},setDetune:function(n){return this.detune=n,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(n){this.manager.isLocked(this,"seek",n)||this.startTime>0||(this.isPlaying||this.isPaused)&&(n=Math.min(Math.max(0,n),this.duration),this.isPlaying?(this.previousTime=n,this.audio.currentTime=n):this.isPaused&&(this.currentConfig.seek=n),this.emit(r.SEEK,this,n))}},setSeek:function(n){return this.seek=n,this},loop:{get:function(){return this.currentConfig.loop},set:function(n){this.currentConfig.loop=n,!this.manager.isLocked(this,"loop",n)&&(this.audio&&(this.audio.loop=n),this.emit(r.LOOP,this,n))}},setLoop:function(n){return this.loop=n,this},pan:{get:function(){return this.currentConfig.pan},set:function(n){this.currentConfig.pan=n,this.emit(r.PAN,this,n)}},setPan:function(n){return this.pan=n,this}});l.exports=h},27622:(l,T,e)=>{/** 5185 * @author Richard Davey <[email protected]> 5186 * @author Pavle Goloskokovic <[email protected]> (http://prunegames.com) 5187 * @copyright 2013-2023 Photon Storm Ltd. 5188 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5189 */var d=e(12486),g=e(56694),r=e(76038),a=e(34350),h=new g({Extends:d,initialize:function(o){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,d.call(this,o)},add:function(n,o){var f=new a(this,n,o);return this.sounds.push(f),f},unlock:function(){this.locked=!1;var n=this;if(this.game.cache.audio.entries.each(function(v,m){for(var p=0;p<m.length;p++)if(m[p].dataset.locked==="true")return n.locked=!0,!1;return!0}),!!this.locked){var o=!1,f=function(){o=!0},u=function(){if(o){o=!1;return}document.body.removeEventListener("touchmove",f),document.body.removeEventListener("touchend",u);var v=[];if(n.game.cache.audio.entries.each(function(p,x){for(var y=0;y<x.length;y++){var P=x[y];P.dataset.locked==="true"&&v.push(P)}return!0}),v.length!==0){var m=v[v.length-1];m.oncanplaythrough=function(){m.oncanplaythrough=null,v.forEach(function(p){p.dataset.locked="false"}),n.unlocked=!0},v.forEach(function(p){p.load()})}};this.once(r.UNLOCKED,function(){for(this.forEachActiveSound(function(m){m.currentMarker===null&&m.duration===0&&(m.duration=m.tags[0].duration),m.totalDuration=m.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",f,!1),document.body.addEventListener("touchend",u,!1)}},onBlur:function(){this.forEachActiveSound(function(n){n.isPlaying&&(this.onBlurPausedSounds.push(n),n.onBlur())})},onFocus:function(){this.onBlurPausedSounds.forEach(function(n){n.onFocus()}),this.onBlurPausedSounds.length=0},destroy:function(){d.prototype.destroy.call(this),this.onBlurPausedSounds.length=0,this.onBlurPausedSounds=null},isLocked:function(n,o,f){return n.tags[0].dataset.locked==="true"?(this.lockedActionsQueue.push({sound:n,prop:o,value:f}),!0):!1},setMute:function(n){return this.mute=n,this},mute:{get:function(){return this._mute},set:function(n){this._mute=n,this.forEachActiveSound(function(o){o.updateMute()}
5189),this.emit(r.GLOBAL_MUTE,this,n)}},setVolume:function(n){return this.volume=n,this},volume:{get:function(){return this._volume},set:function(n){this._volume=n,this.forEachActiveSound(function(o){o.updateVolume()}),this.emit(r.GLOBAL_VOLUME,this,n)}}});l.exports=h},56751:(l,T,e)=>{/** 5190 * @author Richard Davey <[email protected]> 5191 * @author Pavle Goloskokovic <[email protected]> (http://prunegames.com) 5192 * @copyright 2013-2023 Photon Storm Ltd. 5193 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5194 */l.exports={SoundManagerCreator:e(84191),Events:e(76038),BaseSound:e(25798),BaseSoundManager:e(12486),WebAudioSound:e(96008),WebAudioSoundManager:e(55491),HTML5AudioSound:e(34350),HTML5AudioSoundManager:e(27622),NoAudioSound:e(38662),NoAudioSoundManager:e(17546)}},38662:(l,T,e)=>{/** 5195 * @author Richard Davey <[email protected]> 5196 * @author Pavle Goloskokovic <[email protected]> (http://prunegames.com) 5197 * @copyright 2013-2023 Photon Storm Ltd. 5198 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5199 */var d=e(25798),g=e(56694),r=e(6659),a=e(98611),h=e(72283),n=function(){return!1},o=function(){return null},f=function(){return this},u=new g({Extends:r,initialize:function(m,p,x){x===void 0&&(x={}),r.call(this),this.manager=m,this.key=p,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=a({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},x),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:n,updateMarker:n,removeMarker:o,play:n,pause:n,resume:n,stop:n,setMute:f,setVolume:f,setRate:f,setDetune:f,setSeek:f,setLoop:f,setPan:f,applyConfig:o,resetConfig:o,update:h,calculateRate:o,destroy:function(){d.prototype.destroy.call(this)}});l.exports=u},17546:(l,T,e)=>{/** 5200 * @author Richard Davey <[email protected]> 5201 * @author Pavle Goloskokovic <[email protected]> (http://prunegames.com) 5202 * @copyright 2013-2023 Photon Storm Ltd. 5203 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5204 */var d=e(12486),g=e(56694),r=e(6659),a=e(38662),h=e(72283),n=new g({Extends:r,initialize:function(f){r.call(this),this.game=f,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(o,f){var u=new a(this,o,f);return this.sounds.push(u),u},addAudioSprite:function(o,f){var u=this.add(o,f);return u.spritemap={},u},get:function(o){return d.prototype.get.call(this,o)},getAll:function(o){return d.prototype.getAll.call(this,o)},play:function(o,f){return!1},playAudioSprite:function(o,f,u){return!1},remove:function(o){return d.prototype.remove.call(this,o)},removeAll:function(){return d.prototype.removeAll.call(this)},removeByKey:function(o){return d.prototype.removeByKey.call(this,o)},stopByKey:function(o){return d.prototype.stopByKey.call(this,o)},onBlur:h,onFocus:h,onGameBlur:h,onGameFocus:h,pauseAll:h,resumeAll:h,stopAll:h,update:h,setRate:h,setDetune:h,setMute:h,setVolume:h,unlock:h,forEac
5204hActiveSound:function(o,f){d.prototype.forEachActiveSound.call(this,o,f)},destroy:function(){d.prototype.destroy.call(this)}});l.exports=n},96008:(l,T,e)=>{/** 5205 * @author Richard Davey <[email protected]> 5206 * @author Pavle Goloskokovic <[email protected]> (http://prunegames.com) 5207 * @copyright 2013-2023 Photon Storm Ltd. 5208 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5209 */var d=e(25798),g=e(56694),r=e(76038),a=e(72632),h=new g({Extends:d,initialize:function(o,f,u){if(u===void 0&&(u={}),this.audioBuffer=o.game.cache.audio.get(f),!this.audioBuffer)throw new Error('Audio key "'+f+'" missing from cache');this.source=null,this.loopSource=null,this.muteNode=o.context.createGain(),this.volumeNode=o.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),o.context.createPanner&&(this.spatialNode=o.context.createPanner(),this.volumeNode.connect(this.spatialNode)),o.context.createStereoPanner?(this.pannerNode=o.context.createStereoPanner(),o.context.createPanner?this.spatialNode.connect(this.pannerNode):this.volumeNode.connect(this.pannerNode),this.pannerNode.connect(o.destination)):o.context.createPanner?this.spatialNode.connect(o.destination):this.volumeNode.connect(o.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,d.call(this,o,f,u)},play:function(n,o){return d.prototype.play.call(this,n,o)?(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(r.PLAY,this),!0):!1},pause:function(){return this.manager.context.currentTime<this.startTime||!d.prototype.pause.call(this)?!1:(this.currentConfig.seek=this.getCurrentTime(),this.stopAndRemoveBufferSource(),this.emit(r.PAUSE,this),!0)},resume:function(){return this.manager.context.currentTime<this.startTime||!d.prototype.resume.call(this)?!1:(this.createAndStartBufferSource(),this.emit(r.RESUME,this),!0)},stop:function(){return d.prototype.stop.call(this)?(this.stopAndRemoveBufferSource(),this.emit(r.STOP,this),!0):!1},createAndStartBufferSource:function(){var n=this.currentConfig.seek,o=this.currentConfig.delay,f=this.manager.context.currentTime+o,u=(this.currentMarker?this.currentMarker.start:0)+n,v=this.duration-n;this.playTime=f-n,this.startTime=f,this.source=this.createBufferSource(),this.applyConfig(),this.source.start(Math.max(0,f),Math.max(0,u),Math.max(0,v)),this.resetConfig()},createAndStartLoopBufferSource:function(){var n=this.getLoopTime(),o=this.currentMarker?this.currentMarker.start:0,f=this.duration;this.loopTime=n,this.loopSource=this.createBufferSource(),this.loopSource.playbackRate.setValueAtTime(this.totalRate,0),this.loopSource.start(Math.max(0,n),Math.max(0,o),Math.max(0,f))},createBufferSource:function(){var n=this,o=this.manager.context.createBufferSource();return o.buffer=this.audioBuffer,o.connect(this.muteNode),o.onended=function(f){f.target===n.source&&(n.currentConfig.loop?n.hasLooped=!0:n.hasEnded=!0)},o},stopAndRemoveBufferSource:function(){this.source&&(this.source.stop(),this.source.disconnect(),this.source=null),this.playTime=0,this.startTime=0,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 n=this.currentConfig.source;if(n&&this.manager.context.createPanner){var o=this.spatialNode;o.panningModel=a(n,"panningModel","equalpower"),o.distanceModel=a(n,"distanceModel","inverse"),o.orientationX.value=a(n,"orientationX",0),o.orientationY.value=a(n,"orientationY",0),o.orientationZ.value=a(n,"orientationZ",-1),o.refDistance=a(n,"refDistance",1),o.maxDistance=a(n,"maxDistance",1e4),o.rolloffFactor=a(n,"rolloffFactor",1),o.coneInnerAngle=a(n,"coneInnerAngle",360),o.coneOuterAngle=a(n,"coneOuterAngle",0),o.coneOuterGain=a(n,"coneOuterGain",0),this.spatialSource=a(n,"follow",null),this.spatialSource||(o.positionX.value=a(n,"x",0),o.positionY.value=a(n,"y",0),o.positionZ.value=a(n,"z",0))}d.prototype.applyConfig.call(this)},x:{get:function(){return this.spatialNode?this.spatialNode.positionX:0},set:function(n){this.spatialNode&&(this.spatialNode.positionX.value=n)}},y:{get:function(){return this.spatialNode?this.spatialNode.positionY:0},set:function(n){this.spatialNode&&(this.spatialNode.positionY.value=n)}},update:function(){if(this.isPlaying&&this.spatialSource){var n=a(this.spatialSource,"x",null),o=a(this.spatialSource,"y",null);n&&n!==this._spatialx&&(this._spatialx=this.spatialNode.positionX.value=n),o&&o!==this._spatialy&&
5209(this._spatialy=this.spatialNode.positionY.value=o)}this.hasEnded?(this.hasEnded=!1,d.prototype.stop.call(this),this.stopAndRemoveBufferSource(),this.emit(r.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(r.LOOPED,this))},destroy:function(){this.pendingRemove||(d.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(){d.prototype.calculateRate.call(this);var n=this.manager.context.currentTime;this.source&&typeof this.totalRate=="number"&&this.source.playbackRate.setValueAtTime(this.totalRate,n),this.isPlaying&&(this.rateUpdates.push({time:Math.max(this.startTime,n)-this.playTime,rate:this.totalRate}),this.loopSource&&(this.stopAndRemoveLoopBufferSource(),this.createAndStartLoopBufferSource()))},getCurrentTime:function(){for(var n=0,o=0;o<this.rateUpdates.length;o++){var f=0;o<this.rateUpdates.length-1?f=this.rateUpdates[o+1].time:f=this.manager.context.currentTime-this.playTime,n+=(f-this.rateUpdates[o].time)*this.rateUpdates[o].rate}return n},getLoopTime:function(){for(var n=0,o=0;o<this.rateUpdates.length-1;o++)n+=(this.rateUpdates[o+1].time-this.rateUpdates[o].time)*this.rateUpdates[o].rate;var f=this.rateUpdates[this.rateUpdates.length-1];return this.playTime+f.time+(this.duration-n)/f.rate},rate:{get:function(){return this.currentConfig.rate},set:function(n){this.currentConfig.rate=n,this.calculateRate(),this.emit(r.RATE,this,n)}},setRate:function(n){return this.rate=n,this},detune:{get:function(){return this.currentConfig.detune},set:function(n){this.currentConfig.detune=n,this.calculateRate(),this.emit(r.DETUNE,this,n)}},setDetune:function(n){return this.detune=n,this},mute:{get:function(){return this.muteNode.gain.value===0},set:function(n){this.currentConfig.mute=n,this.muteNode.gain.setValueAtTime(n?0:1,0),this.emit(r.MUTE,this,n)}},setMute:function(n){return this.mute=n,this},volume:{get:function(){return this.volumeNode.gain.value},set:function(n){this.currentConfig.volume=n,this.volumeNode.gain.setValueAtTime(n,0),this.emit(r.VOLUME,this,n)}},setVolume:function(n){return this.volume=n,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(n){this.manager.context.currentTime<this.startTime||(this.isPlaying||this.isPaused)&&(n=Math.min(Math.max(0,n),this.duration),this.currentConfig.seek=n,this.isPlaying&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource()),this.emit(r.SEEK,this,n))}},setSeek:function(n){return this.seek=n,this},loop:{get:function(){return this.currentConfig.loop},set:function(n){this.currentConfig.loop=n,this.isPlaying&&(this.stopAndRemoveLoopBufferSource(),n&&this.createAndStartLoopBufferSource()),this.emit(r.LOOP,this,n)}},setLoop:function(n){return this.loop=n,this},pan:{get:function(){return this.pannerNode?this.pannerNode.pan.value:0},set:function(n){this.currentConfig.pan=n,this.pannerNode&&this.pannerNode.pan.setValueAtTime(n,this.manager.context.currentTime),this.emit(r.PAN,this,n)}},setPan:function(n){return this.pan=n,this}});l.exports=h},55491:(l,T,e)=>{/** 5210 * @author Richard Davey <[email protected]> 5211 * @author Pavle Goloskokovic <[email protected]> (http://prunegames.com) 5212 * @copyright 2013-2023 Photon Storm Ltd. 5213 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5214 */var d=e(82329),g=e(12486),r=e(56694),a=e(76038),h=e(97081),n=e(96008),o=e(72632),f=new r({Extends:g,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"&&("ontouchstart"in window||"onclick"in window),g.call(this,v),this.locked&&v.isBooted?this.unlock():v.events.once(h.BOOT,this.unlock,this)},createAudioContext:function(u){var v=u.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(u){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=u,this.masterMuteNode=u.createGain(),this.masterVolumeNode=u.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(u.destination),this.destination=this.masterMuteNode,this},add:function(u,v){var m=new n(this,u,v);return this.sounds.push(m),m},decodeAudio:function(u,v){var m;Array.isArray(u)?m=u:m=[{key:u,data:v}];for(var p=this.game.cache.audio,x=m.length,y=0;y<m.length;y++){var P=m[y],b=P.key,E=P.data;typeof E=="string"&&(E=d(E));
5214var M=function(A,R){p.add(A,R),this.emit(a.DECODED,A),x--,x===0&&this.emit(a.DECODED_ALL)}.bind(this,b),w=function(A,R){console.error("Error decoding audio: "+A+" - ",R?R.message:""),x--,x===0&&this.emit(a.DECODED_ALL)}.bind(this,b);this.context.decodeAudioData(E,M,w)}},setListenerPosition:function(u,v){return u===void 0&&(u=this.game.scale.width/2),v===void 0&&(v=this.game.scale.height/2),this.listenerPosition.set(u,v),this},unlock:function(){var u=this,v=document.body,m=function p(){if(u.context&&v){var x=v.removeEventListener;u.context.resume().then(function(){x("touchstart",p),x("touchend",p),x("click",p),x("keydown",p),u.unlocked=!0},function(){x("touchstart",p),x("touchend",p),x("click",p),x("keydown",p)})}};v&&(v.addEventListener("touchstart",m,!1),v.addEventListener("touchend",m,!1),v.addEventListener("click",m,!1),v.addEventListener("keydown",m,!1))},onBlur:function(){this.locked||this.context.suspend()},onFocus:function(){var u=this.context;u&&!this.locked&&(u.state==="suspended"||u.state==="interrupted")&&u.resume()},update:function(u,v){var m=this.context.listener;if(m&&m.positionX!==void 0){var p=o(this.listenerPosition,"x",null),x=o(this.listenerPosition,"y",null);p&&p!==this._spatialx&&(this._spatialx=m.positionX.value=p),x&&x!==this._spatialy&&(this._spatialy=m.positionY.value=x)}g.prototype.update.call(this,u,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 u=this;this.context.close().then(function(){u.context=null})}g.prototype.destroy.call(this)},setMute:function(u){return this.mute=u,this},mute:{get:function(){return this.masterMuteNode.gain.value===0},set:function(u){this.masterMuteNode.gain.setValueAtTime(u?0:1,0),this.emit(a.GLOBAL_MUTE,this,u)}},setVolume:function(u){return this.volume=u,this},volume:{get:function(){return this.masterVolumeNode.gain.value},set:function(u){this.masterVolumeNode.gain.setValueAtTime(u,0),this.emit(a.GLOBAL_VOLUME,this,u)}}});l.exports=f},71207:(l,T,e)=>{/** 5215 * @author Richard Davey <[email protected]> 5216 * @copyright 2013-2023 Photon Storm Ltd. 5217 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5218 */var d=e(59959),g=e(56694),r=e(72283),a=e(17922),h=new g({initialize:function(o){this.parent=o,this.list=[],this.position=0,this.addCallback=r,this.removeCallback=r,this._sortKey=""},add:function(n,o){return o?d.Add(this.list,n):d.Add(this.list,n,0,this.addCallback,this)},addAt:function(n,o,f){return f?d.AddAt(this.list,n,o):d.AddAt(this.list,n,o,0,this.addCallback,this)},getAt:function(n){return this.list[n]},getIndex:function(n){return this.list.indexOf(n)},sort:function(n,o){return n?(o===void 0&&(o=function(f,u){return f[n]-u[n]}),a(this.list,o),this):this},getByName:function(n){return d.GetFirst(this.list,"name",n)},getRandom:function(n,o){return d.GetRandom(this.list,n,o)},getFirst:function(n,o,f,u){return d.GetFirst(this.list,n,o,f,u)},getAll:function(n,o,f,u){return d.GetAll(this.list,n,o,f,u)},count:function(n,o){return d.CountAllMatching(this.list,n,o)},swap:function(n,o){d.Swap(this.list,n,o)},moveTo:function(n,o){return d.MoveTo(this.list,n,o)},moveAbove:function(n,o){return d.MoveAbove(this.list,n,o)},moveBelow:function(n,o){return d.MoveBelow(this.list,n,o)},remove:function(n,o){return o?d.Remove(this.list,n):d.Remove(this.list,n,this.removeCallback,this)},removeAt:function(n,o){return o?d.RemoveAt(this.list,n):d.RemoveAt(this.list,n,this.removeCallback,this)},removeBetween:function(n,o,f){return f?d.RemoveBetween(this.list,n,o):d.RemoveBetween(this.list,n,o,this.removeCallback,this)},removeAll:function(n){for(var o=this.list.length;o--;)this.remove(this.list[o],n);return this},bringToTop:function(n){return d.BringToTop(this.list,n)},sendToBack:function(n){return d.SendToBack(this.list,n)},moveUp:function(n){return d.MoveUp(this.list,n),n},moveDown:function(n){return d.MoveDown(this.list,n),n},reverse:function(){return this.list.reverse(),this},shuffle:function(){return d.Shuffle(this.list),this},replace:function(n,o){return d.Replace(this.list,n,o)},exists:function(n){return this.list.indexOf(n)>-1},setAll:function(n,o,f,u){return d.SetAll(this.list,n,o,f,u),this},each:function(n,o){for(var f=[null],u=2;u<arguments.length;u++)f.push(arguments[u]);for(u=0;
5218u<this.list.length;u++)f[0]=this.list[u],n.apply(o,f)},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}}});l.exports=h},33885:(l,T,e)=>{/** 5219 * @author Richard Davey <[email protected]> 5220 * @copyright 2013-2023 Photon Storm Ltd. 5221 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5222 */var d=e(56694),g=new d({initialize:function(a){if(this.entries={},this.size=0,Array.isArray(a))for(var h=0;h<a.length;h++)this.set(a[h][0],a[h][1])},set:function(r,a){return this.has(r)||this.size++,this.entries[r]=a,this},get:function(r){if(this.has(r))return this.entries[r]},getArray:function(){var r=[],a=this.entries;for(var h in a)r.push(a[h]);return r},has:function(r){return this.entries.hasOwnProperty(r)},delete:function(r){return this.has(r)&&(delete this.entries[r],this.size--),this},clear:function(){return Object.keys(this.entries).forEach(function(r){delete this.entries[r]},this),this.size=0,this},keys:function(){return Object.keys(this.entries)},values:function(){var r=[],a=this.entries;for(var h in a)r.push(a[h]);return r},dump:function(){var r=this.entries;console.group("Map");for(var a in r)console.log(a,r[a]);console.groupEnd()},each:function(r){var a=this.entries;for(var h in a)if(r(h,a[h])===!1)break;return this},contains:function(r){var a=this.entries;for(var h in a)if(a[h]===r)return!0;return!1},merge:function(r,a){a===void 0&&(a=!1);var h=this.entries,n=r.entries;for(var o in n)h.hasOwnProperty(o)&&a?h[o]=n[o]:this.set(o,n[o]);return this}});l.exports=g},74623:(l,T,e)=>{/** 5223 * @author Richard Davey <[email protected]> 5224 * @copyright 2013-2023 Photon Storm Ltd. 5225 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5226 */var d=e(56694),g=e(6659),r=e(36716),a=new d({Extends:g,initialize:function(){g.call(this),this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,this.checkQueue=!1},isActive:function(h){return this._active.indexOf(h)>-1},isPending:function(h){return this._toProcess>0&&this._pending.indexOf(h)>-1},isDestroying:function(h){return this._destroy.indexOf(h)>-1},add:function(h){return this.checkQueue&&this.isActive()&&!this.isDestroying()||this.isPending()||(this._pending.push(h),this._toProcess++),h},remove:function(h){if(this.isPending(h)){var n=this._pending,o=n.indexOf(h);o!==-1&&n.splice(o,1)}else this.isActive(h)&&(this._destroy.push(h),this._toProcess++);return h},removeAll:function(){for(var h=this._active,n=this._destroy,o=h.length;o--;)n.push(h[o]),this._toProcess++;return this},update:function(){if(this._toProcess===0)return this._active;var h=this._destroy,n=this._active,o,f;for(o=0;o<h.length;o++){f=h[o];var u=n.indexOf(f);u!==-1&&(n.splice(u,1),this.emit(r.PROCESS_QUEUE_REMOVE,f))}for(h.length=0,h=this._pending,o=0;o<h.length;o++)f=h[o],(!this.checkQueue||this.checkQueue&&n.indexOf(f)===-1)&&(n.push(f),this.emit(r.PROCESS_QUEUE_ADD,f));return h.length=0,this._toProcess=0,n},getActive:function(){return this._active},length:{get:function(){return this._active.length}},destroy:function(){this._toProcess=0,this._pending=[],this._active=[],this._destroy=[]}});l.exports=a},68687:(l,T,e)=>{/** 5227 * @author Vladimir Agafonkin 5228 * @author Richard Davey <[email protected]> 5229 * @copyright 2013-2023 Photon Storm Ltd. 5230 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5231 */var d=e(53466);function g(E){if(!(this instanceof g))return new g(E);this._maxEntries=Math.max(4,E||9),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}g.prototype={all:function(){return this._all(this.data,[])},search:function(E){var M=this.data,w=[],A=this.toBBox;if(!y(E,M))return w;for(var R=[],L,O,I,D;M;){for(L=0,O=M.children.length;L<O;L++)I=M.children[L],D=M.leaf?A(I):I,y(E,D)&&(M.leaf?w.push(I):x(E,D)?this._all(I,w):R.push(I));M=R.pop()}return w},collides:function(E){var M=this.data,w=this.toBBox;if(!y(E,M))return!1;for(var A=[],R,L,O,I;M;){for(R=0,L=M.children.length;R<L;R++)if(O=M.children[R],I=M.leaf?w(O):O,y(E,I)){if(M.leaf||x(E,I))return!0;A.push(O)}M=A.pop()}return!1},load:function(E){if(!(E&&E.length))return this;if(E.length<this._minEntries){for(var M=0,w=E.length;M<w;M++)this.insert(E[M]);return this}var A=this._build(E.slice(),0,E.length-1,0);if(!this.data.children.length)this.data=A;
5231else if(this.data.height===A.height)this._splitRoot(this.data,A);else{if(this.data.height<A.height){var R=this.data;this.data=A,A=R}this._insert(A,this.data.height-A.height-1,!0)}return this},insert:function(E){return E&&this._insert(E,this.data.height-1),this},clear:function(){return this.data=P([]),this},remove:function(E,M){if(!E)return this;for(var w=this.data,A=this.toBBox(E),R=[],L=[],O,I,D,B;w||R.length;){if(w||(w=R.pop(),I=R[R.length-1],O=L.pop(),B=!0),w.leaf&&(D=r(E,w.children,M),D!==-1))return w.children.splice(D,1),R.push(w),this._condense(R),this;!B&&!w.leaf&&x(w,A)?(R.push(w),L.push(O),O=0,I=w,w=w.children[0]):I?(O++,w=I.children[O],B=!1):w=null}return this},toBBox:function(E){return E},compareMinX:o,compareMinY:f,toJSON:function(){return this.data},fromJSON:function(E){return this.data=E,this},_all:function(E,M){for(var w=[];E;)E.leaf?M.push.apply(M,E.children):w.push.apply(w,E.children),E=w.pop();return M},_build:function(E,M,w,A){var R=w-M+1,L=this._maxEntries,O;if(R<=L)return O=P(E.slice(M,w+1)),a(O,this.toBBox),O;A||(A=Math.ceil(Math.log(R)/Math.log(L)),L=Math.ceil(R/Math.pow(L,A-1))),O=P([]),O.leaf=!1,O.height=A;var I=Math.ceil(R/L),D=I*Math.ceil(Math.sqrt(L)),B,z,X,W;for(b(E,M,w,D,this.compareMinX),B=M;B<=w;B+=D)for(X=Math.min(B+D-1,w),b(E,B,X,I,this.compareMinY),z=B;z<=X;z+=I)W=Math.min(z+I-1,X),O.children.push(this._build(E,z,W,A-1));return a(O,this.toBBox),O},_chooseSubtree:function(E,M,w,A){for(var R,L,O,I,D,B,z,X;A.push(M),!(M.leaf||A.length-1===w);){for(z=X=1/0,R=0,L=M.children.length;R<L;R++)O=M.children[R],D=u(O),B=m(E,O)-D,B<X?(X=B,z=D<z?D:z,I=O):B===X&&D<z&&(z=D,I=O);M=I||M.children[0]}return M},_insert:function(E,M,w){var A=this.toBBox,R=w?E:A(E),L=[],O=this._chooseSubtree(R,this.data,M,L);for(O.children.push(E),n(O,R);M>=0&&L[M].children.length>this._maxEntries;)this._split(L,M),M--;this._adjustParentBBoxes(R,L,M)},_split:function(E,M){var w=E[M],A=w.children.length,R=this._minEntries;this._chooseSplitAxis(w,R,A);var L=this._chooseSplitIndex(w,R,A),O=P(w.children.splice(L,w.children.length-L));O.height=w.height,O.leaf=w.leaf,a(w,this.toBBox),a(O,this.toBBox),M?E[M-1].children.push(O):this._splitRoot(w,O)},_splitRoot:function(E,M){this.data=P([E,M]),this.data.height=E.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},_chooseSplitIndex:function(E,M,w){var A,R,L,O,I,D,B,z;for(D=B=1/0,A=M;A<=w-M;A++)R=h(E,0,A,this.toBBox),L=h(E,A,w,this.toBBox),O=p(R,L),I=u(R)+u(L),O<D?(D=O,z=A,B=I<B?I:B):O===D&&I<B&&(B=I,z=A);return z},_chooseSplitAxis:function(E,M,w){var A=E.leaf?this.compareMinX:o,R=E.leaf?this.compareMinY:f,L=this._allDistMargin(E,M,w,A),O=this._allDistMargin(E,M,w,R);L<O&&E.children.sort(A)},_allDistMargin:function(E,M,w,A){E.children.sort(A);var R=this.toBBox,L=h(E,0,M,R),O=h(E,w-M,w,R),I=v(L)+v(O),D,B;for(D=M;D<w-M;D++)B=E.children[D],n(L,E.leaf?R(B):B),I+=v(L);for(D=w-M-1;D>=M;D--)B=E.children[D],n(O,E.leaf?R(B):B),I+=v(O);return I},_adjustParentBBoxes:function(E,M,w){for(var A=w;A>=0;A--)n(M[A],E)},_condense:function(E){for(var M=E.length-1,w;M>=0;M--)E[M].children.length===0?M>0?(w=E[M-1].children,w.splice(w.indexOf(E[M]),1)):this.clear():a(E[M],this.toBBox)},compareMinX:function(E,M){return E.left-M.left},compareMinY:function(E,M){return E.top-M.top},toBBox:function(E){return{minX:E.left,minY:E.top,maxX:E.right,maxY:E.bottom}}};function r(E,M,w){if(!w)return M.indexOf(E);for(var A=0;A<M.length;A++)if(w(E,M[A]))return A;return-1}function a(E,M){h(E,0,E.children.length,M,E)}function h(E,M,w,A,R){R||(R=P(null)),R.minX=1/0,R.minY=1/0,R.maxX=-1/0,R.maxY=-1/0;for(var L=M,O;L<w;L++)O=E.children[L],n(R,E.leaf?A(O):O);return R}function n(E,M){return E.minX=Math.min(E.minX,M.minX),E.minY=Math.min(E.minY,M.minY),E.maxX=Math.max(E.maxX,M.maxX),E.maxY=M
5231ath.max(E.maxY,M.maxY),E}function o(E,M){return E.minX-M.minX}function f(E,M){return E.minY-M.minY}function u(E){return(E.maxX-E.minX)*(E.maxY-E.minY)}function v(E){return E.maxX-E.minX+(E.maxY-E.minY)}function m(E,M){return(Math.max(M.maxX,E.maxX)-Math.min(M.minX,E.minX))*(Math.max(M.maxY,E.maxY)-Math.min(M.minY,E.minY))}function p(E,M){var w=Math.max(E.minX,M.minX),A=Math.max(E.minY,M.minY),R=Math.min(E.maxX,M.maxX),L=Math.min(E.maxY,M.maxY);return Math.max(0,R-w)*Math.max(0,L-A)}function x(E,M){return E.minX<=M.minX&&E.minY<=M.minY&&M.maxX<=E.maxX&&M.maxY<=E.maxY}function y(E,M){return M.minX<=E.maxX&&M.minY<=E.maxY&&M.maxX>=E.minX&&M.maxY>=E.minY}function P(E){return{children:E,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function b(E,M,w,A,R){for(var L=[M,w],O;L.length;)w=L.pop(),M=L.pop(),!(w-M<=A)&&(O=M+Math.ceil((w-M)/A/2)*A,d(E,O,M,w,R),L.push(M,O,O,w))}l.exports=g},58403:(l,T,e)=>{/** 5232 * @author Richard Davey <[email protected]> 5233 * @copyright 2013-2023 Photon Storm Ltd. 5234 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5235 */var d=e(56694),g=new d({initialize:function(a){if(this.entries=[],Array.isArray(a))for(var h=0;h<a.length;h++)this.set(a[h])},set:function(r){return this.entries.indexOf(r)===-1&&this.entries.push(r),this},get:function(r,a){for(var h=0;h<this.entries.length;h++){var n=this.entries[h];if(n[r]===a)return n}},getArray:function(){return this.entries.slice(0)},delete:function(r){var a=this.entries.indexOf(r);return a>-1&&this.entries.splice(a,1),this},dump:function(){console.group("Set");for(var r=0;r<this.entries.length;r++){var a=this.entries[r];console.log(a)}console.groupEnd()},each:function(r,a){var h,n=this.entries.slice(),o=n.length;if(a)for(h=0;h<o&&r.call(a,n[h],h)!==!1;h++);else for(h=0;h<o&&r(n[h],h)!==!1;h++);return this},iterate:function(r,a){var h,n=this.entries.length;if(a)for(h=0;h<n&&r.call(a,this.entries[h],h)!==!1;h++);else for(h=0;h<n&&r(this.entries[h],h)!==!1;h++);return this},iterateLocal:function(r){var a,h=[];for(a=1;a<arguments.length;a++)h.push(arguments[a]);var n=this.entries.length;for(a=0;a<n;a++){var o=this.entries[a];o[r].apply(o,h)}return this},clear:function(){return this.entries.length=0,this},contains:function(r){return this.entries.indexOf(r)>-1},union:function(r){var a=new g;return r.entries.forEach(function(h){a.set(h)}),this.entries.forEach(function(h){a.set(h)}),a},intersect:function(r){var a=new g;return this.entries.forEach(function(h){r.contains(h)&&a.set(h)}),a},difference:function(r){var a=new g;return this.entries.forEach(function(h){r.contains(h)||a.set(h)}),a},size:{get:function(){return this.entries.length},set:function(r){return r<this.entries.length?this.entries.length=r:this.entries.length}}});l.exports=g},90881:(l,T,e)=>{/** 5236 * @author Richard Davey <[email protected]> 5237 * @copyright 2013-2023 Photon Storm Ltd. 5238 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5239 */var d=e(82897),g=e(56694),r=e(84314),a=e(93736),h=new g({initialize:function(o,f,u,v){o===void 0&&(o=0),f===void 0&&(f=o),u===void 0&&(u=0),v===void 0&&(v=null),this._width=o,this._height=f,this._parent=v,this.aspectMode=u,this.aspectRatio=f===0?1:o/f,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new a},setAspectMode:function(n){return n===void 0&&(n=0),this.aspectMode=n,this.setSize(this._width,this._height)},setSnap:function(n,o){return n===void 0&&(n=0),o===void 0&&(o=n),this.snapTo.set(n,o),this.setSize(this._width,this._height)},setParent:function(n){return this._parent=n,this.setSize(this._width,this._height)},setMin:function(n,o){return n===void 0&&(n=0),o===void 0&&(o=n),this.minWidth=d(n,0,this.maxWidth),this.minHeight=d(o,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(n,o){return n===void 0&&(n=Number.MAX_VALUE),o===void 0&&(o=n),this.maxWidth=d(n,this.minWidth,Number.MAX_VALUE),this.maxHeight=d(o,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(n,o){switch(n===void 0&&(n=0),o===void 0&&(o=n),this.aspectMode){case h.NONE:this._width=this.getNewWidth(r(n,this.snapTo.x)),this._height=this.getNewHeight(r(o,this.snapTo.y)),this.aspectRatio=this._height===0?1:this._width/this._height;break;case h.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(r(n,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case h.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(r(o,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case h.FIT:this.constrain(n,o,!0);break;case h.ENVELOP:this.constrain(n,o,!1);break}return this},setAspectRatio:function(n){return this.aspectRatio=n,this.setSize(this._width,this._height)},resize:function(n,o){return this._width=this.getNewWidth(r(n,this.snapTo.x)),this._height=this.getNewHeight(r(o,this.snapTo.y)),this.aspectRatio=this._height===0?1:this._width/this._height,this},getNewWidth:function(n,o){return o===void 0&&(o=!0),n=d(n,this.minWidth,this.maxWidth),o&&this._parent&&n>this._parent.width&&(n=Math.max(this.minWidth,this._parent.width)),n},getNewHeight:function(n,o){return o===void 0&&(o=!0),n=d(n,this.minHeight,this.maxHeight),o&&this._parent&&n>this._parent.height&&(n=Math.max(this.minHeight,this._parent.height)),n},constrain:function(n,o,f){n===void 0&&(n=0),o===void 0&&(o=n),f===void 0&&(f=!0),n=this.getNewWidth(n),o=this.getNewHeight(o);var u=this.snapTo,v=o===0?1:n/o;return f&&this.aspectRatio>v||!f&&this.aspectRatio<v?(n=r(n,u.x),o=n/this.aspectRatio,u.y>0&&(o=r(o,u.y),n=o*this.aspectRatio)):(f&&this.aspectRatio<v||!f&&this.aspectRatio>v)&&(o=r(o,u.y),n=o*this.aspectRatio,u.x>
52390&&(n=r(n,u.x),o=n*(1/this.aspectRatio))),this._width=n,this._height=o,this},fitTo:function(n,o){return this.constrain(n,o,!0)},envelop:function(n,o){return this.constrain(n,o,!1)},setWidth:function(n){return this.setSize(n,this._height)},setHeight:function(n){return this.setSize(this._width,n)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(n){n&&n.style&&(n.style.width=this._width+"px",n.style.height=this._height+"px")},copy:function(n){return n.setAspectMode(this.aspectMode),n.aspectRatio=this.aspectRatio,n.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(n){this.setSize(n,this._height)}},height:{get:function(){return this._height},set:function(n){this.setSize(this._width,n)}}});h.NONE=0,h.WIDTH_CONTROLS_HEIGHT=1,h.HEIGHT_CONTROLS_WIDTH=2,h.FIT=3,h.ENVELOP=4,l.exports=h},94160:l=>{/** 5240 * @author Richard Davey <[email protected]> 5241 * @copyright 2013-2023 Photon Storm Ltd. 5242 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5243 */l.exports="add"},95393:l=>{/** 5244 * @author Richard Davey <[email protected]> 5245 * @copyright 2013-2023 Photon Storm Ltd. 5246 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5247 */l.exports="remove"},36716:(l,T,e)=>{/** 5248 * @author Richard Davey <[email protected]> 5249 * @copyright 2013-2023 Photon Storm Ltd. 5250 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5251 */l.exports={PROCESS_QUEUE_ADD:e(94160),PROCESS_QUEUE_REMOVE:e(95393)}},20010:(l,T,e)=>{/** 5252 * @author Richard Davey <[email protected]> 5253 * @copyright 2013-2023 Photon Storm Ltd. 5254 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5255 */l.exports={Events:e(36716),List:e(71207),Map:e(33885),ProcessQueue:e(74623),RTree:e(68687),Set:e(58403),Size:e(90881)}},17487:(l,T,e)=>{/** 5256 * @author Richard Davey <[email protected]> 5257 * @copyright 2013-2023 Photon Storm Ltd. 5258 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5259 */var d=e(56694),g=e(82897),r=e(27119),a=e(86459),h=e(28621),n=e(31673),o=new d({Extends:n,initialize:function(u,v,m,p,x){n.call(this,u,v,m,p,x),this.add("__BASE",0,0,0,p,x),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this.width=p,this.height=x,this.imageData=this.context.getImageData(0,0,p,x),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===a.WEBGL&&this.refresh(),this},draw:function(f,u,v,m){return m===void 0&&(m=!0),this.context.drawImage(v,f,u),m&&this.update(),this},drawFrame:function(f,u,v,m,p){v===void 0&&(v=0),m===void 0&&(m=0),p===void 0&&(p=!0);var x=this.manager.getFrame(f,u);if(x){var y=x.canvasData,P=x.cutWidth,b=x.cutHeight,E=x.source.resolution;this.context.drawImage(x.source.image,y.x,y.y,P,b,v,m,P/E,b/E),p&&this.update()}return this},setPixel:function(f,u,v,m,p,x){x===void 0&&(x=255),f=Math.abs(Math.floor(f)),u=Math.abs(Math.floor(u));var y=this.getIndex(f,u);if(y>-1){var P=this.context.getImageData(f,u,1,1);P.data[0]=v,P.data[1]=m,P.data[2]=p,P.data[3]=x,this.context.putImageData(P,f,u)}return this},putData:function(f,u,v,m,p,x,y){return m===void 0&&(m=0),p===void 0&&(p=0),x===void 0&&(x=f.width),y===void 0&&(y=f.height),this.context.putImageData(f,u,v,m,p,x,y),this},getData:function(f,u,v,m){f=g(Math.floor(f),0,this.width-1),u=g(Math.floor(u),0,this.height-1),v=g(v,1,this.width-f),m=g(m,1,this.height-u);var p=this.context.getImageData(f,u,v,m);return p},getPixel:function(f,u,v){v||(v=new r);var m=this.getIndex(f,u);if(m>-1){var p=this.data,x=p[m+0],y=p[m+1],P=p[m+2],b=p[m+3];v.setTo(x,y,P,b)}return v},getPixels:function(f,u,v,m){f===void 0&&(f=0),u===void 0&&(u=0),v===void 0&&(v=this.width),m===void 0&&(m=v),f=Math.abs(Math.round(f)),u=Math.abs(Math.round(u));for(var p=g(f,0,this.width),x=g(f+v,0,this.width),y=g(u,0,this.height),P=g(u+m,0,this.height),b=new r,E=[],M=y;M<P;M++){for(var w=[],A=p;A<x;A++)b=this.getPixel(A,M,b),w.push({x:A,y:M,color:b.color,alpha:b.alphaGL});E.push(w)}return E},getIndex:function(f,u){return f=Math.abs(Math.round(f)),u=Math.abs(Math.round(u)),f<this.width&&u<this.height?(f+u*this.width)*4:-1}
5259,refresh:function(){return this._source.update(),this},getCanvas:function(){return this.canvas},getContext:function(){return this.context},clear:function(f,u,v,m,p){return f===void 0&&(f=0),u===void 0&&(u=0),v===void 0&&(v=this.width),m===void 0&&(m=this.height),p===void 0&&(p=!0),this.context.clearRect(f,u,v,m),p&&this.update(),this},setSize:function(f,u){return u===void 0&&(u=f),(f!==this.width||u!==this.height)&&(this.canvas.width=f,this.canvas.height=u,this._source.width=f,this._source.height=u,this._source.isPowerOf2=h(f,u),this.frames.__BASE.setSize(f,u,0,0),this.width=f,this.height=u,this.refresh()),this},destroy:function(){n.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}});l.exports=o},845:(l,T,e)=>{/** 5260 * @author Richard Davey <[email protected]> 5261 * @copyright 2013-2023 Photon Storm Ltd. 5262 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5263 */var d=e(95723),g=e(51052),r=e(61068),a=e(56694),h=e(86459),n=e(82047),o=e(72632),f=e(65641),u=e(37410),v=e(31673),m=e(75512),p=new a({Extends:v,initialize:function(y,P,b,E){b===void 0&&(b=256),E===void 0&&(E=256),this.type="DynamicTexture";var M=y.game.renderer,w=M&&M.type===h.CANVAS,A=w?r.create2D(this,b,E):[this];v.call(this,y,P,A,b,E),this.add("__BASE",0,0,0,b,E),this.renderer=M,this.isDrawing=!1,this.canvas=w?A:null,this.context=w?A.getContext("2d",{willReadFrequently:!0}):null,this.dirty=!1,this.isSpriteTexture=!0,this._eraseMode=!1,this.camera=new g(0,0,b,E).setScene(y.game.scene.systemScene,!1),this.renderTarget=w?null:new u(M,b,E,1,0,!1,!0,!0,!1),this.pipeline=w?null:M.pipelines.get(f.SINGLE_PIPELINE),this.setSize(b,E)},setSize:function(x,y){y===void 0&&(y=x);var P=this.get(),b=P.source;if(x!==this.width||y!==this.height){this.canvas&&(this.canvas.width=x,this.canvas.height=y);var E=this.renderTarget;E&&(E.resize(x,y),P.glTexture=E.texture,b.isRenderTexture=!0,b.isGLTexture=!0,b.glTexture=E.texture,b.glTexture.flipY=!0),this.camera.setSize(x,y),b.width=x,b.height=y,P.setSize(x,y),this.width=x,this.height=y}else{var M=this.getSourceImage();P.cutX+x>M.width&&(x=M.width-P.cutX),P.cutY+y>M.height&&(y=M.height-P.cutY),P.setSize(x,y,P.cutX,P.cutY)}return this},setIsSpriteTexture:function(x){return this.isSpriteTexture=x,this},fill:function(x,y,P,b,E,M){var w=this.camera,A=this.renderer;y===void 0&&(y=1),P===void 0&&(P=0),b===void 0&&(b=0),E===void 0&&(E=this.width),M===void 0&&(M=this.height);var R=x>>16&255,L=x>>8&255,O=x&255,I=this.renderTarget;if(w.preRender(),I){I.bind(!0);var D=this.pipeline.manager.set(this.pipeline),B=A.width/I.width,z=A.height/I.height;D.drawFillRect(P*B,b*z,E*B,M*z,m.getTintFromFloats(O/255,L/255,R/255,1),y),I.unbind(!0)}else{var X=this.context;A.setContext(X),X.globalCompositeOperation="source-over",X.fillStyle="rgba("+R+","+L+","+O+","+y+")",X.fillRect(P,b,E,M),A.setContext()}return this.dirty=!0,this},clear:function(){if(this.dirty){var x=this.context,y=this.renderTarget;y?y.clear():x&&(x.save(),x.setTransform(1,0,0,1,0,0),x.clearRect(0,0,this.width,this.height),x.restore()),this.dirty=!1}return this},stamp:function(x,y,P,b,E){P===void 0&&(P=0),b===void 0&&(b=0);var M=o(E,"alpha",1),w=o(E,"tint",16777215),A=o(E,"angle",0),R=o(E,"rotation",0),L=o(E,"scale",1),O=o(E,"scaleX",L),I=o(E,"scaleY",L),D=o(E,"originX",.5),B=o(E,"originY",.5),z=o(E,"blendMode",0),X=o(E,"erase",!1),W=o(E,"skipBatch",!1),j=this.manager.resetStamp(M,w);return j.setAngle(0),A!==0?j.setAngle(A):R!==0&&j.setRotation(R),j.setScale(O,I),j.setTexture(x,y),j.setOrigin(D,B),j.setBlendMode(z),X&&(this._eraseMode=!0),W?this.batchGameObject(j,P,b):this.draw(j,P,b),X&&(this._eraseMode=!1),this},erase:function(x,y,P){return this._eraseMode=!0,this.draw(x,y,P),this._eraseMode=!1,this},draw:function(x,y,P,b,E){return this.beginDraw(),this.batchDraw(x,y,P,b,E),this.endDraw(),this},drawFrame:function(x,y,P,b,E,M){return this.beginDraw(),this.batchDrawFrame(x,y,P,b,E,M),this.endDraw(),this},repeat:function(x,y,P,b,E,M,w,A,R){if(P===void 0&&(P=0),b===void 0&&(b=0),E===void 0&&(E=this.width),M===void 0&&(M=this.height),w===void 0&&(w=1),A===void 0&&(A=16777215),R===void 0&&(R=!1),x instanceof n?y=x:y=this.manager.getFrame(x,y),!y)return this;var L=this.manager.resetStamp(w,A);
5263L.setFrame(y),L.setOrigin(0);var O=y.width,I=y.height;E=Math.floor(E),M=Math.floor(M);var D=Math.ceil(E/O),B=Math.ceil(M/I),z=D*O-E,X=B*I-M;z>0&&(z=O-z),X>0&&(X=I-X),P<0&&(D+=Math.ceil(Math.abs(P)/O)),b<0&&(B+=Math.ceil(Math.abs(b)/I));var W=P,j=b,N=!1,Y=this.manager.stampCrop.setTo(0,0,O,I);R||this.beginDraw();for(var F=0;F<B;F++){if(j+I<0){j+=I;continue}for(var G=0;G<D;G++){if(N=!1,W+O<0){W+=O;continue}else W<0&&(N=!0,Y.width=O+W,Y.x=O-Y.width);j<0&&(N=!0,Y.height=I+j,Y.y=I-Y.height),z>0&&G===D-1&&(N=!0,Y.width=z),X>0&&F===B-1&&(N=!0,Y.height=X),N&&L.setCrop(Y),this.batchGameObject(L,W,j),L.isCropped=!1,Y.setTo(0,0,O,I),W+=O}W=P,j+=I}return R||this.endDraw(),this},beginDraw:function(){if(!this.isDrawing){var x=this.camera,y=this.renderer,P=this.renderTarget;x.preRender(),P?y.beginCapture(P.width,P.height):y.setContext(this.context),this.isDrawing=!0}return this},batchDraw:function(x,y,P,b,E){return Array.isArray(x)||(x=[x]),this.batchList(x,y,P,b,E),this},batchDrawFrame:function(x,y,P,b,E,M){P===void 0&&(P=0),b===void 0&&(b=0),E===void 0&&(E=1),M===void 0&&(M=16777215);var w=this.manager.getFrame(x,y);return w&&(this.renderTarget?this.pipeline.batchTextureFrame(w,P,b,M,E,this.camera.matrix,null):this.batchTextureFrame(w,P,b,E,M)),this},endDraw:function(x){if(x===void 0&&(x=this._eraseMode),this.isDrawing){var y=this.renderer,P=this.renderTarget;if(P){var b=y.endCapture(),E=y.pipelines.setUtility();E.blitFrame(b,P,1,!1,!1,x,this.isSpriteTexture),y.resetScissor(),y.resetViewport()}else y.setContext();this.dirty=!0,this.isDrawing=!1}return this},batchList:function(x,y,P,b,E){var M=x.length;if(M!==0)for(var w=0;w<M;w++){var A=x[w];!A||A===this||(A.renderWebGL||A.renderCanvas?this.batchGameObject(A,y,P):A.isParent||A.list?this.batchGroup(A.getChildren(),y,P):typeof A=="string"?this.batchTextureFrameKey(A,null,y,P,b,E):A instanceof n?this.batchTextureFrame(A,y,P,b,E):Array.isArray(A)&&this.batchList(A,y,P,b,E))}},batchGroup:function(x,y,P){y===void 0&&(y=0),P===void 0&&(P=0);for(var b=0;b<x.length;b++){var E=x[b];E.willRender(this.camera)&&this.batchGameObject(E,E.x+y,E.y+P)}},batchGameObject:function(x,y,P){y===void 0&&(y=x.x),P===void 0&&(P=x.y);var b=x.x,E=x.y,M=this.camera,w=this.renderer,A=this._eraseMode,R=x.mask;if(x.setPosition(y,P),this.canvas){if(A){var L=x.blendMode;x.blendMode=d.ERASE}R&&R.preRenderCanvas(w,x,M),x.renderCanvas(w,x,M,null),R&&R.postRenderCanvas(w,x,M),A&&(x.blendMode=L)}else w&&(R&&R.preRenderWebGL(w,x,M),A||w.setBlendMode(x.blendMode),x.renderWebGL(w,x,M),R&&R.postRenderWebGL(w,M,this.renderTarget));x.setPosition(b,E)},batchTextureFrameKey:function(x,y,P,b,E,M){var w=this.manager.getFrame(x,y);w&&this.batchTextureFrame(w,P,b,E,M)},batchTextureFrame:function(x,y,P,b,E){y===void 0&&(y=0),P===void 0&&(P=0),b===void 0&&(b=1),E===void 0&&(E=16777215);var M=this.camera.matrix,w=this.renderTarget;if(w)this.pipeline.batchTextureFrame(x,y,P,E,b,M,null);else{var A=this.context,R=x.canvasData,L=x.source.image;A.save(),A.globalCompositeOperation=this._eraseMode?"destination-out":"source-over",A.globalAlpha=b,M.setToContext(A),R.width>0&&R.height>0&&A.drawImage(L,R.x,R.y,R.width,R.height,y,P,R.width,R.height),A.restore()}},snapshotArea:function(x,y,P,b,E,M,w){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,E,!1,x,y,P,b,M,w):this.renderer.snapshotCanvas(this.canvas,E,!1,x,y,P,b,M,w),this},snapshot:function(x,y,P){return this.snapshotArea(0,0,this.width,this.height,x,y,P)},snapshotPixel:function(x,y,P){return this.snapshotArea(x,y,1,1,P,"pixel")},getWebGLTexture:function(){if(this.renderTarget)return this.renderTarget.texture},renderWebGL:function(x,y,P,b){var E=this.manager.resetStamp();E.setTexture(this),E.setOrigin(0),E.renderWebGL(x,E,P,b)},renderCanvas:function(){},preDestroy:function(){r.remove(this.canvas),this.renderTarget&&this.renderTarget.destroy(),this.camera.destroy(),this.stamp.destroy(),this.canvas=null,this.context=null,this.renderer=null,this.scene=null}});l.exports=p},82047:(l,T,e)=>{/** 5264 * @author Richard Davey <[email protected]> 5265 * @copyright 2013-2023 Photon Storm Ltd. 5266 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5267 */var d=e(56694),g=e(82897),r=e(98611),a=new d({initialize:function(n,o,f,u,v,m,p){this.texture=n,this.name=o,this.source=n.source[f],this.sourceIndex=f,this.glTexture=this.source.glTexture,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}},this.setSize(m,p,u,v)},setSize:function(h,n,o,f){o===void 0&&(o=0),f===void 0&&(f=0),this.cutX=o,this.cutY=f,this.cutWidth=h,this.cutHeight=n,this.width=h,this.height=n,this.halfWidth=Math.floor(h*.5),this.halfHeight=Math.floor(n*.5),this.centerX=Math.floor(h/2),this.centerY=Math.floor(n/2);var u=this.data,v=u.cut;v.x=o,v.y=f,v.w=h,v.h=n,v.r=o+h,v.b=f+n,u.sourceSize.w=h,u.sourceSize.h=n,u.spriteSourceSize.w=h,u.spriteSourceSize.h=n,u.radius=.5*Math.sqrt(h*h+n*n);var m=u.drawImage;return m.x=o,m.y=f,m.width=h,m.height=n,this.updateUVs()},setTrim:function(h,n,o,f,u,v){var m=this.data,p=m.spriteSourceSize;return m.trim=!0,m.sourceSize.w=h,m.sourceSize.h=n,p.x=o,p.y=f,p.w=u,p.h=v,p.r=o+u,p.b=f+v,this.x=o,this.y=f,this.width=u,this.height=v,this.halfWidth=u*.5,this.halfHeight=v*.5,this.centerX=Math.floor(u/2),this.centerY=Math.floor(v/2),this.updateUVs()},setCropUVs:function(h,n,o,f,u,v,m){var p=this.cutX,x=this.cutY,y=this.cutWidth,P=this.cutHeight,b=this.realWidth,E=this.realHeight;n=g(n,0,b),o=g(o,0,E),f=g(f,0,b-n),u=g(u,0,E-o);var M=p+n,w=x+o,A=f,R=u,L=this.data;if(L.trim){var O=L.spriteSourceSize;f=g(f,0,y-n),u=g(u,0,P-o);var I=n+f,D=o+u,B=!(O.r<n||O.b<o||O.x>I||O.y>D);if(B){var z=Math.max(O.x,n),X=Math.max(O.y,o),W=Math.min(O.r,I)-z,j=Math.min(O.b,D)-X;A=W,R=j,v?M=p+(y-(z-O.x)-W):M=p+(z-O.x),m?w=x+(P-(X-O.y)-j):w=x+(X-O.y),n=z,o=X,f=W,u=j}else M=0,w=0,A=0,R=0}else v&&(M=p+(y-n-f)),m&&(w=x+(P-o-u));var N=this.source.width,Y=this.source.height;return h.u0=Math.max(0,M/N),h.v0=Math.max(0,w/Y),h.u1=Math.min(1,(M+A)/N),h.v1=Math.min(1,(w+R)/Y),h.x=n,h.y=o,h.cx=M,h.cy=w,h.cw=A,h.ch=R,h.width=f,h.height=u,h.flipX=v,h.flipY=m,h},updateCropUVs:function(h,n,o){return this.setCropUVs(h,h.x,h.y,h.width,h.height,n,o)},setUVs:function(h,n,o,f,u,v){var m=this.data.drawImage;return m.width=h,m.height=n,this.u0=o,this.v0=f,this.u1=u,this.v1=v,this},updateUVs:function(){var h=this.cutX,n=this.cutY,o=this.cutWidth,f=this.cutHeight,u=this.data.drawImage;u.width=o,u.height=f;var v=this.source.width,m=this.source.height;return this.u0=h/v,this.v0=n/m,this.u1=(h+o)/v,this.v1=(n+f)/m,this},updateUVsInverted:function(){var h=this.source.width,n=this.source.height;return this.u0=(this.cutX+this.cutHeight)/h,this.v0=this.cutY/n,this.u1=this.cutX/h,this.v1=(this.cutY+this.cutWidth)/n,this},clone:function(){var h=new a(this.texture,this.name,this.sourceIndex);return h.cutX=this.cutX,h.cutY=this.cutY,h.cutWidth=this.cutWidth,h.cutHeight=this.cutHeight,h.x=this.x,h.y=this.y,h.width=this.width,h.height=this.height,h.halfWidth=this.halfWidth,h.halfHeight=this.halfHeight,h.centerX=this.centerX,h.centerY=this.centerY,h.rotated=this.rotated,h.data=r(!0,h.data,this.data),h.updateUVs(),h},destroy:function(){this.source=null,this.texture=null,this.glTexture=null,this.customData=null,this.data=null},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}},canvasData:{get:function(){return this.data.drawImage}}});l.exports=a},31673:(l,T,e)=>{/** 5268 * @author Richard Davey <[email protected]> 5269 * @copyright 2013-2023 Photon Storm Ltd. 5270 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5271 */var d=e(56694),g=e(82047),r=e(32547),a='Texture "%s" has no frame "%s"',h=new d({initialize:function(o,f,u,v,m){Array.isArray(u)||(u=[u]),this.manager=o,this.key=f,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var p=0;p<u.length;
5271p++)this.source.push(new r(this,u[p],v,m))},add:function(n,o,f,u,v,m){if(this.has(n))return null;var p=new g(this,n,o,f,u,v,m);return this.frames[n]=p,this.firstFrame==="__BASE"&&(this.firstFrame=n),this.frameTotal++,p},remove:function(n){if(this.has(n)){var o=this.get(n);return o.destroy(),delete this.frames[n],!0}return!1},has:function(n){return this.frames.hasOwnProperty(n)},get:function(n){n||(n=this.firstFrame);var o=this.frames[n];return o||(console.warn(a,this.key,n),o=this.frames[this.firstFrame]),o},getTextureSourceIndex:function(n){for(var o=0;o<this.source.length;o++)if(this.source[o]===n)return o;return-1},getFramesFromTextureSource:function(n,o){o===void 0&&(o=!1);var f=[];for(var u in this.frames)if(!(u==="__BASE"&&!o)){var v=this.frames[u];v.sourceIndex===n&&f.push(v)}return f},getFrameNames:function(n){n===void 0&&(n=!1);var o=Object.keys(this.frames);if(!n){var f=o.indexOf("__BASE");f!==-1&&o.splice(f,1)}return o},getSourceImage:function(n){(n==null||this.frameTotal===1)&&(n="__BASE");var o=this.frames[n];return o?o.source.image:(console.warn(a,this.key,n),this.frames.__BASE.source.image)},getDataSourceImage:function(n){(n==null||this.frameTotal===1)&&(n="__BASE");var o=this.frames[n],f;return o?f=o.sourceIndex:(console.warn(a,this.key,n),f=this.frames.__BASE.sourceIndex),this.dataSource[f].image},setDataSource:function(n){Array.isArray(n)||(n=[n]);for(var o=0;o<n.length;o++){var f=this.source[o];this.dataSource.push(new r(this,n[o],f.width,f.height))}},setFilter:function(n){var o;for(o=0;o<this.source.length;o++)this.source[o].setFilter(n);for(o=0;o<this.dataSource.length;o++)this.dataSource[o].setFilter(n)},destroy:function(){var n,o=this.source,f=this.dataSource;for(n=0;n<o.length;n++)o[n]&&o[n].destroy();for(n=0;n<f.length;n++)f[n]&&f[n].destroy();for(var u in this.frames){var v=this.frames[u];v&&v.destroy()}this.source=[],this.dataSource=[],this.frames={},this.manager.removeKey(this.key),this.manager=null}});l.exports=h},6237:(l,T,e)=>{/** 5272 * @author Richard Davey <[email protected]> 5273 * @copyright 2013-2023 Photon Storm Ltd. 5274 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5275 */var d=e(61068),g=e(17487),r=e(56694),a=e(27119),h=e(86459),n=e(845),o=e(6659),f=e(38203),u=e(82047),v=e(97081),m=e(52780),p=e(10850),x=e(1539),y=e(42911),P=e(69150),b=e(74118),E=e(31673),M=new r({Extends:o,initialize:function(A){o.call(this),this.game=A,this.name="TextureManager",this.list={},this._tempCanvas=d.create2D(this),this._tempContext=this._tempCanvas.getContext("2d",{willReadFrequently:!0}),this._pending=0,this.stamp,this.stampCrop=new b,this.silentWarnings=!1,A.events.once(v.BOOT,this.boot,this)},boot:function(){this._pending=3,this.on(f.LOAD,this.updatePending,this),this.on(f.ERROR,this.updatePending,this);var w=this.game.config;this.addBase64("__DEFAULT",w.defaultImage),this.addBase64("__MISSING",w.missingImage),this.addBase64("__WHITE",w.whiteImage),this.game.events.once(v.DESTROY,this.destroy,this)},updatePending:function(){this._pending--,this._pending===0&&(this.off(f.LOAD),this.off(f.ERROR),this.emit(f.READY),this.stamp=new x(this.game.scene.systemScene).setOrigin(0))},checkKey:function(w){return this.exists(w)?(this.silentWarnings||console.error("Texture key already in use: "+w),!1):!0},remove:function(w){if(typeof w=="string")if(this.exists(w))w=this.get(w);else return this.silentWarnings||console.warn("No texture found matching key: "+w),this;return this.list.hasOwnProperty(w.key)&&(w.destroy(),this.emit(f.REMOVE,w.key),this.emit(f.REMOVE_KEY+w.key)),this},removeKey:function(w){return this.list.hasOwnProperty(w)&&delete this.list[w],this},addBase64:function(w,A){if(this.checkKey(w)){var R=this,L=new Image;L.onerror=function(){R.emit(f.ERROR,w)},L.onload=function(){var O=R.create(w,L);P.Image(O,0),R.emit(f.ADD,w,O),R.emit(f.ADD_KEY+w,O),R.emit(f.LOAD,w,O)},L.src=A}return this},getBase64:function(w,A,R,L){R===void 0&&(R="image/png"),L===void 0&&(L=.92);var O="",I=this.getFrame(w,A);if(I&&(I.source.isRenderTexture||I.source.isGLTexture))this.silentWarnings||console.warn("Cannot getBase64 from WebGL Texture");else if(I){var D=I.canvasData,B=d.create2D(this,D.width,D.height),z=B.getContext("2d",{willReadFrequently:!0});D.width>0&&D.height>0&&z.drawImage(I.source.image,D.x,D.y,D.width,D.height,0,0,D.width,D.height),O=B.toDataURL(R,L),d.remove(B
5275)}return O},addImage:function(w,A,R){var L=null;return this.checkKey(w)&&(L=this.create(w,A),P.Image(L,0),R&&L.setDataSource(R),this.emit(f.ADD,w,L),this.emit(f.ADD_KEY+w,L)),L},addGLTexture:function(w,A,R,L){var O=null;return this.checkKey(w)&&(R===void 0&&(R=A.width),L===void 0&&(L=A.height),O=this.create(w,A,R,L),O.add("__BASE",0,0,0,R,L),this.emit(f.ADD,w,O),this.emit(f.ADD_KEY+w,O)),O},addCompressedTexture:function(w,A,R){var L=null;if(this.checkKey(w)){if(L=this.create(w,A),L.add("__BASE",0,0,0,A.width,A.height),R)if(Array.isArray(R))for(var O=0;O<R.length;O++)P.JSONHash(L,O,R[O]);else P.JSONHash(L,0,R);this.emit(f.ADD,w,L),this.emit(f.ADD_KEY+w,L)}return L},addRenderTexture:function(w,A){var R=null;return this.checkKey(w)&&(R=this.create(w,A),R.add("__BASE",0,0,0,A.width,A.height),this.emit(f.ADD,w,R),this.emit(f.ADD_KEY+w,R)),R},generate:function(w,A){if(this.checkKey(w)){var R=d.create(this,1,1);return A.canvas=R,m(A),this.addCanvas(w,R)}else return null},createCanvas:function(w,A,R){if(A===void 0&&(A=256),R===void 0&&(R=256),this.checkKey(w)){var L=d.create(this,A,R,h.CANVAS,!0);return this.addCanvas(w,L)}return null},addCanvas:function(w,A,R){R===void 0&&(R=!1);var L=null;return R?L=new g(this,w,A,A.width,A.height):this.checkKey(w)&&(L=new g(this,w,A,A.width,A.height),this.list[w]=L,this.emit(f.ADD,w,L),this.emit(f.ADD_KEY+w,L)),L},addDynamicTexture:function(w,A,R){var L=null;return typeof w=="string"&&!this.exists(w)?L=new n(this,w,A,R):(L=w,w=L.key),this.checkKey(w)?(this.list[w]=L,this.emit(f.ADD,w,L),this.emit(f.ADD_KEY+w,L)):L=null,L},addAtlas:function(w,A,R,L){return Array.isArray(R.textures)||Array.isArray(R.frames)?this.addAtlasJSONArray(w,A,R,L):this.addAtlasJSONHash(w,A,R,L)},addAtlasJSONArray:function(w,A,R,L){var O=null;if(A instanceof E?(w=O.key,O=A):this.checkKey(w)&&(O=this.create(w,A)),O){if(Array.isArray(R))for(var I=R.length===1,D=0;D<O.source.length;D++){var B=I?R[0]:R[D];P.JSONArray(O,D,B)}else P.JSONArray(O,0,R);L&&O.setDataSource(L),this.emit(f.ADD,w,O),this.emit(f.ADD_KEY+w,O)}return O},addAtlasJSONHash:function(w,A,R,L){var O=null;if(A instanceof E?(w=O.key,O=A):this.checkKey(w)&&(O=this.create(w,A)),O){if(Array.isArray(R))for(var I=0;I<R.length;I++)P.JSONHash(O,I,R[I]);else P.JSONHash(O,0,R);L&&O.setDataSource(L),this.emit(f.ADD,w,O),this.emit(f.ADD_KEY+w,O)}return O},addAtlasXML:function(w,A,R,L){var O=null;return A instanceof E?(w=O.key,O=A):this.checkKey(w)&&(O=this.create(w,A)),O&&(P.AtlasXML(O,0,R),L&&O.setDataSource(L),this.emit(f.ADD,w,O),this.emit(f.ADD_KEY+w,O)),O},addUnityAtlas:function(w,A,R,L){var O=null;return A instanceof E?(w=O.key,O=A):this.checkKey(w)&&(O=this.create(w,A)),O&&(P.UnityYAML(O,0,R),L&&O.setDataSource(L),this.emit(f.ADD,w,O),this.emit(f.ADD_KEY+w,O)),O},addSpriteSheet:function(w,A,R,L){var O=null;if(A instanceof E?(w=O.key,O=A):this.checkKey(w)&&(O=this.create(w,A)),O){var I=O.source[0].width,D=O.source[0].height;P.SpriteSheet(O,0,0,0,I,D,R),L&&O.setDataSource(L),this.emit(f.ADD,w,O),this.emit(f.ADD_KEY+w,O)}return O},addSpriteSheetFromAtlas:function(w,A){if(!this.checkKey(w))return null;var R=p(A,"atlas",null),L=p(A,"frame",null);if(!(!R||!L)){var O=this.get(R),I=O.get(L);if(I){var D=this.create(w,I.source.image);return I.trimmed?P.SpriteSheetFromAtlas(D,I,A):P.SpriteSheet(D,0,I.cutX,I.cutY,I.cutWidth,I.cutHeight,A),this.emit(f.ADD,w,D),this.emit(f.ADD_KEY+w,D),D}}},create:function(w,A,R,L){var O=null;return this.checkKey(w)&&(O=new E(this,w,A,R,L),this.list[w]=O),O},exists:function(w){return this.list.hasOwnProperty(w)},get:function(w){return w===void 0&&(w="__DEFAULT"),this.list[w]?this.list[w]:w instanceof E?w:w instanceof u?w.texture:this.list.__MISSING},cloneFrame:function(w,A){if(this.list[w])return this.list[w].get(A).clone()},getFrame:function(w,A){if(this.list[w])return this.list[w].get(A)},parseFrame:function(w){if(w){if(typeof w=="string")return this.getFrame(w);if(Array.isArray(w)&&w.length===2)return this.getFrame(w[0],w[1]);if(y(w))return this.getFrame(w.key,w.frame);if(w instanceof E)return w.get();if(w instanceof u)return w}else return},getTextureKeys:function(){var w=[];for(var A in this.list)A!=="__DEFAULT"&&A!=="__MISSING"&&A!=="__WHITE"&&w.push(A);return w},getPixel:function(w,A,R,L){var O=this.getFrame(R,L);if(O){w-=O.x,A-=O.y;var I=O.data.cut;
5275if(w+=I.x,A+=I.y,w>=I.x&&w<I.r&&A>=I.y&&A<I.b){var D=this._tempContext;D.clearRect(0,0,1,1),D.drawImage(O.source.image,w,A,1,1,0,0,1,1);var B=D.getImageData(0,0,1,1);return new a(B.data[0],B.data[1],B.data[2],B.data[3])}}return null},getPixelAlpha:function(w,A,R,L){var O=this.getFrame(R,L);if(O){w-=O.x,A-=O.y;var I=O.data.cut;if(w+=I.x,A+=I.y,w>=I.x&&w<I.r&&A>=I.y&&A<I.b){var D=this._tempContext;D.clearRect(0,0,1,1),D.drawImage(O.source.image,w,A,1,1,0,0,1,1);var B=D.getImageData(0,0,1,1);return B.data[3]}}return null},setTexture:function(w,A,R){return this.list[A]&&(w.texture=this.list[A],w.frame=w.texture.get(R)),w},renameTexture:function(w,A){var R=this.get(w);return R&&w!==A?(R.key=A,this.list[A]=R,delete this.list[w],!0):!1},each:function(w,A){for(var R=[null],L=1;L<arguments.length;L++)R.push(arguments[L]);for(var O in this.list)R[0]=this.list[O],w.apply(A,R)},resetStamp:function(w,A){w===void 0&&(w=1),A===void 0&&(A=16777215);var R=this.stamp;return R.setCrop(),R.setPosition(0),R.setAngle(0),R.setScale(1),R.setAlpha(w),R.setTint(A),R},destroy:function(){for(var w in this.list)this.list[w].destroy();this.list={},this.stamp.destroy(),this.game=null,this.stamp=null,d.remove(this._tempCanvas)}});l.exports=M},32547:(l,T,e)=>{/** 5276 * @author Richard Davey <[email protected]> 5277 * @copyright 2013-2023 Photon Storm Ltd. 5278 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5279 */var d=e(61068),g=e(56694),r=e(28621),a=e(27394),h=new g({initialize:function(o,f,u,v,m){m===void 0&&(m=!1);var p=o.manager.game;this.renderer=p.renderer,this.texture=o,this.source=f,this.image=f.compressed?null:f,this.compressionAlgorithm=f.compressed?f.format:null,this.resolution=1,this.width=u||f.naturalWidth||f.videoWidth||f.width||0,this.height=v||f.naturalHeight||f.videoHeight||f.height||0,this.scaleMode=a.DEFAULT,this.isCanvas=f instanceof HTMLCanvasElement,this.isVideo=window.hasOwnProperty("HTMLVideoElement")&&f instanceof HTMLVideoElement,this.isRenderTexture=f.type==="RenderTexture"||f.type==="DynamicTexture",this.isGLTexture=window.hasOwnProperty("WebGLTexture")&&f instanceof WebGLTexture,this.isPowerOf2=r(this.width,this.height),this.glTexture=null,this.flipY=m,this.init(p)},init:function(n){var o=this.renderer;if(o){var f=this.source;if(o.gl){var u=this.image,v=this.flipY,m=this.width,p=this.height,x=this.scaleMode;this.isCanvas?this.glTexture=o.createCanvasTexture(u,!1,v):this.isVideo?this.glTexture=o.createVideoTexture(u,!1,v):this.isRenderTexture?this.glTexture=o.createTextureFromSource(null,m,p,x):this.isGLTexture?this.glTexture=f:this.compressionAlgorithm?this.glTexture=o.createTextureFromSource(f):this.glTexture=o.createTextureFromSource(u,m,p,x)}else this.isRenderTexture&&(this.image=f.canvas)}n.config.antialias||this.setFilter(1)},setFilter:function(n){this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,n),this.scaleMode=n},setFlipY:function(n){return n===void 0&&(n=!0),this.flipY=n,this},update:function(){var n=this.renderer,o=this.image,f=this.flipY,u=n.gl;u&&this.isCanvas?this.glTexture=n.updateCanvasTexture(o,this.glTexture,f):u&&this.isVideo&&(this.glTexture=n.updateVideoTexture(o,this.glTexture,f))},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture,!0),this.isCanvas&&d.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});l.exports=h},65154:l=>{/** 5280 * @author Richard Davey <[email protected]> 5281 * @copyright 2013-2023 Photon Storm Ltd. 5282 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5283 */var T={LINEAR:0,NEAREST:1};l.exports=T},49644:l=>{/** 5284 * @author Richard Davey <[email protected]> 5285 * @copyright 2013-2023 Photon Storm Ltd. 5286 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5287 */l.exports="addtexture"},29569:l=>{/** 5288 * @author samme 5289 * @copyright 2013-2023 Photon Storm Ltd. 5290 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5291 */l.exports="addtexture-"},60079:l=>{/** 5292 * @author Richard Davey <[email protected]> 5293 * @copyright 2013-2023 Photon Storm Ltd. 5294 * @license {@link https://opensource.org/licenses/MIT|MIT License}
5295 */l.exports="onerror"},72665:l=>{/** 5296 * @author Richard Davey <[email protected]> 5297 * @copyright 2013-2023 Photon Storm Ltd. 5298 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5299 */l.exports="onload"},93006:l=>{/** 5300 * @author Richard Davey <[email protected]> 5301 * @copyright 2013-2023 Photon Storm Ltd. 5302 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5303 */l.exports="ready"},69018:l=>{/** 5304 * @author Richard Davey <[email protected]> 5305 * @copyright 2013-2023 Photon Storm Ltd. 5306 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5307 */l.exports="removetexture"},85549:l=>{/** 5308 * @author samme 5309 * @copyright 2013-2023 Photon Storm Ltd. 5310 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5311 */l.exports="removetexture-"},38203:(l,T,e)=>{/** 5312 * @author Richard Davey <[email protected]> 5313 * @copyright 2013-2023 Photon Storm Ltd. 5314 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5315 */l.exports={ADD:e(49644),ADD_KEY:e(29569),ERROR:e(60079),LOAD:e(72665),READY:e(93006),REMOVE:e(69018),REMOVE_KEY:e(85549)}},87499:(l,T,e)=>{/** 5316 * @author Richard Davey <[email protected]> 5317 * @copyright 2013-2023 Photon Storm Ltd. 5318 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5319 */var d=e(98611),g=e(65154),r={CanvasTexture:e(17487),DynamicTexture:e(845),Events:e(38203),FilterMode:g,Frame:e(82047),Parsers:e(69150),Texture:e(31673),TextureManager:e(6237),TextureSource:e(32547)};r=d(!1,r,g),l.exports=r},35082:l=>{/** 5320 * @author Richard Davey <[email protected]> 5321 * @copyright 2013-2023 Photon Storm Ltd. 5322 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5323 */var T=function(e,d,g){if(!g.getElementsByTagName("TextureAtlas")){console.warn("Invalid Texture Atlas XML given");return}var r=e.source[d];e.add("__BASE",d,0,0,r.width,r.height);for(var a=g.getElementsByTagName("SubTexture"),h,n=0;n<a.length;n++){var o=a[n].attributes,f=o.name.value,u=parseInt(o.x.value,10),v=parseInt(o.y.value,10),m=parseInt(o.width.value,10),p=parseInt(o.height.value,10);if(h=e.add(f,d,u,v,m,p),o.frameX){var x=Math.abs(parseInt(o.frameX.value,10)),y=Math.abs(parseInt(o.frameY.value,10)),P=parseInt(o.frameWidth.value,10),b=parseInt(o.frameHeight.value,10);h.setTrim(m,p,x,y,P,b)}}return e};l.exports=T},83332:l=>{/** 5324 * @author Richard Davey <[email protected]> 5325 * @copyright 2013-2023 Photon Storm Ltd. 5326 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5327 */var T=function(e,d){var g=e.source[d];return e.add("__BASE",d,0,0,g.width,g.height),e};l.exports=T},21560:l=>{/** 5328 * @author Richard Davey <[email protected]> 5329 * @copyright 2013-2023 Photon Storm Ltd. 5330 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5331 */var T=function(e,d){var g=e.source[d];return e.add("__BASE",d,0,0,g.width,g.height),e};l.exports=T},64423:(l,T,e)=>{/** 5332 * @author Richard Davey <[email protected]> 5333 * @copyright 2013-2023 Photon Storm Ltd. 5334 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5335 */var d=e(32742),g=function(r,a,h){if(!h.frames&&!h.textures){console.warn("Invalid Texture Atlas JSON Array");return}var n=r.source[a];r.add("__BASE",a,0,0,n.width,n.height);for(var o=Array.isArray(h.textures)?h.textures[a].frames:h.frames,f,u=0;u<o.length;u++){var v=o[u];if(f=r.add(v.filename,a,v.frame.x,v.frame.y,v.frame.w,v.frame.h),!f){console.warn("Invalid atlas json, frame already exists: "+v.filename);continue}v.trimmed&&f.setTrim(v.sourceSize.w,v.sourceSize.h,v.spriteSourceSize.x,v.spriteSourceSize.y,v.spriteSourceSize.w,v.spriteSourceSize.h),v.rotated&&(f.rotated=!0,f.updateUVsInverted());var m=v.anchor||v.pivot;m&&(f.customPivot=!0,f.pivotX=m.x,f.pivotY=m.y),f.customData=d(v)}for(var p in h)p!=="frames"&&(Array.isArray(h[p])?r.customData[p]=h[p].slice(0):r.customData[p]=h[p]);return r};l.exports=g},17264:(l,T,e)=>{/** 5336 * @author Richard Davey <[email protected]> 5337 * @copyright 2013-2023 Photon Storm Ltd. 5338 * @license {@link https://opensource.org/licenses/MIT|MIT License}
5339 */var d=e(32742),g=function(r,a,h){if(!h.frames){console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object");return}var n=r.source[a];r.add("__BASE",a,0,0,n.width,n.height);var o=h.frames,f;for(var u in o)if(o.hasOwnProperty(u)){var v=o[u];if(f=r.add(u,a,v.frame.x,v.frame.y,v.frame.w,v.frame.h),!f){console.warn("Invalid atlas json, frame already exists: "+u);continue}v.trimmed&&f.setTrim(v.sourceSize.w,v.sourceSize.h,v.spriteSourceSize.x,v.spriteSourceSize.y,v.spriteSourceSize.w,v.spriteSourceSize.h),v.rotated&&(f.rotated=!0,f.updateUVsInverted());var m=v.anchor||v.pivot;m&&(f.customPivot=!0,f.pivotX=m.x,f.pivotY=m.y),f.customData=d(v)}for(var p in h)p!=="frames"&&(Array.isArray(h[p])?r.customData[p]=h[p].slice(0):r.customData[p]=h[p]);return r};l.exports=g},67409:l=>{/** 5340 * @author Richard Davey <[email protected]> 5341 * @copyright 2021 Photon Storm Ltd. 5342 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5343 */var T=function(e){var d=[171,75,84,88,32,49,49,187,13,10,26,10],g,r=new Uint8Array(e,0,12);for(g=0;g<r.length;g++)if(r[g]!==d[g]){console.warn("KTXParser - Invalid file format");return}var a=Uint32Array.BYTES_PER_ELEMENT,h=new DataView(e,12,13*a),n=h.getUint32(0,!0)===67305985,o=h.getUint32(1*a,n);if(o!==0){console.warn("KTXParser - Only compressed formats supported");return}var f=h.getUint32(4*a,n),u=h.getUint32(6*a,n),v=h.getUint32(7*a,n),m=Math.max(1,h.getUint32(11*a,n)),p=h.getUint32(12*a,n),x=new Array(m),y=12+13*4+p,P=u,b=v;for(g=0;g<m;g++){var E=new Int32Array(e,y,1)[0];y+=4,x[g]={data:new Uint8Array(e,y,E),width:P,height:b},P=Math.max(1,P>>1),b=Math.max(1,b>>1),y+=E}return{mipmaps:x,width:u,height:v,internalFormat:f,compressed:!0,generateMipmap:!1}};l.exports=T},24904:l=>{/** 5344 * @author Richard Davey <[email protected]> 5345 * @copyright 2021 Photon Storm Ltd. 5346 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5347 */function T(w,A,R,L,O,I,D){return D===void 0&&(D=16),Math.floor((w+R)/O)*Math.floor((A+L)/I)*D}function e(w,A){return w=Math.max(w,16),A=Math.max(A,8),w*A/4}function d(w,A){return w=Math.max(w,8),A=Math.max(A,8),w*A/2}function g(w,A){return T(w,A,3,3,4,4,8)}function r(w,A){return T(w,A,3,3,4,4)}function a(w,A){return T(w,A,4,3,5,4)}function h(w,A){return T(w,A,4,4,5,5)}function n(w,A){return T(w,A,5,4,6,5)}function o(w,A){return T(w,A,5,5,6,6)}function f(w,A){return T(w,A,7,4,8,5)}function u(w,A){return T(w,A,7,5,8,6)}function v(w,A){return T(w,A,7,7,8,8)}function m(w,A){return T(w,A,9,4,10,5)}function p(w,A){return T(w,A,9,5,10,6)}function x(w,A){return T(w,A,9,7,10,8)}function y(w,A){return T(w,A,9,9,10,10)}function P(w,A){return T(w,A,11,9,12,10)}function b(w,A){return T(w,A,11,11,12,12)}var E={0:{sizeFunc:e,glFormat:35841},1:{sizeFunc:e,glFormat:35843},2:{sizeFunc:d,glFormat:35840},3:{sizeFunc:d,glFormat:35842},6:{sizeFunc:g,glFormat:36196},7:{sizeFunc:g,glFormat:33776},8:{sizeFunc:r,glFormat:33777},9:{sizeFunc:r,glFormat:33778},11:{sizeFunc:r,glFormat:33779},22:{sizeFunc:g,glFormat:37492},23:{sizeFunc:r,glFormat:37496},24:{sizeFunc:g,glFormat:37494},25:{sizeFunc:g,glFormat:37488},26:{sizeFunc:r,glFormat:37490},27:{sizeFunc:r,glFormat:37808},28:{sizeFunc:a,glFormat:37809},29:{sizeFunc:h,glFormat:37810},30:{sizeFunc:n,glFormat:37811},31:{sizeFunc:o,glFormat:37812},32:{sizeFunc:f,glFormat:37813},33:{sizeFunc:u,glFormat:37814},34:{sizeFunc:v,glFormat:37815},35:{sizeFunc:m,glFormat:37816},36:{sizeFunc:p,glFormat:37817},37:{sizeFunc:x,glFormat:37818},38:{sizeFunc:y,glFormat:37819},39:{sizeFunc:P,glFormat:37820},40:{sizeFunc:b,glFormat:37821}},M=function(w){for(var A=new Uint32Array(w,0,13),R=A[2],L=E[R].glFormat,O=E[R].sizeFunc,I=A[11],D=A[7],B=A[6],z=52+A[12],X=new Uint8Array(w,z),W=new Array(I),j=0,N=D,Y=B,F=0;F<I;F++){var G=O(N,Y);W[F]={data:new Uint8Array(X.buffer,X.byteOffset+j,G),width:N,height:Y},N=Math.max(1,N>>1),Y=Math.max(1,Y>>1),j+=G}return{mipmaps:W,width:D,height:B,internalFormat:L,compressed:!0,generateMipmap:!1}};l.exports=M},6143:(l,T,e)=>{/** 5348 * @author Richard Davey <[email protected]> 5349 * @copyright 2013-2023 Photon Storm Ltd. 5350 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5351 */var d=e(72632),g=function(r,a,h,n,o,f,u){var v=d(u,"frameWidth",null),m=d(u,"frameHeight",v);if(v===null)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var p=r.source[a];r.add("__BASE",a,0,0,p.width,p.height);var x=d(u,"startFrame",0),y=d(u,"endFrame",-1),P=d(u,"margin",0),b=d(u,"spacing",0),E=Math.floor((o-P+b)/(v+b)),M=Math.floor((f-P+b)/(m+b)),w=E*M;w===0&&console.warn("SpriteSheet frame dimensions will result in zero frames for texture:",r.key),(x>w||x<-w)&&(x=0),x<0&&(x=w+x),(y===-1||y>w||y<x)&&(y=w);for(var A=P,R=P,L=0,O=0,I=0,D=0;D<w;D++){L=0,O=0;var B=A+v,z=R+m;B>o&&(L=B-o),z>f&&(O=z-f),D>=x&&D<=y&&(r.add(I,a,h+A,n+R,v-L,m-O),I++),A+=v+b,A+v>o&&(A=P,R+=m+b)}return r};l.exports=g},20030:(l,T,e)=>{/** 5352 * @author Richard Davey <[email protected]> 5353 * @copyright 2013-2023 Photon Storm Ltd. 5354 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5355 */var d=e(72632),g=function(r,a,h){var n=d(h,"frameWidth",null),o=d(h,"frameHeight",n);if(!n)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var f=r.source[0];r.add("__BASE",0,0,0,f.width,f.height),d(h,"startFrame",0),d(h,"endFrame",-1);for(var u=d(h,"margin",0),v=d(h,"spacing",0),m=a.cutX,p=a.cutY,x=a.cutWi
5355dth,y=a.cutHeight,P=a.realWidth,b=a.realHeight,E=Math.floor((P-u+v)/(n+v)),M=Math.floor((b-u+v)/(o+v)),w=a.x,A=n-w,R=n-(P-x-w),L=a.y,O=o-L,I=o-(b-y-L),D,B=u,z=u,X=0,W=0,j=0;j<M;j++){for(var N=j===0,Y=j===M-1,F=0;F<E;F++){var G=F===0,k=F===E-1;if(D=r.add(X,W,m+B,p+z,n,o),G||N||k||Y){var V=G?w:0,U=N?L:0,$=0,K=0;G&&($+=n-A),k&&($+=n-R),N&&(K+=o-O),Y&&(K+=o-I);var J=n-$,_=o-K;D.cutWidth=J,D.cutHeight=_,D.setTrim(n,o,V,U,J,_)}B+=v,G?B+=A:k?B+=R:B+=n,X++}B=u,z+=v,N?z+=O:Y?z+=I:z+=o}return r};l.exports=g},89187:l=>{/** 5356 * @author Richard Davey <[email protected]> 5357 * @copyright 2013-2023 Photon Storm Ltd. 5358 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5359 */var T=0,e=function(g,r,a,h){var n=T-h.y-h.height;g.add(a,r,h.x,n,h.width,h.height)},d=function(g,r,a){var h=g.source[r];g.add("__BASE",r,0,0,h.width,h.height),T=h.height;for(var n=a.split(` 5360`),o=/^[ ]*(- )*(\w+)+[: ]+(.*)/,f="",u="",v={x:0,y:0,width:0,height:0},m=0;m<n.length;m++){var p=n[m].match(o);if(p){var x=p[1]==="- ",y=p[2],P=p[3];if(x&&(u!==f&&(e(g,r,u,v),f=u),v={x:0,y:0,width:0,height:0}),y==="name"){u=P;continue}switch(y){case"x":case"y":case"width":case"height":v[y]=parseInt(P,10);break}}}return u!==f&&e(g,r,u,v),g};l.exports=d},69150:(l,T,e)=>{/** 5361 * @author Richard Davey <[email protected]> 5362 * @copyright 2013-2023 Photon Storm Ltd. 5363 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5364 */l.exports={AtlasXML:e(35082),Canvas:e(83332),Image:e(21560),JSONArray:e(64423),JSONHash:e(17264),KTXParser:e(67409),PVRParser:e(24904),SpriteSheet:e(6143),SpriteSheetFromAtlas:e(20030),UnityYAML:e(89187)}},93560:l=>{/** 5365 * @author Richard Davey <[email protected]> 5366 * @copyright 2013-2023 Photon Storm Ltd. 5367 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5368 */l.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},97042:(l,T,e)=>{/** 5369 * @author Richard Davey <[email protected]> 5370 * @copyright 2013-2023 Photon Storm Ltd. 5371 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5372 */var d=e(56694),g=new d({initialize:function(a,h,n,o,f,u,v){(n===void 0||n<=0)&&(n=32),(o===void 0||o<=0)&&(o=32),f===void 0&&(f=0),u===void 0&&(u=0),this.name=a,this.firstgid=h|0,this.imageWidth=n|0,this.imageHeight=o|0,this.imageMargin=f|0,this.imageSpacing=u|0,this.properties=v||{},this.images=[],this.total=0},containsImageIndex:function(r){return r>=this.firstgid&&r<this.firstgid+this.total},addImage:function(r,a){return this.images.push({gid:r,image:a}),this.total++,this}});l.exports=g},46422:(l,T,e)=>{/** 5373 * @author Richard Davey <[email protected]> 5374 * @copyright 2021 Photon Storm Ltd. 5375 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5376 */var d=e(56694),g=new d({initialize:function(a){if(this.gids=[],a!==void 0)for(var h=0;h<a.length;++h)for(var n=a[h],o=0;o<n.total;++o)this.gids[n.firstgid+o]=n;this._gids=this.gids}
5376,enabled:{get:function(){return!!this.gids},set:function(r){this.gids=r?this._gids:void 0}},getTypeIncludingTile:function(r){if(r.type!==void 0&&r.type!=="")return r.type;if(!(!this.gids||r.gid===void 0)){var a=this.gids[r.gid];if(a){var h=a.getTileData(r.gid);if(h)return h.type}}},setTextureAndFrame:function(r,a,h,n){if(a===null&&this.gids&&n.gid!==void 0){var o=this.gids[n.gid];o&&(a===null&&o.image!==void 0&&(a=o.image.key),h===null&&(h=n.gid-o.firstgid),r.scene.textures.getFrame(a,h)||(a=null,h=null))}r.setTexture(a,h)},setPropertiesFromTiledObject:function(r,a){if(this.gids!==void 0&&a.gid!==void 0){var h=this.gids[a.gid];h!==void 0&&this.setFromJSON(r,h.getTileProperties(a.gid))}this.setFromJSON(r,a.properties)},setFromJSON:function(r,a){if(a){if(Array.isArray(a)){a.forEach(function(n){r.setData(n.name,n.value)});return}for(var h in a)r[h]!==void 0?r[h]=a[h]:r.setData(h,a[h])}}});l.exports=g},15043:(l,T,e)=>{/** 5377 * @author Richard Davey <[email protected]> 5378 * @copyright 2013-2023 Photon Storm Ltd. 5379 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5380 */var d=e(93560),g=e(16586),r=e(90715),a=e(89797),h=function(n,o,f,u,v,m,p,x){f===void 0&&(f=32),u===void 0&&(u=32),v===void 0&&(v=10),m===void 0&&(m=10),x===void 0&&(x=!1);var y=null;if(Array.isArray(p)){var P=o!==void 0?o:"map";y=r(P,d.ARRAY_2D,p,f,u,x)}else if(o!==void 0){var b=n.cache.tilemap.get(o);b?y=r(o,b.format,b.data,f,u,x):console.warn("No map data found for key "+o)}return y===null&&(y=new g({tileWidth:f,tileHeight:u,width:v,height:m})),new a(n,y)};l.exports=h},29633:(l,T,e)=>{/** 5381 * @author Richard Davey <[email protected]> 5382 * @copyright 2013-2023 Photon Storm Ltd. 5383 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5384 */var d=e(56694),g=e(64937),r=e(12920),a=e(28699),h=e(66658),n=new d({Mixins:[g.Alpha,g.Flip,g.Visible],initialize:function(f,u,v,m,p,x,y,P){this.layer=f,this.index=u,this.x=v,this.y=m,this.width=p,this.height=x,this.right,this.bottom,this.baseWidth=y!==void 0?y:p,this.baseHeight=P!==void 0?P:x,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.physics={}},containsPoint:function(o,f){return!(o<this.pixelX||f<this.pixelY||o>this.right||f>this.bottom)},copy:function(o){return this.index=o.index,this.alpha=o.alpha,this.properties=a(o.properties),this.visible=o.visible,this.setFlip(o.flipX,o.flipY),this.tint=o.tint,this.rotation=o.rotation,this.collideUp=o.collideUp,this.collideDown=o.collideDown,this.collideLeft=o.collideLeft,this.collideRight=o.collideRight,this.collisionCallback=o.collisionCallback,this.collisionCallbackContext=o.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(o){var f=this.tilemapLayer;if(f){var u=f.tileToWorldXY(this.x,this.y,void 0,o);return u.x}return this.x*this.baseWidth},getRight:function(o){var f=this.tilemapLayer;return f?this.getLeft(o)+this.width*f.scaleX:this.getLeft(o)+this.width},getTop:function(o){var f=this.tilemapLayer;if(f){var u=f.tileToWorldXY(this.x,this.y,void 0,o);return u.y}return this.y*this.baseWidth-(this.height-this.baseHeight)},getBottom:function(o){var f=this.tilemapLayer;return f?this.getTop(o)+this.height*f.scaleY:this.getTop(o)+this.height},getBounds:function(o,f){return f===void 0&&(f=new h),f.x=this.getLeft(o),f.y=this.getTop(o),f.width=this.getRight(o)-f.x,f.height=this.getBottom(o)-f.y,f},getCenterX:function(o){return(this.getLeft(o)+this.getRight(o))/2},getCenterY:function(o){return(this.getTop(o)+this.getBottom(o))/2},intersects:function(o,f,u,v){return!(u<=this.pixelX||v<=this.pixelY||o>=this.right||f>=this.bottom)},isInteresting:function(o,f){return o&&f?this.canCollide||this.hasInterestingFace:o?this.collides:f?this.hasInterestingFace:!1}
5384,resetCollision:function(o){if(o===void 0&&(o=!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,o){var f=this.tilemapLayer;f&&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(o,f,u,v,m){if(f===void 0&&(f=o),u===void 0&&(u=o),v===void 0&&(v=o),m===void 0&&(m=!0),this.collideLeft=o,this.collideRight=f,this.collideUp=u,this.collideDown=v,this.faceLeft=o,this.faceRight=f,this.faceTop=u,this.faceBottom=v,m){var p=this.tilemapLayer;p&&this.tilemapLayer.calculateFacesAt(this.x,this.y)}return this},setCollisionCallback:function(o,f){return o===null?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=o,this.collisionCallbackContext=f),this},setSize:function(o,f,u,v){return o!==void 0&&(this.width=o),f!==void 0&&(this.height=f),u!==void 0&&(this.baseWidth=u),v!==void 0&&(this.baseHeight=v),this.updatePixelXY(),this},updatePixelXY:function(){var o=this.layer.orientation;if(o===r.ORTHOGONAL)this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight;else if(o===r.ISOMETRIC)this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5;else if(o===r.STAGGERED)this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2);else if(o===r.HEXAGONAL){var f=this.layer.staggerAxis,u=this.layer.staggerIndex,v=this.layer.hexSideLength,m,p;f==="y"?(p=(this.baseHeight-v)/2+v,u==="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*p):f==="x"&&(m=(this.baseWidth-v)/2+v,this.pixelX=this.x*m,u==="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 o=this.layer.tilemapLayer;if(o){var f=o.gidMap[this.index];if(f)return f}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var o=this.tilemapLayer;return o?o.tilemap:null}}});l.exports=n},89797:(l,T,e)=>{/** 5385 * @author Richard Davey <[email protected]> 5386 * @copyright 2013-2023 Photon Storm Ltd. 5387 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5388 */var d=e(14556),g=e(56694),r=e(75606),a=e(93560),h=e(72632),n=e(94990),o=e(46422),f=e(12920),u=e(52257),v=e(72677),m=e(13747),p=e(29633),x=e(5047),y=e(87177),P=e(47975),b=new g({initialize:function(M,w){this.scene=M,this.tileWidth=w.tileWidth,this.tileHeight=w.tileHeight,this.width=w.width,this.height=w.height,this.orientation=w.orientation,this.renderOrder=w.renderOrder,this.format=w.format,this.version=w.version,this.properties=w.properties,this.widthInPixels=w.widthInPixels,this.heightInPixels=w.heightInPixels,this.imageCollections=w.imageCollections,this.images=w.images,this.layers=w.layers,this.tiles=w.tiles,this.tilesets=w.tilesets,this.objects=w.objects,this.currentLayerIndex=0,this.hexSideLength=w.hexSideLength;var A=this.orientation;this._convert={WorldToTileXY:x.GetWorldToTileXYFunction(A),WorldToTileX:x.GetWorldToTileXFunction(A),WorldToTileY:x.GetWorldToTileYFunction(A),TileToWorldXY:x.GetTileToWorldXYFunction(A),TileToWorldX:x.GetTileToWorldXFunction(A),TileToWorldY:x.GetTileToWorldYFunction(A),GetTileCorners:x.GetTileCornersFunction(A)}},setRenderOrder:function(E){var M=["right-down","left-down","right-up","left-up"];return typeof E=="number"&&(E=M[E]),M.indexOf(E)>-1&&(this.renderOrder=E),this},addTilesetImage:function(E,M,w,A,R,L,O,I){if(E===void 0)return null;if(M==null&&(M=E),!this.scene.sys.textures.exists(M))return console.warn("Invalid Tileset Image: "+M),null;var D=this.scene.sys.textures.get(M),B=this.getTilesetIndex(E);if(B===null&&this.format===a.TILED_JSON)return console.warn("No data found for Tileset: "+E),null;var z=this.tilesets[B];return z?(z.setTileSize(w,A),z.setSpacing(R,L),z.setImage(D),z):(w===void 0&&(w=this.tileWidth),A===void 0&&(A=this.tileHeight),R===void 0&&(R=0),L===void 0&&(L=0),O===void 0&&(O=0),I===void 0&&(I={x:0,y:0}),z=new P(E,O,w,A,R,L,void 0,void 0,I),z.setImage(D),this.tilesets.push(z),this.tiles=d(this),z)},copy:function(E,M,w,A,R,L,O,I){return I=this.getLayer(I),I!==null?(x.Copy(E,M,w,A,R,L,O,I),this):null},createBlankLayer:function(E,M,w,A,R,L,O,I){w===void 0&&(w=0),A===void 0&&(A=0),R===void 0&&(R=this.width),L===void 0&&(L=this.height),O===void 0&&(O=this.tileWidth),I===void 0&&(I=this.tileHeight);var D=this.getLayerIndex(E);if(D!==null)return console.warn("Invalid Tilemap Layer ID: "+E),null;for(var B=new n({name:E,tileWidth:O,tileHeight:I,width:R,height:L,orientation:this.orientation}),z,X=0;X<L;X++){z=[];for(var W=0;W<R;W++)z.push(new p(B,-1,W,X,O,I,this.tileWidth,this.tileHeight));B.data.push(z)}this.layers.push(B),this.currentLayerIndex=this.layers.length-1;var j=new y(this.scene,this,this.currentLayerIndex,M,w,A);return j.setRenderOrder(this.renderOrder),this.scene.sys.displayList.add(j),j},createLayer:function(E,M,w,A){var R=this.getLayerIndex(E);if(R===null)return console.warn("Invalid Tilemap Layer ID: "+E),typeof E=="string"&&console.warn("Valid tilelayer names: %o",this.getTileLayerNames()),null;var L=this.layers[R];if(L.tilemapLayer)return console.warn("Tilemap Layer ID already exists:"+E),null;this.currentLayerIndex=R,w===void 0&&(w=L.x),A===void 0&&(A=L.y);var O=new y(this.scene,this,R,M,w,A);return O.setRenderOrder(this.renderOrder),this.scene.sys.displayList.add(O),O},createFromObjects:function(E,M,w){w===void 0&&(w=!0);var A=[],R=this.getObjectLayer(E);if(!R)return console.warn("createFromObjects: Invalid objectLayerName given: "+E),A;var L=new o(w?this.tilesets:void 0);Array.isArray(M)||(M=[M]);for(var O=R.objects,I=0;I<M.length;
5388I++){var D=M[I],B=h(D,"id",null),z=h(D,"gid",null),X=h(D,"name",null),W=h(D,"type",null);L.enabled=!h(D,"ignoreTileset",null);for(var j,N=[],Y=0;Y<O.length;Y++)j=O[Y],(B===null&&z===null&&X===null&&W===null||B!==null&&j.id===B||z!==null&&j.gid===z||X!==null&&j.name===X||W!==null&&L.getTypeIncludingTile(j)===W)&&N.push(j);for(var F=h(D,"classType",m),G=h(D,"scene",this.scene),k=h(D,"container",null),V=h(D,"key",null),U=h(D,"frame",null),$=0;$<N.length;$++){j=N[$];var K=new F(G);if(K.setName(j.name),K.setPosition(j.x,j.y),L.setTextureAndFrame(K,V,U,j),j.width&&(K.displayWidth=j.width),j.height&&(K.displayHeight=j.height),this.orientation===f.ISOMETRIC){var J=this.tileWidth/this.tileHeight,_={x:K.x-K.y,y:(K.x+K.y)/J};K.x=_.x,K.y=_.y}var tt={x:K.originX*j.width,y:(K.originY-(j.gid?1:0))*j.height};if(j.rotation){var st=r(j.rotation);u(tt,st),K.rotation=st}K.x+=tt.x,K.y+=tt.y,(j.flippedHorizontal!==void 0||j.flippedVertical!==void 0)&&K.setFlip(j.flippedHorizontal,j.flippedVertical),j.visible||(K.visible=!1),L.setPropertiesFromTiledObject(K,j),k?k.add(K):G.add.existing(K),A.push(K)}}return A},createFromTiles:function(E,M,w,A,R,L){return L=this.getLayer(L),L===null?null:x.CreateFromTiles(E,M,w,A,R,L)},fill:function(E,M,w,A,R,L,O){return L===void 0&&(L=!0),O=this.getLayer(O),O===null?null:(x.Fill(E,M,w,A,R,L,O),this)},filterObjects:function(E,M,w){if(typeof E=="string"){var A=E;if(E=this.getObjectLayer(E),!E)return console.warn("No object layer found with the name: "+A),null}return E.objects.filter(M,w)},filterTiles:function(E,M,w,A,R,L,O,I){return I=this.getLayer(I),I===null?null:x.FilterTiles(E,M,w,A,R,L,O,I)},findByIndex:function(E,M,w,A){return A=this.getLayer(A),A===null?null:x.FindByIndex(E,M,w,A)},findObject:function(E,M,w){if(typeof E=="string"){var A=E;if(E=this.getObjectLayer(E),!E)return console.warn("No object layer found with the name: "+A),null}return E.objects.find(M,w)||null},findTile:function(E,M,w,A,R,L,O,I){return I=this.getLayer(I),I===null?null:x.FindTile(E,M,w,A,R,L,O,I)},forEachTile:function(E,M,w,A,R,L,O,I){return I=this.getLayer(I),I===null?null:(x.ForEachTile(E,M,w,A,R,L,O,I),this)},getImageIndex:function(E){return this.getIndex(this.images,E)},getImageLayerNames:function(){return!this.images||!Array.isArray(this.images)?[]:this.images.map(function(E){return E.name})},getIndex:function(E,M){for(var w=0;w<E.length;w++)if(E[w].name===M)return w;return null},getLayer:function(E){var M=this.getLayerIndex(E);return M!==null?this.layers[M]:null},getObjectLayer:function(E){var M=this.getIndex(this.objects,E);return M!==null?this.objects[M]:null},getObjectLayerNames:function(){return!this.objects||!Array.isArray(this.objects)?[]:this.objects.map(function(E){return E.name})},getLayerIndex:function(E){return E===void 0?this.currentLayerIndex:typeof E=="string"?this.getLayerIndexByName(E):typeof E=="number"&&E<this.layers.length?E:E instanceof y&&E.tilemap===this?E.layerIndex:null},getLayerIndexByName:function(E){return this.getIndex(this.layers,E)},getTileAt:function(E,M,w,A){return A=this.getLayer(A),A===null?null:x.GetTileAt(E,M,w,A)},getTileAtWorldXY:function(E,M,w,A,R){return R=this.getLayer(R),R===null?null:x.GetTileAtWorldXY(E,M,w,A,R)},getTileLayerNames:function(){return!this.layers||!Array.isArray(this.layers)?[]:this.layers.map(function(E){return E.name})},getTilesWithin:function(E,M,w,A,R,L){return L=this.getLayer(L),L===null?null:x.GetTilesWithin(E,M,w,A,R,L)},getTilesWithinShape:function(E,M,w,A){return A=this.getLayer(A),A===null?null:x.GetTilesWithinShape(E,M,w,A)},getTilesWithinWorldXY:function(E,M,w,A,R,L,O){return O=this.getLayer(O),O===null?null:x.GetTilesWithinWorldXY(E,M,w,A,R,L,O)},getTileset:function(E){var M=this.getIndex(this.tilesets,E);return M!==null?this.tilesets[M]:null},getTilesetIndex:function(E){return this.getIndex(this.tilesets,E)},hasTileAt:function(E,M,w){return w=this.getLayer(w),w===null?null:x.HasTileAt(E,M,w)},hasTileAtWorldXY:function(E,M,w,A){return A=this.getLayer(A),A===null?null:x.HasTileAtWorldXY(E,M,w,A)},layer:{get:function(){return this.layers[this.currentLayerIndex]},set:function(E){this.setLayer(E)}},putTileAt:function(E,M,w,A,R){return A===void 0&&(A=!0),R=this.getLayer(R),R===null?null:x.PutTileAt(E,M,w,A,R)},putTileAtWorldXY:function(E,M,w,A,R,L){return A===void 0&&(A=!0),L=this.getLayer(L),L===null?null:x.PutTileAtWorldXY(E,M,w,A,R,L)},putTilesAt:function(E,M,w,A,R){return A===void 0&&(A=!0),R=this.getLayer(R),R===null?null:(x.PutTilesAt(E,M,w,A,R),this)},randomize:function(E,M,w,A,R,L){return L=this.getLayer(L),L===null?null:(x.Randomize(E,M,w,A,R,L),this)},calculateFacesAt:function(E,M,w){return w=this.getLayer(w),w===null?null:(x.CalculateFacesAt(E,M,w),this)},calculateFacesWithin:function(E,M,w,A,R){return R=this.getLayer(R),R===null?null:(x.CalculateFacesWithin(E,M,w,A,R),this)},removeLayer:function(E){var M=this.getLayerIndex(E);if(M!==null){v(this.layers,M);for(var w=M;w<this.layers.length;w++)this.layers[w].tilemapLayer&&this.layers[w].tilemapLayer.layerIndex--;return this.currentLayerIndex===M&&(this.currentLayerIndex=0),this}else return null},destroyLayer:function(E){var M=this.getLayerIndex(E);return M!==null?(E=this.layers[M],E.tilemapLayer.destroy(),v(this.layers,M),this.currentLayerIndex===M&&(this.currentLayerIndex=0),this):null},removeAllLayers:function(){for(var E=this.layers,M=0;M<E.length;M++)E[M].tilemapLayer&&E[M].tilemapLayer.destroy(!1);return E.length=0,this.currentLayerIndex=0,this},removeTile:function(E,M,w){M===void 0&&(M=-1),w===void 0&&(w=!0);var A=[];Array.isArray(E)||(E=[E]);for(var R=0;R<E.length;R++){var L=E[R];A.push(this.removeTileAt(L.x,L.y,!0,w,L.tilemapLayer)),M>-1&&this.putTileAt(M,L.x,L.y,w,L.tilemapLayer)}return A},removeTileAt:function(E,M,w,A,R){return w===void 0&&(w=!0),A===void 0&&(A=!0),R=this.getLayer(R),R===null?null:x.RemoveTileAt(E,M,w,A,R)},removeTileAtWorldXY:function(E,M,w,A,R,L){return w===void 0&&(w=!0),A===void 0&&(A=!0),L=this.getLayer(L),L===null?null:x.RemoveTileAtWorldXY(E,M,w,A,R,L)},renderDebug:function(E,M,w){return w=this.getLayer(w),w===null?null:(this.orientation===f.ORTHOGONAL&&x.RenderDebug(E,M,w),this)},renderDebugFull:function(E,M){for(var w=this.layers,A=0;A<w.length;A++)x.RenderDebug(E,M,w[A]);return this},replaceByIndex:function(E,M,w,A,R,L,O){return O=this.getLayer(O),O===null?null:(x.ReplaceByIndex(E,M,w,A,R,L,O),this)},setCollision:function(E,M,w,A,R){return M===void 0&&(M=!0),w===void 0&&(w=!0),R===void 0&&(R=!0),A=this.getLayer(A),A===null?null:(x.SetCollision(E,M,w,A,R),this)},setCollisionBetween:function(E,M,w,A,R){return w===void 0&&(w=!0),A===void 0&&(A=!0),R=this.getLayer(R),R===null?null:(x.SetCollisionBetween(E,M,w,A,R),this)},setCollisionByProperty:function(E,M,w,A){return M===void 0&&(M=!0),w===void 0&&(w=!0),A=this.getLayer(A),A===null?null:(x.SetCollisionByProperty(E,M,w,A),this)},setCollisionByExclusion:function(E,M,w,A){return M===void 0&&(M=!0),w===void 0&&(w=!0),A=this.getLayer(A),A===null?null:(x.SetCollisionByExclusion(E,M,w,A),this)},setCollisionFromCollisionGroup:function(E,M,w){return E===void 0&&(E=!0),M===void 0&&(M=!0),w=this.getLayer(w),w===null?null:(x.SetCollisionFromCollisionGroup(E,M,w),this)},setTileIndexCallback:function(E,M,w,A){return A=this.getLayer(A),A===null?null:(x.SetTileIndexCallback(E,M,w,A),this)},setTileLocationCallback:function(E,M,w,A,R,L,O){return O=this.getLayer(O),O===null?null:(x.SetTileLocationCallback(E,M,w,A,R,L,O),this)},setLayer:function(E){var M=this.getLayerIndex(E);return M!==null&&(this.currentLayerIndex=M),this},setBaseTileSize:function(E,M){this.tileWidth=E,this.tileHeight=M,this.widthInPixels=this.width*E,this.heightInPixels=this.height*M;for(var w=0;w<this.layers.length;w++){this.layers[w].baseTileWidth=E,this.layers[w].baseTileHeight=M;for(var A=this.layers[w].data,R=this.layers[w].width,L=this.layers[w].height,O=0;O<L;O++)for(var I=0;I<R;I++){var D=A[O][I];D!==null&&D.setSize(void 0,void 0,E,M)}}return this},setLayerTileSize:function(E,M,w){if(w=this.getLayer(w),w===null)return this;w.tileWidth=E,w.tileHeight=M;for(var A=w.data,R=w.width,L=w.height,O=0;O<L;O++)for(var I=0;I<R;I++){var D=A[O][I];D!==null&&D.setSize(E,M)}return this},shuffle:function(E,M,w,A,R){return R=this.getLayer(R),R===null?null:(x.Shuffle(E,M,w,A,R),this)},swapByIndex:function(E,M,w,A,R,L,O){return O=this.getLayer(O),O===null?null:(x.SwapByIndex(E,M,w,A,R,L,O),this)},tileToWorldX:function(E,M,w){return w=this.getLayer(w),w===null?null:this._convert.TileToWorldX(E,M,w)},tileToWorldY:function(E,M,w){return w=this.getLayer(w),w===null?null:this._convert.TileToWorldY(E,M,w)},tileToWorldXY:function(E,M,w,A,R){return R=this.getLayer(R),R===null?null:this._convert.TileToWorldXY(E,M,w,A,R)},getTileCorners:function(E,M,w,A){return A=this.getLayer(A),A===null?null:this._convert.GetTileCorners(E,M,w,A)},weightedRandomize:function(E,M,w,A,R,L){return L=this.getLayer(L),L===null?null:(x.WeightedRandomize(M,w,A,R,E,L),this)},worldToTileX:function(E,M,w,A){return A=this.getLayer(A),A===null?null:this._convert.WorldToTileX(E,M,w,A)},worldToTileY:function(E,M,w,A){return A=this.getLayer(A),A===null?null:this._convert.WorldToTileY(E,M,w,A)},worldToTileXY:function(E,M,w,A,R,L){return L=this.getLayer(L),L===null?null:this._convert.WorldToTileXY(E,M,w,A,R,L)},destroy:function(){this.removeAllLayers(),this.tiles.length=0,this.tilesets.length=0,this.objects.length=0,this.scene=null}});l.exports=b},4843:(l,T,e)=>{/** 5389 * @author Richard Davey <[email protected]> 5390 * @copyright 2013-2023 Photon Storm Ltd. 5391 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5392 */var d=e(99325),g=e(15043);d.register("tilemap",function(r){var a=r!==void 0?r:{};return g(this.scene,a.key,a.tileWidth,a.tileHeight,a.width,a.height,a.data,a.insertNull)})},37940:(l,T,e)=>{/** 5393 * @author Richard Davey <[email protected]> 5394 * @copyright 2013-2023 Photon Storm Ltd. 5395 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5396 */var d=e(61286),g=e(15043);d.register("tilemap",function(r,a,h,n,o,f,u){return r===null&&(r=void 0),a===null&&(a=void 0),h===null&&(h=void 0),n===null&&(n=void 0),o===null&&(o=void 0),g(this.scene,r,a,h,n,o,f,u)})},87177:(l,T,e)=>{/** 5397 * @author Richard Davey <[email protected]> 5398 * @copyright 2013-2023 Photon Storm Ltd. 5399 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5400 */var d=e(56694),g=e(64937),r=e(89980),a=e(5047),h=e(96193),n=e(93736),o=new d({Extends:r,Mixins:[g.Alpha,g.BlendM
5400ode,g.ComputedSize,g.Depth,g.Flip,g.GetBounds,g.Mask,g.Origin,g.Pipeline,g.PostPipeline,g.Transform,g.Visible,g.ScrollFactor,h],initialize:function(u,v,m,p,x,y){r.call(this,u,"TilemapLayer"),this.isTilemap=!0,this.tilemap=v,this.layerIndex=m,this.layer=v.layers[m],this.layer.tilemapLayer=this,this.tileset=[],this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.culledTiles=[],this.skipCull=!1,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=a.GetCullTilesFunction(this.layer.orientation),this._renderOrder=0,this.gidMap=[],this.tempVec=new n,this.setTilesets(p),this.setAlpha(this.layer.alpha),this.setPosition(x,y),this.setOrigin(0,0),this.setSize(v.tileWidth*this.layer.width,v.tileHeight*this.layer.height),this.initPipeline(),this.initPostPipeline(!1)},setTilesets:function(f){var u=[],v=[],m=this.tilemap;Array.isArray(f)||(f=[f]);for(var p=0;p<f.length;p++){var x=f[p];if(typeof x=="string"&&(x=m.getTileset(x)),x){v.push(x);for(var y=x.firstgid,P=0;P<x.total;P++)u[y+P]=x}}this.gidMap=u,this.tileset=v},setRenderOrder:function(f){var u=["right-down","left-down","right-up","left-up"];return typeof f=="string"&&(f=u.indexOf(f)),f>=0&&f<4&&(this._renderOrder=f),this},calculateFacesAt:function(f,u){return a.CalculateFacesAt(f,u,this.layer),this},calculateFacesWithin:function(f,u,v,m){return a.CalculateFacesWithin(f,u,v,m,this.layer),this},createFromTiles:function(f,u,v,m,p){return a.CreateFromTiles(f,u,v,m,p,this.layer)},cull:function(f){return this.cullCallback(this.layer,f,this.culledTiles,this._renderOrder)},copy:function(f,u,v,m,p,x,y){return a.Copy(f,u,v,m,p,x,y,this.layer),this},fill:function(f,u,v,m,p,x){return a.Fill(f,u,v,m,p,x,this.layer),this},filterTiles:function(f,u,v,m,p,x,y){return a.FilterTiles(f,u,v,m,p,x,y,this.layer)},findByIndex:function(f,u,v){return a.FindByIndex(f,u,v,this.layer)},findTile:function(f,u,v,m,p,x,y){return a.FindTile(f,u,v,m,p,x,y,this.layer)},forEachTile:function(f,u,v,m,p,x,y){return a.ForEachTile(f,u,v,m,p,x,y,this.layer),this},setTint:function(f,u,v,m,p,x){f===void 0&&(f=16777215);var y=function(P){P.tint=f};return this.forEachTile(y,this,u,v,m,p,x)},getTileAt:function(f,u,v){return a.GetTileAt(f,u,v,this.layer)},getTileAtWorldXY:function(f,u,v,m){return a.GetTileAtWorldXY(f,u,v,m,this.layer)},getIsoTileAtWorldXY:function(f,u,v,m,p){v===void 0&&(v=!0);var x=this.tempVec;return a.IsometricWorldToTileXY(f,u,!0,x,p,this.layer,v),this.getTileAt(x.x,x.y,m)},getTilesWithin:function(f,u,v,m,p){return a.GetTilesWithin(f,u,v,m,p,this.layer)},getTilesWithinShape:function(f,u,v){return a.GetTilesWithinShape(f,u,v,this.layer)},getTilesWithinWorldXY:function(f,u,v,m,p,x){return a.GetTilesWithinWorldXY(f,u,v,m,p,x,this.layer)},hasTileAt:function(f,u){return a.HasTileAt(f,u,this.layer)},hasTileAtWorldXY:function(f,u,v){return a.HasTileAtWorldXY(f,u,v,this.layer)},putTileAt:function(f,u,v,m){return a.PutTileAt(f,u,v,m,this.layer)},putTileAtWorldXY:function(f,u,v,m,p){return a.PutTileAtWorldXY(f,u,v,m,p,this.layer)},putTilesAt:function(f,u,v,m){return a.PutTilesAt(f,u,v,m,this.layer),this},randomize:function(f,u,v,m,p){return a.Randomize(f,u,v,m,p,this.layer),this},removeTileAt:function(f,u,v,m){return a.RemoveTileAt(f,u,v,m,this.layer)},removeTileAtWorldXY:function(f,u,v,m,p){return a.RemoveTileAtWorldXY(f,u,v,m,p,this.layer)},renderDebug:function(f,u){return a.RenderDebug(f,u,this.layer),this},replaceByIndex:function(f,u,v,m,p,x){return a.ReplaceByIndex(f,u,v,m,p,x,this.layer),this},setSkipCull:function(f){return f===void 0&&(f=!0),this.skipCull=f,this},setCullPadding:function(f,u){return f===void 0&&(f=1),u===void 0&&(u=1),this.cullPaddingX=f,this.cullPaddingY=u,this},setCollision:function(f,u,v,m){return a.SetCollision(f,u,v,this.layer,m),this},setCollisionBetween:function(f,u,v,m){return a.SetCollisionBetween(f,u,v,m,this.layer),this},setCollisionByProperty:function(f,u,v){return a.SetCollisionByProperty(f,u,v,this.layer),this},setCollisionByExclusion:function(f,u,v){return a.SetCollisionByExclusion(f,u,v,this.layer),this},setCollisionFromCollisionGroup:function(f,u){return a.SetCollisionFromCollisionGroup(f,u,this.layer),this},setTileIndexCallback:function(f,u,v){return a.SetTileIndexCallback(f,u,v,this.layer),this},setTileLocationCallback:function(f,u,v,m,p,x){return a.SetTileLocationCallback(f,u,v,m,p,x,this.layer),this},shuffle:function(f,u,v,m){return a.Shuffle(f,u,v,m,this.layer),this},swapByIndex:function(f,u,v,m,p,x){return a.SwapByIndex(f,u,v,m,p,x,this.layer),this},tileToWorldX:function(f,u){return this.tilemap.tileToWorldX(f,u,this)},tileToWorldY:function(f,u){return this.tilemap.tileToWorldY(f,u,this)},tileToWorldXY:function(f,u,v,m){return this.tilemap.tileToWorldXY(f,u,v,m,this)},getTileCorners:function(f,u,v){return this.tilemap.getTileCorners(f,u,v,this)},weightedRandomize:function(f,u,v,m,p){return a.WeightedRandomize(u,v,m,p,f,this.layer),this},worldToTileX:function(f,u,v){return this.tilemap.worldToTileX(f,u,v,this)},worldToTileY:function(f,u,v){return this.tilemap.worldToTileY(f,u,v,this)},worldToTileXY:function(f,u,v,m,p){return this.tilemap.worldToTileXY(f,u,v,m,p,this)},destroy:function(f){f===void 0&&(f=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),f&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],r.prototype.destroy.call(this))}});l.exports=o},17394:(l,T,e)=>{/** 5401 * @author Richard Davey <[email protected]> 5402 * @copyright 2013-2023 Photon Storm Ltd. 5403 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5404 */var d=e(69360),g=new d,r=new d,a=new d,h=function(n,o,f,u){var v=o.cull(f),m=v.length,p=f.alpha*o.alpha;if(!(m===0||p<=0)){var x=g,y=r,P=a;y.applyITRS(o.x,o.y,o.rotation,o.scaleX,o.scaleY),x.copyFrom(f.matrix);var b=n.currentContext,E=o.gidMap;b.save(),u?(x.multiplyWithOffset(u,-f.scrollX*o.scrollFactorX,-f.scrollY*o.scrollFactorY),y.e=o.x,y.f=o.y,x.multiply(y,P),P.copyToContext(b)):(y.e-=f.scrollX*o.scrollFactorX,y.f-=f.scrollY*o.scrollFactorY,y.copyToContext(b)),(!n.antialias||o.scaleX>1||o.scaleY>1)&&(b.imageSmoothingEnabled=!1);for(var M=0;M<m;M++){var w=v[M],A=E[w.index];if(A){var R=A.image.getSourceImage(),L=A.getTileTextureCoordinates(w.index),O=A.tileWidth,I=A.tileHeight;if(!(L===null||O===0||I===0)){var D=O*.5,B=I*.5;L.x+=A.tileOffset.x,L.y+=A.tileOffset.y,b.save(),b.translate(w.pixelX+D,w.pixelY+B),w.rotation!==0&&b.rotate(w.rotation),(w.flipX||w.flipY)&&b.scale(w.flipX?-1:1,w.flipY?-1:1),b.globalAlpha=p*w.alpha,b.drawImage(R,L.x,L.y,O,I,-D,-B,O,I),b.restore(
5404)}}}b.restore()}};l.exports=h},96193:(l,T,e)=>{/** 5405 * @author Richard Davey <[email protected]> 5406 * @copyright 2013-2023 Photon Storm Ltd. 5407 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5408 */var d=e(72283),g=d,r=d;g=e(51395),r=e(17394),l.exports={renderWebGL:g,renderCanvas:r}},51395:(l,T,e)=>{/** 5409 * @author Richard Davey <[email protected]> 5410 * @copyright 2013-2023 Photon Storm Ltd. 5411 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5412 */var d=e(75512),g=function(r,a,h){var n=a.cull(h),o=n.length,f=h.alpha*a.alpha;if(!(o===0||f<=0)){var u=a.gidMap,v=r.pipelines.set(a.pipeline,a),m=d.getTintAppendFloatAlpha,p=a.scrollFactorX,x=a.scrollFactorY,y=a.x,P=a.y,b=a.scaleX,E=a.scaleY;r.pipelines.preBatch(a);for(var M=0;M<o;M++){var w=n[M],A=u[w.index];if(A){var R=A.getTileTextureCoordinates(w.index);if(R!==null){var L=A.glTexture,O=v.setTexture2D(L,a),I=A.tileWidth,D=A.tileHeight,B=R.x,z=R.y,X=A.tileWidth*.5,W=A.tileHeight*.5,j=A.tileOffset.x,N=A.tileOffset.y,Y=m(w.tint,f*w.alpha);v.batchTexture(a,L,L.width,L.height,y+w.pixelX*b+(X*b-j),P+w.pixelY*E+(W*E-N),w.width,w.height,b,E,w.rotation,w.flipX,w.flipY,p,x,X,W,B,z,I,D,Y,Y,Y,Y,!1,0,0,h,null,!0,O)}}}r.pipelines.postBatch(a)}};l.exports=g},47975:(l,T,e)=>{/** 5413 * @author Richard Davey <[email protected]> 5414 * @copyright 2013-2023 Photon Storm Ltd. 5415 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5416 */var d=e(56694),g=e(93736),r=new d({initialize:function(h,n,o,f,u,v,m,p,x){(o===void 0||o<=0)&&(o=32),(f===void 0||f<=0)&&(f=32),u===void 0&&(u=0),v===void 0&&(v=0),m===void 0&&(m={}),p===void 0&&(p={}),this.name=h,this.firstgid=n,this.tileWidth=o,this.tileHeight=f,this.tileMargin=u,this.tileSpacing=v,this.tileProperties=m,this.tileData=p,this.tileOffset=new g,x!==void 0&&this.tileOffset.set(x.x,x.y),this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(a){return this.containsTileIndex(a)?this.tileProperties[a-this.firstgid]:null},getTileData:function(a){return this.containsTileIndex(a)?this.tileData[a-this.firstgid]:null},getTileCollisionGroup:function(a){var h=this.getTileData(a);return h&&h.objectgroup?h.objectgroup:null},containsTileIndex:function(a){return a>=this.firstgid&&a<this.firstgid+this.total},getTileTextureCoordinates:function(a){return this.containsTileIndex(a)?this.texCoordinates[a-this.firstgid]:null},setImage:function(a){return this.image=a,this.glTexture=a.get().source.glTexture,this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},setTileSize:function(a,h){return a!==void 0&&(this.tileWidth=a),h!==void 0&&(this.tileHeight=h),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},setSpacing:function(a,h){return a!==void 0&&(this.tileMargin=a),h!==void 0&&(this.tileSpacing=h),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},updateTileData:function(a,h){var n=(h-this.tileMargin*2+this.tileSpacing)/(this.tileHeight+this.tileSpacing),o=(a-this.tileMargin*2+this.tileSpacing)/(this.tileWidth+this.tileSpacing);(n%1!==0||o%1!==0)&&console.warn("Image tile area not tile size multiple in: "+this.name),n=Math.floor(n),o=Math.floor(o),this.rows=n,this.columns=o,this.total=n*o,this.texCoordinates.length=0;for(var f=this.tileMargin,u=this.tileMargin,v=0;v<this.rows;v++){for(var m=0;m<this.columns;m++)this.texCoordinates.push({x:f,y:u}),f+=this.tileWidth+this.tileSpacing;f=this.tileMargin,u+=this.tileHeight+this.tileSpacing}return this}});l.exports=r},92839:(l,T,e)=>{/** 5417 * @author Richard Davey <[email protected]> 5418 * @copyright 2013-2023 Photon Storm Ltd. 5419 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5420 */var d=e(15494),g=function(r,a,h){var n=d(r,a,!0,h),o=d(r,a-1,!0,h),f=d(r,a+1,!0,h),u=d(r-1,a,!0,h),v=d(r+1,a,!0,h),m=n&&n.collides;return m&&(n.faceTop=!0,n.faceBottom=!0,n.faceLeft=!0,n.faceRight=!0),o&&o.collides&&(m&&(n.faceTop=!1),o.faceBottom=!m),f&&f.collides&&(m&&(n.faceBottom=!1),f.faceTop=!m),u&&u.collides&&(m&&(n.faceLeft=!1),u.faceRight=!m),v&&v.collides&&(m&&(n.faceRight=!1),v.faceLeft=!m),n&&!n.collides&&n.resetFaces(),n};l.exports=g},60386:(l,T,e)=>{/** 5421 * @author Richard Davey <[email protected]> 5422 * @copyright 2013-2023 Photon Storm Ltd. 5423 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5424 */var d=e(15494),g=e(50811),r=function(a,h,n,o,f){for(var u=null,v=null,m=null,p=null,x=g(a,h,n,o,null,f),y=0;y<x.length;y++){var P=x[y];P&&(P.collides?(u=d(P.x,P.y-1,!0,f),v=d(P.x,P.y+1,!0,f),m=d(P.x-1,P.y,!0,f),p=d(P.x+1,P.y,!0,f),P.faceTop=!(u&&u.collides),P.faceBottom=!(v&&v.collides),P.faceLeft=!(m&&m.collides),P.faceRight=!(p&&p.collides)):P.resetFaces())}};l.exports=r},13125:(l,T,e)=>{/** 5425 * @author Richard Davey <[email protected]> 5426 * @copyright 2013-2023 Photon Storm Ltd. 5427 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5428 */var d=e(93736),g=new d,r=function(a,h,n,o){var f=n.tilemapLayer,u=f.cullPaddingX,v=f.cullPaddingY,m=f.tilemap.tileToWorldXY(a,h,g,o,f);return m.x>o.worldView.x+f.scaleX*n.tileWidth*(-u-.5)&&m.x<o.worldView.right+f.scaleX*n.tileWidth*(u-.5)&&m.y>o.worldView.y+f.scaleY*n.tileHeight*(-v-1)&&m.y<o.worldView.bottom+f.scaleY*n.tileHeight*(v-.5)};l.exports=r},17347:(l,T,e)=>{/** 5429 * @author Richard Davey <[email protected]> 5430 * @copyright 2013-2023 Photon Storm Ltd. 5431 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5432 */var d=e(60386),g=e(50811),r=e(62839),a=e(29633),h=function(n,o,f,u,v,m,p,x){p===void 0&&(p=!0);var y=g(n,o,f,u,null,x),P=[];
5432y.forEach(function(L){var O=new a(L.layer,L.index,L.x,L.y,L.width,L.height,L.baseWidth,L.baseHeight);O.copy(L),P.push(O)});for(var b=v-n,E=m-o,M=0;M<P.length;M++){var w=P[M],A=w.x+b,R=w.y+E;r(A,R,x)&&x.data[R][A]&&(w.x=A,w.y=R,w.updatePixelXY(),x.data[R][A]=w)}p&&d(v-1,m-1,f+2,u+2,x),y.length=0,P.length=0};l.exports=h},93604:(l,T,e)=>{/** 5433 * @author Richard Davey <[email protected]> 5434 * @copyright 2013-2023 Photon Storm Ltd. 5435 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5436 */var d=e(50811),g=e(51202),r=function(a,h,n,o,f,u){n||(n={}),Array.isArray(a)||(a=[a]);var v=u.tilemapLayer;o||(o=v.scene),f||(f=o.cameras.main);var m=d(0,0,u.width,u.height,null,u),p=[],x;for(x=0;x<m.length;x++){var y=m[x];if(a.indexOf(y.index)!==-1){var P=v.tileToWorldXY(y.x,y.y,void 0,f,u);n.x=P.x,n.y=P.y,p.push(o.make.sprite(n))}}if(typeof h=="number")for(x=0;x<a.length;x++)g(a[x],h,0,0,u.width,u.height,u);else if(Array.isArray(h))for(x=0;x<a.length;x++)g(a[x],h[x],0,0,u.width,u.height,u);return p};l.exports=r},71586:(l,T,e)=>{/** 5437 * @author Richard Davey <[email protected]> 5438 * @copyright 2013-2023 Photon Storm Ltd. 5439 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5440 */var d=e(74118),g=e(82127),r=e(84314),a=new d,h=function(n,o){var f=n.tilemapLayer.tilemap,u=n.tilemapLayer,v=Math.floor(f.tileWidth*u.scaleX),m=Math.floor(f.tileHeight*u.scaleY),p=r(o.worldView.x-u.x,v,0,!0)-u.cullPaddingX,x=g(o.worldView.right-u.x,v,0,!0)+u.cullPaddingX,y=r(o.worldView.y-u.y,m,0,!0)-u.cullPaddingY,P=g(o.worldView.bottom-u.y,m,0,!0)+u.cullPaddingY;return a.setTo(p,y,x-p,P-y)};l.exports=h},381:(l,T,e)=>{/** 5441 * @author Richard Davey <[email protected]> 5442 * @copyright 2013-2023 Photon Storm Ltd. 5443 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5444 */var d=e(71586),g=e(6987),r=function(a,h,n,o){n===void 0&&(n=[]),o===void 0&&(o=0),n.length=0;var f=a.tilemapLayer,u=d(a,h);return(f.skipCull||f.scrollFactorX!==1||f.scrollFactorY!==1)&&(u.left=0,u.right=a.width,u.top=0,u.bottom=a.height),g(a,u,o,n),n};l.exports=r},97734:(l,T,e)=>{/** 5445 * @author Richard Davey <[email protected]> 5446 * @copyright 2013-2023 Photon Storm Ltd. 5447 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5448 */var d=e(50811),g=e(60386),r=e(68234),a=function(h,n,o,f,u,v,m){for(var p=m.collideIndexes.indexOf(h)!==-1,x=d(n,o,f,u,null,m),y=0;y<x.length;y++)x[y].index=h,r(x[y],p);v&&g(n-1,o-1,f+2,u+2,m)};l.exports=a},63555:(l,T,e)=>{/** 5449 * @author Richard Davey <[email protected]> 5450 * @copyright 2013-2023 Photon Storm Ltd. 5451 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5452 */var d=e(50811),g=function(r,a,h,n,o,f,u,v){var m=d(h,n,o,f,u,v);return m.filter(r,a)};l.exports=g},37982:l=>{/** 5453 * @author Richard Davey <[email protected]> 5454 * @copyright 2013-2023 Photon Storm Ltd. 5455 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5456 */var T=function(e,d,g,r){d===void 0&&(d=0),g===void 0&&(g=!1);var a=0,h,n,o;if(g){for(n=r.height-1;n>=0;n--)for(h=r.width-1;h>=0;h--)if(o=r.data[n][h],o&&o.index===e){if(a===d)return o;a+=1}}else for(n=0;n<r.height;n++)for(h=0;h<r.width;h++)if(o=r.data[n][h],o&&o.index===e){if(a===d)return o;a+=1}return null};l.exports=T},48297:(l,T,e)=>{/** 5457 * @author Richard Davey <[email protected]> 5458 * @copyright 2013-2023 Photon Storm Ltd. 5459 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5460 */var d=e(50811),g=function(r,a,h,n,o,f,u,v){var m=d(h,n,o,f,u,v);return m.find(r,a)||null};l.exports=g},80916:(l,T,e)=>{/** 5461 * @author Richard Davey <[email protected]> 5462 * @copyright 2013-2023 Photon Storm Ltd. 5463 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5464 */var d=e(50811),g=function(r,a,h,n,o,f,u,v){var m=d(h,n,o,f,u,v);m.forEach(r,a)};l.exports=g},31493:(l,T,e)=>{/** 5465 * @author Richard Davey <[email protected]> 5466 * @copyright 2013-2023 Photon Storm Ltd. 5467 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5468 */var d=e(12920),g=e(381),r=e(37524),a=e(20887),h=e(72283),n=e(19242),o=function(f){return f===d.ORTHOGONAL?g:f===d.HEXAGONAL?r:f===d.STAGGERED?n:f===d.ISOMETRIC?a:h};l.exports=o},15494:(l,T,e)=>{/** 5469 * @author Richard Davey <[email protected]> 5470 * @copyright 2013-2023 Photon Storm Ltd. 5471 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5472 */var d=e(62839),g=function(r,a,h,n){if(h===void 0&&(h=!1),d(r,a,n)){var o=n.data[a][r]||null;return o?o.index===-1?h?o:null:o:null}else return null};l.exports=g},24640:(l,T,e)=>{/** 5473 * @author Richard Davey <[email protected]> 5474 * @copyright 2013-2023 Photon Storm Ltd. 5475 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5476 */var d=e(15494),g=e(93736),r=new g,a=function(h,n,o,f,u){return u.tilemapLayer.worldToTileXY(h,n,!0,r,f),d(r.x,r.y,o,u)};l.exports=a},48495:(l,T,e)=>{/** 5477 * @author Richard Davey <[email protected]> 5478 * @copyright 2013-2023 Photon Storm Ltd. 5479 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5480 */var d=e(93736),g=function(r,a,h,n){var o=n.baseTileWidth,f=n.baseTileHeight,u=n.tilemapLayer,v=0,m=0;u&&(h||(h=u.scene.cameras.main),v=u.x+h.scrollX*(1-u.scrollFactorX),m=u.y+h.scrollY*(1-u.scrollFactorY),o*=u.scaleX,f*=u.scaleY);var p=v+r*o,x=m+a*f;return[new d(p,x),new d(p+o,x),new d(p+o,x+f),new d(p,x+f)]};l.exports=g},7160:(l,T,e)=>{/** 5481 * @author Richard Davey <[email protected]> 5482 * @copyright 2013-2023 Photon Storm Ltd. 5483 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5484 */var d=e(12920),g=e(63634),r=e(72283),a=e(48495),h=function(n){return n===d.ORTHOGONAL?a:n===d.ISOMETRIC?r:n===d.HEXAGONAL?g:(n===d.STAGGERED,r)};l.exports=h},16884:(l,T,e)=>{/** 5485 * @author Richard Davey <[email protected]> 5486 * @copyright 2013-2023 Photon Storm Ltd. 5487 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5488 */var d=e(12920),g=e(72283),r=e(44150),a=function(h){return h===d.ORTHOGONAL?r:g};l.exports=a},68182:(l,T,e)=>{/** 5489 * @author Richard Davey <[email protected]> 5490 * @copyright 2013-2023 Photon Storm Ltd. 5491 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5492 */var d=e(12920),g=e(21715),r=e(21808),a=e(72283),h=e(33388),n=e(46836),o=function(f){return f===d.ORTHOGONAL?n:f===d.ISOMETRIC?r:f===d.HEXAGONAL?g:f===d.STAGGERED?h:a};l.exports=o},3752:(l,T,e)=>{/** 5493 * @author Richard Davey <[email protected]> 5494 * @copyright 2013-2023 Photon Storm Ltd. 5495 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5496 */var d=e(12920),g=e(72283),r=e(84132),a=e(42477),h=function(n){return n===d.ORTHOGONAL?a:n===d.STAGGERED?r:g};l.exports=h},50811:(l,T,e)=>{/** 5497 * @author Richard Davey <[email protected]> 5498 * @copyright 2013-2023 Photon Storm Ltd. 5499 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5500 */var d=e(72632),g=function(r,a,h,n,o,f){r===void 0&&(r=0),a===void 0&&(a=0),h===void 0&&(h=f.width),n===void 0&&(n=f.height),o||(o={});var u=d(o,"isNotEmpty",!1),v=d(o,"isColliding",!1),m=d(o,"hasInterestingFace",!1);r<0&&(h+=r,r=0),a<0&&(n+=a,a=0),r+h>f.width&&(h=Math.max(f.width-r,0)),a+n>f.height&&(n=Math.max(f.height-a,0));for(var p=[],x=a;x<a+n;x++)for(var y=r;y<r+h;y++){var P=f.data[x][y];if(P!==null){if(u&&P.index===-1||v&&!P.collides||m&&!P.hasInterestingFace)continue;p.push(P)}}return p};l.exports=g},31674:(l,T,e)=>{/** 5501 * @author Richard Davey <[email protected]> 5502 * @copyright 2013-2023 Photon Storm Ltd. 5503 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5504 */var d=e(84068),g=e(50811),r=e(7563),a=e(72283),h=e(93736),n=function(m,p){return r.RectangleToTriangle(p,m)},o=new h,f=new h,u=new h,v=function(m,p,x,y){if(m===void 0)return[];var P=a;m instanceof d.Circle?P=r.CircleToRectangle:m instanceof d.Rectangle?P=r.RectangleToRectangle:m instanceof d.Triangle?P=n:m instanceof d.Line&&(P=r.LineToRectangle),y.tilemapLayer.worldToTileXY(m.left,m.top,!0,f,x);var b=f.x,E=f.y;y.tilemapLayer.worldToTileXY(m.right,m.bottom,!1,u,x);var M=Math.ceil(u.x),w=Math.ceil(u.y),A=Math.max(M-b,1),R=Math.max(w-E,1),L=g(b,E,A,R,p,y),O=y.tileWidth,I=y.tileHeight;y.tilemapLayer&&(O*=y.tilemapLayer.scaleX,I*=y.tilemapLayer.scaleY);for(var D=[],B=new d.Rectangle(0,0,O,I),z=0;z<L.length;z++){var X=L[z];y.tilemapLayer.tileToWorldXY(X.x,X.y,o,x),B.x=o.x,B.y=o.y,P(m,B)&&D.push(X)}return D};l.exports=v},44662:(l,T,e)=>{/** 5505 * @author Richard Davey <[email protected]> 5506 * @copyright 2013-2023 Photon Storm Ltd. 5507 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5508 */var d=e(50811),g=e(93736),r=new g,a=new g,h=function(n,o,f,u,v,m,p){var x=p.tilemapLayer.tilemap._convert.WorldToTileXY;x(n,o,!0,r,m,p);var y=r.x,P=r.y;x(n+f,o+u,!1,a,m,p);var b=Math.ceil(a.x),E=Math.ceil(a.y);return d(y,P,b-y,E-P,v,p)};l.exports=h},29296:(l,T,e)=>{/** 5509 * @author Richard Davey <[email protected]> 5510 * @copyright 2013-2023 Photon Storm Ltd. 5511 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5512 */var d=e(12920),g=e(10618),r=e(806),a=function(h){return h===d.ORTHOGONAL?r:g};l.exports=a},32688:(l,T,e)=>{/** 5513 * @author Richard Davey <[email protected]> 5514 * @copyright 2013-2023 Photon Storm Ltd. 5515 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5516 */var d=e(12920),g=e(11516),r=e(18750),a=e(72283),h=e(90562),n=e(45676),o=function(f){return f===d.ORTHOGONAL?n:f===d.ISOMETRIC?r:f===d.HEXAGONAL?g:f===d.STAGGERED?h:a};l.exports=o},74326:(l,T,e)=>{/** 5517 * @author Richard Davey <[email protected]> 5518 * @copyright 2013-2023 Photon Storm Ltd. 5519 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5520 */var d=e(12920),g=e(10618),r=e(3689),a=e(70520),h=function(n){return n===d.ORTHOGONAL?a:n===d.STAGGERED?r:g};l.exports=h},46598:(l,T,e)=>{/** 5521 * @author Richard Davey <[email protected]> 5522 * @copyright 2013-2023 Photon Storm Ltd. 5523 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5524 */var d=e(62839),g=function(r,a,h){if(d(r,a,h)){var n=h.data[a][r];return n!==null&&n.index>-1}
5524else return!1};l.exports=g},28654:(l,T,e)=>{/** 5525 * @author Richard Davey <[email protected]> 5526 * @copyright 2013-2023 Photon Storm Ltd. 5527 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5528 */var d=e(46598),g=e(93736),r=new g,a=function(h,n,o,f){f.tilemapLayer.worldToTileXY(h,n,!0,r,o);var u=r.x,v=r.y;return d(u,v,f)};l.exports=a},6358:(l,T,e)=>{/** 5529 * @author Richard Davey <[email protected]> 5530 * @copyright 2013-2023 Photon Storm Ltd. 5531 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5532 */var d=e(82127),g=e(84314),r=function(a,h){var n=a.tilemapLayer.tilemap,o=a.tilemapLayer,f=Math.floor(n.tileWidth*o.scaleX),u=Math.floor(n.tileHeight*o.scaleY),v=a.hexSideLength,m,p,x,y;if(this.staggerAxis==="y"){var P=(u-v)/2+v;m=g(h.worldView.x-o.x,f,0,!0)-o.cullPaddingX,p=d(h.worldView.right-o.x,f,0,!0)+o.cullPaddingX,x=g(h.worldView.y-o.y,P,0,!0)-o.cullPaddingY,y=d(h.worldView.bottom-o.y,P,0,!0)+o.cullPaddingY}else{var b=(f-v)/2+v;m=g(h.worldView.x-o.x,b,0,!0)-o.cullPaddingX,p=d(h.worldView.right-o.x,b,0,!0)+o.cullPaddingX,x=g(h.worldView.y-o.y,u,0,!0)-o.cullPaddingY,y=d(h.worldView.bottom-o.y,u,0,!0)+o.cullPaddingY}return{left:m,right:p,top:x,bottom:y}};l.exports=r},37524:(l,T,e)=>{/** 5533 * @author Richard Davey <[email protected]> 5534 * @copyright 2013-2023 Photon Storm Ltd. 5535 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5536 */var d=e(6358),g=e(6987),r=function(a,h,n,o){n===void 0&&(n=[]),o===void 0&&(o=0),n.length=0;var f=a.tilemapLayer,u=d(a,h);return f.skipCull&&f.scrollFactorX===1&&f.scrollFactorY===1&&(u.left=0,u.right=a.width,u.top=0,u.bottom=a.height),g(a,u,o,n),n};l.exports=r},63634:(l,T,e)=>{/** 5537 * @author Richard Davey <[email protected]> 5538 * @copyright 2013-2023 Photon Storm Ltd. 5539 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5540 */var d=e(21715),g=e(93736),r=new g,a=function(h,n,o,f){var u=f.baseTileWidth,v=f.baseTileHeight,m=f.tilemapLayer;m&&(u*=m.scaleX,v*=m.scaleY);var p=d(h,n,r,o,f),x=[],y=.5773502691896257,P,b;this.staggerAxis==="y"?(P=y*u,b=v/2):(P=u/2,b=y*v);for(var E=0;E<6;E++){var M=2*Math.PI*(.5-E)/6;x.push(new g(p.x+P*Math.cos(M),p.y+b*Math.sin(M)))}return x};l.exports=a},21715:(l,T,e)=>{/** 5541 * @author Richard Davey <[email protected]> 5542 * @copyright 2013-2023 Photon Storm Ltd. 5543 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5544 */var d=e(93736),g=function(r,a,h,n,o){h||(h=new d);var f=o.baseTileWidth,u=o.baseTileHeight,v=o.tilemapLayer,m=0,p=0;v&&(n||(n=v.scene.cameras.main),m=v.x+n.scrollX*(1-v.scrollFactorX),p=v.y+n.scrollY*(1-v.scrollFactorY),f*=v.scaleX,u*=v.scaleY);var x=f/2,y=u/2,P,b;return this.staggerAxis==="y"?(P=m+f*r+f,b=p+1.5*a*y+y,a%2===0&&(this.staggerIndex==="odd"?P-=x:P+=x)):this.staggerAxis==="x"&&this.staggerIndex==="odd"&&(P=m+1.5*r*x+x,b=p+u*r+u,r%2===0&&(this.staggerIndex==="odd"?b-=y:b+=y)),h.set(P,b)};l.exports=g},11516:(l,T,e)=>{/** 5545 * @author Richard Davey <[email protected]> 5546 * @copyright 2013-2023 Photon Storm Ltd. 5547 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5548 */var d=e(93736),g=function(r,a,h,n,o,f){n||(n=new d);var u=f.baseTileWidth,v=f.baseTileHeight,m=f.tilemapLayer;m&&(o||(o=m.scene.cameras.main),r=r-(m.x+o.scrollX*(1-m.scrollFactorX)),a=a-(m.y+o.scrollY*(1-m.scrollFactorY)),u*=m.scaleX,v*=m.scaleY);var p=.5773502691896257,x=-.3333333333333333,y=0,P=.6666666666666666,b=u/2,E=v/2,M,w,A,R,L;f.staggerAxis==="y"?(M=(r-b)/(p*u),w=(a-E)/E,A=p*M+x*w,R=y*M+P*w):(M=(r-b)/b,w=(a-E)/(p*v),A=x*M+p*w,R=P*M+y*w),L=-A-R;var O=Math.round(A),I=Math.round(R),D=Math.round(L),B=Math.abs(O-A),z=Math.abs(I-R),X=Math.abs(D-L);B>z&&B>X?O=-I-D:z>X&&(I=-O-D);var W,j=I;return f.staggerIndex==="odd"?W=j%2===0?I/2+O:I/2+O-.5:W=j%2===0?I/2+O:I/2+O+.5,n.set(W,j)};l.exports=g},62839:l=>{/** 5549 * @author Richard Davey <[email protected]> 5550 * @copyright 2013-2023 Photon Storm Ltd. 5551 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5552 */var T=function(e,d,g){return e>=0&&e<g.width&&d>=0&&d<g.height};l.exports=T},20887:(l,T,e)=>{/** 5553 * @author Richard Davey <[email protected]> 5554 * @copyright 2013-2023 Photon Storm Ltd. 5555 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5556 */var d=e(13125),g=function(r,a,h,n){h===void 0&&(h=[]),n===void 0&&(n=0),h.length=0;var o=r.tilemapLayer,f=r.data,u=r.width,v=r.height,m=o.skipCull,p=0,x=u,y=0,P=v,b,E,M;if(n===0){for(E=y;E<P;E++)for(b=p;b<x;b++)if(m||d(b,E,r,a)){if(M=f[E][b],!M||M.index===-1||!M.visible||M.alpha===0)continue;h.push(M)}}else if(n===1){for(E=y;E<P;E++)for(b=x;b>=p;b--)if(m||d(b,E,r,a)){if(M=f[E][b],!M||M.index===-1||!M.visible||M.alpha===0)continue;h.push(M)}}else if(n===2){for(E=P;E>=y;E--)for(b=p;b<x;b++)if(m||d(b,E,r,a)){if(M=f[E][b],!M||M.index===-1||!M.visible||M.alpha===0)continue;h.push(M)}}else if(n===3){for(E=P;E>=y;E--)for(b=x;b>=p;b--)if(m||d(b,E,r,a)){if(M=f[E][b],!M||M.index===-1||!M.visible||M.alpha===0)continue;h.push(M)}}return o.tilesDrawn=h.length,o.tilesTotal=u*v,h};l.exports=g},21808:(l,T,e)=>{/** 5557 * @author Richard Davey <[email protected]> 5558 * @copyright 2013-2023 Photon Storm Ltd. 5559 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5560 */var d=e(93736),g=function(r,a,h,n,o){h||(h=new d);var f=o.baseTileWidth,u=o.baseTileHeight,v=o.tilemapLayer,m=0,p=0;v&&(n||(n=v.scene.cameras.main),m=v.x+n.scrollX*(1-v.scrollFactorX),f*=v.scaleX,p=v.y+n.scrollY*(1-v.scrollFactorY),u*=v.scaleY);var x=m+(r-a)*(f/2),y=p+(r+a)*(u/2);return h.set(x,y)};l.exports=g},18750:(l,T,e)=>{/** 5561 * @author Richard Davey <[email protected]> 5562 * @copyright 2013-2023 Photon Storm Ltd. 5563 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5564 */var d=e(93736),g=function(r,a,h,n,o,f,u){n||(n=new d);var v=f.baseTileWidth,m=f.baseTileHeight,p=f.tilemapLayer;p&&(o||(o=p.scene.cameras.main),a=a-(p.y+o.scrollY*(1-p.scrollFactorY)),m*=p.scaleY,r=r-(p.x+o.scrollX*(1-p.scrollFactorX)),v*=p.scaleX);var x=v/2,y=m/2;r=r-x,u||(a=a-m);var P=.5*(r/x+a/y),b=.5*(-r/x+a/y);return h&&(P=Math.floor(P),b=Math.floor(b)),n.set(P,b)};l.exports=g},29003:(l,T,e)=>{/** 5565 * @author Richard Davey <[email protected]> 5566 * @copyright 2013-2023 Photon Storm Ltd. 5567 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5568 */var d=e(29633),g=e(62839),r=e(92839),a=e(68234),h=function(n,o,f,u,v){if(u===void 0&&(u=!0),!g(o,f,v))return null;
5568var m,p=v.data[f][o],x=p&&p.collides;n instanceof d?(v.data[f][o]===null&&(v.data[f][o]=new d(v,n.index,o,f,v.tileWidth,v.tileHeight)),v.data[f][o].copy(n)):(m=n,v.data[f][o]===null?v.data[f][o]=new d(v,m,o,f,v.tileWidth,v.tileHeight):v.data[f][o].index=m);var y=v.data[f][o],P=v.collideIndexes.indexOf(y.index)!==-1;if(m=n instanceof d?n.index:n,m===-1)y.width=v.tileWidth,y.height=v.tileHeight;else{var b=v.tilemapLayer.tilemap.tiles,E=b[m][2],M=v.tilemapLayer.tileset[E];y.width=M.tileWidth,y.height=M.tileHeight}return a(y,P),u&&x!==y.collides&&r(o,f,v),y};l.exports=h},48565:(l,T,e)=>{/** 5569 * @author Richard Davey <[email protected]> 5570 * @copyright 2013-2023 Photon Storm Ltd. 5571 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5572 */var d=e(29003),g=e(93736),r=new g,a=function(h,n,o,f,u,v){return v.tilemapLayer.worldToTileXY(n,o,!0,r,u,v),d(h,r.x,r.y,f,v)};l.exports=a},56547:(l,T,e)=>{/** 5573 * @author Richard Davey <[email protected]> 5574 * @copyright 2013-2023 Photon Storm Ltd. 5575 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5576 */var d=e(60386),g=e(29003),r=function(a,h,n,o,f){if(o===void 0&&(o=!0),!Array.isArray(a))return null;Array.isArray(a[0])||(a=[a]);for(var u=a.length,v=a[0].length,m=0;m<u;m++)for(var p=0;p<v;p++){var x=a[m][p];g(x,h+p,n+m,!1,f)}o&&d(h-1,n-1,v+2,u+2,f)};l.exports=r},91180:(l,T,e)=>{/** 5577 * @author Richard Davey <[email protected]> 5578 * @copyright 2013-2023 Photon Storm Ltd. 5579 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5580 */var d=e(50811),g=e(72861),r=function(a,h,n,o,f,u){var v,m=d(a,h,n,o,{},u);if(!f)for(f=[],v=0;v<m.length;v++)f.indexOf(m[v].index)===-1&&f.push(m[v].index);for(v=0;v<m.length;v++)m[v].index=g(f)};l.exports=r},929:(l,T,e)=>{/** 5581 * @author Richard Davey <[email protected]> 5582 * @copyright 2013-2023 Photon Storm Ltd. 5583 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5584 */var d=e(29633),g=e(62839),r=e(92839),a=function(h,n,o,f,u){if(o===void 0&&(o=!0),f===void 0&&(f=!0),!g(h,n,u))return null;var v=u.data[n][h];if(v)u.data[n][h]=o?null:new d(u,-1,h,n,u.tileWidth,u.tileHeight);else return null;return f&&v&&v.collides&&r(h,n,u),v};l.exports=a},17384:(l,T,e)=>{/** 5585 * @author Richard Davey <[email protected]> 5586 * @copyright 2013-2023 Photon Storm Ltd. 5587 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5588 */var d=e(929),g=e(93736),r=new g,a=function(h,n,o,f,u,v){return v.tilemapLayer.worldToTileXY(h,n,!0,r,u,v),d(r.x,r.y,o,f,v)};l.exports=a},93763:(l,T,e)=>{/** 5589 * @author Richard Davey <[email protected]> 5590 * @copyright 2013-2023 Photon Storm Ltd. 5591 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5592 */var d=e(50811),g=e(95509),r=new g(105,210,231,150),a=new g(243,134,48,200),h=new g(40,39,37,150),n=function(o,f,u){f===void 0&&(f={});var v=f.tileColor!==void 0?f.tileColor:r,m=f.collidingTileColor!==void 0?f.collidingTileColor:a,p=f.faceColor!==void 0?f.faceColor:h,x=d(0,0,u.width,u.height,null,u);o.translateCanvas(u.tilemapLayer.x,u.tilemapLayer.y),o.scaleCanvas(u.tilemapLayer.scaleX,u.tilemapLayer.scaleY);for(var y=0;y<x.length;y++){var P=x[y],b=P.width,E=P.height,M=P.pixelX,w=P.pixelY,A=P.collides?m:v;A!==null&&(o.fillStyle(A.color,A.alpha/255),o.fillRect(M,w,b,E)),M+=1,w+=1,b-=2,E-=2,p!==null&&(o.lineStyle(1,p.color,p.alpha/255),P.faceTop&&o.lineBetween(M,w,M+b,w),P.faceRight&&o.lineBetween(M+b,w,M+b,w+E),P.faceBottom&&o.lineBetween(M,w+E,M+b,w+E),P.faceLeft&&o.lineBetween(M,w,M,w+E))}};l.exports=n},51202:(l,T,e)=>{/** 5593 * @author Richard Davey <[email protected]> 5594 * @copyright 2013-2023 Photon Storm Ltd. 5595 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5596 */var d=e(50811),g=function(r,a,h,n,o,f,u){for(var v=d(h,n,o,f,null,u),m=0;m<v.length;m++)v[m]&&v[m].index===r&&(v[m].index=a)};l.exports=g},6987:l=>{/** 5597 * @author Richard Davey <[email protected]> 5598 * @copyright 2013-2023 Photon Storm Ltd. 5599 * @license {@link https://opensource.org/licenses/MIT|MIT License}
5600 */var T=function(e,d,g,r){var a=e.data,h=e.width,n=e.height,o=e.tilemapLayer,f=Math.max(0,d.left),u=Math.min(h,d.right),v=Math.max(0,d.top),m=Math.min(n,d.bottom),p,x,y;if(g===0)for(x=v;x<m;x++)for(p=f;a[x]&&p<u;p++)y=a[x][p],!(!y||y.index===-1||!y.visible||y.alpha===0)&&r.push(y);else if(g===1)for(x=v;x<m;x++)for(p=u;a[x]&&p>=f;p--)y=a[x][p],!(!y||y.index===-1||!y.visible||y.alpha===0)&&r.push(y);else if(g===2)for(x=m;x>=v;x--)for(p=f;a[x]&&p<u;p++)y=a[x][p],!(!y||y.index===-1||!y.visible||y.alpha===0)&&r.push(y);else if(g===3)for(x=m;x>=v;x--)for(p=u;a[x]&&p>=f;p--)y=a[x][p],!(!y||y.index===-1||!y.visible||y.alpha===0)&&r.push(y);return o.tilesDrawn=r.length,o.tilesTotal=h*n,r};l.exports=T},51710:(l,T,e)=>{/** 5601 * @author Richard Davey <[email protected]> 5602 * @copyright 2013-2023 Photon Storm Ltd. 5603 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5604 */var d=e(68234),g=e(60386),r=e(91181),a=function(h,n,o,f,u){n===void 0&&(n=!0),o===void 0&&(o=!0),u===void 0&&(u=!0),Array.isArray(h)||(h=[h]);for(var v=0;v<h.length;v++)r(h[v],n,f);if(u)for(var m=0;m<f.height;m++)for(var p=0;p<f.width;p++){var x=f.data[m][p];x&&h.indexOf(x.index)!==-1&&d(x,n)}o&&g(0,0,f.width,f.height,f)};l.exports=a},15216:(l,T,e)=>{/** 5605 * @author Richard Davey <[email protected]> 5606 * @copyright 2013-2023 Photon Storm Ltd. 5607 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5608 */var d=e(68234),g=e(60386),r=e(91181),a=function(h,n,o,f,u,v){if(o===void 0&&(o=!0),f===void 0&&(f=!0),v===void 0&&(v=!0),!(h>n)){for(var m=h;m<=n;m++)r(m,o,u);if(v)for(var p=0;p<u.height;p++)for(var x=0;x<u.width;x++){var y=u.data[p][x];y&&y.index>=h&&y.index<=n&&d(y,o)}f&&g(0,0,u.width,u.height,u)}};l.exports=a},33158:(l,T,e)=>{/** 5609 * @author Richard Davey <[email protected]> 5610 * @copyright 2013-2023 Photon Storm Ltd. 5611 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5612 */var d=e(68234),g=e(60386),r=e(91181),a=function(h,n,o,f){n===void 0&&(n=!0),o===void 0&&(o=!0),Array.isArray(h)||(h=[h]);for(var u=0;u<f.height;u++)for(var v=0;v<f.width;v++){var m=f.data[u][v];m&&h.indexOf(m.index)===-1&&(d(m,n),r(m.index,n,f))}o&&g(0,0,f.width,f.height,f)};l.exports=a},4180:(l,T,e)=>{/** 5613 * @author Richard Davey <[email protected]> 5614 * @copyright 2013-2023 Photon Storm Ltd. 5615 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5616 */var d=e(68234),g=e(60386),r=e(19256),a=function(h,n,o,f){n===void 0&&(n=!0),o===void 0&&(o=!0);for(var u=0;u<f.height;u++)for(var v=0;v<f.width;v++){var m=f.data[u][v];if(m){for(var p in h)if(r(m.properties,p)){var x=h[p];Array.isArray(x)||(x=[x]);for(var y=0;y<x.length;y++)m.properties[p]===x[y]&&d(m,n)}}}o&&g(0,0,f.width,f.height,f)};l.exports=a},18625:(l,T,e)=>{/** 5617 * @author Richard Davey <[email protected]> 5618 * @copyright 2013-2023 Photon Storm Ltd. 5619 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5620 */var d=e(68234),g=e(60386),r=function(a,h,n){a===void 0&&(a=!0),h===void 0&&(h=!0);for(var o=0;o<n.height;o++)for(var f=0;f<n.width;f++){var u=n.data[o][f];if(u){var v=u.getCollisionGroup();v&&v.objects&&v.objects.length>0&&d(u,a)}}h&&g(0,0,n.width,n.height,n)};l.exports=r},91181:l=>{/** 5621 * @author Richard Davey <[email protected]> 5622 * @copyright 2013-2023 Photon Storm Ltd. 5623 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5624 */var T=function(e,d,g){var r=g.collideIndexes.indexOf(e);d&&r===-1?g.collideIndexes.push(e):!d&&r!==-1&&g.collideIndexes.splice(r,1)};l.exports=T},68234:l=>{/** 5625 * @author Richard Davey <[email protected]> 5626 * @copyright 2013-2023 Photon Storm Ltd. 5627 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5628 */var T=function(e,d){d?e.setCollision(!0,!0,!0,!0,!1):e.resetCollision(!1)};l.exports=T},11628:l=>{/** 5629 * @author Richard Davey <[email protected]> 5630 * @copyright 2013-2023 Photon Storm Ltd. 5631 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5632 */var T=function(e,d,g,r){if(typeof e=="number")r.callbacks[e]=d!==null?{callback:d,callbackContext:g}:void 0;else for(var a=0,h=e.length;a<h;a++)r.callbacks[e[a]]=d!==null?{callback:d,callbackContext:g}:void 0};l.exports=T},72732:(l,T,e)=>{/** 5633 * @author Richard Davey <[email protected]> 5634 * @copyright 2013-2023 Photon Storm Ltd. 5635 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5636 */var d=e(50811),g=function(r,a,h,n,o,f,u){for(var v=d(r,a,h,n,null,u),m=0;m<v.length;m++)v[m].setCollisionCallback(o,f)};l.exports=g},34397:(l,T,e)=>{/** 5637 * @author Richard Davey <[email protected]> 5638 * @copyright 2013-2023 Photon Storm Ltd. 5639 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5640 */var d=e(50811),g=e(18592),r=function(a,h,n,o,f){var u=d(a,h,n,o,null,f),v=u.map(function(p){return p.index});g(v);for(var m=0;m<u.length;m++)u[m].index=v[m]};l.exports=r},53945:(l,T,e)=>{/** 5641 * @author Richard Davey <[email protected]> 5642 * @copyright 2013-2023 Photon Storm Ltd. 5643 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5644 */var d=e(82127),g=e(84314),r=function(a,h){var n=a.tilemapLayer.tilemap,o=a.tilemapLayer,f=Math.floor(n.tileWidth*o.scaleX),u=Math.floor(n.tileHeight*o.scaleY),v=g(h.worldView.x-o.x,f,0,!0)-o.cullPaddingX,m=d(h.worldView.right-o.x,f,0,!0)+o.cullPaddingX,p=g(h.worldView.y-o.y,u/2,0,!0)-o.cullPaddingY,x=d(h.worldView.bottom-o.y,u/2,0,!0)+o.cullPaddingY;return{left:v,right:m,top:p,bottom:x}};l.exports=r},19242:(l,T,e)=>{/** 5645 * @author Richard Davey <[email protected]> 5646 * @copyright 2013-2023 Photon Storm Ltd. 5647 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5648 */var d=e(53945),g=e(6987),r=function(a,h,n,o){n===void 0&&(n=[]),o===void 0&&(o=0),n.length=0;var f=a.tilemapLayer,u=d(a,h);
5648return f.skipCull&&f.scrollFactorX===1&&f.scrollFactorY===1&&(u.left=0,u.right=a.width,u.top=0,u.bottom=a.height),g(a,u,o,n),n};l.exports=r},33388:(l,T,e)=>{/** 5649 * @author Richard Davey <[email protected]> 5650 * @copyright 2013-2023 Photon Storm Ltd. 5651 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5652 */var d=e(93736),g=function(r,a,h,n,o){h||(h=new d);var f=o.baseTileWidth,u=o.baseTileHeight,v=o.tilemapLayer,m=0,p=0;v&&(n||(n=v.scene.cameras.main),m=v.x+n.scrollX*(1-v.scrollFactorX),f*=v.scaleX,p=v.y+n.scrollY*(1-v.scrollFactorY),u*=v.scaleY);var x=m+r*f+a%2*(f/2),y=p+a*(u/2);return h.set(x,y)};l.exports=g},84132:l=>{/** 5653 * @author Richard Davey <[email protected]> 5654 * @copyright 2013-2023 Photon Storm Ltd. 5655 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5656 */var T=function(e,d,g){var r=g.baseTileHeight,a=g.tilemapLayer,h=0;return a&&(d===void 0&&(d=a.scene.cameras.main),h=a.y+d.scrollY*(1-a.scrollFactorY),r*=a.scaleY),h+e*(r/2)+r};l.exports=T},90562:(l,T,e)=>{/** 5657 * @author Richard Davey <[email protected]> 5658 * @copyright 2013-2023 Photon Storm Ltd. 5659 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5660 */var d=e(93736),g=function(r,a,h,n,o,f){n||(n=new d);var u=f.baseTileWidth,v=f.baseTileHeight,m=f.tilemapLayer;m&&(o||(o=m.scene.cameras.main),a=a-(m.y+o.scrollY*(1-m.scrollFactorY)),v*=m.scaleY,r=r-(m.x+o.scrollX*(1-m.scrollFactorX)),u*=m.scaleX);var p=h?Math.floor(a/(v/2)):a/(v/2),x=h?Math.floor((r+p%2*.5*u)/u):(r+p%2*.5*u)/u;return n.set(x,p)};l.exports=g},3689:l=>{/** 5661 * @author Richard Davey <[email protected]> 5662 * @copyright 2013-2023 Photon Storm Ltd. 5663 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5664 */var T=function(e,d,g,r){var a=r.baseTileHeight,h=r.tilemapLayer;return h&&(g||(g=h.scene.cameras.main),e=e-(h.y+g.scrollY*(1-h.scrollFactorY)),a*=h.scaleY),d?Math.floor(e/(a/2)):e/(a/2)};l.exports=T},55217:(l,T,e)=>{/** 5665 * @author Richard Davey <[email protected]> 5666 * @copyright 2013-2023 Photon Storm Ltd. 5667 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5668 */var d=e(50811),g=function(r,a,h,n,o,f,u){for(var v=d(h,n,o,f,null,u),m=0;m<v.length;m++)v[m]&&(v[m].index===r?v[m].index=a:v[m].index===a&&(v[m].index=r))};l.exports=g},44150:l=>{/** 5669 * @author Richard Davey <[email protected]> 5670 * @copyright 2013-2023 Photon Storm Ltd. 5671 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5672 */var T=function(e,d,g){var r=g.baseTileWidth,a=g.tilemapLayer,h=0;return a&&(d||(d=a.scene.cameras.main),h=a.x+d.scrollX*(1-a.scrollFactorX),r*=a.scaleX),h+e*r};l.exports=T},46836:(l,T,e)=>{/** 5673 * @author Richard Davey <[email protected]> 5674 * @copyright 2013-2023 Photon Storm Ltd. 5675 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5676 */var d=e(44150),g=e(42477),r=e(93736),a=function(h,n,o,f,u){return o||(o=new r(0,0)),o.x=d(h,f,u),o.y=g(n,f,u),o};l.exports=a},42477:l=>{/** 5677 * @author Richard Davey <[email protected]> 5678 * @copyright 2013-2023 Photon Storm Ltd. 5679 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5680 */var T=function(e,d,g){var r=g.baseTileHeight,a=g.tilemapLayer,h=0;return a&&(d||(d=a.scene.cameras.main),h=a.y+d.scrollY*(1-a.scrollFactorY),r*=a.scaleY),h+e*r};l.exports=T},39677:(l,T,e)=>{/** 5681 * @author Richard Davey <[email protected]> 5682 * @copyright 2013-2023 Photon Storm Ltd. 5683 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5684 */var d=e(50811),g=function(r,a,h,n,o,f){if(o){var u,v=d(r,a,h,n,null,f),m=0;for(u=0;u<o.length;u++)m+=o[u].weight;if(!(m<=0))for(u=0;u<v.length;u++){for(var p=Math.random()*m,x=0,y=-1,P=0;P<o.length;P++)if(x+=o[P].weight,p<=x){var b=o[P].index;y=Array.isArray(b)?b[Math.floor(Math.random()*b.length)]:b;break}v[u].index=y}}};l.exports=g},806:(l,T,e)=>{/** 5685 * @author Richard Davey <[email protected]> 5686 * @copyright 2013-2023 Photon Storm Ltd. 5687 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5688 */var d=e(45676),g=e(93736),r=new g,a=function(h,n,o,f){return d(h,0,n,r,o,f),r.x};l.exports=a},45676:(l,T,e)=>{/** 5689 * @author Richard Davey <[email protected]> 5690 * @copyright 2013-2023 Photon Storm Ltd. 5691 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5692 */var d=e(93736),g=function(r,a,h,n,o,f){h===void 0&&(h=!0),n||(n=new d);var u=f.baseTileWidth,v=f.baseTileHeight,m=f.tilemapLayer;m&&(o||(o=m.scene.cameras.main),r=r-(m.x+o.scrollX*(1-m.scrollFactorX)),a=a-(m.y+o.scrollY*(1-m.scrollFactorY)),u*=m.scaleX,v*=m.scaleY);var p=r/u,x=a/v;return h&&(p=Math.floor(p),x=Math.floor(x)),n.set(p,x)};l.exports=g},70520:(l,T,e)=>{/** 5693 * @author Richard Davey <[email protected]> 5694 * @copyright 2013-2023 Photon Storm Ltd. 5695 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5696 */var d=e(45676),g=e(93736),r=new g,a=function(h,n,o,f){return d(0,h,n,r,o,f),r.y};l.exports=a},5047:(l,T,e)=>{/** 5697 * @author Richard Davey <[email protected]> 5698 * @copyright 2013-2023 Photon Storm Ltd. 5699 * @license {@link https://opensource.org/licenses/MIT|MIT License}
5700 */l.exports={CalculateFacesAt:e(92839),CalculateFacesWithin:e(60386),CheckIsoBounds:e(13125),Copy:e(17347),CreateFromTiles:e(93604),CullBounds:e(71586),CullTiles:e(381),Fill:e(97734),FilterTiles:e(63555),FindByIndex:e(37982),FindTile:e(48297),ForEachTile:e(80916),GetCullTilesFunction:e(31493),GetTileAt:e(15494),GetTileAtWorldXY:e(24640),GetTileCorners:e(48495),GetTileCornersFunction:e(7160),GetTilesWithin:e(50811),GetTilesWithinShape:e(31674),GetTilesWithinWorldXY:e(44662),GetTileToWorldXFunction:e(16884),GetTileToWorldXYFunction:e(68182),GetTileToWorldYFunction:e(3752),GetWorldToTileXFunction:e(29296),GetWorldToTileXYFunction:e(32688),GetWorldToTileYFunction:e(74326),HasTileAt:e(46598),HasTileAtWorldXY:e(28654),HexagonalCullBounds:e(6358),HexagonalCullTiles:e(37524),HexagonalGetTileCorners:e(63634),HexagonalTileToWorldXY:e(21715),HexagonalWorldToTileXY:e(11516),IsInLayerBounds:e(62839),IsometricCullTiles:e(20887),IsometricTileToWorldXY:e(21808),IsometricWorldToTileXY:e(18750),PutTileAt:e(29003),PutTileAtWorldXY:e(48565),PutTilesAt:e(56547),Randomize:e(91180),RemoveTileAt:e(929),RemoveTileAtWorldXY:e(17384),RenderDebug:e(93763),ReplaceByIndex:e(51202),RunCull:e(6987),SetCollision:e(51710),SetCollisionBetween:e(15216),SetCollisionByExclusion:e(33158),SetCollisionByProperty:e(4180),SetCollisionFromCollisionGroup:e(18625),SetLayerCollisionIndex:e(91181),SetTileCollision:e(68234),SetTileIndexCallback:e(11628),SetTileLocationCallback:e(72732),Shuffle:e(34397),StaggeredCullBounds:e(53945),StaggeredCullTiles:e(19242),StaggeredTileToWorldXY:e(33388),StaggeredTileToWorldY:e(84132),StaggeredWorldToTileXY:e(90562),StaggeredWorldToTileY:e(3689),SwapByIndex:e(55217),TileToWorldX:e(44150),TileToWorldXY:e(46836),TileToWorldY:e(42477),WeightedRandomize:e(39677),WorldToTileX:e(806),WorldToTileXY:e(45676),WorldToTileY:e(70520)}},12920:l=>{/** 5701 * @author Richard Davey <[email protected]> 5702 * @copyright 2013-2023 Photon Storm Ltd. 5703 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5704 */l.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}},84758:(l,T,e)=>{/** 5705 * @author Richard Davey <[email protected]> 5706 * @copyright 2013-2023 Photon Storm Ltd. 5707 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5708 */var d={ORIENTATION:e(12920)};l.exports=d},52678:(l,T,e)=>{/** 5709 * @author Richard Davey <[email protected]> 5710 * @copyright 2013-2023 Photon Storm Ltd. 5711 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5712 */var d=e(98611),g=e(84758),r={Components:e(5047),Parsers:e(34124),Formats:e(93560),ImageCollection:e(97042),ParseToTilemap:e(15043),Tile:e(29633),Tilemap:e(89797),TilemapCreator:e(4843),TilemapFactory:e(37940),Tileset:e(47975),TilemapLayer:e(87177),Orientation:e(12920),LayerData:e(94990),MapData:e(16586),ObjectLayer:e(15256)};r=d(!1,r,g.ORIENTATION),l.exports=r},94990:(l,T,e)=>{/** 5713 * @author Richard Davey <[email protected]> 5714 * @copyright 2013-2023 Photon Storm Ltd. 5715 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5716 */var d=e(56694),g=e(12920),r=e(72632),a=new d({initialize:function(n){n===void 0&&(n={}),this.name=r(n,"name","layer"),this.x=r(n,"x",0),this.y=r(n,"y",0),this.width=r(n,"width",0),this.height=r(n,"height",0),this.tileWidth=r(n,"tileWidth",0),this.tileHeight=r(n,"tileHeight",0),this.baseTileWidth=r(n,"baseTileWidth",this.tileWidth),this.baseTileHeight=r(n,"baseTileHeight",this.tileHeight),this.orientation=r(n,"orientation",g.ORTHOGONAL),this.widthInPixels=r(n,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=r(n,"heightInPixels",this.height*this.baseTileHeight),this.alpha=r(n,"alpha",1),this.visible=r(n,"visible",!0),this.properties=r(n,"properties",[]),this.indexes=r(n,"indexes",[]),this.collideIndexes=r(n,"collideIndexes",[]),this.callbacks=r(n,"callbacks",[]),this.bodies=r(n,"bodies",[]),this.data=r(n,"data",[]),this.tilemapLayer=r(n,"tilemapLayer",null),this.hexSideLength=r(n,"hexSideLength",0),this.staggerAxis=r(n,"staggerAxis","y"),this.staggerIndex=r(n,"staggerIndex","odd")}});l.exports=a},16586:(l,T,e)=>{/** 5717 * @author Richard Davey <[email protected]> 5718 * @copyright 2013-2023 Photon Storm Ltd. 5719 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5720 */var d=e(56694),g=e(12920),r=e(72632),a=new d({initialize:function(n){n===void 0&&(n={}),this.name=r(n,"name","map"),this.width=r(n,"width",0),this.height=r(n,"height",0),this.infinite=r(n,"infinite",!1),this.tileWidth=r(n,"tileWidth",0),this.tileHeight=r(n,"tileHeight",0),this.widthInPixels=r(n,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=r(n,"heightInPixels",this.height*this.tileHeight),this.format=r(n,"format",null),this.orientation=r(n,"orientation",g.ORTHOGONAL),this.renderOrder=r(n,"renderOrder","right-down"),this.version=r(n,"version","1"),this.properties=r(n,"properties",{}),this.layers=r(n,"layers",[]),this.images=r(n,"images",[]),this.objects=r(n,"objects",[]),Array.isArray(this.objects)||(this.objects=[]),this.collision=r(n,"collision",{}),this.tilesets=r(n,"tilesets",[]),this.imageCollections=r(n,"imageCollections",[]),this.tiles=r(n,"tiles",[]),this.hexSideLength=r(n,"hexSideLength",0),this.staggerAxis=r(n,"staggerAxis","y"),this.staggerIndex=r(n,"staggerIndex","odd")}});l.exports=a},15256:(l,T,e)=>{/** 5721 * @author Richard Davey <[email protected]> 5722 * @copyright 2013-2023 Photon Storm Ltd. 5723 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5724 */var d=e(56694),g=e(72632),r=new d({initialize:function(h){h===void 0&&(h={}),this.name=g(h,"name","object layer"),this.opacity=g(h,"opacity",1),this.properties=g(h,"properties",{}),this.propertyTypes=g(h,"propertytypes",{}),this.type=g(h,"type","objectgroup"),this.visible=g(h,"visible",!0),this.objects=g(h,"objects",[]),Array.isArray(this.objects)||(this.objects=[])}});l.exports=r},21394:(l,T,e)=>{/** 5725 * @author Richard Davey <[email protected]> 5726 * @copyright 2013-2023 Photon Storm Ltd. 5727 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5728 */var d=e(12920),g=function(r){return r=r.toLowerCase(),r==="isometric"?d.ISOMETRIC:r==="staggered"?d.STAGGERED:r==="hexagonal"?d.HEXAGONAL:d.ORTHOGONAL};l.exports=g},90715:(l,T,e)=>{/** 5729 * @author Richard Davey <[email protected]> 5730 * @copyright 2013-2023 Photon Storm Ltd. 5731 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5732 */var d=e(93560),g=e(84346),r=e(96097),a=e(2378),h=e(44909),n=function(o,f,u,v,m,p){var x;switch(f){case d.ARRAY_2D:x=g(o,u,v,m,p);break;case d.CSV:x=r(o,u,v,m,p);break;case d.TILED_JSON:x=a(o,u,p);break;case d.WELTMEISTER:x=h(o,u,p);break;default:console.warn("Unrecognized tilemap data format: "+f),x=null}return x};l.exports=n},84346:(l,T,e)=>{/** 5733 * @author Richard Davey <[email protected]> 5734 * @copyright 2013-2023 Photon Storm Ltd. 5735 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5736 */var d=e(93560),g=e(94990),r=e(16586),a=e(29633),h=function(n,o,f,u,v){for(var m=new g({tileWidth:f,tileHeight:u}),p=new r({name:n,tileWidth:f,tileHeight:u,format:d.ARRAY_2D,layers:[m]}),x=[],y=o.length,P=0,b=0;b<o.length;b++){x[b]=[];for(var E=o[b],M=0;M<E.length;M++){var w=parseInt(E[M],10);isNaN(w)||w===-1?x[b][M]=v?null:new a(m,-1,M,b,f,u):x[b][M]=new a(m,w,M,b,f,u)}P===0&&(P=E.length)}return p.width=m.width=P,p.height=m.height=y,p.widthInPixels=m.widthInPixels=P*f,p.heightInPixels=m.heightInPixels=y*u,m.data=x,p};l.exports=h},96097:(l,T,e)=>{/** 5737 * @author Richard Davey <[email protected]> 5738 * @copyright 2013-2023 Photon Storm Ltd. 5739 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5740 */var d=e(93560),g=e(84346),r=function(a,h,n,o,f){var u=h.trim().split(` 5741`).map(function(m){return m.split(",")}),v=g(a,u,n,o,f);return v.format=d.CSV,v};l.exports=r},30951:(l,T,e)=>{/** 5742 * @author Richard Davey <[email protected]> 5743 * @copyright 2013-2023 Photon Storm Ltd. 5744 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5745 */var d=e(94990),g=e(29633),r=function(a,h){for(var n=[],o=0;o<a.layer.length;
5745o++){for(var f=a.layer[o],u=new d({name:f.name,width:f.width,height:f.height,tileWidth:f.tilesize,tileHeight:f.tilesize,visible:f.visible===1}),v=[],m=[],p=0;p<f.data.length;p++){for(var x=0;x<f.data[p].length;x++){var y=f.data[p][x]-1,P;y>-1?P=new g(u,y,x,p,f.tilesize,f.tilesize):P=h?null:new g(u,-1,x,p,f.tilesize,f.tilesize),v.push(P)}m.push(v),v=[]}u.data=m,n.push(u)}return n};l.exports=r},47488:(l,T,e)=>{/** 5746 * @author Richard Davey <[email protected]> 5747 * @copyright 2013-2023 Photon Storm Ltd. 5748 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5749 */var d=e(47975),g=function(r){for(var a=[],h=[],n=0;n<r.layer.length;n++){var o=r.layer[n],f=o.tilesetName;f!==""&&h.indexOf(f)===-1&&(h.push(f),a.push(new d(f,0,o.tilesize,o.tilesize,0,0)))}return a};l.exports=g},44909:(l,T,e)=>{/** 5750 * @author Richard Davey <[email protected]> 5751 * @copyright 2013-2023 Photon Storm Ltd. 5752 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5753 */var d=e(93560),g=e(16586),r=e(30951),a=e(47488),h=function(n,o,f){if(o.layer.length===0)return console.warn("No layers found in the Weltmeister map: "+n),null;for(var u=0,v=0,m=0;m<o.layer.length;m++)o.layer[m].width>u&&(u=o.layer[m].width),o.layer[m].height>v&&(v=o.layer[m].height);var p=new g({width:u,height:v,name:n,tileWidth:o.layer[0].tilesize,tileHeight:o.layer[0].tilesize,format:d.WELTMEISTER});return p.layers=r(o,f),p.tilesets=a(o),p};l.exports=h},24507:(l,T,e)=>{/** 5754 * @author Richard Davey <[email protected]> 5755 * @copyright 2013-2023 Photon Storm Ltd. 5756 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5757 */l.exports={ParseTileLayers:e(30951),ParseTilesets:e(47488),ParseWeltmeister:e(44909)}},34124:(l,T,e)=>{/** 5758 * @author Richard Davey <[email protected]> 5759 * @copyright 2013-2023 Photon Storm Ltd. 5760 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5761 */l.exports={FromOrientationString:e(21394),Parse:e(90715),Parse2DArray:e(84346),ParseCSV:e(96097),Impact:e(24507),Tiled:e(50044)}},48646:(l,T,e)=>{/** 5762 * @author Richard Davey <[email protected]> 5763 * @copyright 2013-2023 Photon Storm Ltd. 5764 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5765 */var d=e(98611),g=function(r){for(var a,h,n,o,f,u=0;u<r.layers.length;u++){a=r.layers[u],o=null;for(var v=0;v<a.data.length;v++){f=a.data[v];for(var m=0;m<f.length;m++)h=f[m],!(h===null||h.index<0)&&(n=r.tiles[h.index][2],o=r.tilesets[n],h.width=o.tileWidth,h.height=o.tileHeight,o.tileProperties&&o.tileProperties[h.index-o.firstgid]&&(h.properties=d(h.properties,o.tileProperties[h.index-o.firstgid])))}}};l.exports=g},43908:l=>{/** 5766 * @author Richard Davey <[email protected]> 5767 * @copyright 2013-2023 Photon Storm Ltd. 5768 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5769 */var T=function(e){for(var d=window.atob(e),g=d.length,r=new Array(g/4),a=0;a<g;a+=4)r[a/4]=(d.charCodeAt(a)|d.charCodeAt(a+1)<<8|d.charCodeAt(a+2)<<16|d.charCodeAt(a+3)<<24)>>>0;return r};l.exports=T},14556:(l,T,e)=>{/** 5770 * @author Richard Davey <[email protected]> 5771 * @copyright 2013-2023 Photon Storm Ltd. 5772 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5773 */var d=e(47975),g=function(r){var a,h,n=[];for(a=0;a<r.imageCollections.length;a++)for(var o=r.imageCollections[a],f=o.images,u=0;u<f.length;u++){var v=f[u];h=new d(v.image,v.gid,o.imageWidth,o.imageHeight,0,0),h.updateTileData(o.imageWidth,o.imageHeight),r.tilesets.push(h)}for(a=0;a<r.tilesets.length;a++){h=r.tilesets[a];for(var m=h.tileMargin,p=h.tileMargin,x=0,y=0,P=0,b=h.firstgid;b<h.firstgid+h.total&&(n[b]=[m,p,a],m+=h.tileWidth+h.tileSpacing,x++,!(x===h.total||(y++,y===h.columns&&(m=h.tileMargin,p+=h.tileHeight+h.tileSpacing,y=0,P++,P===h.rows))));b++);}return n};l.exports=g},92044:(l,T,e)=>{/** 5774 * @author Seth Berrier <[email protected]> 5775 * @copyright 2013-2023 Photon Storm Ltd. 5776 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5777 */var d=e(72632),g=function(r,a,h){if(!a)return{i:0,layers:r.layers,name:"",opacity:1,visible:!0,x:0,y:0};var n=a.x+d(a,"startx",0)*r.tilewidth+d(a,"offsetx",0),o=a.y+d(a,"starty",0)*r.tileheight+d(a,"offsety",0);return{i:0,layers:a.layers,name:h.name+a.name+"/",opacity:h.opacity*a.opacity,visible:h.visible&&a.visible,x:h.x+n,y:h.y+o}};l.exports=g},8847:l=>{/** 5778 * @author Richard Davey <[email protected]> 5779 * @copyright 2013-2023 Photon Storm Ltd. 5780 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5781 */var T=2147483648,e=1073741824,d=536870912,g=function(r){var a=!!(r&T),h=!!(r&e),n=!!(r&d);r=r&~(T|e|d);var o=0,f=!1;return a&&h&&n?(o=Math.PI/2,f=!0):a&&h&&!n?(o=Math.PI,f=!1):a&&!h&&n?(o=Math.PI/2,f=!1):a&&!h&&!n?(o=0,f=!0):!a&&h&&n?(o=3*Math.PI/2,f=!1):!a&&h&&!n?(o=Math.PI,f=!0):!a&&!h&&n?(o=3*Math.PI/2,f=!0):!a&&!h&&!n&&(o=0,f=!1),{gid:r,flippedHorizontal:a,flippedVertical:h,flippedAntiDiagonal:n,rotation:o,flipped:f}};l.exports=g},78339:(l,T,e)=>{/** 5782 * @author Richard Davey <[email protected]> 5783 * @copyright 2013-2023 Photon Storm Ltd. 5784 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5785 */var d=e(72632),g=e(92044),r=function(a){for(var h=[],n=[],o=g(a);o.i<o.layers.length||n.length>0;){if(o.i>=o.layers.length){if(n.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}o=n.pop();continue}var f=o.layers[o.i];if(o.i++,f.type!=="imagelayer"){if(f.type==="group"){var u=g(a,f,o);n.push(o),o=u}continue}var v=d(f,"offsetx",0)+d(f,"startx",0),m=d(f,"offsety",0)+d(f,"starty",0);h.push({name:o.name+f.name,image:f.image,x:o.x+v+f.x,y:o.y+m+f.y,alpha:o.opacity*f.opacity,visible:o.visible&&f.visible,properties:d(f,"properties",{})})}return h};l.exports=r},2378:(l,T,e)=>{/** 5786 * @author Richard Davey <[email protected]> 5787 * @copyright 2013-2023 Photon Storm Ltd. 5788 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5789 */var d=e(48646),g=e(14556),r=e(12920),a=e(28699),h=e(93560),n=e(21394),o=e(16586),f=e(78339),u=e(61136),v=e(95925),m=e(93392),p=function(x,y,P){var b=a(y),E=new o({width:b.
5789width,height:b.height,name:x,tileWidth:b.tilewidth,tileHeight:b.tileheight,orientation:n(b.orientation),format:h.TILED_JSON,version:b.version,properties:b.properties,renderOrder:b.renderorder,infinite:b.infinite});E.orientation===r.HEXAGONAL&&(E.hexSideLength=b.hexsidelength,E.staggerAxis=b.staggeraxis,E.staggerIndex=b.staggerindex),E.layers=v(b,P),E.images=f(b);var M=m(b);return E.tilesets=M.tilesets,E.imageCollections=M.imageCollections,E.objects=u(b),E.tiles=g(E),d(E),E};l.exports=p},4281:(l,T,e)=>{/** 5790 * @author Richard Davey <[email protected]> 5791 * @copyright 2013-2023 Photon Storm Ltd. 5792 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5793 */var d=e(28820),g=e(8847),r=function(n){return{x:n.x,y:n.y}},a=["id","name","type","rotation","properties","visible","x","y","width","height"],h=function(n,o,f){o===void 0&&(o=0),f===void 0&&(f=0);var u=d(n,a);if(u.x+=o,u.y+=f,n.gid){var v=g(n.gid);u.gid=v.gid,u.flippedHorizontal=v.flippedHorizontal,u.flippedVertical=v.flippedVertical,u.flippedAntiDiagonal=v.flippedAntiDiagonal}else n.polyline?u.polyline=n.polyline.map(r):n.polygon?u.polygon=n.polygon.map(r):n.ellipse?u.ellipse=n.ellipse:n.text?u.text=n.text:n.point?u.point=!0:u.rectangle=!0;return u};l.exports=h},61136:(l,T,e)=>{/** 5794 * @author Richard Davey <[email protected]> 5795 * @copyright 2013-2023 Photon Storm Ltd. 5796 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5797 */var d=e(72632),g=e(4281),r=e(15256),a=e(92044),h=function(n){for(var o=[],f=[],u=a(n);u.i<u.layers.length||f.length>0;){if(u.i>=u.layers.length){if(f.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}u=f.pop();continue}var v=u.layers[u.i];if(u.i++,v.opacity*=u.opacity,v.visible=u.visible&&v.visible,v.type!=="objectgroup"){if(v.type==="group"){var m=a(n,v,u);f.push(u),u=m}continue}v.name=u.name+v.name;for(var p=u.x+d(v,"startx",0)+d(v,"offsetx",0),x=u.y+d(v,"starty",0)+d(v,"offsety",0),y=[],P=0;P<v.objects.length;P++){var b=g(v.objects[P],p,x);y.push(b)}var E=new r(v);E.objects=y,o.push(E)}return o};l.exports=h},95925:(l,T,e)=>{/** 5798 * @author Richard Davey <[email protected]> 5799 * @copyright 2013-2023 Photon Storm Ltd. 5800 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5801 */var d=e(43908),g=e(12920),r=e(92044),a=e(21394),h=e(72632),n=e(94990),o=e(8847),f=e(29633),u=function(v,m){for(var p=h(v,"infinite",!1),x=[],y=[],P=r(v);P.i<P.layers.length||y.length>0;){if(P.i>=P.layers.length){if(y.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}P=y.pop();continue}var b=P.layers[P.i];if(P.i++,b.type!=="tilelayer"){if(b.type==="group"){var E=r(v,b,P);y.push(P),P=E}continue}if(b.compression){console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+b.name+"'");continue}else if(b.encoding&&b.encoding==="base64"){if(b.chunks)for(var M=0;M<b.chunks.length;M++)b.chunks[M].data=d(b.chunks[M].data);b.data&&(b.data=d(b.data)),delete b.encoding}var w,A,R,L,O=[],I=0;if(p){var D=h(b,"startx",0)+b.x,B=h(b,"starty",0)+b.y;w=new n({name:P.name+b.name,x:P.x+h(b,"offsetx",0)+D*v.tilewidth,y:P.y+h(b,"offsety",0)+B*v.tileheight,width:b.width,height:b.height,tileWidth:v.tilewidth,tileHeight:v.tileheight,alpha:P.opacity*b.opacity,visible:P.visible&&b.visible,properties:h(b,"properties",[]),orientation:a(v.orientation)}),w.orientation===g.HEXAGONAL&&(w.hexSideLength=v.hexsidelength,w.staggerAxis=v.staggeraxis,w.staggerIndex=v.staggerindex);for(var z=0;z<b.height;z++){O[z]=[null];for(var X=0;X<b.width;X++)O[z][X]=null}for(z=0,K=b.chunks.length;z<K;z++)for(var W=b.chunks[z],j=W.x-D,N=W.y-B,Y=0,F=0,G=W.data.length;F<G;F++){var k=I+j,V=Y+N;A=o(W.data[F]),A.gid>0?(R=new f(w,A.gid,k,V,v.tilewidth,v.tileheight),R.rotation=A.rotation,R.flipX=A.flipped,O[V][k]=R):(L=m?null:new f(w,-1,k,V,v.tilewidth,v.tileheight),O[V][k]=L),I++,I===W.width&&(Y++,I=0)}}else{w=new n({name:P.name+b.name,x:P.x+h(b,"offsetx",0)+b.x,y:P.y+h(b,"offsety",0)+b.y,width:b.width,height:b.height,tileWidth:v.tilewidth,tileHeight:v.tileheight,alpha:P.opacity*b.opacity,visible:P.visible&&b.visible,properties:h(b,"properties",[]),orientation:a(v.orientation)}),w.orientation===g.HEXAGONAL&&(w.hexSideLength=v.hexsidelength,w.staggerAxis=v.staggeraxis,w.staggerIndex=v.staggerindex);for(var U=[],$=0,K=b.data.length;$<K;$++)A=o(b.data[$]),A.gid>0?(R=new f(w,A.gid,I,O.length,v.tilewidth,v.tileheight),R.rotation=A.rotation,R.flipX=A.flipped,U.push(R)):(L=m?null:new f(w,-1,I,O.length,v.tilewidth,v.tileheight),U.push(L)),I++,I===b.width&&(O.push(U),I=0,U=[])}w.data=O,x.push(w)}return x};l.exports=u},93392:(l,T,e)=>{/** 5802 * @author Richard Davey <[email protected]> 5803 * @copyright 2013-2023 Photon Storm Ltd. 5804 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5805 */var d=e(47975),g=e(97042),r=e(4281),a=e(39642),h=function(n){for(var o=[],f=[],u=null,v,m=0;m<n.tilesets.length;m++){var p=n.tilesets[m];if(p.source)console.warn("External tilesets unsupported. Use Embed Tileset and re-export");else if(p.image){var x=new d(p.name,p.firstgid,p.tilewidth,p.tileheight,p.margin,p.spacing,void 0,void 0,p.tileoffset);if(n.version>1){var y=void 0,P=void 0;if(Array.isArray(p.tiles)){y=y||{},P=P||{};for(var b=0;b<p.tiles.length;b++){var E=p.tiles[b];if(E.properties){var M={};
5805E.properties.forEach(function(z){M[z.name]=z.value}),P[E.id]=M}if(E.objectgroup&&((y[E.id]||(y[E.id]={})).objectgroup=E.objectgroup,E.objectgroup.objects)){var w=E.objectgroup.objects.map(function(z){return r(z)});y[E.id].objectgroup.objects=w}E.animation&&((y[E.id]||(y[E.id]={})).animation=E.animation),E.type&&((y[E.id]||(y[E.id]={})).type=E.type)}}Array.isArray(p.wangsets)&&(y=y||{},P=P||{},a(p.wangsets,y)),y&&(x.tileData=y,x.tileProperties=P)}else if(p.tileproperties&&(x.tileProperties=p.tileproperties),p.tiles){x.tileData=p.tiles;for(v in x.tileData){var A=x.tileData[v].objectgroup;if(A&&A.objects){var R=A.objects.map(function(z){return r(z)});x.tileData[v].objectgroup.objects=R}}}x.updateTileData(p.imagewidth,p.imageheight),o.push(x)}else{var L=new g(p.name,p.firstgid,p.tilewidth,p.tileheight,p.margin,p.spacing,p.properties),O=0;for(b=0;b<p.tiles.length;b++){E=p.tiles[b];var I=E.image,D=parseInt(E.id,10),B=p.firstgid+D;L.addImage(B,I),O=Math.max(D,O)}L.maxId=O,f.push(L)}u&&(u.lastgid=p.firstgid-1),u=p}return{tilesets:o,imageCollections:f}};l.exports=h},39642:l=>{/** 5806 * @author Richard Davey <[email protected]> 5807 * @copyright 2013-2023 Photon Storm Ltd. 5808 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5809 */var T=function(e,d){for(var g=0;g<e.length;g++){var r=e[g],a=g;if(r.name&&r.name!==""&&(a=r.name),Array.isArray(r.wangtiles)&&r.wangtiles.length>0){var h={},n={},o,f,u;if(Array.isArray(r.edgecolors))for(o=0;o<r.edgecolors.length;o++)u=1+o,f=r.edgecolors[o],f.name!==""&&(h[u]=f.name);if(Array.isArray(r.cornercolors))for(o=0;o<r.cornercolors.length;o++)u=1+o,f=r.cornercolors[o],f.name!==""&&(n[u]=f.name);if(Array.isArray(r.colors))for(o=0;o<r.colors.length;o++)f=r.colors[o],u=1+o,f.name!==""&&(h[u]=n[u]=f.name);for(var v=[h,n,h,n,h,n,h,n],m=0;m<r.wangtiles.length;m++){var p=r.wangtiles[m],x=d[p.tileid]||(d[p.tileid]={});x=x.wangid||(x.wangid={});for(var y=[],P=0;P<Math.min(v.length,p.wangid.length);P++){if(f=p.wangid[P],f===0){y.push(void 0);continue}var b=v[P][f];if(b!==void 0){y.push(b);continue}y.push(f)}x[a]=y}}}};l.exports=T},50044:(l,T,e)=>{/** 5810 * @author Richard Davey <[email protected]> 5811 * @copyright 2013-2023 Photon Storm Ltd. 5812 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5813 */l.exports={AssignTileProperties:e(48646),Base64Decode:e(43908),BuildTilesetIndex:e(14556),CreateGroupLayer:e(92044),ParseGID:e(8847),ParseImageLayers:e(78339),ParseJSONTiled:e(2378),ParseObject:e(4281),ParseObjectLayers:e(61136),ParseTileLayers:e(95925),ParseTilesets:e(93392)}},73779:(l,T,e)=>{/** 5814 * @author Richard Davey <[email protected]> 5815 * @copyright 2013-2023 Photon Storm Ltd. 5816 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5817 */var d=e(56694),g=e(91963),r=e(7599),a=e(57911),h=e(66458),n=new d({initialize:function(f){this.scene=f,this.systems=f.sys,this.now=0,this.startTime=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],f.sys.events.once(r.BOOT,this.boot,this),f.sys.events.on(r.START,this.start,this)},boot:function(){this.now=this.systems.game.loop.time,this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){this.startTime=this.systems.game.loop.time;var o=this.systems.events;o.on(r.PRE_UPDATE,this.preUpdate,this),o.on(r.UPDATE,this.update,this),o.once(r.SHUTDOWN,this.shutdown,this)},addEvent:function(o){var f;return o instanceof a?(f=o,this.removeEvent(f),f.elapsed=f.startAt,f.hasDispatched=!1,f.repeatCount=f.repeat===-1||f.loop?999999999999:f.repeat):f=new a(o),this._pendingInsertion.push(f),f},delayedCall:function(o,f,u,v){return this.addEvent({delay:o,callback:f,args:u,callbackScope:v})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeEvent:function(o){Array.isArray(o)||(o=[o]);for(var f=0;f<o.length;f++){var u=o[f];h(this._pendingRemoval,u),h(this._pendingInsertion,u),h(this._active,u)}return this},removeAllEvents:function(){return this._pendingRemoval=this._pendingRemoval.concat(this._active),this}
5817,preUpdate:function(){var o=this._pendingRemoval.length,f=this._pendingInsertion.length;if(!(o===0&&f===0)){var u,v;for(u=0;u<o;u++){v=this._pendingRemoval[u];var m=this._active.indexOf(v);m>-1&&this._active.splice(m,1),v.destroy()}for(u=0;u<f;u++)v=this._pendingInsertion[u],this._active.push(v);this._pendingRemoval.length=0,this._pendingInsertion.length=0}},update:function(o,f){if(this.now=o,!this.paused){f*=this.timeScale;for(var u=0;u<this._active.length;u++){var v=this._active[u];if(!v.paused&&(v.elapsed+=f*v.timeScale,v.elapsed>=v.delay)){var m=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--,m>=v.delay)for(;m>=v.delay&&v.repeatCount>0;)v.callback&&v.callback.apply(v.callbackScope,v.args),m-=v.delay,v.repeatCount--;v.elapsed=m,v.hasDispatched=!1}else v.hasDispatched&&this._pendingRemoval.push(v)}}}},shutdown:function(){var o;for(o=0;o<this._pendingInsertion.length;o++)this._pendingInsertion[o].destroy();for(o=0;o<this._active.length;o++)this._active[o].destroy();for(o=0;o<this._pendingRemoval.length;o++)this._pendingRemoval[o].destroy();this._active.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;var f=this.systems.events;f.off(r.PRE_UPDATE,this.preUpdate,this),f.off(r.UPDATE,this.update,this),f.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null}});g.register("Clock",n,"time"),l.exports=n},20517:(l,T,e)=>{/** 5818 * @author Richard Davey <[email protected]> 5819 * @copyright 2013-2023 Photon Storm Ltd. 5820 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5821 */var d=e(56694),g=e(6659),r=e(61286),a=e(72632),h=e(7599),n=new d({Extends:g,initialize:function(f,u){g.call(this),this.scene=f,this.systems=f.sys,this.elapsed=0,this.paused=!0,this.complete=!1,this.totalComplete=0,this.events=[];var v=this.systems.events;v.on(h.PRE_UPDATE,this.preUpdate,this),v.on(h.UPDATE,this.update,this),v.once(h.SHUTDOWN,this.destroy,this),u&&this.add(u)},preUpdate:function(o,f){this.paused||(this.elapsed+=f)},update:function(){if(!this.paused){var o,f=this.events,u=!1,v=this.systems,m;for(o=0;o<f.length;o++){var p=f[o];if(!p.complete&&p.time<=this.elapsed){if(p.complete=!0,this.totalComplete++,p.once&&(u=!0),p.set&&p.target)for(var x in p.set)p.target[x]=p.set[x];p.tween&&v.tweens.add(p.tween),p.sound&&(typeof p.sound=="string"?v.sound.play(p.sound):v.sound.play(p.sound.key,p.sound.config)),m=p.target?p.target:this,p.event&&this.emit(p.event,m),p.run&&p.run.call(m),p.stop&&this.stop()}}if(u)for(o=0;o<f.length;o++)f[o].complete&&f[o].once&&(f.splice(o,1),o--);this.totalComplete>=f.length&&(this.complete=!0)}},play:function(o){return o===void 0&&(o=!0),this.paused=!1,this.complete=!1,this.totalComplete=0,o&&this.reset(),this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},stop:function(){return this.paused=!0,this.complete=!0,this},reset:function(){this.elapsed=0;for(var o=0;o<this.events.length;o++)this.events[o].complete=!1;return this.play(!1)},add:function(o){Array.isArray(o)||(o=[o]);var f=this.events,u=0;f.length>0&&(u=f[f.length-1].time);for(var v=0;v<o.length;v++){var m=o[v],p=a(m,"at",0),x=a(m,"in",null);x!==null&&(p=this.elapsed+x);var y=a(m,"from",null);y!==null&&(p=u+y),f.push({complete:!1,time:p,run:a(m,"run",null),event:a(m,"event",null),target:a(m,"target",null),set:a(m,"set",null),tween:a(m,"tween",null),sound:a(m,"sound",null),once:a(m,"once",!1),stop:a(m,"stop",!1)}),u=p}return this.complete=!1,this},clear:function(){return this.events=[],this.elapsed=0,this.paused=!0,this},isPlaying:function(){return!this.paused&&!this.complete},getProgress:function(){var o=Math.min(this.totalComplete,this.events.length);return o/this.events.length},destroy:function(){var o=this.systems.events;o.off(h.PRE_UPDATE,this.preUpdate,this),o.off(h.UPDATE,this.update,this),o.off(h.SHUTDOWN,this.destroy,this),this.scene=null,this.systems=null,this.events=[]}});r.register("timeline",function(o){return new n(this.scene,o)}),l.exports=n},57911:(l,T,e)=>{/** 5822 * @author Richard Davey <[email protected]> 5823 * @copyright 2013-2023 Photon Storm Ltd. 5824 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5825 */var d=e(56694),g=e(72632),r=new d({initialize:function(h){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(h)}
5825,reset:function(a){if(this.delay=g(a,"delay",0),this.repeat=g(a,"repeat",0),this.loop=g(a,"loop",!1),this.callback=g(a,"callback",void 0),this.callbackScope=g(a,"callbackScope",this),this.args=g(a,"args",[]),this.timeScale=g(a,"timeScale",1),this.startAt=g(a,"startAt",0),this.paused=g(a,"paused",!1),this.elapsed=this.startAt,this.hasDispatched=!1,this.repeatCount=this.repeat===-1||this.loop?999999999999:this.repeat,this.delay===0&&(this.repeat>0||this.loop))throw new Error("TimerEvent infinite loop created via zero delay");return this},getProgress:function(){return this.elapsed/this.delay},getOverallProgress:function(){if(this.repeat>0){var a=this.delay+this.delay*this.repeat,h=this.elapsed+this.delay*(this.repeat-this.repeatCount);return h/a}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(a){a===void 0&&(a=!1),this.elapsed=this.delay,this.hasDispatched=!a,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});l.exports=r},97121:(l,T,e)=>{/** 5826 * @author Richard Davey <[email protected]> 5827 * @copyright 2013-2023 Photon Storm Ltd. 5828 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5829 */l.exports={Clock:e(73779),Timeline:e(20517),TimerEvent:e(57911)}},64532:(l,T,e)=>{/** 5830 * @author Richard Davey <[email protected]> 5831 * @copyright 2013-2023 Photon Storm Ltd. 5832 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5833 */var d=e(66458),g=e(56694),r=e(5454),a=e(68710),h=e(91963),n=e(7599),o=e(91944),f=e(39366),u=e(68061),v=e(45641),m=e(56034),p=new g({initialize:function(y){this.scene=y,this.events=y.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(n.BOOT,this.boot,this),this.events.on(n.START,this.start,this)},boot:function(){this.events.once(n.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(n.UPDATE,this.update,this),this.events.once(n.SHUTDOWN,this.shutdown,this)},create:function(x){Array.isArray(x)||(x=[x]);for(var y=[],P=0;P<x.length;P++){var b=x[P];b instanceof f||b instanceof v?y.push(b):Array.isArray(b.tweens)?y.push(m(this,b)):y.push(u(this,b))}return y.length===1?y[0]:y},add:function(x){var y=x,P=this.tweens;return y instanceof f||y instanceof v||(Array.isArray(y.tweens)?y=m(this,y):y=u(this,y)),P.push(y.reset()),y},addMultiple:function(x){for(var y,P=[],b=this.tweens,E=0;E<x.length;E++)y=x[E],y instanceof f||y instanceof v||(Array.isArray(y.tweens)?y=m(this,y):y=u(this,y)),b.push(y.reset()),P.push(y);return P},chain:function(x){var y=m(this,x);return this.tweens.push(y.init()),y},getChainedTweens:function(x){return x.getChainedTweens()},has:function(x){return this.tweens.indexOf(x)>-1},existing:function(x){return this.has(x)||this.tweens.push(x.reset()),this},addCounter:function(x){var y=a(this,x);return this.tweens.push(y.reset()),y},stagger:function(x,y){return o(x,y)},setLagSmooth:function(x,y){return x===void 0&&(x=1/1e-8),y===void 0&&(y=0),this.maxLag=x,this.lagSkip=Math.min(y,this.maxLag),this},setFps:function(x){return x===void 0&&(x=240),this.gap=1e3/x,this.nextTime=this.time*1e3+this.gap,this},getDelta:function(x){var y=Date.now()-this.prevTime;y>this.maxLag&&(this.startTime+=y-this.lagSkip),this.prevTime+=y;var P=this.prevTime-this.startTime,b=P-this.nextTime,E=P-this.time*1e3;return b>0||x?(P/=1e3,this.time=P,this.nextTime+=b+(b>=this.gap?4:this.gap-b)):E=0,E},tick:function(){return this.step(!0),this},update:function(){this.paused||this.step(!1)},step:function(x){x===void 0&&(x=!1);var y=this.getDelta(x);if(!(y<=0)){this.processing=!0;var P,b,E=[],M=this.tweens;for(P=0;P<M.length;P++)b=M[P],b.update(y)&&E.push(b);var w=E.length;if(w&&M.length>0){for(P=0;P<w;P++){b=E[P];var A=M.indexOf(b);A>-1&&(b.isPendingRemove()||b.isDestroyed())&&(M.splice(A,1),b.destroy())}E.length=0}this.processing=!1}},remove:function(x){return this.processing?x.setPendingRemoveState():(d(this.tweens,x),x.setRemovedState()),this},reset:function(x){return this.existing(x),x.seek(),x.setActiveState(),this},makeActive:function(x){return this.existing(x),x.setActiveState(),this},each:function(x,y){var P,b=[null];for(P=1;P<arguments.length;P++)b.push(arguments[P]);return this.tweens.forEach(function(E){b[0]=E,x.apply(y,b)}),this},getTweens:function(){return this.tweens.slice()},getTweensOf:function(x){var y=[],P=this.tweens;Array.isArray(x)?x=r(x):x=[x];for(var b=x.length,E=0;E<P.length;E++)for(var M=P[E],w=0;w<b;w++)!M.isDestroyed()&&M.hasTarget(x[w])&&y.push(M);return y},getGlobalTimeScale:function(){return this.timeScale},setGlobalTimeScale:function(x){return this.timeScale=x,this},isTweening:function(x){for(var y=this.tweens,P,b=0;b<y.length;b++)if(P=y[b],P.isPlaying()&&P.hasTarget(x))return!0;return!1},killAll:function(){for(var x=this.processing?this.getTweens():this.tweens,y=0;y<x.length;y++)x[y].destroy();return this.processing||(x.length=0),this},killTweensOf:function(x){for(var y=this.getTweensOf(x),P=0;P<y.length;P++)y[P].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(n.UPDATE,this.update,this),this.events.off(n.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(n.START,this.start,this),this.scene=null,this.events=null}});h.register("TweenManager",p,"tweens"),l.exports=p},63130:l=>{/** 5834 * @author Richard Davey <[email protected]> 5835 * @copyright 2013-2023 Photon Storm Ltd. 5836 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5837 */var T=function(e,d,g){return e&&e.hasOwnProperty(d)?e[d]:g};l.exports=T},21902:(l,T,e)=>{/** 5838 * @author Richard Davey <[email protected]> 5839 * @copyright 2013-2023 Photon Storm Ltd. 5840 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5841 */var d=e(35060),g=e(40587),r=function(a,h){var n=d.Power0;
5841if(typeof a=="string")if(d.hasOwnProperty(a))n=d[a];else{var o="";if(a.indexOf(".")){o=a.substring(a.indexOf(".")+1);var f=o.toLowerCase();f==="in"?o="easeIn":f==="out"?o="easeOut":f==="inout"&&(o="easeInOut")}a=g(a.substring(0,a.indexOf(".")+1)+o),d.hasOwnProperty(a)&&(n=d[a])}else typeof a=="function"&&(n=a);if(!h)return n;var u=h.slice(0);return u.unshift(0),function(v){return u[0]=v,n.apply(this,u)}};l.exports=r},4840:(l,T,e)=>{/** 5842 * @author Richard Davey <[email protected]> 5843 * @copyright 2013-2023 Photon Storm Ltd. 5844 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5845 */var d=e(63210),g=e(88332),r=e(47614),a={bezier:d,catmull:g,catmullrom:g,linear:r},h=function(n){if(n===null)return null;var o=a.linear;return typeof n=="string"?a.hasOwnProperty(n)&&(o=a[n]):typeof n=="function"&&(o=n),o};l.exports=h},28348:l=>{/** 5846 * @author Richard Davey <[email protected]> 5847 * @copyright 2013-2023 Photon Storm Ltd. 5848 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5849 */var T=function(e,d,g){var r;if(e.hasOwnProperty(d)){var a=typeof e[d];a==="function"?r=function(h,n,o,f,u,v){return e[d](h,n,o,f,u,v)}:r=function(){return e[d]}}else typeof g=="function"?r=g:r=function(){return g};return r};l.exports=T},92407:(l,T,e)=>{/** 5850 * @author Richard Davey <[email protected]> 5851 * @copyright 2013-2023 Photon Storm Ltd. 5852 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5853 */var d=e(53709),g=function(r){var a,h=[];if(r.hasOwnProperty("props"))for(a in r.props)a.substring(0,1)!=="_"&&h.push({key:a,value:r.props[a]});else for(a in r)d.indexOf(a)===-1&&a.substring(0,1)!=="_"&&h.push({key:a,value:r[a]});return h};l.exports=g},65868:(l,T,e)=>{/** 5854 * @author Richard Davey <[email protected]> 5855 * @copyright 2013-2023 Photon Storm Ltd. 5856 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5857 */var d=e(10850),g=function(r){var a=d(r,"targets",null);return a===null||(typeof a=="function"&&(a=a.call()),Array.isArray(a)||(a=[a])),a};l.exports=g},9744:(l,T,e)=>{/** 5858 * @author Richard Davey <[email protected]> 5859 * @copyright 2013-2023 Photon Storm Ltd. 5860 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5861 */var d=e(17489),g=e(61616);function r(f){return!!f.getActive&&typeof f.getActive=="function"}function a(f){return!!f.getStart&&typeof f.getStart=="function"}function h(f){return!!f.getEnd&&typeof f.getEnd=="function"}function n(f){return a(f)||h(f)||r(f)}var o=function(f,u){var v,m=function(W,j,N){return N},p=function(W,j,N){return N},x=null,y=typeof u;if(y==="number")m=function(){return u};else if(Array.isArray(u))p=function(){return u[0]},m=function(){return u[u.length-1]};else if(y==="string"){var P=u.toLowerCase(),b=P.substring(0,6)==="random",E=P.substring(0,3)==="int";if(b||E){var M=P.indexOf("("),w=P.indexOf(")"),A=P.indexOf(",");if(M&&w&&A){var R=parseFloat(P.substring(M+1,A)),L=parseFloat(P.substring(A+1,w));b?m=function(){return g(R,L)}:m=function(){return d(R,L)}}else throw new Error("invalid random() format")}else{P=P[0];var O=parseFloat(u.substr(2));switch(P){case"+":m=function(W,j,N){return N+O};break;case"-":m=function(W,j,N){return N-O};break;case"*":m=function(W,j,N){return N*O};break;case"/":m=function(W,j,N){return N/O};break;default:m=function(){return parseFloat(u)}}}}else if(y==="function")m=u;else if(y==="object")if(n(u))r(u)&&(x=u.getActive),h(u)&&(m=u.getEnd),a(u)&&(p=u.getStart);else if(u.hasOwnProperty("value"))v=o(f,u.value);else{var I=u.hasOwnProperty("to"),D=u.hasOwnProperty("from"),B=u.hasOwnProperty("start");if(I&&(D||B)){if(v=o(f,u.to),B){var z=o(f,u.start);v.getActive=z.getEnd}if(D){var X=o(f,u.from);v.getStart=X.getEnd}}}return v||(v={getActive:x,getEnd:m,getStart:p}),v};l.exports=o},68710:(l,T,e)=>{/** 5862 * @author Richard Davey <[email protected]> 5863 * @copyright 2013-2023 Photon Storm Ltd. 5864 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5865 */var d=e(502),g=e(99730),r=e(20494),a=e(63130),h=e(21902),n=e(28348),o=e(10850),f=e(9744),u=e(72066),v=e(39366),m=function(p,x,y){if(x instanceof v)return x.parent=p,x;y===void 0?y=g:y=u(g,y);var P=o(x,"from",0),b=o(x,"to",1),E=[{value:P}],M=o(x,"delay",y.delay),w=o(x,"easeParams",y.easeParams),A=o(x,"ease",y.ease),R=f("value",b),L=new v(p,E),O=L.add(0,"value",R.getEnd,R.getStart,R.getActive,h(o(x,"ease",A),o(x,"easeParams",w)),n(x,"delay",M),o(x,"duration",y.duration),a(x,"yoyo",y.yoyo),o(x,"hold",y.hold),o(x,"repeat",y.repeat),o(x,"repeatDelay",y.repeatDelay),!1,!1);O.start=P,O.current=P,L.completeDelay=r(x,"completeDelay",0),L.loop=Math.round(r(x,"loop",0)),L.loopDelay=Math.round(r(x,"loopDelay",0)),L.paused=a(x,"paused",!1),L.persist=a(x,"persist",!1),L.callbackScope=
5865o(x,"callbackScope",L);for(var I=d.TYPES,D=0;D<I.length;D++){var B=I[D],z=o(x,B,!1);if(z){var X=o(x,B+"Params",[]);L.setCallback(B,z,X)}}return L};l.exports=m},91944:(l,T,e)=>{/** 5866 * @author Richard Davey <[email protected]> 5867 * @copyright 2013-2023 Photon Storm Ltd. 5868 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5869 */var d=e(21902),g=e(10850),r=e(83392),a=function(h,n){n===void 0&&(n={});var o,f=g(n,"start",0),u=g(n,"ease",null),v=g(n,"grid",null),m=g(n,"from",0),p=m==="first",x=m==="center",y=m==="last",P=typeof m=="number",b=Array.isArray(h),E=parseFloat(b?h[0]:h),M=b?parseFloat(h[1]):0,w=Math.max(E,M);if(b&&(f+=E),v){var A=v[0],R=v[1],L=0,O=0,I=0,D=0,B=[];y?(L=A-1,O=R-1):P?(L=m%A,O=Math.floor(m/A)):x&&(L=(A-1)/2,O=(R-1)/2);for(var z=r.MIN_SAFE_INTEGER,X=0;X<R;X++){B[X]=[];for(var W=0;W<A;W++){I=L-W,D=O-X;var j=Math.sqrt(I*I+D*D);j>z&&(z=j),B[X][W]=j}}}var N=u?d(u):null;return v?o=function(Y,F,G,k){var V=0,U=k%A,$=Math.floor(k/A);U>=0&&U<A&&$>=0&&$<R&&(V=B[$][U]);var K;if(b){var J=M-E;N?K=V/z*J*N(V/z):K=V/z*J}else N?K=V*E*N(V/z):K=V*E;return K+f}:o=function(Y,F,G,k,V){V--;var U;p?U=k:x?U=Math.abs(V/2-k):y?U=V-k:P&&(U=Math.abs(m-k));var $;if(b){var K;x?K=(M-E)/V*(U*2):K=(M-E)/V*U,N?$=K*N(U/V):$=K}else N?$=V*w*N(U/V):$=U*E;return $+f},o};l.exports=a},68061:(l,T,e)=>{/** 5870 * @author Richard Davey <[email protected]> 5871 * @copyright 2013-2023 Photon Storm Ltd. 5872 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5873 */var d=e(502),g=e(99730),r=e(20494),a=e(63130),h=e(21902),n=e(4840),o=e(28348),f=e(92407),u=e(65868),v=e(10850),m=e(9744),p=e(72066),x=e(39366),y=function(P,b,E){if(b instanceof x)return b.parent=P,b;E===void 0?E=g:E=p(g,E);var M=u(b);!M&&E.targets&&(M=E.targets);for(var w=f(b),A=v(b,"delay",E.delay),R=v(b,"duration",E.duration),L=v(b,"easeParams",E.easeParams),O=v(b,"ease",E.ease),I=v(b,"hold",E.hold),D=v(b,"repeat",E.repeat),B=v(b,"repeatDelay",E.repeatDelay),z=a(b,"yoyo",E.yoyo),X=a(b,"flipX",E.flipX),W=a(b,"flipY",E.flipY),j=v(b,"interpolation",E.interpolation),N=function(tt,st,ht,lt){if(ht==="texture"){var nt=lt,gt=void 0;Array.isArray(lt)?(nt=lt[0],gt=lt[1]):lt.hasOwnProperty("value")?(nt=lt.value,Array.isArray(lt.value)?(nt=lt.value[0],gt=lt.value[1]):typeof lt.value=="string"&&(nt=lt.value)):typeof lt=="string"&&(nt=lt),tt.addFrame(st,nt,gt,o(lt,"delay",A),v(lt,"duration",R),v(lt,"hold",I),v(lt,"repeat",D),v(lt,"repeatDelay",B),a(lt,"flipX",X),a(lt,"flipY",W))}else{var bt=m(ht,lt),Pt=n(v(lt,"interpolation",j));tt.add(st,ht,bt.getEnd,bt.getStart,bt.getActive,h(v(lt,"ease",O),v(lt,"easeParams",L)),o(lt,"delay",A),v(lt,"duration",R),a(lt,"yoyo",z),v(lt,"hold",I),v(lt,"repeat",D),v(lt,"repeatDelay",B),a(lt,"flipX",X),a(lt,"flipY",W),Pt,Pt?lt:null)}},Y=new x(P,M),F=0;F<w.length;F++)for(var G=w[F].key,k=w[F].value,V=0;V<M.length;V++)G==="scale"&&!M[V].hasOwnProperty("scale")?(N(Y,V,"scaleX",k),N(Y,V,"scaleY",k)):N(Y,V,G,k);Y.completeDelay=r(b,"completeDelay",0),Y.loop=Math.round(r(b,"loop",0)),Y.loopDelay=Math.round(r(b,"loopDelay",0)),Y.paused=a(b,"paused",!1),Y.persist=a(b,"persist",!1),Y.callbackScope=v(b,"callbackScope",Y);for(var U=d.TYPES,$=0;$<U.length;$++){var K=U[$],J=v(b,K,!1);if(J){var _=v(b,K+"Params",[]);Y.setCallback(K,J,_)}}return Y};l.exports=y},56034:(l,T,e)=>{/** 5874 * @author Richard Davey <[email protected]> 5875 * @copyright 2013-2023 Photon Storm Ltd. 5876 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5877 */var d=e(502),g=e(20494),r=e(63130),a=e(65868),h=e(10850),n=e(68061),o=e(45641),f=function(u,v){if(v instanceof o)return v.parent=u,v;var m=new o(u);m.startDelay=h(v,"delay",0),m.completeDelay=g(v,"completeDelay",0),m.loop=Math.round(g(v,"loop",h(v,"repeat",0))),m.loopDelay=Math.round(g(v,"loopDelay",h(v,"repeatDelay",0))),m.paused=r(v,"paused",!1),m.persist=r(v,"persist",!0),m.callbackScope=h(v,"callbackScope",m);var p,x=d.TYPES;for(p=0;p<x.length;p++){var y=x[p],P=h(v,y,!1);if(P){var b=h(v,y+"Params",[]);m.setCallback(y,P,b)}}var E=h(v,"tweens",null);if(Array.isArray(E)){var M=[],w=a(v),A=void 0;for(w&&(A={targets:w}),p=0;p<E.length;p++)M.push(n(m,E[p],A));m.add(M)}return m};l.exports=f},79619:(l,T,e)=>{/** 5878 * @author Richard Davey <[email protected]> 5879 * @copyright 2013-2023 Photon Storm Ltd. 5880 * @license {@link https://opensource.org/licenses/MIT|MIT License}
5881 */l.exports={GetBoolean:e(63130),GetEaseFunction:e(21902),GetInterpolationFunction:e(4840),GetNewValue:e(28348),GetProps:e(92407),GetTargets:e(65868),GetValueOp:e(9744),NumberTweenBuilder:e(68710),StaggerBuilder:e(91944),TweenBuilder:e(68061)}},5570:l=>{/** 5882 * @author Richard Davey <[email protected]> 5883 * @copyright 2013-2023 Photon Storm Ltd. 5884 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5885 */l.exports="active"},6383:l=>{/** 5886 * @author Richard Davey <[email protected]> 5887 * @copyright 2013-2023 Photon Storm Ltd. 5888 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5889 */l.exports="complete"},72582:l=>{/** 5890 * @author Richard Davey <[email protected]> 5891 * @copyright 2013-2023 Photon Storm Ltd. 5892 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5893 */l.exports="loop"},90281:l=>{/** 5894 * @author Richard Davey <[email protected]> 5895 * @copyright 2013-2023 Photon Storm Ltd. 5896 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5897 */l.exports="pause"},80803:l=>{/** 5898 * @author Richard Davey <[email protected]> 5899 * @copyright 2013-2023 Photon Storm Ltd. 5900 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5901 */l.exports="repeat"},13640:l=>{/** 5902 * @author Richard Davey <[email protected]> 5903 * @copyright 2013-2023 Photon Storm Ltd. 5904 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5905 */l.exports="resume"},10472:l=>{/** 5906 * @author Richard Davey <[email protected]> 5907 * @copyright 2013-2023 Photon Storm Ltd. 5908 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5909 */l.exports="start"},5379:l=>{/** 5910 * @author samme 5911 * @copyright 2013-2023 Photon Storm Ltd. 5912 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5913 */l.exports="stop"},43449:l=>{/** 5914 * @author Richard Davey <[email protected]> 5915 * @copyright 2013-2023 Photon Storm Ltd. 5916 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5917 */l.exports="update"},61541:l=>{/** 5918 * @author Richard Davey <[email protected]> 5919 * @copyright 2013-2023 Photon Storm Ltd. 5920 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5921 */l.exports="yoyo"},54272:(l,T,e)=>{/** 5922 * @author Richard Davey <[email protected]> 5923 * @copyright 2013-2023 Photon Storm Ltd. 5924 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5925 */l.exports={TWEEN_ACTIVE:e(5570),TWEEN_COMPLETE:e(6383),TWEEN_LOOP:e(72582),TWEEN_PAUSE:e(90281),TWEEN_RESUME:e(13640),TWEEN_REPEAT:e(80803),TWEEN_START:e(10472),TWEEN_STOP:e(5379),TWEEN_UPDATE:e(43449),TWEEN_YOYO:e(61541)}},75193:(l,T,e)=>{/** 5926 * @author Richard Davey <[email protected]> 5927 * @copyright 2013-2023 Photon Storm Ltd. 5928 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5929 */var d={States:e(55303),Builders:e(79619),Events:e(54272),TweenManager:e(64532),Tween:e(39366),TweenData:e(15718),TweenFrameData:e(96490),BaseTween:e(502),TweenChain:e(45641)};l.exports=d},502:(l,T,e)=>{/** 5930 * @author Richard Davey <[email protected]> 5931 * @copyright 2013-2023 Photon Storm Ltd. 5932 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5933 */var d=e(56694),g=e(6659),r=e(54272),a=e(55303),h=new d({Extends:g,initialize:function(o){g.call(this),this.parent=o,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=a.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(n){return this.timeScale=n,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return!this.paused&&this.isActive()},isPaused:function(){return this.paused},pause:function(){return this.paused||(this.paused=!0,this.dispatchEvent(r.TWEEN_PAUSE,"onPause")),this},resume:function(){return this.paused&&(this.paused=!1,this.dispatchEvent(r.TWEEN_RESUME,"onResume")),this},makeActive:function(){this.parent.makeActive(this),this.dispatchEvent(r.TWEEN_ACTIVE,"onActive")},onCompleteHandler:function(){this.setPendingRemoveState(),this.dispatchEvent(r.TWEEN_COMPLETE,"onComplete")}
5933,complete:function(n){return n===void 0&&(n=0),n?(this.setCompleteDelayState(),this.countdown=n):this.onCompleteHandler(),this},completeAfterLoop:function(n){return n===void 0&&(n=0),this.loopCounter>n&&(this.loopCounter=n),this},remove:function(){return this.parent.remove(this),this},stop:function(){return!this.isRemoved()&&!this.isPendingRemove()&&!this.isDestroyed()&&(this.dispatchEvent(r.TWEEN_STOP,"onStop"),this.setPendingRemoveState()),this},updateLoopCountdown:function(n){this.countdown-=n,this.countdown<=0&&(this.setActiveState(),this.dispatchEvent(r.TWEEN_LOOP,"onLoop"))},updateStartCountdown:function(n){return this.countdown-=n,this.countdown<=0&&(this.hasStarted=!0,this.setActiveState(),this.dispatchEvent(r.TWEEN_START,"onStart"),n=0),n},updateCompleteDelay:function(n){this.countdown-=n,this.countdown<=0&&this.onCompleteHandler()},setCallback:function(n,o,f){return f===void 0&&(f=[]),this.callbacks.hasOwnProperty(n)&&(this.callbacks[n]={func:o,params:f}),this},setPendingState:function(){this.state=a.PENDING},setActiveState:function(){this.state=a.ACTIVE},setLoopDelayState:function(){this.state=a.LOOP_DELAY},setCompleteDelayState:function(){this.state=a.COMPLETE_DELAY},setStartDelayState:function(){this.state=a.START_DELAY,this.countdown=this.startDelay,this.hasStarted=!1},setPendingRemoveState:function(){this.state=a.PENDING_REMOVE},setRemovedState:function(){this.state=a.REMOVED},setFinishedState:function(){this.state=a.FINISHED},setDestroyedState:function(){this.state=a.DESTROYED},isPending:function(){return this.state===a.PENDING},isActive:function(){return this.state===a.ACTIVE},isLoopDelayed:function(){return this.state===a.LOOP_DELAY},isCompleteDelayed:function(){return this.state===a.COMPLETE_DELAY},isStartDelayed:function(){return this.state===a.START_DELAY},isPendingRemove:function(){return this.state===a.PENDING_REMOVE},isRemoved:function(){return this.state===a.REMOVED},isFinished:function(){return this.state===a.FINISHED},isDestroyed:function(){return this.state===a.DESTROYED},destroy:function(){this.data&&this.data.forEach(function(n){n.destroy()}),this.removeAllListeners(),this.callbacks=null,this.data=null,this.parent=null,this.setDestroyedState()}});h.TYPES=["onActive","onComplete","onLoop","onPause","onRepeat","onResume","onStart","onStop","onUpdate","onYoyo"],l.exports=h},65521:(l,T,e)=>{/** 5934 * @author Richard Davey <[email protected]> 5935 * @copyright 2013-2023 Photon Storm Ltd. 5936 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5937 */var d=e(56694),g=e(54272),r=e(55303),a=new d({initialize:function(n,o,f,u,v,m,p,x,y,P){this.tween=n,this.targetIndex=o,this.duration=u,this.totalDuration=0,this.delay=0,this.getDelay=f,this.yoyo=v,this.hold=m,this.repeat=p,this.repeatDelay=x,this.repeatCounter=0,this.flipX=y,this.flipY=P,this.progress=0,this.elapsed=0,this.state=0,this.isCountdown=!1},getTarget:function(){return this.tween.targets[this.targetIndex]},setTargetValue:function(h){h===void 0&&(h=this.current),this.tween.targets[this.targetIndex][this.key]=h},setCreatedState:function(){this.state=r.CREATED,this.isCountdown=!1},setDelayState:function(){this.state=r.DELAY,this.isCountdown=!0},setPendingRenderState:function(){this.state=r.PENDING_RENDER,this.isCountdown=!1},setPlayingForwardState:function(){this.state=r.PLAYING_FORWARD,this.isCountdown=!1},setPlayingBackwardState:function(){this.state=r.PLAYING_BACKWARD,this.isCountdown=!1},setHoldState:function(){this.state=r.HOLD_DELAY,this.isCountdown=!0},setRepeatState:function(){this.state=r.REPEAT_DELAY,this.isCountdown=!0},setCompleteState:function(){this.state=r.COMPLETE,this.isCountdown=!1},isCreated:function(){return this.state===r.CREATED},isDelayed:function(){return this.state===r.DELAY},isPendingRender:function(){return this.state===r.PENDING_RENDER},isPlayingForward:function(){return this.state===r.PLAYING_FORWARD},isPlayingBackward:function(){return this.state===r.PLAYING_BACKWARD},isHolding:function(){return this.state===r.HOLD_DELAY},isRepeating:function(){return this.state===r.REPEAT_DELAY},isComplete:function(){return this.state===r.COMPLETE},setStateFromEnd:function(h){this.yoyo?this.onRepeat(h,!0,!0):this.repeatCounter>0?this.onRepeat(h,!0,!1):this.setCompleteState()},setStateFromStart:function(h){this.repeatCounter>0?this.onRepeat(h,!1):this.setCompleteState()},reset:function(){var h=this.tween,n=h.totalTargets,o=this.targetIndex,f=h.targets[o],u=this.key;this.progress=0,this.elapsed=0,this.delay=this.getDelay(f,u,0,o,n,h),this.repeatCounter=this.repeat===-1?r.MAX:this.repeat,this.setPendingRenderState();var v=this.duration+this.hold;this.yoyo&&(v+=this.duration);var m=v+this.repeatDelay;this.totalDuration=this.delay+v,this.repeat===-1?(this.totalDuration+=m*r.MAX,h.isInfinite=!0):this.repeat>0&&(this.totalDuration+=m*this.repeat),this.totalDuration>h.duration&&(h.duration=this.totalDuration),this.delay<h.startDelay&&(h.startDelay=this.delay),this.delay>0&&(this.elapsed=this.delay,this.setDelayState())},onRepeat:function(h,n,o){var f=this.tween,u=f.totalTargets,v=this.targetIndex,m=f.targets[v],p=this.key,x=p!=="texture";if(this.elapsed=h,this.progress=h/this.duration,this.flipX&&m.toggleFlipX(),this.flipY&&m.toggleFlipY(),x&&(n||o)&&(this.start=this.getStartValue(m,p,this.start,v,u,f)),o){this.setPlayingBackwardState(),this.dispatchEvent(g.TWEEN_YOYO,"onYoyo");return}this.repeatCounter--,x&&(this.end=this.getEndValue(m,p,this.start,v,u,f)),this.repeatDelay>0?(this.elapsed=this.repeatDelay-h,x&&(this.current=this.start,m[p]=this.current),this.setRepeatState()):(this.setPlayingForwardState(),this.dispatchEvent(g.TWEEN_REPEAT,"onRepeat"))},destroy:function(){this.tween=null,this.getDelay=null,this.setCompleteState()}});l.exports=a},99730:l=>{/** 5938 * @author Richard Davey <[email protected]> 5939 * @copyright 2013-2023 Photon Storm Ltd. 5940 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5941 */var T={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};l.exports=T},53709:l=>{/** 5942 * @author Richard Davey <[email protected]> 5943 * @copyright 2013-2023 Photon Storm Ltd. 5944 * @license {@link https://opensource.org/licenses/MIT|MIT License}
5945 */l.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"]},39366:(l,T,e)=>{/** 5946 * @author Richard Davey <[email protected]> 5947 * @copyright 2013-2023 Photon Storm Ltd. 5948 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5949 */var d=e(502),g=e(56694),r=e(54272),a=e(99325),h=e(61286),n=e(83392),o=e(55303),f=e(15718),u=e(96490),v=new g({Extends:d,initialize:function(p,x){d.call(this,p),this.targets=x,this.totalTargets=x.length,this.isSeeking=!1,this.isInfinite=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0},add:function(m,p,x,y,P,b,E,M,w,A,R,L,O,I,D,B){var z=new f(this,m,p,x,y,P,b,E,M,w,A,R,L,O,I,D,B);return this.totalData=this.data.push(z),z},addFrame:function(m,p,x,y,P,b,E,M,w,A){var R=new u(this,m,p,x,y,P,b,E,M,w,A);return this.totalData=this.data.push(R),R},getValue:function(m){m===void 0&&(m=0);var p=null;return this.data&&(p=this.data[m].current),p},hasTarget:function(m){return this.targets&&this.targets.indexOf(m)!==-1},updateTo:function(m,p,x){if(x===void 0&&(x=!1),m!=="texture")for(var y=0;y<this.totalData;y++){var P=this.data[y];P.key===m&&(P.isPlayingForward()||P.isPlayingBackward())&&(P.end=p,x&&(P.start=P.current))}return this},restart:function(){switch(this.state){case o.REMOVED:case o.FINISHED:this.seek(),this.parent.makeActive(this);break;case o.PENDING:case o.PENDING_REMOVE:this.parent.reset(this);break;case o.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(r.TWEEN_LOOP,"onLoop"));else if(this.completeDelay>0)this.countdown=this.completeDelay,this.setCompleteDelayState();else return this.onCompleteHandler(),!0;return!1},onCompleteHandler:function(){this.progress=1,this.totalProgress=1,d.prototype.onCompleteHandler.call(this)},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed Tween",this),this):((this.isPendingRemove()||this.isFinished())&&this.seek(),this.paused=!1,this.setActiveState(),this)},seek:function(m,p,x){if(m===void 0&&(m=0),p===void 0&&(p=16.6),x===void 0&&(x=!1),this.isDestroyed())return console.warn("Cannot seek destroyed Tween",this),this;x||(this.isSeeking=!0),this.reset(!0),this.initTweenData(!0),this.setActiveState(),this.dispatchEvent(r.TWEEN_ACTIVE,"onActive");var y=this.paused;if(this.paused=!1,m>0){for(var P=Math.floor(m/p),b=m-P*p,E=0;E<P;E++)this.update(p);b>0&&this.update(b)}return this.paused=y,this.isSeeking=!1,this},initTweenData:function(m){m===void 0&&(m=!1),this.duration=0,this.startDelay=n.MAX_SAFE_INTEGER;for(var p=this.data,x=0;x<this.totalData;x++)p[x].reset(m);this.duration=Math.max(this.duration,.01);var y=this.duration,P=this.completeDelay,b=this.loopCounter,E=this.loopDelay;b>0?this.totalDuration=y+P+(y+E)*b:this.totalDuration=y+P},reset:function(m){return m===void 0&&(m=!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=o.MAX),m||(this.initTweenData(),this.setActiveState(),this.dispatchEvent(r.TWEEN_ACTIVE,"onActive")),this},update:function(m){if(this.isPendingRemove()||this.isDestroyed())return!0;if(this.paused||this.isFinished())return!1;if(m*=this.timeScale*this.parent.timeScale,this.isLoopDelayed())return this.updateLoopCountdown(m),!1;if(this.isCompleteDelayed())return this.updateCompleteDelay(m),!1;this.hasStarted||(this.startDelay-=m,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchEvent(r.TWEEN_START,"onStart"),m=0));var p=!1;if(this.isActive())for(var x=this.data,y=0;y<this.totalData;y++)x[y].update(m)&&(p=!0);this.elapsed+=m,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=m,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),p||this.nextState();var P=this.isPendingRemove();return P&&this.persist&&(this.setFinishedState(),P=!1),P},forward:function(m){return this.update(m),this},rewind:function(m){return this.update(-m),this}
5949,dispatchEvent:function(m,p){if(!this.isSeeking){this.emit(m,this,this.targets);var x=this.callbacks[p];x&&x.func.apply(this.callbackScope,[this,this.targets].concat(x.params))}},destroy:function(){d.prototype.destroy.call(this),this.targets=null}});h.register("tween",function(m){return this.scene.sys.tweens.add(m)}),a.register("tween",function(m){return this.scene.sys.tweens.create(m)}),l.exports=v},45641:(l,T,e)=>{/** 5950 * @author Richard Davey <[email protected]> 5951 * @copyright 2013-2023 Photon Storm Ltd. 5952 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5953 */var d=e(66458),g=e(502),r=e(56694),a=e(54272),h=e(99325),n=e(61286),o=e(55303),f=new r({Extends:g,initialize:function(v){g.call(this,v),this.currentTween=null,this.currentIndex=0},init:function(){return this.loopCounter=this.loop===-1?o.MAX:this.loop,this.setCurrentTween(0),this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this.dispatchEvent(a.TWEEN_ACTIVE,"onActive"),this},add:function(u){var v=this.parent.create(u);Array.isArray(v)||(v=[v]);for(var m=this.data,p=0;p<v.length;p++){var x=v[p];x.parent=this,m.push(x.reset())}return this.totalData=m.length,this},remove:function(u){return d(this.data,u),u.setRemovedState(),u===this.currentTween&&this.nextTween(),this.totalData=this.data.length,this},hasTarget:function(u){for(var v=this.data,m=0;m<this.totalData;m++)if(v[m].hasTarget(u))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(u){return u.seek(),u.setActiveState(),this},makeActive:function(u){return u.reset(),u.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(a.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 u=this.data,v=this.totalData,m=0;m<v;m++)u[m].reset(!1);this.currentIndex=0,this.currentTween=u[0]},update:function(u){if(this.isPendingRemove()||this.isDestroyed())return!0;if(this.isFinished()||this.paused)return!1;u*=this.parent.timeScale,this.isLoopDelayed()?this.updateLoopCountdown(u):this.isCompleteDelayed()?this.updateCompleteDelay(u):this.isStartDelayed()&&(u=this.updateStartCountdown(u));var v=!1;return this.isActive()&&this.currentTween&&(this.currentTween.update(u)&&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(u){this.currentIndex=u,this.currentTween=this.data[u],this.currentTween.setActiveState(),this.currentTween.dispatchEvent(a.TWEEN_ACTIVE,"onActive")},dispatchEvent:function(u,v){this.emit(u,this);var m=this.callbacks[v];m&&m.func.apply(this.callbackScope,[this].concat(m.params))},destroy:function(){g.prototype.destroy.call(this),this.currentTween=null}});n.register("tweenchain",function(u){return this.scene.sys.tweens.chain(u)}),h.register("tweenchain",function(u){return this.scene.sys.tweens.create(u)}),l.exports=f},15718:(l,T,e)=>{/** 5954 * @author Richard Davey <[email protected]> 5955 * @copyright 2013-2023 Photon Storm Ltd. 5956 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5957 */var d=e(65521),g=e(82897),r=e(56694),a=e(54272),h=new r({Extends:d,initialize:function(o,f,u,v,m,p,x,y,P,b,E,M,w,A,R,L,O){d.call(this,o,f,y,P,b,E,M,w,A,R),this.key=u,this.getActiveValue=p,this.getEndValue=v,this.get
5957StartValue=m,this.ease=x,this.start=0,this.previous=0,this.current=0,this.end=0,this.interpolation=L,this.interpolationData=O},reset:function(n){d.prototype.reset.call(this);var o=this.tween.targets[this.targetIndex],f=this.key;n&&(o[f]=this.start),this.start=0,this.previous=0,this.current=0,this.end=0,this.getActiveValue&&(o[f]=this.getActiveValue(o,f,0))},update:function(n){var o=this.tween,f=o.totalTargets,u=this.targetIndex,v=o.targets[u],m=this.key;if(!v)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=n,this.elapsed<=0&&(this.elapsed=0,n=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(a.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.start=this.getStartValue(v,m,v[m],u,f,o),this.end=this.getEndValue(v,m,this.start,u,f,o),this.current=this.start,v[m]=this.start,this.setPlayingForwardState(),!0;var p=this.isPlayingForward(),x=this.isPlayingBackward();if(p||x){var y=this.elapsed,P=this.duration,b=0,E=!1;y+=n,y>=P?(b=y-P,y=P,E=!0):y<0&&(y=0);var M=g(y/P,0,1);if(this.elapsed=y,this.progress=M,this.previous=this.current,E)p?(this.current=this.end,v[m]=this.end,this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(b)):(this.current=this.start,v[m]=this.start,this.setStateFromStart(b));else{p||(M=1-M);var w=this.ease(M);this.interpolation?this.current=this.interpolation(this.interpolationData,w):this.current=this.start+(this.end-this.start)*w,v[m]=this.current}this.dispatchEvent(a.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(n,o){var f=this.tween;if(!f.isSeeking){var u=f.targets[this.targetIndex],v=this.key,m=this.current,p=this.previous;f.emit(n,f,v,u,m,p);var x=f.callbacks[o];x&&x.func.apply(f.callbackScope,[f,u,v,m,p].concat(x.params))}},destroy:function(){d.prototype.destroy.call(this),this.getActiveValue=null,this.getEndValue=null,this.getStartValue=null,this.ease=null}});l.exports=h},96490:(l,T,e)=>{/** 5958 * @author Richard Davey <[email protected]> 5959 * @copyright 2013-2023 Photon Storm Ltd. 5960 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5961 */var d=e(65521),g=e(82897),r=e(56694),a=e(54272),h=new r({Extends:d,initialize:function(o,f,u,v,m,p,x,y,P,b,E){d.call(this,o,f,m,p,!1,x,y,P,b,E),this.key="texture",this.startTexture=null,this.endTexture=u,this.startFrame=null,this.endFrame=v,this.yoyo=y!==0},reset:function(n){d.prototype.reset.call(this);var o=this.tween.targets[this.targetIndex];this.startTexture||(this.startTexture=o.texture.key,this.startFrame=o.frame.name),n&&o.setTexture(this.startTexture,this.startFrame)},update:function(n){var o=this.tween,f=this.targetIndex,u=o.targets[f];if(!u)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=n,this.elapsed<=0&&(this.elapsed=0,n=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(a.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.startTexture&&u.setTexture(this.startTexture,this.startFrame),this.setPlayingForwardState(),!0;var v=this.isPlayingForward(),m=this.isPlayingBackward();if(v||m){var p=this.elapsed,x=this.duration,y=0,P=!1;p+=n,p>=x?(y=p-x,p=x,P=!0):p<0&&(p=0);var b=g(p/x,0,1);this.elapsed=p,this.progress=b,P&&(v?(u.setTexture(this.endTexture,this.endFrame),this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(y)):(u.setTexture(this.startTexture,this.startFrame),this.setStateFromStart(y))),this.dispatchEvent(a.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(n,o){var f=this.tween;if(!f.isSeeking){var u=f.targets[this.targetIndex],v=this.key;f.emit(n,f,v,u);var m=f.callbacks[o];m&&m.func.apply(f.callbackScope,[f,u,v].concat(m.params))}},destroy:function(){d.prototype.destroy.call(this),this.startTexture=null,this.endTexture=null,this.startFrame=null,this.endFrame=null}});l.exports=h},55303:l=>{/** 5962 * @author Richard Davey <[email protected]> 5963 * @copyright 2013-2023 Photon Storm Ltd. 5964 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5965 */var T={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};l.exports=T},56694:l=>{/** 5966 * @author Richard Davey <[email protected]> 5967 * @copyright 2013-2023 Photon Storm Ltd. 5968 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5969 */function T(h){return!!h.get&&typeof h.get=="function"||!!h.set&&typeof h.set=="function"}function e(h,n,o){var f=o?h[n]:Object.getOwnPropertyDescriptor(h,n);return!o&&f.value&&typeof f.value=="object"&&(f=f.value),f&&T(f)?(typeof f.enumerable>"u"&&(f.enumerable=!0),typeof f.configurable>"u"&&(f.configurable=!0),f):!1}function d(h,n){var o=Object.getOwnPropertyDescriptor(h,n);return o?(o.value&&typeof o.value=="object"&&(o=o.value),o.configurable===!1):!1}function g(h,n,o,f){for(var u in n)if(n.hasOwnProperty(u)){var v=e(n,u,o);if(v!==!1){var m=f||h;if(d(m.prototype,u)){if(a.ignoreFinals)continue;throw new Error("cannot override final property '"+u+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(h.prototype,u,v)}else h.prototype[u]=n[u]}}function r(h,n){if(n){Array.isArray(n)||(n=[n]);for(var o=0;o<n.length;o++)g(h,n[o].prototype||n[o])}}function a(h){h||(h={});var n,o;if(h.initialize){if(typeof h.initialize!="function")throw new Error("initialize must be a function");n=h.initialize,delete h.initialize}else if(h.Extends){var f=h.Extends;n=function(){f.apply(this,arguments)}}else n=function(){};h.Extends?(n.prototype=Object.create(h.Extends.prototype),n.prototype.constructor=n,o=h.Extends,delete h.Extends):n.prototype.constructor=n;var u=null;return h.Mixins&&(u=h.Mixins,delete h.Mixins),r(n,u),g(n,h,!0,o),n}a.extend=g,a.mixin=r,a.ignoreFinals=!1,l.exports=a},72283:l=>{/** 5970 * @author Richard Davey <[email protected]> 5971 * @copyright 2013-2023 Photon Storm Ltd. 5972 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5973 */var T=function(){};l.exports=T},10618:l=>{/** 5974 * @author Richard Davey <[email protected]> 5975 * @copyright 2013-2023 Photon Storm Ltd. 5976 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5977 */var T=function(){return null};l.exports=T},78991:l=>{/** 5978 * @author Richard Davey <[email protected]> 5979 * @copyright 2013-2023 Photon Storm Ltd. 5980 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5981 */var T=function(e,d,g,r,a){if(a===void 0&&(a=e),g>0){var h=g-e.length;if(h<=0)return null}if(!Array.isArray(d))return e.indexOf(d)===-1?(e.push(d),r&&r.call(a,d),d):null;for(var n=d.length-1;n>=0;)e.indexOf(d[n])!==-1&&d.splice(n,1),n--;if(n=d.length,n===0)return null;g>0&&n>h&&(d.splice(h),n=h);for(var o=0;o<n;o++){var f=d[o];e.push(f),r&&r.call(a,f)}return d};l.exports=T},48522:l=>{/** 5982 * @author Richard Davey <[email protected]> 5983 * @copyright 2013-2023 Photon Storm Ltd. 5984 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5985 */var T=function(e,d,g,r,a,h){if(g===void 0&&(g=0),h===void 0&&(h=e),r>0){var n=r-e.length;if(n<=0)return null}if(!Array.isArray(d))return e.indexOf(d)===-1?(e.splice(g,0,d),a&&a.call(h,d),d):null;for(var o=d.length-1;o>=0;)e.indexOf(d[o])!==-1&&d.pop(),o--;
5985if(o=d.length,o===0)return null;r>0&&o>n&&(d.splice(n),o=n);for(var f=o-1;f>=0;f--){var u=d[f];e.splice(g,0,u),a&&a.call(h,u)}return d};l.exports=T},58742:l=>{/** 5986 * @author Richard Davey <[email protected]> 5987 * @copyright 2013-2023 Photon Storm Ltd. 5988 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5989 */var T=function(e,d){var g=e.indexOf(d);return g!==-1&&g<e.length&&(e.splice(g,1),e.push(d)),d};l.exports=T},30164:(l,T,e)=>{/** 5990 * @author Richard Davey <[email protected]> 5991 * @copyright 2013-2023 Photon Storm Ltd. 5992 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5993 */var d=e(45838),g=function(r,a,h,n,o){n===void 0&&(n=0),o===void 0&&(o=r.length);var f=0;if(d(r,n,o))for(var u=n;u<o;u++){var v=r[u];v[a]===h&&f++}return f};l.exports=g},36337:l=>{/** 5994 * @author Richard Davey <[email protected]> 5995 * @copyright 2013-2023 Photon Storm Ltd. 5996 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5997 */var T=function(e,d,g){var r,a=[null];for(r=3;r<arguments.length;r++)a.push(arguments[r]);for(r=0;r<e.length;r++)a[0]=e[r],d.apply(g,a);return e};l.exports=T},46208:(l,T,e)=>{/** 5998 * @author Richard Davey <[email protected]> 5999 * @copyright 2013-2023 Photon Storm Ltd. 6000 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6001 */var d=e(45838),g=function(r,a,h,n,o){if(n===void 0&&(n=0),o===void 0&&(o=r.length),d(r,n,o)){var f,u=[null];for(f=5;f<arguments.length;f++)u.push(arguments[f]);for(f=n;f<o;f++)u[0]=r[f],a.apply(h,u)}return r};l.exports=g},2406:l=>{/** 6002 * @author Richard Davey <[email protected]> 6003 * @copyright 2013-2023 Photon Storm Ltd. 6004 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6005 */var T=function(e,d,g){if(d.length){if(d.length===1)return d[0]}else return NaN;var r=1,a,h;if(g){if(e<d[0][g])return d[0];for(;d[r][g]<e;)r++}else for(;d[r]<e;)r++;return r>d.length&&(r=d.length),g?(a=d[r-1][g],h=d[r][g],h-e<=e-a?d[r]:d[r-1]):(a=d[r-1],h=d[r],h-e<=e-a?h:a)};l.exports=T},5454:l=>{/** 6006 * @author Richard Davey <[email protected]> 6007 * @copyright 2013-2023 Photon Storm Ltd. 6008 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6009 */var T=function(e,d){d===void 0&&(d=[]);for(var g=0;g<e.length;g++)Array.isArray(e[g])?T(e[g],d):d.push(e[g]);return d};l.exports=T},71608:(l,T,e)=>{/** 6010 * @author Richard Davey <[email protected]> 6011 * @copyright 2013-2023 Photon Storm Ltd. 6012 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6013 */var d=e(45838),g=function(r,a,h,n,o){n===void 0&&(n=0),o===void 0&&(o=r.length);var f=[];if(d(r,n,o))for(var u=n;u<o;u++){var v=r[u];(!a||a&&h===void 0&&v.hasOwnProperty(a)||a&&h!==void 0&&v[a]===h)&&f.push(v)}return f};l.exports=g},51463:(l,T,e)=>{/** 6014 * @author Richard Davey <[email protected]> 6015 * @copyright 2013-2023 Photon Storm Ltd. 6016 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6017 */var d=e(45838),g=function(r,a,h,n,o){if(n===void 0&&(n=0),o===void 0&&(o=r.length),d(r,n,o))for(var f=n;f<o;f++){var u=r[f];if(!a||a&&h===void 0&&u.hasOwnProperty(a)||a&&h!==void 0&&u[a]===h)return u}return null};l.exports=g},72861:l=>{/** 6018 * @author Richard Davey <[email protected]> 6019 * @copyright 2013-2023 Photon Storm Ltd. 6020 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6021 */var T=function(e,d,g){d===void 0&&(d=0),g===void 0&&(g=e.length);var r=d+Math.floor(Math.random()*g);return e[r]===void 0?null:e[r]};l.exports=T},24218:l=>{/** 6022 * @author Richard Davey <[email protected]> 6023 * @copyright 2013-2023 Photon Storm Ltd. 6024 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6025 */var T=function(e,d,g){if(d===g)return e;var r=e.indexOf(d),a=e.indexOf(g);if(r<0||a<0)throw new Error("Supplied items must be elements of the same array");return r>a||(e.splice(r,1),a===e.length-1?e.push(d):e.splice(a,0,d)),e};l.exports=T},58258:l=>{/** 6026 * @author Richard Davey <[email protected]> 6027 * @copyright 2013-2023 Photon Storm Ltd. 6028 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6029 */var T=function(e,d,g){if(d===g)return e;var r=e.indexOf(d),a=e.indexOf(g);if(r<0||a<0)throw new Error("Supplied items must be elements of the same array");return r<a||(e.splice(r,1),a===0?e.unshift(d):e.splice(a,0,d)),e};l.exports=T},51172:l=>{/** 6030 * @author Richard Davey <[email protected]> 6031 * @copyright 2013-2023 Photon Storm Ltd. 6032 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6033 */var T=function(e,d){var g=e.indexOf(d);if(g>0){var r=e[g-1],a=e.indexOf(r);e[g]=r,e[a]=d}return e};l.exports=T},68396:l=>{/** 6034 * @author Richard Davey <[email protected]> 6035 * @copyright 2013-2023 Photon Storm Ltd. 6036 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6037 */var T=function(e,d,g){var r=e.indexOf(d);if(r===-1||g<0||g>=e.length)throw new Error("Supplied index out of bounds");return r!==g&&(e.splice(r,1),e.splice(g,0,d)),d};l.exports=T},27555:l=>{/** 6038 * @author Richard Davey <[email protected]> 6039 * @copyright 2013-2023 Photon Storm Ltd. 6040 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6041 */var T=function(e,d){var g=e.indexOf(d);if(g!==-1&&g<e.length-1){var r=e[g+1],a=e.indexOf(r);e[g]=r,e[a]=d}return e};l.exports=T},13401:l=>{/** 6042 * @author Richard Davey <[email protected]> 6043 * @copyright 2013-2023 Photon Storm Ltd. 6044 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6045 */var T=function(e,d,g,r){var a=[],h,n=!1;if((g||r)&&(n=!0,g||(g=""),r||(r="")),d<e)for(h=e;h>=d;h--)n?a.push(g+h.toString()+r):a.push(h);else for(h=e;h<=d;h++)n?a.push(g+h.toString()+r):a.push(h);return a};l.exports=T},89955:(l,T,e)=>{/** 6046 * @author Richard Davey <[email protected]> 6047 * @copyright 2013-2023 Photon Storm Ltd. 6048 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6049 */var d=e(67233),g=function(r,a,h){r===void 0&&(r=0),a===void 0&&(a=null),h===void 0&&(h=1),a===null&&(a=r,r=0);for(var n=[],o=Math.max(d((a-r)/(h||1)),0),f=0;f<o;f++)n.push(r),r+=h;return n};l.exports=g},53466:l=>{/** 6050 * @author Richard Davey <[email protected]> 6051 * @copyright 2013-2023 Photon Storm Ltd. 6052 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6053 */function T(g,r,a){var h=g[r];g[r]=g[a],g[a]=h}function e(g,r){return g<r?-1:g>r?1:0}var d=function(g,r,a,h,n){for(a===void 0&&(a=0),h===void 0&&(h=g.length-1),n===void 0&&(n=e);h>a;){if(h-a>600){var o=h-a+1,f=r-a+1,u=Math.log(o),v=.5*Math.exp(2*u/3),m=.5*Math.sqrt(u*v*(o-v)/o)*(f-o/2<0?-1:1),p=Math.max(a,Math.floor(r-f*v/o+m)),x=Math.min(h,Math.floor(r+(o-f)*v/o+m));d(g,r,p,x,n)}var y=g[r],P=a,b=h;for(T(g,a,r),n(g[h],y)>0&&T(g,a,h);P<b;){for(T(g,P,b),P++,b--;n(g[P],y)<0;)P++;for(;n(g[b],y)>0;)b--}n(g[a],y)===0?T(g,a,b):(b++,T(g,b,h)),b<=r&&(a=b+1),r<=b&&(h=b-1)}};l.exports=d},75757:(l,T,e)=>{/** 6054 * @author Richard Davey <[email protected]> 6055 * @copyright 2013-2023 Photon Storm Ltd. 6056 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6057 */var d=e(10850),g=e(18592),r=function(h,n,o){for(var f=[],u=0;u<h.length;u++)for(var v=0;v<n.length;v++)for(var m=0;m<o;m++)f.push({a:h[u],b:n[v]});return f},a=function(h,n,o){var f=d(o,"max",0),u=d(o,"qty",1),v=d(o,"random",!1),m=d(o,"randomB",!1),p=d(o,"repeat",0),x=d(o,"yoyo",!1),y=[];if(m&&g(n),p===-1)if(f===0)p=0;else{var P=h.length*n.length*u;x&&(P*=2),p=Math.ceil(f/P)}for(var b=0;b<=p;b++){var E=r(h,n,u);v&&g(E),y=y.concat(E),x&&(E.reverse(),y=y.concat(E))}return f&&y.splice(f),y};l.exports=a},66458:(l,T,e)=>{/** 6058 * @author Richard Davey <[email protected]> 6059 * @copyright 2013-2023 Photon Storm Ltd. 6060 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6061 */var d=e(72677),g=function(r,a,h,n){n===void 0&&(n=r);var o;if(!Array.isArray(a))return o=r.indexOf(a),o!==-1?(d(r,o),h&&h.call(n,a),a):null;for(var f=a.length-1,u=[];f>=0;){var v=a[f];o=r.indexOf(v),o!==-1&&(d(r,o),u.push(v),h&&h.call(n,v)),f--}return u};l.exports=g},8324:(l,T,e)=>{/** 6062 * @author Richard Davey <[email protected]> 6063 * @copyright 2013-2023 Photon Storm Ltd. 6064 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6065 */var d=e(72677),g=function(r,a,h,n){if(n===void 0&&(n=r),a<0||a>r.length-1)throw new Error("Index out of bounds");var o=d(r,a);return h&&h.call(n,o),o};l.exports=g},47427:(l,T,e)=>{/** 6066 * @author Richard Davey <[email protected]> 6067 * @copyright 2013-2023 Photon Storm Ltd. 6068 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6069 */var d=e(45838),g=function(r,a,h,n,o){if(a===void 0&&(a=0),h===void 0&&(h=r.length),o===void 0&&(o=r),d(r,a,h)){var f=h-a,u=r.splice(a,f);if(n)for(var v=0;v<u.length;v++){var m=u[v];n.call(o,m)}return u}else return[]};l.exports=g},50147:(l,T,e)=>{/** 6070 * @author Richard Davey <[email protected]> 6071 * @copyright 2013-2023 Photon Storm Ltd. 6072 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6073 */var d=e(72677),g=function(r,a,h){a===void 0&&(a=0),h===void 0&&(h=r.length);var n=a+Math.floor(Math.random()*h);return d(r,n)};l.exports=g},80402:l=>{/** 6074 * @author Richard Davey <[email protected]> 6075 * @copyright 2013-2023 Photon Storm Ltd. 6076 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6077 */var T=function(e,d,g){var r=e.indexOf(d),a=e.indexOf(g);return r!==-1&&a===-1?(e[r]=g,!0):!1};l.exports=T},77640:l=>{/** 6078 * @author Richard Davey <[email protected]> 6079 * @copyright 2013-2023 Photon Storm Ltd. 6080 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6081 */var T=function(e,d){d===void 0&&(d=1);for(var g=null,r=0;r<d;r++)g=e.shift(),e.push(g);return g};l.exports=T},38487:l=>{/** 6082 * @author Richard Davey <[email protected]> 6083 * @copyright 2013-2023 Photon Storm Ltd. 6084 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6085 */var T=function(e,d){d===void 0&&(d=1);for(var g=null,r=0;r<d;r++)g=e.pop(),e.unshift(g);return g};l.exports=T},45838:l=>{/** 6086 * @author Richard Davey <[email protected]> 6087 * @copyright 2013-2023 Photon Storm Ltd. 6088 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6089 */var T=function(e,d,g,r){var a=e.length;if(d<0||d>a||d>=g||g>a){if(r)throw new Error("Range Error: Values outside acceptable range");return!1}else return!0};l.exports=T},27847:l=>{/** 6090 * @author Richard Davey <[email protected]> 6091 * @copyright 2013-2023 Photon Storm Ltd. 6092 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6093 */var T=function(e,d){var g=e.indexOf(d);return g!==-1&&g>0&&(e.splice(g,1),e.unshift(d)),d};l.exports=T},6034:(l,T,e)=>{/** 6094 * @author Richard Davey <[email protected]> 6095 * @copyright 2013-2023 Photon Storm Ltd. 6096 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6097 */var d=e(45838),g=function(r,a,h,n,o){if(n===void 0&&(n=0),o===void 0&&(o=r.length),d(r,n,o))for(var f=n;f<o;f++){var u=r[f];u.hasOwnProperty(a)&&(u[a]=h)}return r};l.exports=g},18592:l=>{/** 6098 * @author Richard Davey <[email protected]> 6099 * @copyright 2013-2023 Photon Storm Ltd. 6100 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6101 */var T=function(e){for(var d=e.length-1;d>0;d--){var g=Math.floor(Math.random()*(d+1)),r=e[d];e[d]=e[g],e[g]=r}return e};l.exports=T},28834:l=>{/** 6102 * @author Richard Davey <[email protected]> 6103 * @copyright 2013-2023 Photon Storm Ltd. 6104 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6105 */var T=function(e){var d=/\D/g;return e.sort(function(g,r){return parseInt(g.replace(d,""),10)-parseInt(r.replace(d,""),10)}),e};l.exports=T},72677:l=>{/** 6106 * @author Richard Davey <[email protected]> 6107 * @copyright 2013-2023 Photon Storm Ltd. 6108 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6109 */var T=function(e,d){if(!(d>=e.length)){for(var g=e.length-1,r=e[d],a=d;a<g;a++)e[a]=e[a+1];return e.length=g,r}};l.exports=T},17922:(l,T,e)=>{/** 6110 * @author Richard Davey <[email protected]> 6111 * @author Angry Bytes (and contributors) 6112 * @copyright 2013-2023 Photon Storm Ltd. 6113 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6114 */var d=e(77290);function g(n,o){return String(n).localeCompare(o)}function r(n,o){var f=n.length;if(f<=1)return n;for(var u=new Array(f),v=1;v<f;v*=2){a(n,o,v,u);var m=n;n=u,u=m}return n}function a(n,o,f,u){var v=n.length,m=0,p=f*2,x,y,P,b,E;for(x=0;x<v;x+=p)for(y=x+f,P=y+f,y>v&&(y=v),P>v&&(P=v),b=x,E=y;;)if(b<y&&E<P)o(n[b],n[E])<=0?u[m++]=n[b++]:u[m++]=n[E++];else if(b<y)u[m++]=n[b++];else if(E<P)u[m++]=n[E++];else break}var h=function(n,o){if(o===void 0&&(o=g),!n||n.length<2)return n;if(d.features.stableSort)return n.sort(o);var f=r(n,o);return f!==n&&a(f,null,n.length,n),n};l.exports=h},96928:l=>{/** 6115 * @author Richard Davey <[email protected]> 6116 * @copyright 2013-2023 Photon Storm Ltd. 6117 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6118 */var T=function(e,d,g){if(d===g)return e;var r=e.indexOf(d),a=e.indexOf(g);if(r<0||a<0)throw new Error("Supplied items must be elements of the same array");return e[r]=g,e[a]=d,e};l.exports=T},59959:(l,T,e)=>{/** 6119 * @author Richard Davey <[email protected]> 6120 * @copyright 2013-2023 Photon Storm Ltd. 6121 * @license {@link https://opensource.org/licenses/MIT|MIT License}
6122 */l.exports={Matrix:e(13515),Add:e(78991),AddAt:e(48522),BringToTop:e(58742),CountAllMatching:e(30164),Each:e(36337),EachInRange:e(46208),FindClosestInSorted:e(2406),Flatten:e(5454),GetAll:e(71608),GetFirst:e(51463),GetRandom:e(72861),MoveDown:e(51172),MoveTo:e(68396),MoveUp:e(27555),MoveAbove:e(24218),MoveBelow:e(58258),NumberArray:e(13401),NumberArrayStep:e(89955),QuickSelect:e(53466),Range:e(75757),Remove:e(66458),RemoveAt:e(8324),RemoveBetween:e(47427),RemoveRandomElement:e(50147),Replace:e(80402),RotateLeft:e(77640),RotateRight:e(38487),SafeRange:e(45838),SendToBack:e(27847),SetAll:e(6034),Shuffle:e(18592),SortByDigits:e(28834),SpliceOne:e(72677),StableSort:e(17922),Swap:e(96928)}},97494:l=>{/** 6123 * @author Richard Davey <[email protected]> 6124 * @copyright 2013-2023 Photon Storm Ltd. 6125 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6126 */var T=function(e){if(!Array.isArray(e)||!Array.isArray(e[0]))return!1;for(var d=e[0].length,g=1;g<e.length;g++)if(e[g].length!==d)return!1;return!0};l.exports=T},68428:(l,T,e)=>{/** 6127 * @author Richard Davey <[email protected]> 6128 * @copyright 2013-2023 Photon Storm Ltd. 6129 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6130 */var d=e(76400),g=e(97494),r=function(a){var h="";if(!g(a))return h;for(var n=0;n<a.length;n++){for(var o=0;o<a[n].length;o++){var f=a[n][o].toString();f!=="undefined"?h+=d(f,2):h+="?",o<a[n].length-1&&(h+=" |")}if(n<a.length-1){h+=` 6131`;for(var u=0;u<a[n].length;u++)h+="---",u<a[n].length-1&&(h+="+");h+=` 6132`}}return h};l.exports=r},59521:l=>{/** 6133 * @author Richard Davey <[email protected]> 6134 * @copyright 2013-2023 Photon Storm Ltd. 6135 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6136 */var T=function(e){return e.reverse()};l.exports=T},51995:l=>{/** 6137 * @author Richard Davey <[email protected]> 6138 * @copyright 2013-2023 Photon Storm Ltd. 6139 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6140 */var T=function(e){for(var d=0;d<e.length;d++)e[d].reverse();return e};l.exports=T},89011:(l,T,e)=>{/** 6141 * @author Richard Davey <[email protected]> 6142 * @copyright 2013-2023 Photon Storm Ltd. 6143 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6144 */var d=e(63515),g=function(r){return d(r,180)};l.exports=g},42549:(l,T,e)=>{/** 6145 * @author Richard Davey <[email protected]> 6146 * @copyright 2013-2023 Photon Storm Ltd. 6147 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6148 */var d=e(63515),g=function(r){return d(r,90)};l.exports=g},63515:(l,T,e)=>{/** 6149 * @author Richard Davey <[email protected]> 6150 * @copyright 2013-2023 Photon Storm Ltd. 6151 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6152 */var d=e(97494),g=e(78581),r=function(a,h){if(h===void 0&&(h=90),!d(a))return null;if(typeof h!="string"&&(h=(h%360+360)%360),h===90||h===-270||h==="rotateLeft")a=g(a),a.reverse();else if(h===-90||h===270||h==="rotateRight")a.reverse(),a=g(a);else if(Math.abs(h)===180||h==="rotate180"){for(var n=0;n<a.length;n++)a[n].reverse();a.reverse()}return a};l.exports=r},14305:(l,T,e)=>{/** 6153 * @author Richard Davey <[email protected]> 6154 * @copyright 2013-2023 Photon Storm Ltd. 6155 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6156 */var d=e(63515),g=function(r){return d(r,-90)};l.exports=g},27365:(l,T,e)=>{/** 6157 * @author Richard Davey <[email protected]> 6158 * @copyright 2013-2023 Photon Storm Ltd. 6159 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6160 */var d=e(77640),g=e(38487),r=function(a,h,n){if(h===void 0&&(h=0),n===void 0&&(n=0),n!==0&&(n<0?d(a,Math.abs(n)):g(a,n)),h!==0)for(var o=0;o<a.length;o++){var f=a[o];h<0?d(f,Math.abs(h)):g(f,h)}return a};l.exports=r},78581:l=>{/** 6161 * @author Richard Davey <[email protected]> 6162 * @copyright 2013-2023 Photon Storm Ltd. 6163 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6164 */var T=function(e){for(var d=e.length,g=e[0].length,r=new Array(g),a=0;a<g;a++){r[a]=new Array(d);for(var h=d-1;h>-1;h--)r[a][h]=e[h][a]}return r};l.exports=T},13515:(l,T,e)=>{/** 6165 * @author Richard Davey <[email protected]> 6166 * @copyright 2013-2023 Photon Storm Ltd. 6167 * @license {@link https://opensource.org/licenses/MIT|MIT License}
6168 */l.exports={CheckMatrix:e(97494),MatrixToString:e(68428),ReverseColumns:e(59521),ReverseRows:e(51995),Rotate180:e(89011),RotateLeft:e(42549),RotateMatrix:e(63515),RotateRight:e(14305),Translate:e(27365),TransposeMatrix:e(78581)}},40581:l=>{/** 6169 * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer) 6170 * @author Richard Davey <[email protected]> 6171 * @copyright 2013-2023 Photon Storm Ltd. 6172 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6173 */var T="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=function(d,g){for(var r=new Uint8Array(d),a=r.length,h=g?"data:"+g+";base64,":"",n=0;n<a;n+=3)h+=T[r[n]>>2],h+=T[(r[n]&3)<<4|r[n+1]>>4],h+=T[(r[n+1]&15)<<2|r[n+2]>>6],h+=T[r[n+2]&63];return a%3===2?h=h.substring(0,h.length-1)+"=":a%3===1&&(h=h.substring(0,h.length-2)+"=="),h};l.exports=e},82329:l=>{/** 6174 * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer) 6175 * @author Richard Davey <[email protected]> 6176 * @copyright 2013-2023 Photon Storm Ltd. 6177 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6178 */for(var T="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=new Uint8Array(256),d=0;d<T.length;d++)e[T.charCodeAt(d)]=d;var g=function(r){r=r.substr(r.indexOf(",")+1);var a=r.length,h=a*.75,n=0,o,f,u,v;r[a-1]==="="&&(h--,r[a-2]==="="&&h--);for(var m=new ArrayBuffer(h),p=new Uint8Array(m),x=0;x<a;x+=4)o=e[r.charCodeAt(x)],f=e[r.charCodeAt(x+1)],u=e[r.charCodeAt(x+2)],v=e[r.charCodeAt(x+3)],p[n++]=o<<2|f>>4,p[n++]=(f&15)<<4|u>>2,p[n++]=(u&3)<<6|v&63;return m};l.exports=g},78417:(l,T,e)=>{/** 6179 * @author Richard Davey <[email protected]> 6180 * @copyright 2013-2023 Photon Storm Ltd. 6181 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6182 */l.exports={ArrayBufferToBase64:e(40581),Base64ToArrayBuffer:e(82329)}},22178:(l,T,e)=>{/** 6183 * @author Richard Davey <[email protected]> 6184 * @copyright 2013-2023 Photon Storm Ltd. 6185 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6186 */l.exports={Array:e(59959),Base64:e(78417),Objects:e(64615),String:e(50379),NOOP:e(72283),NULL:e(10618)}},32742:l=>{/** 6187 * @author Richard Davey <[email protected]> 6188 * @copyright 2013-2023 Photon Storm Ltd. 6189 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6190 */var T=function(e){var d={};for(var g in e)Array.isArray(e[g])?d[g]=e[g].slice(0):d[g]=e[g];return d};l.exports=T},28699:l=>{/** 6191 * @author Richard Davey <[email protected]> 6192 * @copyright 2013-2023 Photon Storm Ltd. 6193 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6194 */var T=function(e){var d,g,r;if(typeof e!="object"||e===null)return e;d=Array.isArray(e)?[]:{};for(r in e)g=e[r],d[r]=T(g);return d};l.exports=T},98611:(l,T,e)=>{/** 6195 * @author Richard Davey <[email protected]> 6196 * @copyright 2013-2023 Photon Storm Ltd. 6197 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6198 */var d=e(42911),g=function(){var r,a,h,n,o,f,u=arguments[0]||{},v=1,m=arguments.length,p=!1;for(typeof u=="boolean"&&(p=u,u=arguments[1]||{},v=2),m===v&&(u=this,--v);v<m;v++)if((r=arguments[v])!=null)for(a in r)h=u[a],n=r[a],u!==n&&(p&&n&&(d(n)||(o=Array.isArray(n)))?(o?(o=!1,f=h&&Array.isArray(h)?h:[]):f=h&&d(h)?h:{},u[a]=g(p,f,n)):n!==void 0&&(u[a]=n));return u};l.exports=g},20494:(l,T,e)=>{/** 6199 * @author Richard Davey <[email protected]> 6200 * @copyright 2013-2023 Photon Storm Ltd. 6201 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6202 */var d=e(5923),g=e(10850),r=function(a,h,n){var o=g(a,h,null);if(o===null)return n;if(Array.isArray(o))return d.RND.pick(o);if(typeof o=="object"){if(o.hasOwnProperty("randInt"))return d.RND.integerInRange(o.randInt[0],o.randInt[1]);if(o.hasOwnProperty("randFloat"))return d.RND.realInRange(o.randFloat[0],o.randFloat[1])}else if(typeof o=="function")return o(h);return o};l.exports=r},72632:l=>{/** 6203 * @author Richard Davey <[email protected]> 6204 * @copyright 2013-2023 Photon Storm Ltd. 6205 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6206 */var T=function(e,d,g){var r=typeof e;return!e||r==="number"||r==="string"?g:e.hasOwnProperty(d)&&e[d]!==void 0?e[d]:g};l.exports=T},94324:(l,T,e)=>{/** 6207 * @author Richard Davey <[email protected]> 6208 * @copyright 2013-2023 Photon Storm Ltd. 6209 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6210 */var d=e(10850),g=e(82897),r=function(a,h,n,o,f){f===void 0&&(f=n);var u=d(a,h,f);return g(u,n,o)};l.exports=r},10850:l=>{/** 6211 * @author Richard Davey <[email protected]> 6212 * @copyright 2013-2023 Photon Storm Ltd. 6213 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6214 */var T=function(e,d,g,r){if(!e&&!r||typeof e=="number")return g;if(e&&e.hasOwnProperty(d))return e[d];if(r&&r.hasOwnProperty(d))return r[d];if(d.indexOf(".")!==-1){for(var a=d.split("."),h=e,n=r,o=g,f=g,u=!0,v=!0,m=0;m<a.length;m++)h&&h.hasOwnProperty(a[m])?(o=h[a[m]],h=h[a[m]]):u=!1,n&&n.hasOwnProperty(a[m])?(f=n[a[m]],n=n[a[m]]):v=!1;return u?o:v?f:g}else return g};l.exports=T},87701:l=>{/** 6215 * @author Richard Davey <[email protected]> 6216 * @copyright 2013-2023 Photon Storm Ltd. 6217 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6218 */var T=function(e,d){for(var g=0;g<d.length;g++)if(!e.hasOwnProperty(d[g]))return!1;return!0};l.exports=T},53523:l=>{/** 6219 * @author Richard Davey <[email protected]> 6220 * @copyright 2013-2023 Photon Storm Ltd. 6221 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6222 */var T=function(e,d){for(var g=0;g<d.length;g++)if(e.hasOwnProperty(d[g]))return!0;return!1};l.exports=T},19256:l=>{/** 6223 * @author Richard Davey <[email protected]> 6224 * @copyright 2013-2023 Photon Storm Ltd. 6225 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6226 */var T=function(e,d){return e.hasOwnProperty(d)};l.exports=T},42911:l=>{/** 6227 * @author Richard Davey <[email protected]> 6228 * @copyright 2013-2023 Photon Storm Ltd. 6229 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6230 */var T=function(e){if(!e||typeof e!="object"||e.nodeType||e===e.window)return!1;try{if(e.constructor&&!{}.hasOwnProperty.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch{return!1}return!0};l.exports=T},30657:(l,T,e)=>{/** 6231 * @author Richard Davey <[email protected]> 6232 * @copyright 2013-2023 Photon Storm Ltd. 6233 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6234 */var d=e(32742),g=function(r,a){var h=d(r);for(var n in a)h.hasOwnProperty(n)||(h[n]=a[n]);return h};l.exports=g},72066:(l,T,e)=>{/** 6235 * @author Richard Davey <[email protected]> 6236 * @copyright 2013-2023 Photon Storm Ltd. 6237 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6238 */var d=e(32742),g=function(r,a){var h=d(r);for(var n in a)h.hasOwnProperty(n)&&(h[n]=a[n]);return h};l.exports=g},28820:(l,T,e)=>{/** 6239 * @author Richard Davey <[email protected]> 6240 * @copyright 2013-2023 Photon Storm Ltd. 6241 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6242 */var d=e(19256),g=function(r,a){for(var h={},n=0;n<a.length;n++){var o=a[n];d(r,o)&&(h[o]=r[o])}return h};l.exports=g},22440:l=>{/** 6243 * @author Richard Davey <[email protected]> 6244 * @copyright 2013-2023 Photon Storm Ltd. 6245 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6246 */var T=function(e,d,g){if(!e||typeof e=="number")return!1;if(e.hasOwnProperty(d))return e[d]=g,!0;if(d.indexOf(".")!==-1){for(var r=d.split("."),a=e,h=e,n=0;n<r.length;
6246n++)if(a.hasOwnProperty(r[n]))h=a,a=a[r[n]];else return!1;return h[r[r.length-1]]=g,!0}return!1};l.exports=T},64615:(l,T,e)=>{/** 6247 * @author Richard Davey <[email protected]> 6248 * @copyright 2013-2023 Photon Storm Ltd. 6249 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6250 */l.exports={Clone:e(32742),DeepCopy:e(28699),Extend:e(98611),GetAdvancedValue:e(20494),GetFastValue:e(72632),GetMinMaxValue:e(94324),GetValue:e(10850),HasAll:e(87701),HasAny:e(53523),HasValue:e(19256),IsPlainObject:e(42911),Merge:e(30657),MergeRight:e(72066),Pick:e(28820),SetValue:e(22440)}},69429:l=>{/** 6251 * @author Richard Davey <[email protected]> 6252 * @copyright 2013-2023 Photon Storm Ltd. 6253 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6254 */var T=function(e,d){return e.replace(/%([0-9]+)/g,function(g,r){return d[Number(r)-1]})};l.exports=T},76400:l=>{/** 6255 * @author Richard Davey <[email protected]> 6256 * @copyright 2013-2023 Photon Storm Ltd. 6257 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6258 */var T=function(e,d,g,r){d===void 0&&(d=0),g===void 0&&(g=" "),r===void 0&&(r=3),e=e.toString();var a=0;if(d+1>=e.length)switch(r){case 1:e=new Array(d+1-e.length).join(g)+e;break;case 3:var h=Math.ceil((a=d-e.length)/2),n=a-h;e=new Array(n+1).join(g)+e+new Array(h+1).join(g);break;default:e=e+new Array(d+1-e.length).join(g);break}return e};l.exports=T},76872:l=>{/** 6259 * @author Richard Davey <[email protected]> 6260 * @copyright 2013-2023 Photon Storm Ltd. 6261 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6262 */var T=function(e,d){return d===0?e.slice(1):e.slice(0,d-1)+e.slice(d)};l.exports=T},8051:l=>{/** 6263 * @author Richard Davey <[email protected]> 6264 * @copyright 2013-2023 Photon Storm Ltd. 6265 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6266 */var T=function(e){return e.split("").reverse().join("")};l.exports=T},76583:l=>{/** 6267 * @author Richard Davey <[email protected]> 6268 * @copyright 2013-2023 Photon Storm Ltd. 6269 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6270 */var T=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var d=Math.random()*16|0,g=e==="x"?d:d&3|8;return g.toString(16)})};l.exports=T},40587:l=>{/** 6271 * @author Richard Davey <[email protected]> 6272 * @copyright 2013-2023 Photon Storm Ltd. 6273 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6274 */var T=function(e){return e&&e[0].toUpperCase()+e.slice(1)};l.exports=T},50379:(l,T,e)=>{/** 6275 * @author Richard Davey <[email protected]> 6276 * @copyright 2013-2023 Photon Storm Ltd. 6277 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6278 */l.exports={Format:e(69429),Pad:e(76400),RemoveAt:e(76872),Reverse:e(8051),UppercaseFirst:e(40587),UUID:e(76583)}}},c={};function C(l){var T=c[l];if(T!==void 0)return T.exports;var e=c[l]={exports:{}};return s[l](e,e.exports,C),e.exports}C.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}();var S=C(92491);return S})())})(Xx);var $e=Xx.exports;const Pf={}.VITE_ENV==="development",At={TILE_SIZE:64,PLAYER_SCALE:.8,MOVE_SPEED:250,WINDOW_MAX_WIDTH:1200,WINDOW_MAX_HEIGHT:800,DEBUG_ALPHA:Pf?.5:0,MESSAGE_OFFSET:20,FONT:"pixel",TEXT_SPEED:10};function rS(i,t){return{x:i*At.TILE_SIZE,y:t*At.TILE_SIZE}}const jt={COLLEGE:"CollegeScene",COLLEGE_2:"CollegeScene2",COLLEGE_3:"CollegeScene3",CLASSROOM:"InnerClassroom",LIBRARY:"LibraryScene",BATH:"BathScene",CASINO:"CasinoScene",GYM:"GymScene",NURSERY:"NurseryScene",PRINCIPAL:"PrincipalScene",MAIN:"MainScene",GAME_1:"Game1Scene"},Wh="ok",Hh=i=>{i.music={dialog:i.sound.add("dialogo_snd",{volume:.7,loop:!1}),quest:i.sound.add("quest_snd",{volume:.8,loop:!1}),intro:i.sound.add("intro_snd",{volume:.8,loop:!0}),bg:i.sound.add("bg_snd",{volume:.8,loop:!0}),game:i.sound.add("game_snd",{volume:.4,loop:!0}),win:i.sound.add("win_snd",{volume:1,loop:!1}),lose:i.sound.add("lose_snd",{volume:1,loop:!1}),click:i.sound.add("click_snd",{volume:.4,loop:!1}),step:i.sound.add("step_snd",{volume:.1,loop:!0}),moveBlock:i.sound.add("move_block_snd",{volume:.4,loop:!1}),rotateBlock:i.sound.add("rotate_block_snd",{volume:.4,loop:!1}),destroyBlocks:i.sound.add("destroy_blocks_snd",{volume:.4,loop:!1}),moveBlockDown:i.sound.add("move_block_down_snd",{volume:.2,loop:!1}),blockNwe:i.sound.add("block_new_snd",{volume:.5,loop:!1}),right:i.sound.add("right_snd",{volume:.5,loop:!1}),wrong:i.sound.add("wrong_snd",{volume:.5,loop:!1}),turn:i.sound.add("turn_snd",{volume:.5,loop:!1}),neutral:i.sound.add("neutral_snd",{volume:.5,loop:!1}),end:i.sound.add("end_snd",{volume:.5,loop:!0}),questComplete:i.sound.add("quest_complete_snd",{volume:.5,loop:!1})},ut.quest=()=>{i.music.quest.play()},ut.intro=()=>{i.music.intro.play()},re.intro=()=>{i.music.intro.stop()},ut.bg=()=>{i.music.bg.play(),Ia.bg=i.music.bg.isPlaying}
6278,re.bg=()=>{i.music.bg.stop(),Ia.bg=i.music.bg.isPlaying},ut.game=()=>{i.music.game.play()},re.game=()=>{i.music.game.stop()},ut.win=()=>{i.music.win.play()},ut.lose=()=>{i.music.lose.play()},ut.dialog=()=>{i.music.dialog.play()},ut.click=()=>{i.music.click.play()},ut.step=()=>{i.music.step.play()},re.step=()=>{i.music.step.stop()},ut.moveBlock=()=>{i.music.moveBlock.play()},ut.rotateBlock=()=>{i.music.rotateBlock.play()},ut.destroyBlocks=()=>{i.music.destroyBlocks.play()},ut.moveBlockDown=()=>{i.music.moveBlockDown.play()},ut.blockNew=()=>{i.music.blockNwe.play()},ut.right=()=>{i.music.right.play()},ut.wrong=()=>{i.music.wrong.play()},ut.turn=()=>{i.music.turn.play()},ut.neutral=()=>{i.music.neutral.play()},ut.end=()=>{i.music.end.play()},re.end=()=>{i.music.end.stop()},ut.questComplete=()=>{i.music.questComplete.play()}},ut={},re={},Ia={},_a=it(!1),Fp=it(1),aS=it(1),Zr=it({win:()=>{console.log("WIN !!!")},lose:()=>{console.log("LOSE !!!")},close:()=>{console.log("CLOSE !!!")}}),js=()=>({openGame:(s,c)=>{_a.value||(re.bg&&re.bg(),ut.game&&ut.game(),_a.value=!0,Fp.value=s,aS.value=(c==null?void 0:c.level)||1,c!=null&&c.winCb&&(Zr.value.win=c==null?void 0:c.winCb),c!=null&&c.loseCb&&(Zr.value.lose=c==null?void 0:c.loseCb),c!=null&&c.closeCb&&(Zr.value.close=c==null?void 0:c.closeCb))},closeGame:async s=>{_a.value&&(console.log("CLOSE"),_a.value=!1,re.game&&re.game(),ut.bg&&ut.bg(),Zr.value[s]&&(await Zr.value[s](),s==="lose"&&await Zr.value.close()))},showGameModal:Ap(_a),gameType:Ap(Fp)}),cr=it(!1),Ip=it({char:"",portrait:"",charName:"",text:"",mood:"",actions:[]}),tn=it("dialog"),fn=()=>{const i=l=>{tn.value="dialog",cr.value=!0,Ip.value=l},t=l=>{switch(l){case 1:tn.value="instructions1";break;case 2:tn.value="instructions2";break;case 3:tn.value="instructions3";break}cr.value=!0},s=l=>{switch(l){case 1:tn.value="options1";break;case 2:tn.value="options2";break;case 3:tn.value="options3";break}cr.value=!0},c=()=>{cr.value=!1},C=()=>{cr.value=!1},S=()=>{tn.value="map",cr.value=!0};return{show:wt(()=>cr.value),dialogMode:wt(()=>tn.value),showRmDialog:i,hideRmDialog:C,dialogData:wt(()=>Ip.value),showInstructions:t,showRmQuestOptions:s,hideRmQuestOptions:c,showRmMap:S}},$h=(i,t,s,c,C)=>{const l=C||"bg",d={bg:{RT:"bg_rt",LT:"bg_lt",TC:"bg_tc",RB:"bg_rb",LB:"bg_lb",BC:"bg_bc",RC:"bg_rc",LC:"bg_lc",CC:"bg_cc"},dialog:{RT:"dialog_rt",LT:"dialog_lt",TC:"dialog_tc",RB:"dialog_rb",LB:"dialog_lb",BC:"dialog_bc",RC:"dialog_rc",LC:"dialog_lc",CC:"dialog_cc"}},g=i.add.container((c==null?void 0:c.x)||0,(c==null?void 0:c.y)||0),r=i.add.image(0,0,d[l].RT).setOrigin(0,0).setDepth(1),a=i.add.image(t-25,0,d[l].LT).setOrigin(0,0).setDepth(1),h=i.add.container(25,0),n=Math.ceil((t-25*2)/25);for(let M=0;M<n;M++){const w=i.add.sprite(M*25,0,d[l].TC).setOrigin(0,0).setDepth(0);h.add(w)}const o=i.add.image(0,s-25,d[l].RB).setOrigin(0,0).setDepth(1),f=i.add.image(t-25,s-25,d[l].LB).setOrigin(0,0).setDepth(1),u=i.add.container(25,s-25),v=Math.ceil((t-25*2)/25);for(let M=0;M<v;M++){const w=i.add.sprite(M*25,0,d[l].BC).setOrigin(0,0).setDepth(0);u.add(w)}const m=i.add.container(0,25),p=Math.ceil((s-25*2)/25);for(let M=0;M<p;M++){const w=i.add.sprite(0,M*25,d[l].RC).setOrigin(0,0).setDepth(0);m.add(w)}const x=i.add.container(t-25,25),y=Math.ceil((s-25*2)/25);for(let M=0;M<y;M++){const w=i.add.sprite(0,M*25,d[l].LC).setOrigin(0,0).setDepth(0);x.add(w)}const P=i.add.container(25,25),b=Math.ceil((t-25*2)/25),E=Math.ceil((s-25*2)/25);for(let M=0;M<E;M++)for(let w=0;w<b;w++){const A=i.add.sprite(w*25,M*25,d[l].CC).setOrigin(0,0).setDepth(0);P.add(A)}return g.add([P,m,x,h,r,a,u,o,f]),g},oS=(i,t,s)=>{const C={RT:"dialog_rt",LT:"dialog_lt",TC:"dialog_tc",RB:"dialog_rb",LB:"dialog_lb",BC:"dialog_bc",RC:"dialog_rc",LC:"dialog_lc",CC:"dialog_cc"},S=i.add.container(s.x||0,s.y||0),l=i.add.image(t.w-50,0,C.RT).setOrigin(0,0).setDepth(1),T=i.add.image(0,0,C.LT).setOrigin(0,0).setDepth(1),e=i.add.container(50,0);e.width=t.w-50*2;const d=Math.ceil((t.w-50*2)/50);for(let v=0;v<d;v++){const m=i.add.sprite(v*50,0,C.TC).setOrigin(0,0).setDepth(0);e.add(m)}const g=i.add.image(t.w-50,50,C.RC).setOrigin(0,0).setDepth(1),r=i.add.image(0,50,C.LC).setOrigin(0,0).setDepth(1),a=i.add.container(50,50);a.width=t.w-50*2;const h=Math.ceil((t.w-50*2)/50);for(let v=0;v<h;v++){const m=i.add.sprite(v*50,0,C.CC).setOrigin(0,0).setDepth(0);a.add(m)}const n=i.add.image(t.w-50,100,C.RB).setOrigin(0,0).setDepth(1),o=i.add.image(0,100,C.LB).setOrigin(0,0).setDepth(1),f=i.add.container(50,50*2);f.width=t.w-50*2;const u=Math.ceil((t.w-50*2)/50);for(let v=0;v<u;v++){const m=i.add.sprite(v*50,0,C.BC).setOrigin(0,0).setDepth(0);f.add(m)}return S.add([l,T,e,g,r,a,n,o,f]),S},Da=Math.min(window.innerWidth,800),Dp=window.innerHeight,xe=At.MESSAGE_OFFSET,Es=async(i,t,s)=>{var m,p,x,y;i.isDisplayingText=!0;const c=!!(s!=null&&s.character),C=5,S=i.add.container(0,0).setDepth(C),l=i.add.rectangle(0,0,10,10,"0x000000",.5),T={wordWrap:{width:Da-xe*5-(c?130:0),useAdvancedWrap:!0},fontSize:"21px",fontFamily:At.FONT,color:"#000"},e=i.add.text(xe*3+(c?120:0),xe*2+(c?30:0),t,T).setDepth(10);l.setVisible(!1),l.setOrigin(0,0),S.setScrollFactor(0),l.setPosition(xe,xe),l.width=Da-xe*2;let d=(m=s==null?void 0:s.character)!=null&&m.portrait?0:-40;const g=Math.max(e.height,150),r=i.add.container(0,g).setDepth(C);r.setVisible(!1),s!=null&&s.btns&&(s.btns.forEach((P,b)=>{if(b===0){const{btn:E,h:M}=lS(i,d-35,l.width,P.text,P.cb);r.add(E),d+=M}else if(b===1){const{btn:E,h:M}=hS(i,d-35,l.width,P.text,P.cb);r.add(E),d+=M+5}else if(b===2){const{btn:E,h:M}=uS(i,d-35,l.width,P.text,P.cb);r.add(E),d+=M+15}else if(b===3){const{btn:E,h:M}=dS(i,d-35,l.width,P.text,P.cb);r.add(E),d+=M+15}}),s.btns.length===1?d+=60:s.btns.length===2?d+=70:s.btns.length===3?d+=115:s.btns.length===4&&(d+=65));const a=Math.ceil((e.height+xe*2)/25)*25,h=e.height+xe*2+d+10+(c?30:0),n=h<a?a:h,o=Math.ceil((Dp-xe*2)/25)*25,f=Dp-xe*2,u=f<o?o:f;l.height=Math.max(Math.min(n,u),150);const v=$h(i,l.width,l.height,{x:xe,y:xe});if(S.add([v,e,r]),c&&((p=s==null?void 0:s.character)!=null&&p.portraitKey)){const P=i.add.rectangle(xe*3,xe*2,110,110,"0x000000",.5).setOrigin(0,0),b=i.physics.add.sprite(xe*3,xe*2,s.character.portraitKey).setOrigin(0,0),E=i.add.text(xe*3+(c?120:0),xe*2,((x=s==null?void 0:s.character)==null?void 0:x.name)+":",T).setDepth(10);S.add([P,E,b])}i.message.container=S,i.message.background=l,i.message.text=e,i.message.background.setInteractive(),i.input.on("pointerdown",P=>{Phaser.Geom.Rectangle.Contains(v.getBounds(),P.x,P.y)?i.isMovableClick=!1:i.isMovableClick=!0}),S.setVisible(!0),r.setVisible(!0),(y=i.music)!=null&&y.dialog&&i.music.dialog.play()},bh=i=>{var t,s,c,C;(t=i.message.container)==null||t.setVisible(!1),(s=i.message.background)==null||s.destroy(),(c=i.message.text)==null||c.destroy(),(C=i.message.container)==null||C.destroy(),i.message.container=null,i.message.background=null,i.message.text=null,i.isDisplayingText=!1},Ks=(i,t,s)=>{setTimeout(()=>{i.locationName===t&&bh(i)},s||1500)},lS=(i,t,s,c,C)=>{const S=i.add.container(60,t+xe*2+10).setDepth(10),l=i.add.rectangle(0,0,s-100,34,"0x000000",.15).setOrigin(0,0).setDepth(10),T=i.add.text(20,6,c,{fontSize:"21px",fontFamily:At.FONT,color:"#000",wordWrap:{width:Da-xe*8,useAdvancedWrap:!0}}).setDepth(10);return l.height=T.height+12,S.add([l,T]),i.input.on("pointerdown",e=>{Phaser.Geom.Rectangle.Contains(S.getBounds(),e.x,e.y)&&(console.log("OPT DOWN 1"),!i.message.isWriting&&C())}),{btn:S,h:l.height}},hS=(i,t,s,c,C)=>{const S=i.add.container(60,t+xe*3).setDepth(10),l=i.add.rectangle(0,0,s-100,34,"0x000000",.15).setOrigin(0,0).setDepth(10),T=i.add.text(20,6,c,{fontSize:"21px",fontFamily:At.FONT,color:"#000",wordWrap:{width:Da-xe*8,useAdvancedWrap:!0}}).setDepth(10);return l.height=T.height+12,S.add([l,T]),i.input.on("pointerdown",e=>{Phaser.Geom.Rectangle.Contains(S.getBounds(),e.x,e.y)&&(console.log("OPT DOWN 2"),!i.message.isWriting&&C())}),{btn:S,h:l.height}},uS=(i,t,s,c,C)=>{const S=i.add.container(60,t+xe*3.3).setDepth(10),l=i.add.rectangle(0,0,s-100,34,"0x000000",.15).setOrigin(0,0).setDepth(10),T=i.add.text(20,6,c,{fontSize:"21px",fontFamily:At.FONT,color:"#000",wordWrap:{width:Da-xe*8,useAdvancedWrap:!0}}).setDepth(10);return l.height=T.height+12,S.add([l,T]),i.input.on("pointerdown",e=>{Phaser.Geom.Rectangle.Contains(S.getBounds(),e.x,e.y)&&(console.log("OPT DOWN 3"),!i.message.isWriting&&C())}),{btn:S,h:l.height}},dS=(i,t,s,c,C)=>{const S=i.add.container(60,t+xe*3.3).setDepth(10),l=i.add.rectangle(0,0,s-100,34,"0x000000",.15).setOrigin(0,0).setDepth(10),T=i.add.text(20,6,c,{fontSize:"21px",fontFamily:At.FONT,color:"#000",wordWrap:{width:Da-xe*8,useAdvancedWrap:!0}}).setDepth(10);return l.height=T.height+12,S.add([l,T]),i.input.on("pointerdown",e=>{Phaser.Geom.Rectangle.Contains(S.getBounds(),e.x,e.y)&&(console.log("OPT DOWN 4"),!i.message.isWriting&&C())}),{btn:S,h:l.height}},Bp=it(!1),Cn=it(!1),Jr=it(null),xl=it([]),id=it(null),yl=it({1:2,2:2,3:2}),kp=it(!1),Gp=it(!1),{showRmQuestOptions:cS,hideRmQuestOptions:Np}=fn(),Xi=()=>{const i=e=>{Bp.value=e},t=e=>{Cn.value===e||!xl.value.length||(e?(ut.click&&ut.click(),Cn.value=!0,clearTimeout(Jr.value),Jr.value=setTimeout(()=>{Cn.value&&(Cn.value=!1)},5e3)):(clearTimeout(Jr.value),Jr.value=null,Cn.value=!1))},s=(e,d)=>{Cn.value===e||!xl.value.length||(e&&d?(ut.click&&ut.click(),cS(d)):Np())},c=e=>{clearTimeout(Jr.value),e&&ut.click&&ut.click(),Jr.value=null,Cn.value=!1,kp.value=e},C=e=>{xl.value=[...e]},S=(e,d)=>{yl.value[e.toString()]=d},l=e=>{id.value=e},T=e=>{Gp.value=e};return{iconCtrl:wt(()=>Bp.value),optionsCtrl:wt(()=>Cn.value),epilogoCtrl:wt(()=>kp.value),questStatus:wt(()=>xl.value),epilogo:wt(()=>yl.value),nextStageFn:()=>
6278{Np(),id.value&&id.value()},setNextFn:l,showEpilogo:c,setEpilogo:S,showIcon:i,showOptions:t,setQuestStatus:C,loaderModalCtrl:wt(()=>Gp.value),setLoaderModal:T,getEpilogo:()=>({...yl.value}),setEpilogoAll:e=>{yl.value={...e}},showDetailedOption:s}},fS=Ws(),vt=(i,t,s,c)=>{const C={stage:i,key:t,game:s,score:c||0};return fS.request("POST","/user/progress",{auth:!0,body:C})},{loadCharHalfBody:Cs}=Te(),{setEpilogo:Ux,showOptions:jn}=Xi(),vS="<< Continuar >>",q="<< Terminar conversación >>",Z=[{text:vS,dispatch:"next"}],bf={dialogs:{1:[{id:1,emitter:"ariel",text:"¡Hola!, ¿Jugamos a algo?",mood:"neutral",actions:[{text:"Jugar a memorice",dispatch:"game",game:{type:2,onLoad:async()=>{await Cs("ariel","A ver... ¿Cómo está tu memoria?","Me acuerdo hasta de que comà en navidad")},winCb:()=>{console.log("WIN !!!")},loseCb:()=>{console.log("LOSE !!!")},onComplete:{next:"ariel",data:[{n:1,char:"ariel"}],win:{next:"ariel",data:[{n:2,char:"ariel"}]}}}},{text:"Jugar a bloques",dispatch:"game",game:{type:4,onLoad:async()=>{await Cs("ariel","Este es mi juego favorito","Yo en este siempre gano")},winCb:()=>{console.log("WIN !!!")},loseCb:()=>{console.log("LOSE !!!")},onComplete:{next:"ariel",data:[{n:1,char:"ariel"}],win:{next:"ariel",data:[{n:2,char:"ariel"}]}}}},{text:"Jugar a búsqueda",dispatch:"game",game:{type:5,onLoad:async()=>{await Cs("ariel","No parece que puedas encontrarlos todos","Ya verás, soy muy hábil en esto")},winCb:()=>{console.log("WIN !!!")},loseCb:()=>{console.log("LOSE !!!")},onComplete:{next:"ariel",data:[{n:1,char:"ariel"}],win:{next:"ariel",data:[{n:2,char:"ariel"}]}}}},{text:"<<No gracias, quizás después>>",dispatch:"close"}]}],2:[{id:1,emitter:"ariel",text:"¡Eso fue genial!, tenemos que repetirlo",mood:"neutral",actions:[{text:"<<Si, será divertido>>",dispatch:"complete",onComplete:[{key:"ariel",status:"none",step:1}]}]}]}},pS={dialogs:{1:[{id:1,emitter:"cris",text:"¿Supiste? Un grupo se va a juntar al costado de la biblioteca a conversar sobre el uniformeâ¦",mood:"neutral",actions:[{text:"Ire a ver",dispatch:"complete",onComplete:[{key:"cris",status:"none",step:2},{key:"dani",status:"exclamation"}],cb:()=>{yt(1,"principal","started0")}}]}],2:[{id:1,emitter:"cris",text:"La biblioteca está antes del casino, sigue hacia arriba y ve a la derecha en los baños.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],3:[{id:1,emitter:"cris",text:"Ojalá pudiéramos venir con ropa normal, no me gusta el uniforme",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},mS={dialogs:{1:[{id:1,emitter:"dani",text:"¡Hola!",mood:"neutral",onDisplay:[{key:"cris",status:null,step:3}],actions:[{text:"Me dijeron que los encontrarÃa aquÃ.",dispatch:"next"}]},{id:2,emitter:"jose",text:"Estamos pensando en ponerle un poco de color al liceo, es todo tan gris, muy poca diversidad.",mood:"neutral",actions:[{text:"Podemos meternos en problemas.",dispatch:"set",onSet:{next:"dani",data:[{n:2,char:"dani"}]},cb:()=>{vt(1,"dani-1-1","RM"),yt(1,"principal","started0-b")}},{text:"¡Cuenten conmigo!",dispatch:"set",onSet:{next:"dani",data:[{n:5,char:"dani"},{n:3,char:"cris"}]},cb:()=>{vt(1,"dani-1-2","RM")}}]}],2:[{id:1,emitter:"player",text:"Yo soy nuevo/a en el colegio. Mejor no me meto en atados.",mood:"neutral",actions:Z},{id:2,emitter:"jose",text:"Qué fome.",mood:"neutral",actions:Z},{id:3,emitter:"dani",text:"Igual te entiendo, pero prefiero hacer algo.",mood:"neutral",actions:Z},{id:4,emitter:"jose",text:"Yo pienso venir con mi cosplay.",mood:"neutral",actions:Z},{id:5,emitter:"mati",text:"Nosotres igual vamos a insistir con esta idea. Ahà te contamos cómo nos va.",mood:"neutral",actions:[{text:q,dispatch:"complete",onComplete:[{key:"dani",status:null,step:0,stepSelector(){return 0}},{key:"mati",status:"exclamation",step:1,delay:0}]}]}],3:[{id:1,emitter:"dani",text:"Si convencemos a los de las gradas, el director demás nos pesca.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],4:[{id:1,emitter:"dani",text:"La subdirectora no es fácil de convencer, pero seguro tu puedes",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],5:[{id:1,emitter:"jose",text:"¡Buena!",mood:"neutral",actions:Z},{id:2,emitter:"dani",text:"Queremos proponer un âDÃa con ropa de calleâ. Asà todos podemos vestirnos como nos gusta, au
6278nque sea por un dÃa.",mood:"neutral",actions:Z},{id:3,emitter:"jose",text:"Hasta puedo traer el cosplay de mi juego favorito.",mood:"neutral",actions:Z},{id:4,emitter:"mati",text:"¿Qué crees que deberÃamos hacer?",mood:"neutral",actions:[{text:"Ir a hablar con la Subdire para hablarle de nuestra idea.",dispatch:"complete",onComplete:[{key:"dani",status:"none",step:6},{key:"mati",status:"none",step:6},{key:"sub_directora",status:"question",step:2}],cb:()=>{yt(1,"principal","started3"),vt(1,"dani-5-1","RM")}},{text:"Ir a hablar con el director nuevo",dispatch:"complete",onComplete:[{key:"dani",status:"none",step:7},{key:"mati",status:"none",step:7},{key:"director",status:"question",step:0,stepSelector:()=>Fe(1,"leo",[{str:"started1",n:8},{str:"finished",n:2},{str:"off",n:2}])}],cb:()=>{yt(1,"principal","started4"),vt(1,"dani-5-2","RM")}},{text:"Ir a hablar con más gente a las gradas",dispatch:"complete",onComplete:[{key:"dani",status:null,step:6},{key:"mati",status:null,step:7},{key:"lino",status:"exclamation",step:0,stepSelector:()=>Fe(1,"teo",[{str:"started1",n:6}],2)}],cb:()=>{yt(1,"principal","started5"),vt(1,"dani-5-3","RM")}}]}],6:[{id:1,emitter:"dani",text:"Puede ser difÃcil, pero demás convences a la subdire.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],7:[{id:1,emitter:"dani",text:"Igual el director nuevo es buena onda, ¡dale!.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],8:[{id:1,emitter:"dani",text:"Te fue mal ¿cierto?",mood:"neutral",actions:Z},{id:2,emitter:"jose",text:"Lo sabìa",mood:"neutral",actions:Z},{id:3,emitter:"dani",text:"Mejor hablamos con los cabres en las gradas, seguro nos apoyan y seremos muchos más para convencer a la dirección.",mood:"neutral",actions:[{text:"Ir a hablar con más gente a las gradas.",dispatch:"complete",onComplete:[{key:"dani",status:"none",step:9},{key:"mati",status:"none",step:7},{key:"lino",status:"exclamation",step:2}],cb:()=>{yt(1,"principal","started5"),vt(1,"dani-8-1","RM")}}]}],9:[{id:1,emitter:"dani",text:"No deberÃa ser difÃcil convencer a los cabres en las gradas.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],10:[{id:1,emitter:"dani",text:"Igual espero verte en el dÃa sin uniforme, ten seguro que lo vamos a lograr.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],11:[{id:1,emitter:"dani",text:"¿Cómo te fue?, ¿Te escucharon?",mood:"neutral",actions:Z},{id:2,emitter:"player",text:"Si, les encantó la idea, están super motivados.",mood:"neutral",actions:Z},{id:3,emitter:"jose",text:"¡Buena!, sabÃa que lo lograrÃas.",mood:"neutral",actions:Z},{id:4,emitter:"dani",text:"Ahora somos caleta, podremos convencer al director.",mood:"neutral",actions:[{text:"Yo creo que sÃ, vamos a hablar con él.",dispatch:"complete",onComplete:[{key:"director",status:"question",step:0,stepSelector:()=>Fe(1,"leo",[{str:"started1",n:8},{str:"finished",n:6},{str:"off",n:6}])},{key:"dani",status:"none",step:12}],cb:()=>{yt(1,"principal","started7")}}]}],12:[{id:1,emitter:"dani",text:"Esperemos el director nos apoye, tenemos a muchos compañeres detrás",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],13:[{id:1,emitter:"dani",text:"¡Muy Bien, lo logramos!",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},gS={dialogs:{1:[{id:1,emitter:"player",text:"¿Están seguros de querer un dÃa sin uniforme?.",mood:"neutral",actions:Z},{id:2,emitter:"mati",text:"¡SÃ!.",mood:"neutral",actions:Z},{id:3,emitter:"dani",text:"De hecho, estuvimos hablando con otres cabres en las gradas.",mood:"neutral",actions:Z}
6278,{id:4,emitter:"jose",text:"¡A todo el mundo le gusta la idea!.",mood:"neutral",actions:Z},{id:5,emitter:"player",text:"<<¿Qué hago ahora?>>",mood:"neutral",actions:[{text:"Mejor no meterse",dispatch:"set",onSet:{next:"mati",data:[{n:2,char:"mati"},{n:3,char:"cris"}]},cb:()=>{vt(1,"mati-1-1","RM")}},{text:"Ir a hablar con la subdirectora",dispatch:"complete",onComplete:[{step:3,status:"none",key:"cris"},{key:"mati",status:"none",step:5},{key:"dani",status:"none",step:4},{key:"sub_directora",status:"question",step:2}],cb:()=>{yt(1,"principal","started3"),vt(1,"mati-1-2","RM")}},{text:"Ir a hablar con el director nuevo",dispatch:"complete",onComplete:[{step:3,status:"none",key:"cris"},{key:"mati",status:"none",step:4},{key:"dani",status:"none",step:3},{key:"director",status:"question",step:0,stepSelector:()=>Fe(1,"leo",[{str:"started1",n:8},{str:"finished",n:2},{str:"off",n:2}])}],cb:()=>{yt(1,"principal","started4"),vt(1,"mati-1-3","RM")}}]}],2:[{id:1,emitter:"player",text:"No sé. En verdad prefiero no meterme. Si hay algún atado prefiero mirar de lejos.",mood:"neutral",actions:Z},{id:2,emitter:"jose",text:"Cero rollo.",mood:"neutral",actions:Z},{id:3,emitter:"dani",text:"Nosotres vamos a seguir intentando.",mood:"neutral",actions:Z},{id:4,emitter:"jose",text:"Ya tengo elegido mi cosplay.",mood:"neutral",actions:Z},{id:5,emitter:"mati",text:"Yo creo que vamos a seguir buscando apoyo y luego vamos a hablar con el dire. Demás que apaña.",mood:"neutral",actions:[{text:q,dispatch:"complete",onComplete:[{key:"mati",status:"none",step:3},{key:"dani",status:"none",step:10}],cb:()=>{Ux(1,1),yt(1,"principal","finished"),jn(!0)}}]}],3:[{id:1,emitter:"mati",text:"Uff, deseanos suerte para poder convencer a todos, pero mientras vamos a clases no más.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],4:[{id:1,emitter:"mati",text:"¿El Director?, primero deberÃamos sumar a los que se juntan en las gradas.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],5:[{id:1,emitter:"mati",text:"¿La Subdirectora?, siempre anda por la entrada revisando todo.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],6:[{id:1,emitter:"mati",text:"La subdire me da miedo, pero demás que la convencemos.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],7:[{id:1,emitter:"mati",text:"Será divertido tener un dÃa sin uniforme.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],8:[{id:1,emitter:"mati",text:"DifÃcil que la subdire nos apoye, mejor buscar apoyo de más compañeres.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],9:[{id:1,emitter:"mati",text:"¡Genial!, no puedo esperar a que llegué el dÃa sin uniforme.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},xS={dialogs:{1:[{id:1,emitter:"sub_directora",text:"Las clases ya inician. No pierda el tiempo y dirÃjase a su salón.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],2:[{id:1,emitter:"player",text:"Señorita Subdirectora, tenemos la idea de hacer un dÃa con ropa de calle.",mood:"neutral",actions:Z},{id:2,emitter:"player",text:"¡Ese dÃa podemos venir con la ropa que queramos!",mood:"neutral",actions:Z},{id:3,emitter:"sub_directora",text:"!Con la pinta que quieran?! !¡Este es un colegio tradicional! gracias al uniforme hay menos discriminación y menos violencia !¡Esto serÃa un caos!",mood:"neutral",actions:[{text:"Explicar por que es buena idea un dÃa sin uniforme",dispatch:"game",game:{type:5,onLoad:async()=>{await Cs("subdirectora","Usted es muy joven para opinar en cosas de la institución","Todos deberáamos tener opinión")},winCb:()=>{console.log("WIN !!!")},loseCb:()=>{console.log("LOSE !!!")},onComplete:{next:"sub_directora",data:[{n:2,char:"sub_directora"},{key:"dani",status:"exclamation",step:3}],win:{next:"sub_directora",data:[{n:3,char:"sub_directora"}],cb:()=>{yt(1,"principal","started3b"),he(!0)}}}}},{text:q,dispatch:"close"}]}],3:[{id:1,emitter:"sub_directora",text:"Mire, joven, usted es nuevo y no conoce este colegio. ¡Acá nos apegamos a las tradiciones!.",mood:"neutral",actions:[{text:"Encontraré quien nos pueda ayudar",dispatch:"complete",onComplete:[{key:"sub_directora",
6278status:"none",step:4},{key:"dani",status:"exclamation",step:8},{key:"mati",status:"none",step:8}]}]}],4:[{id:1,emitter:"sub_directora",text:"En esta escuela no queremos alborotadores, ¡mejor vaya a su sala!",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},yS={dialogs:{1:[{id:1,emitter:"director",text:"¡Buen dÃa joven!, Las clases ya inician.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],2:[{id:1,emitter:"player",text:"¡Oiga, director, tenemos la idea de hacer un dÃa con ropa de calle! ¡Ese dÃa podemos venir con la ropa que queramos!",mood:"neutral",actions:Z},{id:2,emitter:"director",text:"Interesante. Cuénteme su idea.",mood:"neutral",actions:[{text:"Explicar la idea al director",dispatch:"game",game:{type:5,onLoad:async()=>{await Cs("director","Lo escucho con atención","Es una idea genial")},winCb:()=>{console.log("WIN !!!")},loseCb:()=>{console.log("LOSE !!!")},onComplete:{next:"director",data:[{n:2,char:"director"}],win:{next:"director",data:[{n:3,char:"director"}],cb:()=>{yt(1,"principal","started6")}}}}}]}],3:[{id:1,emitter:"director",text:"¿Tenemos la idea? ¿Quiénes son âtenemosâ? Mire, yo soy nuevo en el liceo y hasta el momento no ha sido fácil cambiar las cosas. Si tú me dijeras que muchos estudiantes quieren eso, serÃa más fácil para mà poder hacer algo.",mood:"neutral",actions:[{text:q,dispatch:"complete",onComplete:[{key:"director",status:"none",step:0,stepSelector:()=>Fe(1,"leo",[{str:"started1",n:4},{str:"off",n:1},{str:"finished",n:1}])},{key:"dani",status:"exclamation",step:8}]}]}],4:[{id:1,emitter:"player",text:"¡Oiga director! Allá hay un estudiante golpeando a otro por ser extranjero, ¡Eso es xenofobia! ¡No puede permitirlo!",mood:"neutral",actions:Z},{id:2,emitter:"director",text:"¿Está seguro?, esas son acusaciones muy graves",mood:"neutral",actions:[{text:"Explicar la situación al director",dispatch:"game",game:{type:5,onLoad:async()=>{await Cs("director","Espero que esto no sea una broma de mal gusto","Todos debemos ser respetados")},winCb:()=>{console.log("WIN !!!")},loseCb:()=>{console.log("LOSE !!!")},onComplete:{next:"director",data:[{n:4,char:"director"}],win:{next:"director",data:[{n:6,char:"leo"},{n:5,char:"director"}],cb:()=>{yt(1,"leo","finished"),he(!0)}}}}}]}],5:[{id:1,emitter:"director",text:"Voy inmediatamente a solucionar este asunto.",mood:"neutral",actions:[{text:q,dispatch:"complete",onComplete:[{key:"director",status:"none",step:0,stepSelector:()=>Fe(1,"principal",[{str:"started4",n:2},{str:"started7",n:6},{str:"finished",n:9}])}],cb:()=>jn(!0)}]}],6:[{id:1,emitter:"director",text:"Buen dÃa joven, tiene rostro que quiere decir algo, no parece que se pueda aguantar.",mood:"neutral",actions:Z},{id:2,emitter:"player",text:"Si, hemos hablado entre compañeres.",mood:"neutral",actions:Z},{id:3,emitter:"director",text:"Estupendo, nada como un buen diálogo entre pares, ¿en qué puedo ayudarlos?.",mood:"neutral",actions:Z},{id:3,emitter:"player",text:"¡Oiga, director, tenemos la idea de hacer un dÃa con ropa de calle! ¡Ese dÃa podemos venir con la pinta que queramos! ¡Tenemos mucho apoyo de les estudiantes!.",mood:"neutral",actions:Z},{id:4,emitter:"director",text:"Interesante. Cuénteme su idea.",mood:"neutral",actions:[{text:"Explicar la idea al director",dispatch:"game",game:{type:5,onLoad:async()=>{await Cs("director","Lo escucho con atención","Es una idea genial")},winCb:()=>{console.log("WIN !!!")},loseCb:()=>{console.log("LOSE !!!")},onComplete:{next:"director",data:[{n:6,char:"director"}],win:{next:"director",data:[{n:7,char:"director"}],cb:()=>{yt(1,"principal","finished"),Ux(1,2)}}}}}]}],7:[{id:1,emitter:"director",text:"A mà me parece una buena idea y veo que tiene suficiente apoyo de los estudiantes. Voy a buscar apoyo entre los profesores para que sea una realidad.",mood:"neutral",actions:[{text:q,dispatch:"complete",onComplete:[{key:"director",status:"none",stepSelector:()=>Fe(1,"leo",[{str:"started1",n:4},{str:"off",n:9},{str:"finished",n:9}])},{key:"dani",status:"none",step:13},{key:"mati",status:"none",step:9},{key:"lino",status:"none",step:4}],cb:()=>{jn(!0)}}]}],8:[{id:1,emitter:"director",text:"Buenos dÃas",mood:"neutral",actions:[{text:"Hablar sobre el dÃa sin uniforme.",dispatch:"set",onSet:{next:"director",data:[{n:0,char:"director",stepSelector:()=>Fe(1,"principal",[{str:"started4",n:2},{str:"started7",n:6}])}]}},{text:"Hablar sobre el bulling hacia Leo.",dispatch:"set",onSet:{next:"director",data:[{n:4,char:"director"}]}}]}],9:[{id:1,emitter:"director",text:"Conversaré con los profesores y haremos realidad el dÃa sin uniforme.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},CS={dialogs:{1:[{id:1,emitter:"lino",text:"¡Oh, que lata!, ya hay que ir a clases.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],2:[{id:1,emitter:"player",text:"¡Hola, gente! Con un grupo estamos pensando en tener un dÃa con ropa de calle. ¿qué opinan?",mood:"neutral",actions:Z},{id:2,emitter:"lino",text:"¿En serio?",mood:"neutral",actions:Z},{id:3,emitter:"nico",text:"¡Seguro la Subdire nos va a dejar, jajaja!",mood:"neutral",actions:Z},{id:4,emitter:"mile",text:"Mejor no nos metamos en problemas.",mood:"neutral",actions:Z},{id:5,emitter:"lino",text:"PodrÃa ser...",mood:"neutral",actions:[{text:"Vamos anÃmense, será divertido.",dispatch:"game",game:{type:4,onLoad:async()=>{await Cs("lino","Nos vamos a meter en problemas","No hay problema, pero tenemos que estar todos de acuerdo")},winCb:()=>{console.log("WIN !!!")},loseCb:()=>{console.log("LOSE !!!")},onComplete:{next:"lino",data:[{n:2,char:"lino"}],win:{next:"lino",data:[{n:3,char:"lino"}],cb:()=>{yt(1,"principal","started6")}}}}}]}
6278],3:[{id:1,emitter:"lino",text:"Creo que no es mala idea después de todo.",mood:"neutral",actions:Z},{id:2,emitter:"mile",text:"¡Hay que puro hacerla!",mood:"neutral",actions:Z},{id:3,emitter:"nico",text:"Yo creo que el Dire nuevo de más está de acuerdo!",mood:"neutral",actions:Z},{id:4,emitter:"lino",text:"No estoy seguro, pero bueno, probemos!",mood:"neutral",actions:Z},{id:5,emitter:"nico",text:"¡Vamos a decirle a otres compañeres para buscar más apoyo!",mood:"neutral",actions:[{text:q,dispatch:"complete",onComplete:[{key:"dani",status:"exclamation",step:11},{key:"lino",status:"none",step:0,stepSelector:()=>Fe(1,"teo",[{str:"started1",n:7}],5)}]}]}],4:[{id:1,emitter:"lino",text:"Ese dÃa será como una fiesta, no puedo esperar",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],5:[{id:1,emitter:"lino",text:"Esperemos que en la dirección nos pesquen",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],6:[{id:1,emitter:"lino",text:"¿Qué sucede?",mood:"neutral",actions:[{text:"Hablar sobre el dÃa sin uniforme",dispatch:"set",onSet:{next:"lino",data:[{n:2,char:"lino"}]}},{text:"Hablar sobre el bulling hacia Teo",dispatch:"set",onSet:{next:"lino",data:[{n:7,char:"lino"}]}}]}],7:[{id:1,emitter:"player",text:"Oigan, cabres, hay un matón molestando al cabro de lentes. DeberÃamos detenerlo.",mood:"neutral",actions:Z},{id:2,emitter:"lino",text:"Ese porro siempre en lo mismo.",mood:"neutral",actions:Z},{id:3,emitter:"nico",text:"ajajaj, yo quiero ir a ver.",mood:"neutral",actions:Z},{id:3,emitter:"mile",text:"Mejor no nos metemos.",mood:"neutral",actions:Z},{id:4,emitter:"lino",text:"No sé, qué hacer.",mood:"neutral",actions:Z},{id:5,emitter:"player",text:"DeberÃamos apoyarnos y no dejar que maltraten a otros",mood:"neutral",actions:[{text:"Convencerlos de ayudar a Teo",dispatch:"game",game:{type:4,onLoad:async()=>{await Cs("lino","Prefiero no meterme","DeberÃamos preocuparnos por el bienestar de todos")},winCb:()=>{console.log("WIN !!!")},loseCb:()=>{console.log("LOSE !!!")},onComplete:{next:"lino",data:[{n:5,char:"lino"}],win:{next:"lino",data:[{n:8,status:"none",char:"lino"}],cb:()=>{yt(1,"teo","finished"),he(!0)}}}}}]}],8:[{id:1,emitter:"lino",text:"Tienes razón, no deberÃamos dejar que lo molesten.",mood:"neutral",actions:[{text:q,dispatch:"complete",onComplete:[{key:"lino",status:"none",step:0,stepSelector:()=>Fe(1,"principal",[{str:"started5",n:2}],1)},{key:"teo",status:"none",step:6}],cb:()=>jn(!0)}]}]}},TS={dialogs:{1:[{id:1,emitter:"maton_1",text:"¡Jajaja! ¡Qué comida tan mala! ¿En tu paÃs no saben comer? ¿Por qué no te devuelves?",mood:"neutral",actions:Z},{id:2,emitter:"leo",text:"Tengo miedo.",mood:"crying",actions:Z},{id:3,emitter:"maton_1",text:"¡Este venezolano trajo un sándwich asqueroso y hediondo de colación! ¡Se merece una lección!",mood:"neutral",actions:Z},{id:4,emitter:"leo",text:"¡NO! ¡¿Por qué!?",mood:"crying",actions:Z},{id:5,emitter:"player",text:"<<¿Qué deberÃa hacer?>>",mood:"neutral",actions:[{text:"Detener al matón",dispatch:"set",onSet:{next:"leo",data:[{n:3,char:"leo"}]},cb:()=>{vt(1,"leo-1","RM")}},{text:"Ir a dar aviso al Director",dispatch:"complete",onComplete:[{key:"leo",status:"none",step:7},{key:"director",status:"none",step:0,stepSelector:()=>Fe(1,"principal",[{str:"started4",n:8},{str:"started7",n:8}],4)}],cb:()=>{yt(1,"leo","started1"),vt(1,"leo-2","RM")}},{text:"No meterme en problemas",dispatch:"complete",onComplete:[{key:"leo",status:"none",step:2}],cb:()=>{yt(1,"leo","finished"),jn(!0),vt(1,"leo-3","RM")}}]}],2:[{id:1,emitter:"leo",text:"Mi comida, sniff.",mood:"crying",actions:[{text:q,dispatch:"close"}]}],3:[{id:1,emitter:"player",text:"¡Detente ahora mismo! ¡No dejaré que lo lastimes!",mood:"neutral",actions:[{text:"Convencer a Pepe para que deje a Leo en paz",dispatch:"game",game:{type:2,onLoad:async()=>{await Cs("maton_1","Nadie me dice que hacer","Debes aprender a respetar a los demás")},winCb:()=>{console.log("WIN !!!")},loseCb:()=>{console.log("LOSE !!!")},onComplete:{next:"leo",data:[{n:3,char:"leo"}],win:{next:"leo",data:[{n:4,char:"leo"}],cb:()=>{yt(1,"leo","finished"),he(!0)}}}}},{text:q,dispatch:"close"}]}],4:[{id:1,emitter:"maton_1",text:"Tienes razón, no volverá a pasar.",mood:"neutral",actions:Z},{id:2,emitter:"leo",text:"Muchas gracias por tu ayuda",mood:"neutral",actions:[{text:"De nada, pero no deberÃas tener miedo de nadie. Siempre hay alguien que te puede ayudar.",dispatch:"complete",onComplete:[{key:"leo",status:"none",step:5}],cb:()=>{jn(!0)}}]}],5:[{id:1,emitter:"leo",text:"Ahora podré comer tranquilo",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],6:[{id:1,emitter:"leo",text:"Qué bueno que vino el Dire, ese matón está en problemas.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],7:[{id:1,emitter:"leo",text:"Yo sólo querÃa comer tranquilo",mood:"crying",actions:[{text:q,dispatch:"close"}]}]}},SS={dialogs:{1:[{id:1,emitter:"maton_2",text:"Oye, baboso. ¿Por qué me hiciste mal la tarea? ¡El profesor me puso un 3!",mood:"neutral",actions:Z},{id:2,emitter:"teo",text:"¡Tal vez el profe te pilló!",mood:"crying",actions:Z},{id:3,emitter:"maton_2",text:"¡Ya vas a ver!",mood:"neutral",actions:Z},{id:4,emitter:"player",text:"¡Oye! ¡Detente!",mood:"neutral",actions:Z},{id:5,emitter:"maton_2",text:"No te metas en esto, perquin.",mood:"neutral",actions:Z},{id:6,emitter:"player",text:"<<¿Qué deberÃa hacer?>>",mood:"neutral",actions:[{text:"No meterme en problemas",dispatch:"complete",onComplete:[{key:"teo",status:"none",step:2}],cb:()=>{yt(1,"teo","finished"),jn(!0),vt(1,"teo-1","RM")}},{text:"Detenerlo yo mismo",dispatch:"set",onSet:{next:"teo",data:[{n:3,char:"teo"}]},cb:()=>{vt(1,"teo-2","RM")}},{text:"Ir a buscar ayuda a las gradas",dispatch:"complete",onComplete:[{key:"teo",status:"none",step:2},{key:"lino",status:"none",step:0,stepSelector:()=>Fe(1,"principal",[{str:"started5",n:6}],7)}],cb:()=>{yt(1,"teo","started1"),vt(1,"teo-3","RM")}}]}],2:[{id:1,emitter:"teo",text:"Nos van a reprobar a los dos por copiar.",mood:"crying",actions:[{text:q,dispatch:"close"}]}],3:[{id:1,emitter:"player",text:"¡Te pedà que te detengas!",mood:"neutral",actions:[{text:"Convencer a Alonso para que haga sus propios deberes",dispatch:"game",game:{type:2,onLoad:async()=>{await Cs("maton_2","Nadie me dice que hacer","Debes hacer tus propios trabajos")},winCb:()=>{console.log("WIN !!!")},loseCb:()=>{console.log("LOSE !!!")},onComplete:{next:"teo",data:[{n:3,char:"teo"}],win:{next:"teo",data:[{n:4,char:"teo"}],cb:()=>{yt(1,"teo","finished"),he(!0)}}}}},{text:q,dispatch:"close"}]}],4:[{id:1,emitter:"maton_2",text:"Tienes razón, no volverá a pasar.",mood:"neutral",actions:Z},{id:2,emitter:"teo",text:"Muchas gracias por tu ayuda",mood:"neutral",actions:[{text:"De nada, pero no deberÃas tener miedo de nadie. Siempre hay alguien que te puede ayudar.",dispatch:"complete",onComplete:[{key:"teo",status:"none",step:5}],cb:()=>jn(!0)}]}],5:[{id:1,emitter:"teo",text:"Si hubiese sido más amable, incluso podrÃa haberle ayudado con la tarea.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],6:[{id:1,emitter:"teo",text:"Gracias por no ser indiferentes, no sabÃa qué hacer.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},ES={dialogs:{1:[{id:1,emitter:"soccer_player_5",text:"Está bueno el partido... ¡Ãltimo gol gana todo!",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},PS={dialogs:{1:[{id:1,emitter:"ale",text:"Me gustarÃa poder usar el patio, ¡pero siempre están jugando a la pelota!",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},bS={dialogs:{1:[{id:1,emitter:"andy",text:"Qué lata venir al colegio, serÃa más agradable si no fueran todos tan agresivos.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},MS={dialogs:{1:[{id:1,emitter:"chini",text:"Ya tenemos que entrar a clases y no dejan usar la cancha... ni que fueran tan buenos.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},wS={dialogs:{1:[{id:1,emitter:"mia",text:"¿No quieres sumarte a un grupo de baile?, vamos a hacer coreografÃas de k-idols.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},AS={dialogs:{1:[{id:1,emitter:"josefina",text:"1... 2... giro y brazos arriba, ¡Vamos, súmate!.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},RS={dialogs:{1:[{id:1,emitter:"tere",text:"Se nota en tu rostro que tienes ritmo, que no puedes aguantarte las ganas de bailar.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},OS={dialogs:{1:[{id:1,emitter:"profesor_1",text:"Ya vamos a comenzar, avÃsele a sus compañeros que entren y vaya a su asiento.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},LS={dialogs:{1:[{id:1,emitter:"estudiante_h_5",text:"Esta es mi clase favorito, siempre soy el primero en llegar.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},FS={dialogs:{1:[{id:1,emitter:"estudiante_h_1",text:"Esta clase no sólo es fome... además el profe siempre llega tarde.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},IS={dialogs:{1:[{id:1,emitter:"alan",text:"Es temprano, pero ya se siente el olor de la comida del almuerzo.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},DS={dialogs:{1:[{id:1,emitter:"inspector",text:"Apúrese... ya vamos a cerrar las puertas, no se vaya a quedar sin clases.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},Mf={dialogs:{1:[{id:1,emitter:"cancha",text:"¡Oye!, no entres a la cancha, no ves que estamos
6278jugando.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},BS={dialogs:{1:[{id:1,emitter:"estudiante_h_6",text:"Shhh... silencio.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},kS={dialogs:{1:[{id:1,emitter:"estudiante_h_10",text:"Que lata, no hay nada de manga en esta biblioteca... seguiré buscando.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},wf={dialogs:{1:[{id:1,emitter:"player",text:"Si me voy, eso serÃa hacer la cimarra... Eso me meterÃa en problemas aún en un liceo virtual.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},Af={dialogs:{1:[{id:1,emitter:"player",text:"Oh, el kiosko parece vacÃo, si espero... ¿vendrá alguien?",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},{loadCharHalfBody:is}=Te(),{setEpilogo:Wx,showOptions:Ai}=Xi(),GS={dialogs:{1:[{id:1,emitter:"cris",text:"¿Supiste? ¡La Chini ganó un campeonato de fútbol en su barrio!",mood:"neutral",actions:Z},{id:2,emitter:"player",text:"¿La Chini? ¿En serio? No sabÃa que jugaba a la pelota.",mood:"neutral",actions:Z},{id:3,emitter:"cris",text:"¡En serio! Incluso le regalaron una pelota. Ahora está en la cancha pero unos cabros no la dejaban jugar. Espero que no haya problemas.",mood:"neutral",actions:[{text:"Ire a felicitarla.",dispatch:"complete",onComplete:[{key:"cris",status:"none",step:2},{key:"chini",status:"exclamation",step:2},{key:"mia",status:"none",step:1}],cb:()=>{yt(2,"principal","started1")}}]}],2:[{id:1,emitter:"cris",text:"Vamos a ver cómo está la Chini. No es bueno que molesten a les amigues.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],3:[{id:1,emitter:"cris",text:"La cancha es para todes, y todes deberÃan poder usarla.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],4:[{id:1,emitter:"cris",text:"¿Escuchaste? ¡Hay problemas en la cancha con la Chini de nuevo!",mood:"neutral",actions:Z},{id:2,emitter:"player",text:"¿Otra vez le quitaron la pelota?",mood:"neutral",actions:Z},{id:3,emitter:"cris",text:"¡No! Si estaba jugando con los cabros y llegó la subdirectora.",mood:"neutral",actions:[{text:"Ire a ver a la Chini",dispatch:"complete",onComplete:[{key:"cris",status:"none",step:5},{key:"chini",status:"none",step:13}
6278,{key:"sub_directora",status:"exclamation",step:0,stepSelector:()=>Fe(2,"alan",[{str:"started1",n:6}],2)}],cb:()=>{yt(2,"principal","started7"),he(!0)}}]}],5:[{id:1,emitter:"cris",text:"Que lata, la subdire siempre se mete en todo.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],6:[{id:1,emitter:"cris",text:"Podemos hacer que las cosas mejoren.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},NS={dialogs:{1:[{id:1,emitter:"inspector",text:"Evite correr por los pasillos, puede haber un accidente.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],2:[{id:1,emitter:"player",text:"Oiga inspector, en el patio hay unos niños jugando a la pelota.",mood:"neutral",actions:Z},{id:2,emitter:"inspector",text:"¿Y a usted qué le importa jóven?",mood:"neutral",actions:Z},{id:3,emitter:"player",text:"Pensamos que deberÃan hacerlo en la cancha, además puede ser peligroso para quienes no participan del juego. ",mood:"neutral",actions:[{text:"Explicar el caso de Ale",dispatch:"game",game:{type:5,onLoad:async()=>{await is("inspector","Por favor explÃquese","El patio es de todos")},winCb:()=>{console.log("WIN !!!")},loseCb:()=>{console.log("LOSE !!!")},onComplete:{next:"inspector",data:[{n:2,char:"inspector"}],win:{next:"inspector",data:[{n:3,char:"inspector"},{n:8,char:"ale"}],cb:()=>{yt(2,"ale","finished"),yt(2,"soccer","finished"),he(!0)}}}}},{text:q,dispatch:"close"}]}],3:[{id:1,emitter:"inspector",text:"Sabe joven, tiene razón además pueden quebrar un vidrio. el próximo recreo ya no los verá en este patio.",mood:"neutral",actions:[{text:q,dispatch:"close",cb:()=>Ai(!0)}]}]}},VS={dialogs:{1:[{id:1,emitter:"chini",text:"Oh! es mi pelota y no me dejan jugar.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],2:[{id:1,emitter:"player",text:"Hola Chini, supe que ganaste un campeonato de fútbol. ¡No sabÃa que jugabas!",mood:"neutral",actions:Z},{id:2,emitter:"chini",text:"Claro, cómo ibas a saber si en este colegio solo juegan los hombres.",mood:"neutral",actions:Z},{id:3,emitter:"mia",text:"¡Y con este uniforme es imposible jugar bien!",mood:"neutral",actions:Z},{id:4,emitter:"chini",text:"Además hoy traje mi pelota nueva y estos pesados me la quitaron. ¡ARGHH! Estoy tan enojada. ¡La voy a ir a recuperar! ¡GRRR!.",mood:"neutral",actions:Z},{id:5,emitter:"player",text:"¿Qué vas a hacer?",mood:"neutral",actions:Z},{id:6,emitter:"chini",text:"No se todavÃa⦠¿Qué opinas tú?",mood:"neutral",actions:[{text:"Mejor no me meto.",dispatch:"set",onSet:{next:"chini",data:[{n:3,char:"chini"},{n:4,char:"sub_directora"}]},cb:()=>{yt(2,"principal","started2"),vt(2,"chini-1-1","RM")}},{text:"Vamos a contarle al director.",dispatch:"set",onSet:{next:"chini",data:[{n:5,char:"chini"}]},cb:()=>{yt(2,"principal","started3"),vt(2,"chini-1-2","RM")}},{text:"Vamos a conversar con los peloteros.",dispatch:"set",onSet:{next:"chini",data:[{n:7,char:"chini"}]},cb:()=>{yt(2,"principal","started4"),vt(2,"chini-1-3","RM")}},{text:"¡Vamos a quitarles la pelota de vuelta!",dispatch:"set",onSet:{next:"chini",data:[{n:9,char:"chini"}]},cb:()=>{yt(2,"principal","started5"),vt(2,"chini-1-4","RM")}}]}],3:[{id:1,emitter:"player",text:"No se lo que vas a hacer, pero creo que mejor no me meto.",mood:"neutral",actions:Z},{id:2,emitter:"chini",text:"No esperaba que te metieras, al final siempre me las arreglo sola.",mood:"neutral",actions:[{text:q,dispatch:"complete",onComplete:[{key:"chini",status:"none",step:4},{key:"cris",status:"exclamation",step:4}]}]}],4:[{id:1,emitter:"chini",text:"Ya verán, no me dejaré quitar mi pelota tan fácilmente.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],5:[{id:1,emitter:"player",text:"Pienso que lo mejor es ir a hablarlo con el director. Demás que nos ayuda.",mood:"neutral",actions:Z},{id:2,emitter:"mia",text:"¿Y han visto al director últimamente?",mood:"neutral",actions:Z},{id:3,emitter:"player",text:"Yo lo vi antes en la entrada, pero ahora no lo vÃ.",mood:"neutral",actions:Z},{id:4,emitter:"mia",text:"¡Ah!, entonces debe estar en su oficina, al fondo a la izquierda, la última puerta... por ahà donde está la enfermerÃa.",mood:"neutral",actions:Z},{id:5,emitter:"mia",text:"Ya vamos, de repente ayuda.",mood:"neutral",actions:[{text:q,dispatch:"complete",onComplete:[{key:"chini",status:"none",step:6},{key:"director",status:"exclamation",step:0,stepSelector:()=>Fe(2,"profe",[{str:"started2",n:10}],2)}]}]}],6:[{id:1,emitter:"chini",text:"Si el director no está en la entrada, debe estar en su oficina.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],7:[{id:1,emitter:"player",text:"Yo creo que conversando todo se puede resolver.",mood:"neutral",actions:Z},{id:2,emitter:"chini",text:"No se si vamos a lograr mucho, pero dale, vamos a conversar.",mood:"neutral",actions:[{text:q,dispatch:"complete",onComplete:[{key:"chini",status:"none",step:8},{key:"soccer_player_5",status:"exclamation",step:2}]}]}],8:[{id:1,emitter:"chini",text:"Espero que a ti te hagan caso, a mi no me escuchan.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],9:[{id:1,emitter:"player",text:"Yo cacho que lo único que queda es ir a quitarles la pelota devuelta.",mood:"neutral",actions:Z},{id:2,emitter:"chini",text:"¡SÃ! ¡Vamos a recuperar mi pelota!",mood:"neutral",actions:[{text:q,dispatch:"complete",onComplete:[{key:"chini",status:"none",step:10},{key:"soccer_player_5",status:"exclamation",step:3}]}]}],10:[{id:1,emitter:"chini",text:"Me la devuelven o me la devuelven.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],11:[{id:1,emitter:"chini",text:"¡Gracias!, al siguiente partido entró a jugar.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],12:[{id:1,emitter:"chini",text:"yo cacho que el próximo recreo juego, y me los paso a todos",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],13:[{id:1,emitter:"chini",text:"No, la subdire me quitó la pelota.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],14:[{id:1,emitter:"chini",text:"Me tiene chata este uniforme y que no me dejen jugar.",mood:"neutral",actions:Z},{id:2,emitter:"player",text:"Es mala que no te dejen hacer lo que quieres solamente por ser mujer.",mood:"neutral",actions:Z},{id:3,emitter:"chini",text:"Es que ella es muy machista.",mood:"neutral",actions:Z},{id:4,emitter:"mia",text:"Si, no podemos permitirlo, esto tiene que cambiar.",mood:"neutral",actions:Z},{id:5,emitter:"chini",text:"¿Qué crees que podemos hacer?.",mood:"neutral",actions:[{text:"Mejor no meterse.",dis
6278patch:"set",onSet:{next:"chini",data:[{n:15,char:"chini"}]},cb:()=>{yt(2,"principal","finished"),he(!0),vt(2,"chini-14-1","RM")}},{text:"Vamos a hablar con el director",dispatch:"set",onSet:{next:"chini",data:[{n:17,char:"chini"}]},cb:()=>{yt(2,"principal","started9"),he(!0),vt(2,"chini-14-2","RM")}},{text:"Vamos a buscar apoyo a la cancha",dispatch:"set",onSet:{next:"chini",data:[{n:20,char:"chini"}]},cb:()=>{yt(2,"principal","started10"),he(!0),vt(2,"chini-14-3","RM")}}]}],15:[{id:1,emitter:"player",text:"Con la subdirectora no va a pasar nada. Mejor olvÃdate de tu pelota. Yo al menos ya no me meto.",mood:"neutral",actions:Z},{id:2,emitter:"chini",text:"Si la pelota ya no es tema. Hay que cambiar las cosas.",mood:"neutral",actions:[{text:q,dispatch:"complete",onComplete:[{key:"chini",status:"none",step:16},{key:"mia",status:"none",step:3}],cb:()=>{Ai(!0),Wx(2,1)}}]}],16:[{id:1,emitter:"chini",text:"Vamos a hacer que las cosas cambien en este colegio.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],17:[{id:1,emitter:"player",text:"El director siempre está dispuesto a escuchar buenos argumentos.",mood:"neutral",actions:Z},{id:2,emitter:"chini",text:"Si, vamos a pedirle que flexibilice el uniforme, y que hombres y mujeres podamos hacer las mismas cosas.",mood:"neutral",actions:[{text:q,dispatch:"complete",onComplete:[{key:"director",status:"question",step:0,stepSelector:()=>Fe(2,"profe",[{str:"started2",n:10}],4)},{key:"chini",status:"none",step:18}]}]}],18:[{id:1,emitter:"chini",text:"Espero que el director nos escuche.",mood:"neutral",actions:Z},{id:2,emitter:"player",text:"¿Y donde lo encontramos?, hay que ir cuanto antes.",mood:"neutral",actions:Z},{id:3,emitter:"chini",text:"Mmmmhh... si no esta en la entrada, debe estar en su oficina, al fondo a la izquierda, la última puerta... por ahà donde está la enfermerÃa.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],19:[{id:1,emitter:"chini",text:"Ojala el dire haga algo con lo del uniforme.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],20:[{id:1,emitter:"player",text:"Vamos a hablar con los cabros de la cancha.",mood:"neutral",actions:Z},{id:2,emitter:"chini",text:"¿Qué sacamos con ir donde ellos?",mood:"neutral",actions:Z},{id:3,emitter:"player",text:"¡Reunamos más apoyo para la causa!.",mood:"neutral",actions:Z},{id:4,emitter:"chini",text:"Bueno ya, intentémoslo",mood:"neutral",actions:[{text:q,dispatch:"complete",onComplete:[{key:"soccer_player_5",status:"question",step:7},{key:"chini",status:"none",step:21}]}]}],21:[{id:1,emitter:"chini",text:"No creo que nos escuchen, pero al menos posemos intentarlo.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],22:[{id:1,emitter:"chini",text:"Ahora nos apoyan más compañeres, tenÃas razón, juntos podemos cambiar las cosas.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},zS={dialogs:{1:[{id:1,emitter:"mia",text:"Creen que son los únicos que pueden jugar a la pelota, que pesados",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],2:[{id:1,emitter:"mia",text:"Que es injusta la sudbire.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],3:[{id:1,emitter:"mia",text:"Estoy harta de que nos limiten por ser mujer.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],5:[{id:1,emitter:"mia",text:"Que lata todo, pero podremos ser un factor de cambio.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},YS={dialogs:{1:[{id:1,emitter:"soccer_player_5",text:"Termina este partido, y vamos a jugar otro altiro.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],2:[{id:1,emitter:"player",text:"Oigan cabros. Queremos hablar con ustedes.",mood:"neutral",actions:Z},{id:2,emitter:"chini",text:"Sà poh, devuelvan la pelota.",mood:"neutral",actions:Z},{id:3,emitter:"soccer_player_5",text:"¿Me la vai a quitar acaso?",mood:"neutral",actions:Z},{id:4,emitter:"chini",text:"No pasa nah, si queremos hablar.",mood:"neutral",actions:[{text:"Convencerlos de devolver la pelota.",dispatch:"game",game:{type:5,onLoad:async()=>{await is("soccer_player_5","Estamos usando la pelota","Pero no es de ustedes")},winCb:()=>{console.log("WIN !!!")},loseCb:()=>{console.log("LOSE !!!")},onComplete:{next:"soccer_player_5",data:[{n:2,char:"soccer_player_5"}],win:{next:"soccer_player_5",data:[{n:4,char:"soccer_player_5",status:"none"},{n:11,char:"chini"},{n:4,char:"cris",status:"exclamation"},{n:4,char:"sub_directora"}],cb:()=>{yt(2,"principal","started6"),he(!0)}}}}},{text:q,dispatch:"close"}]}],3:[{id:1,emitter:"player",text:"Oigan cabros...",mood:"neutral",actions:Z},{id:2,emitter:"chini",text:"¡DEVUELVAN LA PELOTA!.",mood:"neutral",actions:Z},{id:3,emitter:"soccer_player_5",text:"¿Me la vai a quitar acaso?",mood:"neutral",actions:Z},{id:4,emitter:"chini",text:"Sà poh, ¿te vai a defender acaso?.",mood:"neutral",actions:[{text:"Quitarles la pelota.",dispatch:"game",game:{type:2,onLoad:async()=>{await is("soccer_player_5","Estamos usando la pelota","Pero no es de ustedes")},winCb:()=>{console.log("WIN !!!")},loseCb:()=>{console.log("LOSE !!!")},onComplete:{next:"soccer_player_5",data:[{n:3,char:"soccer_player_5"}],win:{next:"soccer_player_5",data:[{n:6,char:"soccer_player_5",status:"none"},{n:12,char:"chini"},{n:4,char:"cris",status:"exclamation"},{n:4,char:"sub_directora"}],cb:()=>{yt(2,"principal","started6"),he(!0)}}}}},{text:q,dispatch:"close"}]}],4:[{id:1,emitter:"chini",text:"¿Tú cachai que esa pelota me la gané en un campeonato?",mood:"neutral",actions:Z},{id:2,emitter:"soccer_player_5",text:"¿En serio eres tan buena?",mood:"neutral",actions:Z},{id:3,emitter:"chini",text:"Sà poh, si soy capitana de mi equipo.",mood:"neutral",actions:Z},{id:4,emitter:"soccer_player_5",text:"Ven a jugar al próximo recreo entonces.",mood:"neutral",actions:Z},{id:5,emitter:"chini",text:"Este uniforme es incomodo, pero igual les gano...",mood:"neutral",actions:Z},{id:6,emitter:"soccer_player_5",text:"Jajaja, toma, ahà tenà tu pelota.",mood:"neutral",actions:[{text:q,dispatch:"complete",onComplete:[{key:"chini",status:"none",step:12},{key:"soccer_player_5",status:"none",step:5}]}]}],5:[{id:1,emitter:"soccer_player_5",text:"Si es tan buena, que venga a jugar al próximo recreo.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],6:[{id:1,emitter:"soccer_player_5",text:"Ya, toma, ahà tienes tu pelota.",mood:"neutral",actions:Z},{id:2,emitter:"chini",text:"Ya po, y al próximo recreo presten la cancha también.",mood:"neutral",actions:Z},{id:3,emitter:"soccer_player_5",text:"¿Acaso juegas también?",mood:"neutral",actions:Z},{id:4,emitter:"player",text:"Sà poh, si hasta ganó un campeonato.",mood:"neutral",actions:Z},{id:5,emitter:"soccer_player_5",text:"Vamos a ver qué tan buena es.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],7:[{id:1,emitter:"soccer_player_5",text:"¿Nos quitaste la pelota para dársela a la subdirectora?",mood:"neutral",actions:Z},{id:2,emitter:"chini",text:"La pelota es mÃa, y la subdirectora me la quitó.",mood:"neutral",actions:Z},{id:3,emitter:"player",text:"Se la quitaron sólo por que jugar a la pelota es cosa de niños.",mood:"neutral",actions:Z},{id:4,emitter:"chini",text:"Es super injusto.",mood:"neutral",actions:Z},{id:5,emitter:"player",text:"Y la Chini es re buena pa'la pelota.",mood:"neutral",actions:Z},{id:6,emitter:"player",text:"No cachaba que la subdirectora le pone tanto color.",mood:"neutral",actions:Z}
6278,{id:7,emitter:"chini",text:"Hagamos un cambio en este colegio.",mood:"neutral",actions:[{text:"Vamos, ayuden a cambiar las cosas.",dispatch:"game",game:{type:4,onLoad:async()=>{await is("soccer_player_5","¿Qué podemos hacer?","Vamos a cambiar las cosas.")},winCb:()=>{console.log("WIN !!!")},loseCb:()=>{console.log("LOSE !!!")},onComplete:{next:"soccer_player_5",data:[{n:7,char:"soccer_player_5"}],win:{next:"soccer_player_5",data:[{n:8,char:"soccer_player_5"},{n:22,char:"chini"},{n:6,char:"cris",status:"none"},{n:5,char:"mia",status:"none"}],cb:()=>{yt(2,"principal","finished"),he(!0)}}}}},{text:q,dispatch:"close"}]}],8:[{id:1,emitter:"soccer_player_5",text:"Mmmm.. Tienes razón.",mood:"neutral",actions:Z},{id:2,emitter:"soccer_player_5",text:"Que la Chini y todas las mujeres tengan las mismas oportunidades que nosotros, debemos apoyarlas.",mood:"neutral",actions:Z},{id:3,emitter:"chini",text:"¡Que el uniforme sea más flexible!.",mood:"neutral",actions:Z},{id:4,emitter:"player",text:"Tenemos que hablarlo con más estudiantes. Las autoridades no podrán decirnos que no.",mood:"neutral",actions:[{text:q,dispatch:"complete",onComplete:[{key:"soccer_player_5",status:"none",step:9}],cb:()=>Ai(!0)}]}],9:[{id:1,emitter:"soccer_player_5",text:"Todos deberÃamos tener los mismos derechos.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},XS={dialogs:{1:[{id:1,emitter:"director",text:"Los profesores discuten sobre el dÃa sin uniforme, pero hay varios que consideran que puede ser una buena idea.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],2:[{id:1,emitter:"player",text:"Oiga Dire, tenemos algo que decirle.",mood:"neutral",actions:Z},{id:2,emitter:"chini",text:"Los chicos de la cancha me quitaron la pelota y no me dejan jugar.",mood:"neutral",actions:Z},{id:3,emitter:"director",text:"Eso está muy mal pue. A ver, explÃquemeâ¦",mood:"neutral",actions:[{text:"Explicar lo que sucede con los peloteros.",dispatch:"game",game:{type:5,onLoad:async()=>{await is("director","Por favor explÃquese","No debemos aguantar que se adueñen de la pelota")},winCb:()=>{console.log("WIN !!!")},loseCb:()=>{console.log("LOSE !!!")},onComplete:{next:"director",data:[{n:2,char:"director"}],win:{next:"director",data:[{n:3,char:"director"},{n:4,char:"sub_directora"}],cb:()=>{yt(2,"principal","started6"),he(!0)}}}}},{text:q,dispatch:"close"}]}],3:[{id:1,emitter:"director",text:"Oiga mija ¿y por qué tiene usted un balón de fútbol?",mood:"neutral",actions:Z},{id:2,emitter:"player",text:"¡Es que se la ganó en un campeonato de su barrio!",mood:"neutral",actions:Z},{id:3,emitter:"director",text:"Le pregunté a ella jóven. Déjela hablar.",mood:"neutral",actions:Z},{id:4,emitter:"chini",text:"A mi me gusta mucho jugar a la pelota y tengo un equipo en el barrio.",mood:"neutral",actions:Z},{id:5,emitter:"director",text:"¿Y por qué no la he visto jugar acá en el colegio?",mood:"neutral",actions:Z},{id:6,emitter:"chini",text:"Con este uniforme es imposible.",mood:"neutral",actions:Z},{id:7,emitter:"player",text:"Además la subdirectora no nos deja.",mood:"neutral",actions:Z},{id:8,emitter:"director",text:"Vamos a recuperar su balón y luego vemos lo otro.",mood:"neutral",actions:[{text:q,dispatch:"complete",onComplete:[{key:"chini",status:"none",step:11},{key:"cris",status:"exclamation",step:4},{key:"director",status:"none",step:5}]}]}],4:[{id:1,emitter:"player",text:"Oiga director. En este colegio hay mucho machismo.",mood:"neutral",actions:Z},{id:2,emitter:"director",text:"¿Machismo? ¿Por qué dicen eso?",mood:"neutral",actions:Z},{id:3,emitter:"chini",text:"Y eso nunca cambiará si no se nos dan los mismos derechos a mujeres que a hombres.",mood:"neutral",actions:Z},{id:4,emitter:"director",text:"¿Machismo? ¿De qué derechos me hablan?, cálmese y explÃquenme.",mood:"neutral",actions:[{text:"Explicar lo que sucede con la Chini.",dispatch:"game",game:{type:5,onLoad:async()=>{await is("director","Por favor explÃquese","No debemos aguantar este machismo")},winCb:()=>{console.log("WIN !!!")},loseCb:()=>{console.log("LOSE !!!")},onComplete:{next:"director",data:[{n:4,char:"director"}],win:{next:"director",data:[{n:6,char:"director",status:"none"},{n:19,char:"chini"},{n:6,char:"cris",status:"none"},{n:4,char:"mia",status:"none"}],cb:()=>{yt(2,"principal","finished"),he(!0),Wx(2,2)}}}}},{text:q,dispatch:"close"}]}],5:[{id:1,emitter:"director",text:"Espero que ahora puedan jugar tranquilos.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],6:[{id:1,emitter:"director",text:"Debemos velar por una mejor convivencia.",mood:"neutral",actions:[{text:q,dispatch:"close",cb:()=>Ai(!0)}]}],7:[{id:1,emitter:"player",text:"Oiga director.",mood:"neutral",actions:Z},{id:2,emitter:"director",text:"DÃgame, cómo le puedo ayudar.",mood:"neutral",actions:Z},{id:3,emitter:"player",text:"El profesor de matemática acaba de poner en ridÃculo a una compañera y luego hizo comentarios machistas.",mood:"neutral",actions:Z},{id:4,emitter:"director",text:"ExplÃqueme lo sucedido.",mood:"neutral",actions:[{text:"Explicar lo que esta sucediendo con lo que dice el profesor.",dispatch:"game",game:{type:5,onLoad:async()=>{await is("director","Es una acusación muy grave","Más grave es lo que el profesor esta haciendo")},winCb:()=>{console.log("WIN !!!")},loseCb:()=>{console.log("LOSE !!!")},onComplete:{next:"director",data:[{n:7,char:"director"}],win:{next:"director",data:[{n:8,char:"director"},{n:111,char:"alex"},{n:4,char:"josefina",status:"none"}],cb:()=>{yt(2,"profe","finished")}}}}},{text:q,dispatch:"close"}]}],8:[{id:1,emitter:"director",text:"Usted tiene razón jóven. Un docente no puede comportarse asà en el colegi
6278o.",mood:"neutral",actions:Z},{id:2,emitter:"player",text:"¿Cómo va a hacer cambiar al profesor?",mood:"neutral",actions:Z},{id:3,emitter:"director",text:"No puedo hacer nada para cambiarlo, pero puedo impedir que trate mal a las niñas.",mood:"neutral",actions:[{text:q,dispatch:"close",onComplete:[{key:"director",status:"none",step:9}],cb:()=>Ai(!0)}]}],9:[{id:1,emitter:"director",text:"Conversaré con el profesor, lo que hace no está bien.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],10:[{id:1,emitter:"director",text:"¿Qué desea jovén?",mood:"neutral",actions:[{text:"Hablar sobre la pelota de la Chini.",dispatch:"set",onSet:{next:"director",data:[{n:0,char:"director",stepSelector:()=>Fe(2,"principal",[{str:"started3",n:2},{str:"started9",n:4}],1)}]}},{text:"Hablar sobre el profe machista.",dispatch:"set",onSet:{next:"director",data:[{n:7,char:"director"}]}}]}]}},US={dialogs:{1:[{id:1,emitter:"sub_directora",text:"No me convence el dÃa sin uniforme, será una excusa para el desorden y la falta de respeto.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],2:[{id:1,emitter:"chini",text:"Oiga subdirectora, no se lleve mi pelota.",mood:"neutral",actions:Z},{id:2,emitter:"sub_directora",text:"¡Cómo se le ocurre andar jugando a la pelota! Ese no es comportamiento de una señorita. Además los niños necesitan descargar su energÃa o sabe cómo se ponen...",mood:"neutral",actions:[{text:q,dispatch:"complete",onComplete:[{key:"sub_directora",
6278status:"none",step:0,stepSelector:()=>Fe(2,"alan",[{str:"started1",n:5}],3)},{key:"chini",status:"exclamation",step:14}],cb:()=>{yt(2,"principal","started8"),he(!0)}}]}],3:[{id:1,emitter:"sub_directora",text:"Que clase de comportamiento es ese, claramente no el de una señorita.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],4:[{id:1,emitter:"sub_directora",text:"Esto no me parece bien, las niñitas no deben andar jugando a la pelota.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],5:[{id:1,emitter:"player",text:"Señorita subdirectora, al lado de la biblioteca hay una pareja peleando, ¡incluso hay violencia fÃsica!",mood:"neutral",actions:Z},{id:2,emitter:"sub_directora",text:"A una mujer no se la toca ni con el pétalo de una rosa. voy inmediatamente, esto amerita la suspensión de ese energúmeno. Muchas gracias joven es usted un héroe.",mood:"neutral",actions:[{text:q,dispatch:"complete",onComplete:[{key:"alan",status:"none",step:11},{key:"sub_directora",status:"none",step:0,stepSelector:()=>Fe(2,"principal",[{str:"started7",n:2}],1)}],cb:()=>{yt(2,"alan","finished"),Ai(!0)}}]}],6:[{id:1,emitter:"sub_directora",text:"¿Qué desea jovén?",mood:"neutral",actions:[{text:"Hablar sobre la pelota de la Chini.",dispatch:"set",onSet:{next:"sub_directora",data:[{n:2,char:"sub_directora"}]}},{text:"Hablar sobre la violencia entre Alan y Tere.",dispatch:"set",onSet:{next:"sub_directora",data:[{n:5,char:"sub_directora"}]}}]}]}},WS={dialogs:{1:[{id:1,emitter:"estudiante_h_1",text:"El profe es seco.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],2:[{id:1,emitter:"estudiante_h_1",text:"La volaita, no nos dábamos cuenta.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},HS={dialogs:{1:[{id:1,emitter:"estudiante_h_5",text:"Si, el profe tiene razón.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],2:[{id:1,emitter:"estudiante_h_5",text:"No deberÃamos fomentar la desigualdad.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},$S={dialogs:{1:[{id:1,emitter:"profesor_1",text:"Los jóvenes han inventado cosas tan confusas, antes no era asÃ.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],2:[{id:1,emitter:"profesor_1",text:"Por eso las mujeres no pued...",mood:"neutral",actions:Z},{id:2,emitter:"player",text:"Ejem... disculpe profesor...",mood:"neutral",actions:Z},{id:3,emitter:"profesor_1",text:"Hola Jóven. DÃgame qué necesita.",mood:"neutral",actions:Z},{id:4,emitter:"player",text:"Oiga profe. Usted no puede hablar asà de las mujeres. ¡Ese pensamiento machista es muy retrógrado!",mood:"neutral",actions:Z},{id:5,emitter:"profesor_1",text:"¿A quién viene usted a tratar de machista? ¡Yo no soy machista! Solamente hago notar hechos reales, como que los hombres son mejores para la matemática y las mujeres son mejores para cuidar niños. Lo he visto en mis 20 años siendo profesor.",mood:"neutral",actions:Z},{id:6,emitter:"player",text:"Pensar asà sà es machista. Hombres y mujeres tenemos las mismas capacidades.",mood:"neutral",actions:[{text:"Convencer al profesor.",dispatch:"game",game:{type:2,onLoad:async()=>{await is("profesor_1","No me va a decir usted como son las cosas","Son otros tiempos")},winCb:()=>{console.log("WIN !!!")},loseCb:()=>{console.log("LOSE !!!")},onComplete:{next:"profesor_1",data:[{n:2,char:"profesor_1"}],win:{next:"profesor_1",data:[{n:3,char:"profesor_1"},{n:5,char:"alex"},{n:2,char:"josefina"}],cb:()=>{yt(2,"profe","finished")}}}}},{text:q,dispatch:"close"}]}],3:[{id:1,emitter:"profesor_1",text:"Aunque no creo que tenga razón, me has dado en que pensar.",mood:"neutral",actions:[{text:q,dispatch:"close",cb:()=>Ai(!0)}]}],4:[{id:1,emitter:"profesor_1",text:"Por eso las mujeres no pued...",mood:"neutral",actions:Z},{id:2,emitter:"player",text:"Oigan compañeros. ¿No les parece que el profe está equivocado?",mood:"neutral",actions:Z},{id:3,emitter:"estudiante_h_1",text:"¡Pero si es verdad que hombres y mujeres somos diferentes po!.",mood:"neutral",actions:Z},{id:4,emitter:"player",text:"Obvio que somos diferentes, ¡pero esa diferencia no limita nuestras capacidades!",mood:"neutral",actions:Z},{id:5,emitter:"estudiante_h_5",text:"Yo igual pienso que se le pasa la mano al profeâ¦",mood:"neutral",actions:[{text:"Convencer al profesor",dispatch:"game",game:{type:2,onLoad:async()=>{await is("profesor_1","No deberÃa interrumpir a los mayores","No deberÃa tratar asà a les compañeres")},winCb:()=>{console.log("WIN !!!")},loseCb:()=>{console.log("LOSE !!!")},onComplete:{next:"profesor_1",data:[{n:4,char:"profesor_1"}],win:{next:"profesor_1",data:[{n:5,char:"profesor_1"},{n:7,char:"alex"},{n:3,char:"josefina"},{n:2,char:"estudiante_h_1"},{n:2,char:"estudiante_h_5"}],cb:()=>
6278{yt(2,"profe","finished"),yt(2,"h_1","finished"),he(!0)}}}}},{text:q,dispatch:"close"}]}],5:[{id:1,emitter:"estudiante_h_1",text:"Ya, si igual es verdad que tenemos las mismas capacidades, pero ¿qué podemos hacer?",mood:"neutral",actions:Z},{id:2,emitter:"player",text:"No podemos dejar que los viejos sigan hablando asà de las compañeras.",mood:"neutral",actions:Z},{id:3,emitter:"estudiante_h_5",text:"La próxima vez deberÃamos pararle los carros al profe.",mood:"neutral",actions:Z},{id:4,emitter:"player",text:"En verdad basta con que no se lo celebren. Eso es lo que él anda buscando.",mood:"neutral",actions:Z},{id:5,emitter:"estudiante_h_1",text:"En el futuro no vamos a validar su machismo.",mood:"neutral",actions:[{text:q,dispatch:"close",cb:()=>Ai(!0)}]}]}},jS={dialogs:{1:[{id:1,emitter:"soccer_player_6",text:"Cuidado, que estamos jugando",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],2:[{id:1,emitter:"soccer_player_6",text:"¿Qué querÃ?, no ves que estamos jugando.",mood:"neutral",actions:Z},{id:2,emitter:"player",text:"Creo que deberÃan dejar de jugar acá.",mood:"neutral",actions:Z},{id:3,emitter:"soccer_player_6",text:"Ya después, que ahora voy perdiendo, no pienso perder hoy.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],3:[{id:1,emitter:"soccer_player_6",text:"Tienes razón, nos vamos.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},KS={dialogs:{1:[{id:1,emitter:"soccer_player_7",text:"No molestes, que voy ganando.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],2:[{id:1,emitter:"player",text:"Oigan, hay una cancha donde deberÃan jugar.",mood:"neutral",actions:Z},{id:2,emitter:"soccer_player_7",text:"Pero allá los grandes no nos dejan jugar.",mood:"neutral",actions:Z},{id:3,emitter:"ale",text:"Pero este es el patio y no dejan que nadie más la use.",mood:"neutral",actions:Z},{id:4,emitter:"soccer_player_7",text:"¿Y dónde jugamos entonces?",mood:"neutral",actions:[{text:"Vayan a pedir la cancha. ¡El patio es para el resto del colegio!",dispatch:"game",game:{type:2,onLoad:async()=>{await is("soccer_player_7","no nos dejan jugar","Pero este no es el lugar")},winCb:()=>{console.log("WIN !!!")},loseCb:()=>{console.log("LOSE !!!")},onComplete:{next:"soccer_player_7",data:[{n:2,char:"soccer_player_7"}],win:{next:"soccer_player_7",data:[{n:3,char:"soccer_player_7"},{n:3,char:"soccer_player_6"},{n:5,char:"ale"}],cb:()=>{yt(2,"ale","finished"),yt(2,"soccer","finished"),he(!0)}}}}},{text:q,dispatch:"close"}]}],3:[{id:1,emitter:"soccer_player_7",text:"Tienes razón, intentaremos que nos presten la cancha.",mood:"neutral",actions:[{text:q,dispatch:"close",cb:()=>Ai(!0)}]}]}},ZS={dialogs:{1:[{id:1,emitter:"ale",text:"Estos niños siempre usan el patio como cancha de fútbol.",mood:"neutral",actions:Z},{id:2,emitter:"player",text:"¿Tú quieres juegas al fútbol?",mood:"neutral",actions:Z},{id:3,emitter:"ale",text:"¡No! A mi me gustarÃa poder pasear sin miedo a que me llegue un pelotazo.",mood:"neutral",actions:Z},{id:4,emitter:"player",text:"Creo que si te mueves con cuidado no te va a pasar nada.",mood:"neutral",actions:Z},{id:5,emitter:"ale",text:"Tal vez, pero pienso que todos tenemos derecho a usar el patio sin miedo a que nos lleguen pelotazos. Además, ¡hay una cancha que pueden usar!",mood:"neutral",actions:Z},{id:6,emitter:"player",text:"Hmmm⦠¿Qué deberÃamos hacer?",mood:"neutral",actions:[{text:"Nada, el patio es de libre uso.",dispatch:"set",onSet:{next:"ale",data:[{n:2,char:"ale"}]},cb:()=>{yt(2,"ale","finished"),vt(2,"ale-1-1","RM")}},{text:"Echar a los peloteros del patio.",dispatch:"set",onSet:{next:"ale",data:[{n:4,char:"ale"},{n:2,char:"soccer_player_6"},{n:2,char:"soccer_player_7"}]},cb:()=>{yt(2,"ale","started2"),vt(2,"ale-1-2","RM")}},{text:"Ir a hablar con el inspector.",dispatch:"set",onSet:{next:"ale",data:[{n:6,char:"ale"},{n:2,char:"inspector"}]},cb:()=>{yt(2,"ale","started1"),vt(2,"ale-1-3","RM")}}]}],2:[{id:1,emitter:"player",text:"Me parece que todos tienen la libertad de usar el patio, y si ellos quieren jugar a la pelota, entonces tú debes andar con cuidado.",mood:"neutral",actions:Z},{id:2,emitter:"ale",text:"¡Pero yo también quiero usarlo!",mood:"neutral",actions:Z},{id:3,emitter:"player",text:"Ese ya no es mi problema.",mood:"neutral",actions:[{text:q,dispatch:"complete",onComplete:[{key:"ale",status:"none",step:3}],cb:()=>Ai(!0)}]}],3:[{id:1,emitter:"ale",text:"Si no ayudas, tampoco estorbes, yo me las arreglaré.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],4:[{id:1,emitter:"ale",text:"Ya, vamos a explicarles, uno de ellos entenderá.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],5:[{id:1,emitter:"ale",text:"Que bueno, ahora se puede caminar en paz.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],6:[{id:1,emitter:"player",text:"Esto es contra el reglamento. Vamos a buscar al inspector para que libere la cancha.",mood:"neutral",actions:Z},{id:2,emitter:"ale",text:"Si, vamos a decirle.",mood:"neutral",actions:[{text:q,dispatch:"complete",onComplete:[{key:"ale",status:"none",step:7}]}]}],7:[{id:1,emitter:"ale",text:"El inspector tiene que venir a poner orden.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],8:[{id:1,emitter:"ale",text:"Que bueno, el inspector por fin hizo lo que tenÃa que hacer.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},JS={dialogs:{1:[{id:1,emitter:"josefina",text:"Oh! que rabia ese profesor, como me trata asÃ.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],2:[{id:1,emitter:"josefina",text:"Oh! que rabia, como tan retrogado.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],3:[{id:1,emitter:"josefina",text:"Debemos apoyarnos entre nosotres.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],4:[{id:1,emitter:"josefina",text:"Esperemos el director lo haga recapacitar.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},QS={dialogs:{1:[{id:1,emitter:"alex",text:"Se fue en la media volá el profe.",mood:"neutral",actions:Z},{id:2,emitter:"josefina",text:"SÃ, ¿Cómo pueden pensar asà todavÃa?.",mood:"neutral",actions:Z},{id:3,emitter:"player",text:"Hola, ¿Qué pasó?.",mood:"neutral",actions:Z},{id:4,emitter:"josefina",text:"El profe de matemática es súper machista! Me pidió que saliera a la pizarra y como no supe hacer el ejercicio, empezó a decir que no pude porque soy mujer.",mood:"neutral",actions:Z},{id:5,emitter:"alex",text:"Dijo que las mujeres son malas para la matemática, por eso hay pocas mujeres ingenieras.",mood:"neutral",actions:Z},{id:6,emitter:"josefina",text:"¡Me mandó a hacer el electivo de cocina! Uff, ¡que rabia!",mood:"neutral",actions:Z},{id:7,emitter:"player",text:"¿Alguien le dijo algo?",mood:"neutral",actions:Z},{id:8,emitter:"alex",text:"No, incluso unos cabros se la celebraron.",mood:"neutral",actions:Z},{id:9,emitter:"player",text:"<<<¿Qué deberÃa hacer?>>>",mood:"neutral",actions:[{text:"Mejor no me meto ",dispatch:"set",onSet:{next:"alex",data:[{n:2,char:"alex"}]},cb:()=>{yt(2,"profe","finished"),Ai(!0),vt(2,"alex-1-1","RM")}},{text:"¡No me puedo quedar en silencio!",dispatch:"set",onSet:{next:"alex",data:[{n:3,char:"alex"},{n:2,char:"profesor_1"}]},cb:()=>{yt(2,"profe","started1"),vt(2,"alex-1-2","RM")}}
6278,{text:"DeberÃan sancionarloâ¦",dispatch:"set",onSet:{next:"alex",data:[{n:8,char:"alex"},{n:0,char:"director",stepSelector:()=>Fe(2,"principal",[{str:"started3",n:10},{str:"started9",n:10}],7)}]},cb:()=>{yt(2,"profe","started2"),vt(2,"alex-1-3","RM")}},{text:"Tenemos que dejar de validarlo.",dispatch:"set",onSet:{next:"alex",data:[{n:6,char:"alex"},{n:4,char:"profesor_1"}]},cb:()=>{yt(2,"profe","started3"),vt(2,"alex-1-4","RM")}}]}],2:[{id:1,emitter:"alex",text:"O sea, tu crees que si antes era asÃ, debe seguir asÃ.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],3:[{id:1,emitter:"player",text:"Alguien le tiene que decir al profe que no puede hablarle asà a las compañeras.",mood:"neutral",actions:Z},{id:2,emitter:"josefina",text:"¡Y que su pensamiento es machista y es mentira!",mood:"neutral",actions:[{text:"Ir a hablar con el profe.",dispatch:"complete",onComplete:[{key:"alex",status:"none",step:4}]}]}],4:[{id:1,emitter:"alex",text:"Ese profe siempre esta en una de las salas de 2º medio.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],5:[{id:1,emitter:"alex",text:"IncreÃble que un profesor piense asÃ, esto deberÃa cambiar.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],6:[{id:1,emitter:"alex",text:"No podemos permitir esas conductas, aún si es un profesor.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],7:[{id:1,emitter:"alex",text:"Si no lo validamos, no se sentirá con el derecho de seguir haciéndolo.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],8:[{id:1,emitter:"player",text:"Decir ese tipo de cosas deberÃa estar prohibido.",mood:"neutral",actions:Z},{id:2,emitter:"josefina",text:"Qué va a estar prohibido, si son todos iguales.",mood:"neutral",actions:Z},{id:3,emitter:"player",text:"Voy a ir a hablar con el director y contarle lo que pasó.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],9:[{id:1,emitter:"alex",text:"Esperemos el director se ponga estricto con el profe.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},qS={dialogs:{1:[{id:1,emitter:"alan",text:"PERO TERE, ¿CÃMO EXPLICAS ESO?",mood:"neutral",actions:Z},{id:2,emitter:"tere",text:"Oye, ya para tus gritos y celos, no es para tanto...",mood:"neutral",actions:Z},{id:3,emitter:"alan",text:"¿Y TU QUE ESTÃS MIRANDO?",mood:"neutral",actions:[{text:"Nada.",dispatch:"set",onSet:{next:"alan",data:[{n:2,char:"alan"}]},cb:()=>{yt(2,"alan","finished"),vt(2,"alan-1-1","RM")}},{text:"Suéltala",dispatch:"set",onSet:{next:"alan",data:[{n:4,char:"alan"}]},cb:()=>{vt(2,"alan-1-2","RM")}},{text:"Ir a hablar con la subdirectora.",dispatch:"set",onSet:{next:"alan",data:[{n:10,char:"alan"}
6278,{n:0,char:"sub_directora",stepSelector:()=>Fe(2,"principal",[{str:"off",n:5},{str:"finished",n:5}],6)}]},cb:()=>{yt(2,"alan","started1"),vt(2,"alan-1-3","RM")}},{text:"Darles un consejo.",dispatch:"set",onSet:{next:"alan",data:[{n:7,char:"alan"}]},cb:()=>{vt(2,"alan-1-4","RM")}}]}],2:[{id:1,emitter:"player",text:"Nada.",mood:"neutral",actions:Z},{id:2,emitter:"alan",text:"¡Más te vale!, ¡Ella es MI polola!",mood:"neutral",actions:Z},{id:3,emitter:"player",text:"¡Uf!",mood:"neutral",actions:[{text:q,dispatch:"complete",onComplete:[{key:"alan",status:"none",step:3}],cb:()=>Ai(!0)}]}],3:[{id:1,emitter:"alan",text:"¡Lárgate!, no tienes nada que hacer aquÃ.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],4:[{id:1,emitter:"player",text:"¡¡¡Oye déjala inmediatamente!!!",mood:"neutral",actions:Z},{id:2,emitter:"player",text:"¡Sal de acá!",mood:"neutral",actions:Z},{id:3,emitter:"player",text:"No me iré, lo que está pasando es graveâ¦",mood:"neutral",actions:Z},{id:4,emitter:"player",text:"¿Y qué piensas hacer?",mood:"neutral",actions:[{text:"Convencer a ambos de tratarse mejor.",dispatch:"game",game:{type:2,onLoad:async()=>{await is("alan","No te metas en donde no te llaman","No deberÃas tratar asà a tu pareja")},winCb:()=>{console.log("WIN !!!")},loseCb:()=>{console.log("LOSE !!!")},onComplete:{next:"alan",data:[{n:4,char:"alan"}],win:{next:"alan",data:[{n:5,char:"alan"}],cb:()=>{yt(2,"alan","finished")}}}}},{text:q,dispatch:"close"}]}],5:[{id:1,emitter:"tere",text:"Viste Alan, qué vergüenza me haces pasar, todo por tus celos, mejor me iré a mi sala.",mood:"neutral",actions:Z},{id:1,emitter:"alan",text:"¡Nah que ver Tere! ¡Lo que pasa es que tú eres manipuladora! y tú partiste la pelea⦠",mood:"neutral",actions:[{text:q,dispatch:"close",onComplete:[{key:"alan",status:"none",step:6}],cb:()=>Ai(!0)}]}],6:[{id:1,emitter:"alan",text:"...pero tere.",mood:"neutral",actions:Z},{id:2,emitter:"tere",text:"nada de peros.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],7:[{id:1,emitter:"player",text:"Oigan chiquillos esa no es manera de tratarse, se supone que se quieren.",mood:"neutral",actions:Z},{id:2,emitter:"alan",text:"¿Qué sabes tú?",mood:"neutral",actions:Z},{id:3,emitter:"player",text:"Disculpen que me meta, pero deberÃan detener el maltrato.",mood:"neutral",actions:Z},{id:4,emitter:"tere",text:"Pucha es que yo le grito al Alan porque es muy celoso⦠se pasa muchas pelÃculas.",mood:"neutral",actions:Z},{id:5,emitter:"alan",text:"¡Nah que ver Tere! ¡Lo que pasa es que tú eres manipuladora!",mood:"neutral",actions:Z},{id:6,emitter:"player",text:"A veces pedir ayuda profesional puede ser la solución, ¿por qué no van a ver a la psicóloga del colegio?",mood:"neutral",actions:[{text:"Convencer a ambos de tratarse mejor.",dispatch:"game",game:{type:2,onLoad:async()=>{await is("alan","No es para tanto","No deberÃas normalizar la violencia")},winCb:()=>{console.log("WIN !!!")},loseCb:()=>{console.log("LOSE !!!")},onComplete:{next:"alan",data:[{n:7,char:"alan"}],win:{next:"alan",data:[{n:8,char:"alan"}],cb:()=>{yt(2,"alan","finished")}}}}},{text:q,dispatch:"close"}]}],8:[{id:1,emitter:"tere",text:"La verdad no habÃamos pensado en eso, si realmente nos queremos tenemos que cuidarnos y pedir ayuda en lo que no podemos manejar bien.",mood:"neutral",actions:Z},{id:2,emitter:"alan",text:"Es verdad⦠Gracias por el consejo.",mood:"neutral",actions:[{text:q,dispatch:"complete",onComplete:[{key:"alan",status:"none",step:9}],cb:()=>Ai(!0)}]}],9:[{id:1,emitter:"alan",text:"Vamos a pedir ayuda para no seguir con la violencia.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],10:[{id:1,emitter:"player",text:"Esto lo sabrá la subdirectora.",mood:"neutral",actions:Z},{id:2,emitter:"alan",text:"No me importa.",mood:"neutral",actions:[{text:q,dispatch:"complete",onComplete:[{key:"alan",status:"none",step:12}
6278,{key:"sub_directora",status:"none",step:0,stepSelector:()=>Fe(2,"principal",[{str:"started7",n:6}],5)}]}]}],11:[{id:1,emitter:"alan",text:"Ahora más encima me van a suspender.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],12:[{id:1,emitter:"alan",text:"Ahora más encima me van a suspender.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},_S={dialogs:{1:[{id:1,emitter:"andy",text:"¿Haz visto a la tÃa del kiosko?, últimamente siempre esta vacÃo o cerrado.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},t2={dialogs:{1:[{id:1,emitter:"teo",text:"No sé que diversión le ven a correr detrás de un balón.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},e2={dialogs:{1:[{id:1,emitter:"leo",text:"¿Tu crees que me dejen jugar?, me encanta jugar al arco.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},i2={dialogs:{1:[{id:1,emitter:"profe_vero",text:"Ya vamos a entrar a clases, aproveche bien su tiempo de descanso.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},s2={dialogs:{1:[{id:1,emitter:"lino",text:"DeberÃamos volver al liceo, si el inspector nos ve acá nos meteremos en problemas.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},n2={dialogs:{1:[{id:1,emitter:"mile",text:"Parece que en este colegio solo juegan a la pelota, ¿Qué hacemos los que nos gusta el pin-pong?.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},r2={dialogs:{1:[{id:1,emitter:"mati",text:"¿Sabes si el kiosko está abierto?... quiero comprarme unas galletas antes de volver a clases... ¿Alcanzaré?.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},a2={dialogs:{1:[{id:1,emitter:"nico",text:"Se pone cuático el inspector, no estas ni caminando rápido y te llama la atención.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},o2={dialogs:{1:[{id:1,emitter:"estudiante_h_6",text:"Shhh... silencio.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},l2={dialogs:{1:[{id:1,emitter:"estudiante_h_10",text:"Que lata, no hay nada de comics en esta biblioteca... seguiré buscando.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},Jt={principal:"off",ale:"off",alan:"off",profe:"off",soccer:"off",h_1:"off",item_1:"off",item_2:"off",item_3:"off",item_4:"off",item_5:"off",item_6:"off"},Ps=[{status:"idle",name:"ale",x:16,y:14},{status:"running",name:"soccer_player_1",x:18,y:10},{status:"running",name:"soccer_player_2",x:21,y:8},{status:"running",name:"soccer_player_3",x:25,y:9},{status:"running",name:"soccer_player_4",x:26,y:7},{status:"running",name:"soccer_player_6",x:20,y:13},{status:"running",name:"soccer_player_7",x:23,y:13},{status:"idle",name:"soccer_player_5",x:22.5,y:11.2},{status:"none",name:"sub_directora",x:26.2,y:11.7},{status:"idle",name:"inspector",x:20,y:21},{status:"idle",name:"chini",x:27.2,y:11.7},{status:"idle",name:"tere",x:36.2,y:14.3},{status:"idle",name:"alan",x:36,y:15},{status:"idle",name:"mia",x:28,y:11.2},{status:"idle",name:"cris",x:23,y:18},{status:"idle",name:"josefina",x:31,y:19.4},{status:"idle",name:"alex",x:31.2,y:20},{status:"idle",name:"ariel",x:26,y:22},{status:"idle",name:"andy",x:27.5,y:4.2},{status:"idle",name:"teo",x:29,y:7},{status:"idle",name:"leo",x:18.3,y:5.6},{status:"idle",name:"profe_vero",x:35.1,y:25.6},{status:"idle",name:"lino",x:22.1,y:28.6},{status:"idle",name:"mile",x:29.1,y:16.6},{status:"idle",name:"mati",x:10.7,y:19.6},{status:"idle",name:"jose",x:2.7,y:25.6},{status:"idle",name:"dani",x:2.1,y:26.1},{status:"idle",name:"nico",x:18.4,y:18.4}],h2={ale:1,alan:1,inspector:1,chini:1,tere:1,mia:1,cris:1,alex:1,josefina:1,sub_directora:1,director:1,soccer_player_1:1,soccer_player_2:1,soccer_player_3:1,soccer_player_4:1,soccer_player_5:1,soccer_player_6:1,soccer_player_7:1,profesor_1:1,estudiante_h_5:1,estudiante_h_1:1,estudiante_h_6:1,estudiante_h_10:1,ariel:1,cancha:1,andy:1,teo:1,leo:1,profe_vero:1,lino:1,mile:1,mati:1,jose:1,dani:1,nico:1,cimarra:1,kiosko:1},u2={ale:"none",alan:"none",inspector:"none",chini:"none",tere:"none",mia:"none",cris:"exclamation",alex:"none",josefina:"none",sub_directora:"none",director:"none",soccer_player_1:"none",soccer_player_2:"none",soccer_player_3:"none",soccer_player_4:"none",soccer_player_5:"none",soccer_player_6:"none",soccer_player_7:"none",profesor_1:"none",estudiante_h_5:"none",estudiante_h_1:"none",ariel:"none",cancha:"none",andy:"none",teo:"none",leo:"none",profe_vero:"none",lino:"none",mile:"none",mati:"none",jose:"none",dani:"none",nico:"none",estudiante_h_6:"none",estudiante_h_10:"none",estudiante_h_2:null,estudiante_h_3:null,estudiante_h_4:null,estudiante_h_7:null,estudiante_h_8:null,estudiante_h_9:null,cimarra:"none",kiosko:"none"},d2={ale:ZS,alan:qS,inspector:NS,chini:VS,tere:null,mia:zS,cris:GS,alex:QS,josefina:JS,sub_directora:US,director:XS,soccer_player_1:null,
6278soccer_player_2:null,soccer_player_3:null,soccer_player_4:null,soccer_player_5:YS,soccer_player_6:jS,soccer_player_7:KS,profesor_1:$S,estudiante_h_5:WS,estudiante_h_1:HS,ariel:bf,cancha:Mf,andy:_S,teo:t2,leo:e2,profe_vero:i2,lino:s2,mile:n2,mati:r2,estudiante_h_6:o2,estudiante_h_10:l2,nico:a2,cimarra:wf,kiosko:Af},{loadCharHalfBody:ss}=Te(),{setEpilogo:sd,showOptions:Xn}=Xi(),c2={dialogs:{1:[{id:1,emitter:"cris",text:"Me encanta que ahora tengamos un dÃa con ropa de calle.",mood:"neutral",actions:Z},{id:2,emitter:"cris",text:"¿Qué mas podemos hacer? Aún hay muchas cosas por cambiar en este liceo.",mood:"neutral",actions:[{text:"Conversaré con los chiques, quizá tengan ideas.",dispatch:"complete",onComplete:[{key:"cris",status:"none",step:2},{key:"mati",status:"exclamation",step:2}],cb:()=>{yt(3,"principal","started1")}}]}],2:[{id:1,emitter:"cris",text:"Avisame si necesitas ayuda con algo, me encantarÃa ayudar.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],3:[{id:1,emitter:"cris",text:"Wow, mejorar el dÃa del liceo... ¡Qué buena idea!.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],4:[{id:1,emitter:"cris",text:"Ya todos se enteraron de lo que están planeando para el dÃa del liceo, será genial.",mood:"neutral",actions:Z},{id:2,emitter:"player",text:"Que rápido vuelan las noticias.",mood:"neutral",actions:Z},{id:3,emitter:"cris",text:"Jajaja, es que están todos emocionadas. Al fin será divertido venir a clases.",mood:"neutral",actions:[{text:"<< Terminar conversación >>",dispatch:"complete",onComplete:[{key:"jose",status:"exclamation",step:16},{key:"cris",status:"none",step:5},{key:"mati",status:"none",step:9},{key:"dani",status:"none",step:7},{key:"chini",status:"none",step:4}],cb:()=>{yt(3,"principal","started13")}}]}],5:[{id:1,emitter:"cris",text:"Será el mejor dÃa del liceo que se haya visto en la historia de los dÃas del liceo.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},f2={dialogs:{1:[{id:1,emitter:"mati",text:"Wow, las cosas ya van cambiando acá",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],2:[{id:1,emitter:"mati",text:"Fué bueno el dÃa con ropa normal y ahora que el uniforme se ha flexibilizado, se nota que el colegio está mucho mejor.",mood:"neutral",actions:Z},{id:2,emitter:"jose",text:"¡Si! Oigan se acerca el dÃa del liceo y serÃa bkn que no fuera como todos los años.",mood:"neutral",actions:Z},{id:3,emitter:"dani",text:"Siempre es muy tradicional, con muchas palabras de las autoridades y los mismos juegos de todos los años, muy heteronormados, ¡me carga el tirar la cuerda!",mood:"neutral",actions:Z},{id:4,emitter:"jose",text:"Pero saben cabros, es importante hacer esas cosas que cambian la actitud de les compañeres y refuerzan el ánimo de cambios, pero hay que hacer cambios estructurales también, el colegio necesita hacerse cargo de los problemas de género.",mood:"neutral",actions:Z},{id:5,emitter:"dani",text:"¡Claro! Pero... ¿Qué sugieres?",mood:"neutral",actions:Z},{id:6,emitter:"jose",text:"Que se forme una secretarÃa de género, que vele por la igualdad de oportunidades y el respeto de todes les estudiantes.",mood:"neutral",actions:Z},{id:7,emitter:"chini",text:"¡¿En serio?! eso es súper difÃcil po.",mood:"neutral",actions:Z},{id:8,emitter:"jose",text:"No tanto, creo que es posible si nos movemos bien y trabajamos en conjunto.",mood:"neutral",actions:Z},{id:9,emitter:"mati",text:"¡Dale! pero ¿Qué hacemos primero? ¿Mejorar el dÃa del liceo o la secretarÃa de género?",mood:"neutral",actions:Z},{id:10,emitter:"chini",text:"¿Qué opinas? ¿Qué hacemos primero?",mood:"neutral",actions:[{text:"Me da igual.",dispatch:"set",onSet:{next:"mati",data:[{n:3,char:"mati"}]},cb:()=>{yt(3,"principal","started2")}},{text:"Votemos",dispatch:"set",onSet:{next:"mati",data:[{n:4,char:"mati"}]},cb:()=>{yt(3,"principal","started3")}}]}],3:[{id:1,emitter:"player",text:"Ambas son buenas ideas, pero decidan ustedes. Esto no me interesa.",mood:"neutral",actions:Z},{id:2,emitter:"jose",text:"Parece que no has visto lo que pasa en los patios de este colegi
6278o.",mood:"neutral",actions:Z},{id:3,emitter:"jose",text:"Veamos lo del dÃa del liceo, y después podemos ver lo de la secretarÃa de género, una cosa no quita la otra.",mood:"neutral",actions:[{text:"<< Terminar conversación >>",dispatch:"complete",onComplete:[{key:"mati",status:"none",step:5},{key:"jose",status:"exclamation",step:2},{key:"cris",status:"none",step:3},{key:"chini",status:"none",step:2},{key:"dani",status:"none",step:2}]}]}],4:[{id:1,emitter:"player",text:"DeberÃamos hacer una votación y que decida la mayorÃa.",mood:"neutral",actions:Z},{id:2,emitter:"mati",text:"Ya po, vamos con la democracia. ¡Votemos!",mood:"neutral",actions:[{text:"<< Terminar conversación >>",dispatch:"complete",onComplete:[{key:"mati",status:"none",step:6},{key:"dani",status:"exclamation",step:3}]}]}],5:[{id:1,emitter:"mati",text:"Debemos promover el cambio",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],6:[{id:1,emitter:"mati",text:"¿Qué será lo más importante?, ¿Qué votarás tú?",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],7:[{id:1,emitter:"mati",text:"Creo que es buena idea.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],8:[{id:1,emitter:"mati",text:"Oh, que sorpresa... no te creo que la subdire apoyó a la primera.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],9:[{id:1,emitter:"mati",text:"Aún tenemos cosas por hacer, pero vamos bien.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},v2={dialogs:{1:[{id:1,emitter:"jose",text:"Por fin tendremos un colegio para los nuevos tiempos.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],2:[{id:1,emitter:"jose",text:"Será la mejor versión del dÃa del liceo.",mood:"neutral",actions:Z},{id:2,emitter:"mati",text:"Bueno, entonces este dÃa del Liceo debe ser bkn. Lo mejor es ser estratégicos y hablar con las personas indicadas. Es bueno saber que la Subdire después de lo de la Chini está mucho más abierta a sugerencias.",mood:"neutral",actions:Z},{id:3,emitter:"chini",text:"Si, era el colmo no poder jugar a la pelota... ¡Sólo por ser niña!",mood:"neutral",actions:Z},{id:4,emitter:"mati",text:"Pero hay que recordar que es la profe Vero de los primeros medios la que todos los años organiza el dÃa del liceo.",mood:"neutral",actions:Z},{id:5,emitter:"chini",text:"Si, quizás la profe pone menos ataos.",mood:"neutral",actions:Z},{id:6,emitter:"mati",text:"¿Qué hacemos?.",mood:"neutral",actions:[{text:"Vamos a hablar con la subdirectora, nos apoyo antes, nos puede apoyar de nuevo",dispatch:"complete",onComplete:[{key:"jose",status:"none",step:3},{key:"mati",status:"none",step:7},{key:"dani",status:"none",step:2},{key:"chini",status:"none",step:2}
6278,{key:"sub_directora",status:"question",step:2}],cb:()=>{yt(3,"principal","started5"),yt(3,"subdire_1","finished"),vt(3,"principal-1-1","RM")}},{text:"Vamos a hablar con la profe a cargo, demás que no pone ataos",dispatch:"complete",onComplete:[{key:"jose",status:"none",step:4},{key:"mati",status:"none",step:7},{key:"dani",status:"none",step:2},{key:"chini",status:"none",step:2},{key:"profe_vero",status:"question",step:2}],cb:()=>{yt(3,"principal","started6"),yt(3,"profe_vero_1","finished"),vt(3,"principal-1-2","RM")}},{text:"Vamos a hablar con los compañeres en las gradas, asà somos más y hacemos más presión.",dispatch:"complete",onComplete:[{key:"jose",status:"none",step:4},{key:"mati",status:"none",step:7},{key:"dani",status:"none",step:2},{key:"chini",status:"none",step:2},{key:"lino",status:"exclamation",step:2},{key:"nico",status:"none",step:2},{key:"mile",status:"none",step:2}],cb:()=>{yt(3,"principal","started7"),yt(3,"gradas_1","finished"),vt(3,"principal-1-3","RM")}}]}],3:[{id:1,emitter:"jose",text:"Veamos si la Subdirectora esta en la oficina del director, o quizás en la entrada",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],4:[{id:1,emitter:"jose",text:"Si vamos ahora, pillamos a la profe en la sala de primero medio",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],5:[{id:1,emitter:"jose",text:"Asà se hace, que gran poder de convencimiento tienes.",mood:"neutral",actions:Z},{id:2,emitter:"player",text:"Si, hasta yo me sorprendo.",mood:"neutral",actions:Z},{id:3,emitter:"mati",text:"Yo me movà también y tengo invitado a 3 grupos de música de acá del liceo que pueden presentarse... y prestan los equipos y todo. ",mood:"neutral",actions:Z},{id:4,emitter:"jose",text:"¡Que motivados!.",mood:"neutral",actions:Z},{id:5,emitter:"chini",text:"Nosotras estamos hablando con el dire para poder conseguir que el ese dÃa podamos hacer unos murales en la pared del gimnasio que muestren la diversidad del liceo.",mood:"neutral",actions:Z},{id:6,emitter:"jose",text:"Esaaa!!! Será intenso!!!, yo pienso que igual podemos coordinar con la profe Vero una coreografÃa potente y que la baile todo el cole.",mood:"neutral",actions:Z},{id:7,emitter:"mati",text:"¡Ya!, ¿ahora con que seguimos?",mood:"neutral",actions:[{text:"<< Siguiente >>.",dispatch:"set",onSet:{next:"jose",data:[{n:0,char:"jose",stepSelector:()=>{let i=6;return Ht.subdire_1==="finished"&&(i=6),Ht.profe_vero_1==="finished"&&(i=7),Ht.gradas_1==="finished"&&(i=8),i}}]}}]}],6:[{id:1,emitter:"jose",text:"Yo creo que ...",mood:"neutral",actions:[{text:"...Debemos ir a hablar con la profe.",dispatch:"set",onSet:{next:"jose",data:[{n:9,char:"jose"}]},cb:()=>{vt(3,"principal-2-1","RM")}},{text:"...Debemos ir a hablar con los compañeres en las gradas",dispatch:"set",onSet:{next:"jose",data:[{n:10,char:"jose"}]},cb:()=>{vt(3,"principal-2-2","RM")}},{text:"...Ya hice suficiente, decidan ustedes",dispatch:"set",onSet:{next:"jose",data:[{n:11,char:"jose"}]},cb:()=>{vt(3,"principal-2-3","RM")}}]}],7:[{id:1,emitter:"jose",text:"Yo creo que ...",mood:"neutral",actions:[{text:"...Debemos ir a hablar con la subdirectora.",dispatch:"set",onSet:{next:"jose",data:[{n:12,char:"jose"}]},cb:()=>{vt(3,"principal-3-1","RM")}},{text:"...Debemos ir a hablar con los compañeres en las gradas",dispatch:"set",onSet:{next:"jose",data:[{n:13,char:"jose"}]},cb:()=>{vt(3,"principal-3-2","RM")}},{text:"...Ya hice suficiente, decidan ustedes",dispatch:"set",onSet:{next:"jose",data:[{n:11,char:"jose"}]},cb:()=>{vt(3,"principal-3-3","RM")}}]}],8:[{id:1,emitter:"jose",text:"Yo creo que ...",mood:"neutral",actions:[{text:"...Debemos ir a hablar con la subdirectora.",dispatch:"set",onSet:{next:"jose",data:[{n:14,char:"jose"}]},cb:()=>{vt(3,"principal-4-1","RM")}},{text:"...Debemos ir a hablar con la profe",dispatch:"set",onSet:{next:"jose",data:[{n:15,char:"jose"}]},cb:()=>{vt(3,"principal-4-2","RM")}},{text:"...Ya hice suficiente, decidan ustedes",dispatch:"set",onSet:{next:"jose",data:[{n:11,char:"jose"}]},cb:()=>{vt(3,"principal-4-3","RM")}}]}],9:[{id:1,emitter:"player",text:"Fui a hablar con la Subdire, está un poco más receptiva pero igual dijo que todo pasaba por la profe Vero.",mood:"neutral",actions:Z},{id:2,emitter:"jose",text:"¡Oh! me sorprende.",mood:"neutral",actions:Z},{id:3,emitter:"player",text:"Si, asà que ahora ya deberÃamos ir a hablar con la profesora Vero.",mood:"neutral",actions:[{text:"<< Terminar conversación >>",dispatch:"complete",onComplete:[{key:"profe_vero",status:"exclamation",step:5},{key:"jose",status:"none",step:26}],cb:()=>{yt(3,"principal","started10")}}]}],10:[{id:1,emitter:"player",text:"Fui a hablar con la Subdire. Está un poco más receptiva pero igual dijo que todo pasaba por la profe Vero.",mood:"neutral",actions:Z},{id:2,emitter:"jose",text:"¡Oh! me sorprende.",mood:"neutral",actions:Z},{id:3,emitter:"player",text:"Si, asà que ahora ya deberÃamos juntar más gente, hablemos con los cabres en las gradas.",mood:"neutral",actions:[{text:"<< Terminar conversación >>",dispatch:"complete",onComplete:[{key:"lino",status:"exclamation",step:5},{key:"jose",status:"none",step:26}],cb:()=>{yt(3,"principal","started11")}}]}
6278],11:[{id:1,emitter:"player",text:"Creo que ya hice suficiente.",mood:"neutral",actions:Z},{id:2,emitter:"jose",text:"¡Oh! ¿dejarás todo hasta acá?.... bueno, pero nosotros no desistiremos.",mood:"neutral",actions:[{text:"<< Terminar conversación >>",dispatch:"complete",onComplete:[{key:"cris",status:"exclamation",step:4},{key:"jose",status:"none",step:25}],cb:()=>{yt(3,"principal","started12")}}]}],12:[{id:1,emitter:"player",text:"Fui a hablar con la Profe Vero. Igual estuvo receptiva, pero hay que seguir trabajando.",mood:"neutral",actions:Z},{id:2,emitter:"mati",text:"Buena, no hay que bajar lo brazos ¿Cuál es el siguiente paso?",mood:"neutral",actions:Z},{id:3,emitter:"player",text:"Subir la apuesta e ir a hablar con la subdirectora.",mood:"neutral",actions:[{text:"<< Terminar conversación >>",dispatch:"complete",onComplete:[{key:"sub_directora",status:"exclamation",step:5},{key:"jose",status:"none",step:26}],cb:()=>{yt(3,"principal","started9")}}]}],13:[{id:1,emitter:"player",text:"Fui a hablar con la Profe Vero. Igual estuvo receptiva, pero hay que seguir trabajando.",mood:"neutral",actions:Z},{id:2,emitter:"mati",text:"Buena, no hay que bajar lo brazos ¿Cuál es el siguiente paso?",mood:"neutral",actions:Z},{id:3,emitter:"player",text:"Ahora deberÃamos juntar más gente, hablemos con los cabres en las gradas..",mood:"neutral",actions:[{text:"<< Terminar conversación >>",dispatch:"complete",onComplete:[{key:"lino",status:"exclamation",step:5},{key:"jose",status:"none",step:26}],cb:()=>{yt(3,"principal","started11")}}]}],14:[{id:1,emitter:"player",text:"Fui a hablar con la gente de las gradas. Me fue bien, aunque igual hay que seguir buscando más apoyo de les estudiantes..",mood:"neutral",actions:Z},{id:2,emitter:"chini",text:"¡SÃ! Si somos muchos no se van a poder negar. ¿Cuál es el siguiente paso?",mood:"neutral",actions:Z},{id:3,emitter:"player",text:"Subir la apuesta e ir directo con la subdirectora",mood:"neutral",actions:[{text:"<< Terminar conversación >>
6278",dispatch:"complete",onComplete:[{key:"sub_directora",status:"exclamation",step:5},{key:"jose",status:"none",step:26}],cb:()=>{yt(3,"principal","started9")}}]}],15:[{id:1,emitter:"player",text:"Fui a hablar con la gente de las gradas. Me fue bien, aunque igual hay que seguir buscando más apoyo de les estudiantes..",mood:"neutral",actions:Z},{id:2,emitter:"chini",text:"¡SÃ! Si somos muchos no se van a poder negar. ¿Cuál es el siguiente paso?",mood:"neutral",actions:Z},{id:3,emitter:"player",text:"Ya que igual somos hartos, podrÃamos ir a convencer con la profe Vero",mood:"neutral",actions:[{text:"<< Terminar conversación >>",dispatch:"complete",onComplete:[{key:"profe_vero",status:"exclamation",step:5},{key:"jose",status:"none",step:26}],cb:()=>{yt(3,"principal","started10")}}]}],16:[{id:1,emitter:"jose",text:"Ya se está armando todo para el dÃa del liceo.",mood:"neutral",actions:Z},{id:2,emitter:"dani",text:"Si, ¡Lo estamos logrando!",mood:"neutral",actions:Z},{id:3,emitter:"jose",text:"Pero recuerden que aún hay más cambios que realizar.",mood:"neutral",actions:Z},{id:4,emitter:"chini",text:"Si, y que también son muy importantes.",mood:"neutral",actions:Z},{id:5,emitter:"player",text:"Claro, no debemos olvidarnos de la secretarÃa de género.",mood:"neutral",actions:Z},{id:6,emitter:"mati",text:"Ya, entonces ¿cómo armamos una en nuestro liceo?.",mood:"neutral",actions:Z},{id:7,emitter:"chini",text:"DeberÃamos tener algo bien estructurado, una propuesta firme.",mood:"neutral",actions:Z},{id:8,emitter:"dani",text:"¿Qué crees que debemos hacer?",mood:"neutral",actions:[{text:"Mejor no meterse.",dispatch:"complete",onComplete:[{key:"jose",status:"none",step:17}],cb:()=>{yt(3,"principal","finished"),vt(3,"principal-5-1","RM"),sd(3,1)}},{text:"Lo mejor serÃa ir directamente con el director.",dispatch:"complete",onComplete:[{key:"jose",status:"none",step:18},{key:"director",status:"exclamation",step:2}],cb:()=>{yt(3,"principal","started14"),vt(3,"principal-5-2","RM"),sd(3,2)}},{text:"Los cambios deben partir desde la comunidad, busquemos apoyo en las gradas.",dispatch:"complete",onComplete:[{key:"jose",status:"none",step:19},{key:"lino",status:"exclamation",step:7}],cb:()=>{yt(3,"principal","started15"),vt(3,"principal-5-3","RM"),sd(3,2)}}]}],17:[{id:1,emitter:"player",text:"Creo que ya hemos hecho bastante.",mood:"neutral",actions:Z},{id:2,emitter:"chini",text:"¿Tú crees?",mood:"neutral",actions:Z},{id:3,emitter:"jose",text:"Hay mucho por cambiar, si quieres tú te quedás acá",mood:"neutral",actions:Z},{id:4,emitter:"jose",text:"SÃ, nosotros hablaremos con todos hasta lograr que se vele por que todos tengan el mismo trato",mood:"neutral",actions:[{text:"<< Terminar Conversación >>",dispatch:"complete",onComplete:[{key:"jose",status:"none",step:20}],cb:()=>Xn(!0)}]}],18:[{id:1,emitter:"player",text:"Hay que seguir escalando con las autoridades. Voy a ir a hablar con el director.",mood:"neutral",actions:Z},{id:1,emitter:"jose",text:"Muy bien, directo con la máxima autoridad, me gusta.",mood:"neutral",actions:[{text:"<< Terminar Conversación >>",dispatch:"complete",onComplete:[{key:"jose",status:"none",step:21},{key:"director",status:"question",step:2}]}]}],19:[{id:1,emitter:"player",text:"Todo lo que logramos ha sido en grupo, deberÃamos ir a hablar con otros compañeres para que nos apoyen.",mood:"neutral",actions:Z},{id:2,emitter:"dani",text:"Si, eso ya nos ha resultado, y demás nos apoyan en esta buena causa.",mood:"neutral",actions:[{text:"<< Terminar Conversación >>",dispatch:"complete",onComplete:[{key:"jose",status:"none",step:22}]}]}],20:[{id:1,emitter:"jose",text:"Nunca se ha hecho demasiado, debemos traer el cambio y la inclusión al liceo",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],21:[{id:1,emitter:"jose",text:"Muy bien, directo con la máxima autoridad, me gusta.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],22:[{id:1,emitter:"jose",text:"Buena idea, la comunidad es la que debe decidir.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],23:[{id:1,emitter:"jose",text:"Que bien, ya estamos en camino a un liceo más inclusivo.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],24:[{id:1,emitter:"jose",text:"¿Cómo te fue?",mood:"neutral",actions:Z},{id:2,emitter:"player",text:"Fui a hablar con les cabres a las gradas. La idea ya va agarrando vuelo pero hay que seguir trabajando.",mood:"neutral",actions:Z},{id:3,emitter:"chini",text:"¡Sin duda!",mood:"neutral",actions:Z},{id:4,emitter:"mati",text:"¿Cuál es el siguiente paso?",mood:"neutral",actions:Z},{id:5,emitter:"player",text:"Ahora que somos hartos, debemos ir a hablar con el director",mood:"neutral",actions:[{text:"<< Terminar conversación >>",dispatch:"complete",onComplete:[{key:"jose",status:"none",step:23},{key:"director",status:"exclamation",step:2}],cb:()=>{yt(3,"principal","started14")}}]}],25:[{id:1,emitter:"jose",text:"Aunque creas que hemos hecho suficiente, te aseguro que hay mucho más por hacer.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],26:[{id:1,emitter:"jose",text:"Si nos esforzamos, podemos ser el motor del cambio",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},p2={dialogs:{1:[{id:1,emitter:"dani",text:"Es bueno ver que las cosas van cambiando.... para mejor.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],2:[{id:1,emitter:"dani",text:"Todo cambio comienza con un paso, y nosotros vamos a hacer grandes cambios.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],3:[{id:1,emitter:"dani",text:"Ya, votemos entonces.",mood:"neutral",actions:Z},{id:2,emitter:"player",text:"¿Qué decidirás?",mood:"neutral",actions:[{text:"Mejorar el dÃa del liceo.",dispatch:"set",onSet:{next:"dani",data:[{n:4,char:"dani"}]}},{text:"Crear la secretarÃa de género.",dispatch:"set",onSet:{next:"dani",data:[{n:4,char:"dani"}]}},{text:"Voto nulo, escojan ustedes.",dispatch:"set",onSet:{next:"dani",data:[{n:4,char:"dani"}]}}]}],4:[{id:1,emitter:"dani",text:"Yo voto por el dia del liceo.",mood:"neutral",actions:Z},{id:2,emitter:"jose",text:"Yo insisto con la secretarÃa, es más importante.",mood:"neutral",actions:Z},{id:3,emitter:"chini",text:"Pero comencemos por algo más fácil, el dÃa del liceo.",mood:"neutral",actions:Z},{id:4,emitter:"mati",text:"Yap, yo voto... dÃa del liceo.",mood:"neutral",actions:Z},{id:5,emitter:"player",text:"Entonces está decidido.",mood:"neutral",actions:Z},{id:6,emitter:"jose",text:"Bueno... la democracia ha hablado.",mood:"neutral",actions:Z},{id:7,emitter:"dani",text:"¡Vamos a mejorar el dÃa del liceo!.",mood:"neutral",actions:[{text:"<< Terminar conversación >>",dispatch:"complete",onComplete:[{key:"dani",status:"none",step:5},{key:"jose",status:"exclamation",step:2},{key:"cris",status:"none",step:3},{key:"chini",status:"none",step:2},{key:"mati",status:"none",step:5}],cb:()=>{yt(3,"principal","started4")}}]}],5:[{id:1,emitter:"dani",text:"Comencemos cuanto antes.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],6:[{id:1,emitter:"dani",text:"Que sorpresa, pero mejor para nosotros, no pense que tendrÃamos el apoyo de la subdire.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],7:[{id:1,emitter:"dani",text:"Hemos conseguido grandes cosas... vamos por más.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},m2={dialogs:{1:[{id:1,emitter:"chini",text:"Que bueno contar con un dÃa libre de uniforme.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],2:[{id:1,emitter:"chini",text:"Que emoción, será un dÃa del liceo distinto... y para mejor.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],3:[{id:1,emitter:"chini",text:"¿Era la subdirectora?, quizás los alien la reemplazaron por otra más simpática... jajaja.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],4:[{id:1,emitter:"chini",text:"No sólo mejoraremos el dÃa del liceo, mejoraremos todo el liceo.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},g2={dialogs:{1:[{id:1,emitter:"director",text:"Todos están felices con los cambios que se han ido realizando, eso me pone feliz.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],2:[{id:1,emitter:"player",text:"Hola director, querÃa hablarle de un tema importante.",mood:"neutral",actions:Z},{id:2,emitter:"director",text:"¿De qué se trata?",mood:"neutral",actions:Z},{id:3,emitter:"player",text:"Como usted sabe, el liceo ha entrado en una nueva etapa y debemos hacer frente a los desafÃos que esto conlleva.",mood:"neutral",actions:Z},{id:4,emitter:"director",text:"... Interesante.",mood:"neutral",actions:Z},{id:5,emitter:"player",text:"Creemos que una secretarÃa de género ayudarÃa mucho en la sana convivencia de la comunidad estudiantil. ¿Qué opina usted?",mood:"neutral",actions:Z},{id:6,emitter:"director",text:"Me interesa el tema. DÃgame más.",mood:"neutral",actions:[{text:"Comentar las ideas para la secretarÃa de género.",dispatch:"game",game:{type:5,onLoad:async()=>
6278{await ss("director","Me interesa saber que tienen en mente","Debemos hacer que todos se sientan incluidos.")},winCb:()=>{console.log("WIN !!!")},loseCb:()=>{console.log("LOSE !!!")},onComplete:{next:"director",data:[{n:2,char:"director"}],win:{next:"director",data:[{n:3,char:"director",status:"none"}],cb:()=>{yt(3,"principal","finished")}}}}},{text:q,dispatch:"close"}]}],3:[{id:1,emitter:"director",text:"Me parece muy bien lo que dice. Hay que ver qué opina el resto de la comunidad. Estos cambios son muy necesarios.",mood:"neutral",actions:Z},{id:2,emitter:"player",text:"Es fundamental que esto sea una tarea conjunta de estudiantes, trabajadores y autoridades.",mood:"neutral",actions:Z},{id:3,emitter:"director",text:"Conversaré con los profesores y les daré mi opinión. Gracias por acercarse a mÃ.",mood:"neutral",actions:[{text:"<< Terminar conversación >>",dispatch:"complete",onComplete:[{key:"jose",status:"none",step:23},{key:"director",status:"none",step:4}],cb:()=>Xn(!0)}]}],4:[{id:1,emitter:"director",text:"Como la idea viene desde la comunidad estudiantil, puedo asegurar que será bien recibida.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},x2={dialogs:{1:[{id:1,emitter:"sub_directora",text:"¿Qué se le ofrece joven?... ¿No deberÃa estar estudiando?.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],2:[{id:1,emitter:"player",text:"¿Cómo esta subdire?",mood:"neutral",actions:Z},{id:2,emitter:"sub_directora",text:"Muy bien joven, ¿En qué puedo ayudarle?,¿Qué le trae por aquÃ?",mood:"neutral",actions:Z},{id:3,emitter:"player",text:"QuerÃa hablar con usted porque el dÃa del liceo será pronto y queremos ser más proactivos como alumnos en la organización, pero nos parece importante hablar de esto con usted primero.",mood:"neutral",actions:Z},{id:4,emitter:"sub_directora",text:"¿Cambiar el dÃa del liceo?.",mood:"neutral",actions:Z},{id:5,emitter:"player",text:"Si, tenemos ideas para que más compañeres se motiven y participen.",mood:"neutral",actions:Z},{id:6,emitter:"sub_directora",text:"A ver, ¿Qué ideas tienen?.",mood:"neutral",actions:[{text:"Comentar las ideas para el dÃa del liceo.",dispatch:"game",game:{type:5,onLoad:async()=>{await ss("subdirectora","Si mejoran la participación, quizás sea posible hacer algo.","La inclusión es importante, muchos querrán participar si se sienten incluidos.")},winCb:()=>{console.log("WIN !!!")},loseCb:()=>{console.log("LOSE !!!")},onComplete:{next:"sub_directora",data:[{n:2,char:"sub_directora"}
6278],win:{next:"sub_directora",data:[{n:3,char:"sub_directora",status:"none"}],cb:()=>{yt(3,"principal","started8")}}}}},{text:q,dispatch:"close"}]}],3:[{id:1,emitter:"sub_directora",text:"Me parece muy bien que los alumnos se interesen por su colegio.",mood:"neutral",actions:Z},{id:2,emitter:"player",text:"Si, lo hacemos por que creemos que es lo mejor para el colegio.",mood:"neutral",actions:Z},{id:3,emitter:"sub_directora",text:"muy bien, yo puedo hablar con la señorita Verónica, pero creo que ustedes también deben contarle su propuesta.",mood:"neutral",actions:Z},{id:4,emitter:"player",text:"Sabe Subdire, veo que usted está más receptiva que antes.",mood:"neutral",actions:Z},{id:5,emitter:"sub_directora",text:"Puede ser, las personas podemos cambiar de opinión.",mood:"neutral",actions:[{text:"<< Terminar conversación >>",dispatch:"complete",onComplete:[{key:"sub_directora",status:"none",step:4},{key:"mati",status:"none",step:8},{key:"dani",status:"none",step:6},{key:"jose",status:"exclamation",step:5},{key:"chini",status:"none",step:3}]}]}],4:[{id:1,emitter:"sub_directora",text:"Coméntenle sus ideas a la señorita Verónica, ella es la encargada del dÃa del liceo y es importante que lo escuche de ustedes",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],5:[{id:1,emitter:"player",text:"¿Cómo esta subdire?",mood:"neutral",actions:Z},{id:2,emitter:"sub_directora",text:"Muy bien joven, ¿Le ayudo en algo?",mood:"neutral",actions:Z},{id:3,emitter:"player",text:"Si, hemos estado hablando por el dÃa del liceo... ya está cerca y queremos hacer algo especial, algo inclusivo.",mood:"neutral",actions:Z},{id:4,emitter:"sub_directora",text:"A ver, ¿Qué ideas tienen?",mood:"neutral",actions:[{text:"Comentar las ideas para el dÃa del liceo.",dispatch:"game",game:{type:4,onLoad:async()=>{await ss("subdirectora","Si mejoran la participación, quizás sea posible hacer algo.","La inclusión es importante, muchos querrán participar si se sienten incluidos.")},winCb:()=>{console.log("WIN !!!")},loseCb:()=>{console.log("LOSE !!!")},onComplete:{next:"sub_directora",data:[{n:5,char:"sub_directora"}
6278],win:{next:"sub_directora",data:[{n:6,char:"sub_directora",status:"none"},{n:4,char:"cris",status:"exclamation"}],cb:()=>{yt(3,"principal","started12"),he(!0)}}}}},{text:q,dispatch:"close"}]}],6:[{id:1,emitter:"sub_directora",text:"Me alegra que los jóvenes estén interesados en aportar con el dÃa del liceo.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],7:[{id:1,emitter:"sub_directora",text:"Me alegra que los jóvenes estén interesados en aportar con el dÃa del liceo.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},y2={dialogs:{1:[{id:1,emitter:"inspector",text:"Oiga joven, no corra por los pasillos, puede provocar un accidente.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],2:[{id:1,emitter:"player",text:"Hola inspector, le vengo a contar algo que está sucediendo en los baños del liceo. ",mood:"neutral",actions:Z},{id:2,emitter:"inspector",text:"DÃgame jóven.",mood:"neutral",actions:Z},{id:3,emitter:"player",text:"A la Andy la están discriminando en el baño de niñas. Ahora viene vestida como quiere y ese baño le corresponde.",mood:"neutral",actions:Z},{id:4,emitter:"inspector",text:"Espere un minuto. ¿Usted habla de Andrés?",mood:"neutral",actions:Z},{id:5,emitter:"player",text:"¡No inspector! le estoy hablando de Andy. Ella se percibe como mujer y usted deberÃa usar el nombre social de ella.",mood:"neutral",actions:[{text:"DeberÃa hacer algo al respecto.",dispatch:"game",game:{type:2,onLoad:async()=>{await ss("inspector","ExplÃquese joven.","Todos merecen libertad y respeto.")},winCb:()=>{console.log("WIN !!!")},loseCb:()=>{console.log("LOSE !!!")},onComplete:{next:"inspector",data:[{n:2,char:"inspector"}],win:{next:"inspector",data:[{n:3,char:"inspector",status:"none"}],cb:()=>{yt(3,"bullying","finished"),yt(3,"bullying_crying","finished"),he(!0)}}}}},{text:q,dispatch:"close"}]}],3:[{id:1,emitter:"inspector",text:"Este es un inconveniente que no pensamos, pero debemos hacernos cargo. Veré cómo podemos solucionarlo de manera permanente. Es importante también generar conciencia y empatÃa en la comunidad.",mood:"neutral",actions:Z},{id:2,emitter:"player",text:"Gracias Inspector.",mood:"neutral",actions:[{text:"<< Terminar conversación >>",dispatch:"complete",onComplete:[{key:"andy",status:"none",step:6},{key:"inspector",status:"none",step:4}],cb:()=>Xn(!0)}]}],4:[{id:1,emitter:"inspector",text:"No se permitirá que le falten el respeto a nadie.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},C2={dialogs:{1:[{id:1,emitter:"lino",text:"Qué fome el colegio, siempre lo mismo",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],2:[{id:1,emitter:"player",text:"Hola compañeres, se acerca el dÃa del liceo ¿Qué opinan ustedes de las actividades que hacemos ese dÃa?",mood:"neutral",actions:Z},{id:2,emitter:"lino",text:"A mi me parece que son bien fomes, podrÃamos hacer algo diferente.",mood:"neutral",actions:Z},{id:3,emitter:"nico",text:"De seguro nos hacen tirar la cuerda de nuevo.",mood:"neutral",actions:Z},{id:4,emitter:"lino",text:"si, que fome, prefiero quedarme en mi casa.",mood:"neutral",actions:Z},{id:5,emitter:"mile",text:"A mi igual me gusta, la profe Vero le pone empeño.",mood:"neutral",actions:Z},{id:6,emitter:"player",text:"Tenemos algunas ideas para ese dÃa, ¿les gustarÃa participar?.",mood:"neutral",actions:[{text:"Comentar las ideas para el dÃa del liceo.",dispatch:"game",game:{type:5,onLoad:async()=>{await ss("lino","Ojalá sea algo entretenido","Más que entretenido, es algo necesario para todos")},winCb:()=>{console.log("WIN !!!")},loseCb:()=>{console.log("LOSE !!!")},onComplete:{next:"sub_directora",data:[{n:2,char:"lino"}],win:{next:"lino",data:[{n:3,char:"lino",status:"none"}],cb:()=>{yt(3,"principal","started8")}}}}},{text:q,dispatch:"close"}]}],3:[{id:1,emitter:"lino",text:"¿Transformar el dÃa del liceo, en un dÃa de inclusión?",mood:"neutral",actions:Z},{id:2,emitter:"mile",text:"Suena bien.",mood:"neutral",actions:Z},{id:3,emitter:"nico",text:"Servirá más que andar tirando la cuerda, ¡me sumo!",mood:"neutral",actions:Z},{id:4,emitter:"lino",text:"Tienen razón, será el mejor dÃa del liceo que hayamos tenido.",mood:"neutral",actions:[{text:"<< Terminar conversación >>",dispatch:"complete",onComplete:[{key:"lino",status:"none",step:4},{key:"mile",status:"none",step:3},{key:"nico",status:"none",step:3},{key:"jose",status:"exclamation",step:5}]}]}],4:[{id:1,emitter:"lino",text:"Qué buena idea, será un dÃa del liceo distinto.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],5:[{id:1,emitter:"player",text:"Hola chiques, necesitamos su ayuda.",mood:"neutral",actions:Z},{id:2,emitter:"lino",text:"¿Qué están pensando hacer?",mood:"neutral",actions:Z},{id:2,emitter:"player",text:"Estamos pensando en hacer un dÃa del liceo distinto, ¿qué opinan?",mood:"neutral",actions:Z},{id:3,emitter:"mile",text:"Es buena idea, ¿pero en la dirección nos dejarán intervenir?",mood:"neutral",actions:Z},{id:4,emitter:"nico",text:"Si, podrÃamos hacer algo más divertido, pero no sé si nos dejarán.",mood:"neutral",actions:[{text:"Comentar las ideas para el dÃa del liceo.",dispatch:"game",game:{type:4,onLoad:async()=>{await ss("lino","¿Qué tienen pensado hacer?","Ayúdennos a que sea un dÃa inclusivo")},winCb:()=>{console.log("WIN !!!")},loseCb:()=>{console.log("LOSE !!!")},onComplete:{next:"lino",data:[{n:5,char:"lino"}],win:{next:"lino",data:[{n:6,char:"lino",status:"none"}],cb:()=>{yt(3,"principal","started12")}}}}},{text:q,dispatch:"close"}]}],6:[{id:1,emitter:"player",text:"Ya estamos conversando con la directora y la profe, esta casi todo listo",mood:"neutral",actions:Z},{id:2,emitter:"lino",text:"¡Qué buena!, será un dÃa del liceo distinto, cuenten con nosotros",mood:"neutral",actions:[{text:q,dispatch:"complete",onComplete:[{key:"lino",status:"none",step:9},{key:"cris",status:"exclamation",step:4}]}]}],7:[{id:1,emitter:"player",text:"Hola compañeres ¿Han notado que este liceo tiene serios problemas de inclusión? ¡Es muy importante que exista una secretarÃa de género!",mood:"neutral",actions:Z},{id:2,emitter:"lino",text:"¿Tú dices?",mood:"neutral",actions:Z},{id:3,emitter:"nico",text:"Eso puede ayudar.",mood:"neutral",actions:Z},{id:4,emitter:"lino",text:"Es súper difÃcil hacer algo asÃ, la subdire no va a estar de acuerdo.",mood:"neutral",actions:Z},{id:5,emitter:"player",text:"Si reunimos suficiente apoyo entre les estudiantes demás podemos generar un cambio asà de estructural en el liceo.",mood:"neutral",actions:[{text:"Convencer a lino y los demás para apoyar la idea.",dispatch:"game",game:{type:2,onLoad:async()=>{await ss("lino","¿Tu crees que nos tomarán en cuenta?","Si nos apoyan podremos hacer algo grande")},winCb:()=>{console.log("WIN !!!")},loseCb:()=>{console.log("LOSE !!!")},onComplete:{next:"lino",data:[{n:7,char:"lino"}],win:{next:"lino",data:[{n:8,char:"lino",status:"none"},{n:24,char:"jose",status:"exclamation"}],cb:()=>{yt(3,"principal","started13")}}}}},{text:q,dispatch:"close"}]}],8:[{id:1,emitter:"nico",text:"Buena, me sumo.",mood:"neutral",actions:Z},{id:2,emitter:"mile",text:"Yo igual.",mood:"neutral",actions:Z},{id:3,emitter:"lino",text:"Es algo que debemos hacer.",mood:"neutral",actions:[{text:"<< Terminar conversación >>",dispatch:"complete",onComplete:[{key:"lino",status:"none",step:9}]}]}],9:[{id:1,emitter:"lino",text:"Espero que esto sea el comienzo de un liceo más inclusivo.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},T2={dialogs:{1:[{id:1,emitter:"mile",text:"No puede ser wue todo sea sólo estudiar... ¿y la diversión?",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],2:[{id:1,emitter:"mile",text:"¿Qué idea tienen ahora?",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],3:[{id:1,emitter:"mile",text:"¡Ya tengo ganas de ver como va a resultar el dÃa del liceo!, ¡Qué emoción!",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},S2={dialogs:{1:[{id:1,emitter:"nico",text:"Este sistema de estudio parece del 1800, deberÃan modernizarse.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],2:[{id:1,emitter:"nico",text:"¿Tienes cara de querer preguntar algo?, ya suéltala... cuéntanos",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],3:[{id:1,emitter:"nico",text:"Será un dÃa del liceo como nunca se haya visto antes.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},E2={dialogs:{1:[{id:1,emitter:"profe_vero",text:"Joven, aproveche el recreo para descansar, no deberÃa estar aquà en clases.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],2:[{id:1,emitter:"profe_vero",text:"Hola, ¿En qué puedo ayudarte?",mood:"neutral",actions:Z},{id:2,emitter:"player",text:"Hola Profe, venÃa a conversar con usted, tenemos algunas ideas para el dÃa del liceo y queremos trabajar en ellas junto con usted.",mood:"neutral",actions:Z},{id:3,emitter:"profe_vero",text:"Que bueno que se motiven. A ver, cuénteme que tienen en mente",mood:"neutral",actions:[{text:"Comentar las ideas para el dÃa del liceo.",dispatch:"game",game:{type:5,onLoad:async()=>{await ss("profe_vero","Me gusta que se motiven","y tenemos grandes ideas para este dÃa del liceo.")},winCb:()=>{console.log("WIN !!!")},loseCb:()=>{console.log("LOSE !!!")},onComplete:{next:"profe_vero",data:[{n:2,char:"profe_vero"}],win:{next:"profe_vero",data:[{n:3,char:"profe_vero",status:"none"},{char:"jose",status:"exclamation",n:5}],cb:()=>{yt(3,"principal","started8")}}}}},{text:q,dispatch:"close"}]}],3:[{id:1,emitter:"profe_vero",text:"Son buenas ideas, es muy bueno preocuparse por el dÃa del liceo. Para mà a veces es difÃcil saber qué es lo que a ustedes les gusta o quieren hacer. Asà que les agradezco este acercamiento. Además, es verdad que al colegio le falta celebrar la diversidad.",mood:"neutral",actions:Z},{id:2,emitter:"player",text:"Gracias a usted Profe Vero, trabajaremos duro para que asà sea.",mood:"neutral",actions:[{text:"<< Terminar conversación >>",dispatch:"complete",onComplete:[{key:"profe_vero",status:"none",step:4}]}]}],4:[{id:1,emitter:"profe_vero",text:"Vamos a tener que reunirnos después de clases, avÃsele a sus compañeres",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],5:[{id:1,emitter:"player",text:"Hola profesora, ¿cómo está?",mood:"neutral",actions:Z},{id:2,emitter:"profe_vero",text:"Muy bien joven, ¿Le ayudo en algo?",mood:"neutral",actions:Z},{id:3,emitter:"player",text:"Si, hemos estado hablando por el dÃa del liceo... ya está cerca y queremos hacer algo especial, algo inclusivo",mood:"neutral",actions:Z},{id:4,emitter:"profe_vero",text:"A ver, ¿Qué ideas tienen?",mood:"neutral",actions:[{text:"Comentar las ideas para el dÃa del liceo.",dispatch:"game",game:{type:4,onLoad:async()=>{await ss("profe_vero","Si mejoran la participación, quizás sea posible hacer algo.","La inclusión es importante, muchos querrán participar si se sienten incluidos.")},winCb:()=>{console.log("WIN !!!")},loseCb:()=>{console.log("LOSE !!!")},onComplete:{next:"profe_vero",data:[{n:5,char:"profe_vero"}],win:{next:"profe_vero",data:[{n:6,char:"profe_vero",status:"none"}],cb:()=>{yt(3,"principal","started12")}}}}},{text:q,dispatch:"close"}]}],6:[{id:1,emitter:"profe_vero",text:"Son buenas ideas, es muy bueno preocuparse por el dÃa del liceo. Para mà a veces es difÃcil saber qué es lo que a ustedes les gusta o quieren hacer. Asà que les agradezco este acercamiento. Además, es verdad que al colegio le falta celebrar la diversidad.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},P2={dialogs:{1:[{id:1,emitter:"player",text:"Hola, ¿Algún problema?, ¿Por qué lloras?.",mood:"neutral",actions:Z},{id:2,emitter:"andy",text:"No... nada.",mood:"crying",actions:Z},{id:3,emitter:"player",text:"¿Segura?.",mood:"neutral",actions:Z},{id:4,emitter:"andy",text:" Desde que pude venir al colegio vestida como quiero, he recibido algunos malos comentarios de otras niñas y no me dejan usar el baño. Eso es bien incómodo⦠pues si entro al otro baño será peor.",mood:"crying",actions:[{text:"No es mi problema.",dispatch:"set",onSet:{next:"andy",data:[{n:2,char:"andy"}]},cb:()=>{yt(3,"bullying","finished"),vt(3,"bully-1-1","RM")}},{text:"DeberÃamos pedir ayuda.",dispatch:"set",onSet:{next:"andy",data:[{n:4,char:"andy"}]},cb:()=>{yt(3,"bullying","started1"),vt(3,"bully-1-2","RM")}},{text:"Vamos a hablar con ellas.",dispatch:"set",onSet:{next:"andy",data:[{n:7,char:"andy"}]},cb:()=>{yt(3,"bullying","started2"),vt(3,"bully-1-3","RM")}}]}],2:[{id:1,emitter:"player",text:"A veces es difÃcil, pero no se puede hacer mucho más que aguantar.",mood:"neutral",actions:Z},{id:2,emitter:"andy",text:"Vale, gracias.",mood:"crying",actions:[{text:"<< Terminar conversación >>
6278",dispatch:"complete",onComplete:[{key:"andy",status:"none",step:3}],cb:()=>Xn(!0)}]}],3:[{id:1,emitter:"andy",text:"Ya no me dejan usar el baño... y nadie del liceo me ayuda.",mood:"crying",actions:[{text:q,dispatch:"close"}]}],4:[{id:1,emitter:"player",text:"Se me ocurre que el inspector puede ayudarnos.",mood:"neutral",actions:Z},{id:2,emitter:"andy",text:"¿Tu crees?",mood:"crying",actions:[{text:"<< Terminar conversación >>",dispatch:"complete",onComplete:[{key:"andy",status:"none",step:5},{key:"inspector",status:"none",step:2}]}]}],5:[{id:1,emitter:"andy",text:"Espero que le hagan caso al inspector.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],6:[{id:1,emitter:"andy",text:"Gracias, el inspector me habló y va a solucionar todo.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],7:[{id:1,emitter:"player",text:"¡Esto no es posible! Vamos, yo te acompaño a hablar con ellas. ",mood:"neutral",actions:[{text:"<< Terminar conversación >>",dispatch:"complete",onComplete:[{key:"andy",status:"none",step:8},{key:"xime",status:"none",step:2}]}]}],8:[{id:1,emitter:"andy",text:"¿Crees que te harán caso?.",mood:"crying",actions:[{text:q,dispatch:"close"}]}],9:[{id:1,emitter:"andy",text:"Gracias, me has ayudado mucho.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},b2={dialogs:{1:[{id:1,emitter:"xime",text:"Viste a ese tipo, se veÃa ridÃculo con esa ropa.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],2:[{id:1,emitter:"player",text:"Oigan, ¿Qué está pasando aquÃ?",mood:"neutral",actions:Z},{id:2,emitter:"nora",text:"¿Y tú qué te metes?",mood:"neutral",actions:Z},{id:3,emitter:"player",text:"Ustedes están haciendo sentir incómoda a Andy, en su propio liceo?",mood:"neutral",actions:Z},{id:4,emitter:"xime",text:"No es su baño, ¿sabes? No pertenece aquÃ.",mood:"neutral",actions:Z},{id:5,emitter:"player",text:"¿En serio creen que eso justifica discriminarla? Ella es una mujer y merece el mismo respeto que ustedes.",mood:"neutral",actions:Z},{id:6,emitter:"nora",text:"Pero, ¿y nuestra seguridad?",mood:"neutral",actions:Z},{id:7,emitter:"player",text:"¿Su seguridad? ¿De qué están hablando? Andy solo quiere usar el baño, no representa ninguna amenaza para ustedes. Además, la verdadera seguridad radica en la tolerancia y el respeto.",mood:"neutral",actions:[{text:"DeberÃan ser más empáticas",dispatch:"game",game:{type:4,onLoad:async()=>{await ss("xime","No piensan en nosotros.","Con mayor razón deberÃan apoyarla.")},winCb:()=>{console.log("WIN !!!")},loseCb:()=>{console.log("LOSE !!!")},onComplete:{next:"xime",data:[{n:2,char:"xime"}],win:{next:"xime",data:[{n:3,char:"xime",status:"none"}],cb:()=>{yt(3,"bullying","finished"),yt(3,"bullying_crying","finished"),he(!0)}}}}},{text:q,dispatch:"close"}]}],3:[{id:1,emitter:"player",text:"Todes merecemos sentirnos seguros y aceptados en nuestra propia escuela. ¿No creen que serÃa mejor usar esa energÃa para apoyar y comprender a las demás personas en lugar de juzgar.",mood:"neutral",actions:Z},{id:2,emitter:"nora",text:"Supongo que sÃâ¦",mood:"neutral",actions:Z},{id:3,emitter:"nora",text:"Nunca lo habÃa pensado de esa manera.",mood:"neutral",actions:[{text:"<< Terminar conversación >>",dispatch:"complete",onComplete:[{key:"andy",status:"none",step:9},{key:"xime",status:"none",step:4}],cb:()=>Xn(!0)}]}],4:[{id:1,emitter:"xime",text:"Ya no daremos más problemas.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},M2={dialogs:{1:[{id:1,emitter:"maton_3",text:"¡Esto es patético! ¡DeberÃa darles vergüenza!.",mood:"neutral",actions:Z},{id:2,emitter:"maton_3",text:"No tengo por que andar aguantando estas lelas.",mood:"neutral",actions:Z},{id:3,emitter:"player",text:"¡Oye déjalas tranquilas!.",mood:"neutral",actions:Z},{id:4,emitter:"maton_3",text:"¿Y qué vas a hacer al respecto, alfeñique?.",mood:"neutral",actions:[{text:"No las conozco, no es mi problema...",dispatch:"set",onSet:{next:"maton_3",data:[{n:2,char:"maton_3"}]},cb:()=>{yt(3,"discriminacion","finished"),vt(3,"discriminacion-1-1","RM")}},{text:"Dije que las dejaras en paz.",dispatch:"set",onSet:{next:"maton_3",data:[{n:4,char:"maton_3"}]},cb:()=>{vt(3,"discriminacion-1-2","RM")}},{text:"Ellas no están solas.",dispatch:"set",onSet:{next:"maton_3",data:[{n:7,char:"maton_3"}]},cb:()=>{vt(3,"discriminacion-1-3","RM")}}]}],2:[{id:1,emitter:"player",text:"Glup. Nada en verdad⦠yo me voy.",mood:"neutral",actions:Z},{id:2,emitter:"maton_3",text:"Jajajaja, eso pensé.",mood:"neutral",actions:[{text:"<< Terminar conversación >>",dispatch:"complete",onComplete:[{key:"maton_3",status:"none",step:3}],cb:()=>Xn(!0)}]}],3:[{id:1,emitter:"maton_3",text:"Ya lárguense de aquÃ, no quiero verlas.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],4:[{id:1,emitter:"maton_3",text:"Tus comentarios son inaceptables. No tienes derecho a tratar asà a nadie por su orientación sexual.",mood:"neutral",actions:[{text:"Debes detenerte",dispatch:"game",game:{type:4,onLoad:async()=>{await ss("maton_3","No tengo por que tolerarlas","Claro que deberÃas.")},winCb:()=>{console.log("WIN !!!")},loseCb:()=>{console.log("LOSE !!!")},onComplete:{next:"maton_3",data:[{n:4,char:"maton_3"}],win:{next:"maton_3",data:[{n:5,char:"maton_3",status:"none"}],cb:()=>{yt(3,"discriminacion","finished")}}}}},{text:q,dispatch:"close"}]}],5:[{id:1,emitter:"player",text:"Necesito que te detengas y reflexiones sobre cómo tratas a los demás. La discriminación por orientación sexual no tiene espacio en este liceo.",mood:"neutral",actions:Z},{id:2,emitter:"maton_3",text:"¿Sabes? Solo estaba bromeando. ",mood:"neutral",actions:Z},{id:3,emitter:"player",text:"Las bromas no son excusa para herir a otras personas. Es momento de que cambies tu actitud y empieces a respetar a quienes son diferentes a ti. ",mood:"neutral",actions:Z},{id:4,emitter:"maton_3",text:"Ya, si ya dije que era broma. No volverá a pasar.",mood:"neutral",actions:[{text:"<< Terminar conversación >>",dispatch:"complete",onComplete:[{key:"maton_3",status:"none",step:6}],cb:()=>Xn(!0)}]}],6:[{id:1,emitter:"maton_3",text:"EntendÃ, las bromas no son excusa para ser intolerante.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}],7:[{id:1,emitter:"maton_3",text:"AsÃ, tú y que ejército",mood:"neutral",actions:Z},{id:2,emitter:"player",text:"El que sea necesario para detener a intolerantes como tú.",mood:"neutral",actions:Z},{id:3,emitter:"maton_3",text:"Pura palabrerÃa, no te creo",mood:"neutral",actions:Z},{id:4,emitter:"player",text:"Oigan chiques, ¡necesito su ayuda aquÃ!.",mood:"neutral",actions:Z},{id:5,emitter:"lino",text:"¿Qué pasó?.",mood:"neutral",actions:Z},{id:6,emitter:"nico",text:"¿Qué está pasando aquÃ?",mood:"neutral",actions:Z},{id:7,emitter:"player",text:"Miren a este intolerante... creo que debe aprender una lección",mood:"neutral",actions:[{text:"DeberÃas ser más empático",dispatch:"game",game:{type:4,onLoad:async()=>{await ss("maton_3","No tengo por que hacerte caso","Es por la convivencia de todos.")},winCb:()=>{console.log("WIN !!!")},loseCb:()=>{console.log("LOSE !!!")},onComplete:{next:"maton_3",data:[{n:7,char:"maton_3"}],win:{next:"maton_3",data:[{n:8,char:"maton_3",status:"none"}],cb:()=>{yt(3,"discriminacion","finished")}}}}},{text:q,dispatch:"close"}]}],8:[{id:1,emitter:"player",text:"Tal vez deberÃas preguntarte ¿Por qué las molestas? ¿Tal vez te hace sentir incómodo? ",mood:"neutral",actions:Z},{id:2,emitter:"maton_3",text:"Solo estaba bromeando.",mood:"neutral",actions:Z},{id:3,emitter:"mile",text:"La sexualidad de otras personas no te concierne. No tienes ningún derecho sobre sus vidas o sus decisiones, ni siquiera a juzgarlas y menos en público.",mood:"neutral",actions:Z},{id:4,emitter:"lino",text:"No es gracioso.",mood:"neutral",actions:Z},{id:5,emitter:"maton_3",text:"Ok, ya no seguiré... entendÃ.",mood:"neutral",actions:[{text:"<< Terminar conversación >>",dispatch:"complete",onComplete:[{key:"maton_3",status:"none",step:6}],cb:()=>Xn(!0)}]}]}},w2={dialogs:{1:[{id:1,emitter:"soccer_player_5",text:"Lo mejor del colegi
6278o es el fútbol, ¿no crees?",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},A2={dialogs:{1:[{id:1,emitter:"nora",text:"Los de su tipo no deberÃan usar este baño.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},R2={dialogs:{1:[{id:1,emitter:"leo",text:"¡Me dejarán jugar!, mañana traeré mis guantes y atajaré todos los balones.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},O2={dialogs:{1:[{id:1,emitter:"teo",text:"¿Supiste lo del profe?, parece que està en problema por sus comentarios misóginos.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},L2={dialogs:{1:[{id:1,emitter:"estudiante_h_1",text:"Parece que ya está listo el almuerzo, mejor ponerse en la fila desde ya.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},F2={dialogs:{1:[{id:1,emitter:"estudiante_h_5",text:"Si comemos rápido, podriamos llegar antes a la cancha... aunque apuesto que los peloteros van a estar ahÃ.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},I2={dialogs:{1:[{id:1,emitter:"estudiante_h_6",text:"Shhh... silencio.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},D2={dialogs:{1:[{id:1,emitter:"estudiante_h_10",text:"Que lata, no hay nada de anime en esta biblioteca... seguiré buscando.",mood:"neutral",actions:[{text:q,dispatch:"close"}]}]}},Ht={principal:"off",discriminacion:"off",bullying:"off",subdire_1:"off",profe_vero_1:"off",gradas_1:"off",subdire_2:"off",profe_vero_2:"off",gradas_2:"off",no_meterse_2:"off",bullying_crying:"off",discriminador:"off",item_1:"off",item_2:"off",item_3:"off",item_4:"off",item_5:"off",item_6:"off"},fr=[{status:"running",name:"soccer_player_1",x:18,y:10},{status:"running",name:"soccer_player_2",x:21,y:8},{status:"running",name:"soccer_player_3",x:25,y:9},{status:"running",name:"soccer_player_4",x:26,y:7},{status:"idle",name:"soccer_player_5",x:22.5,y:11.2},{status:"idle",name:"sub_directora",x:17,y:19},{status:"idle",name:"inspector",x:20,y:21},{status:"idle",name:"cris",x:29,y:22},{status:"idle",name:"ariel",x:26,y:22},{status:"idle",name:"chini",x:11.2,y:14.3},{status:"idle",name:"mati",x:10.5,y:14.5},{status:"idle",name:"dani",x:12.3,y:14.2},{status:"idle",name:"jose",x:10,y:15},{status:"idle",name:"nico",x:23,y:3},{status:"idle",name:"mile",x:24,y:3.4},{status:"idle",name:"lino",x:23.7,y:4.5},{status:"idle",name:"maton_3",x:18.6,y:4.5},{status:"idle",name:"ale",x:19.5,y:4},{status:"idle",name:"mia",x:19.9,y:4.2},{status:"crying",name:"andy",x:27,y:18},{status:"idle",name:"xime",x:24.8,y:17.6},{status:"idle",name:"nora",x:25.2,y:17.7},{status:"idle",name:"leo",x:20.2,y:11.6},{status:"idle",name:"teo",x:16.2,y:21.6}],B2={inspector:1,cris:1,sub_directora:1,director:1,soccer_player_1:1,soccer_player_2:1,soccer_player_3:1,soccer_player_4:1,soccer_player_5:1,ariel:1,mati:1,dani:1,jose:1,nico:1,mile:1,lino:1,maton_3:1,andy:1,xime:1,nora:1,profe_vero:1,chini:1,cancha:1,leo:1,teo:1,estudiante_h_1:1,estudiante_h_5:1,estudiante_h_6:1,estudiante_h_7:1,estudiante_h_8:1,estudiante_h_9:1,estudiante_h_10:1,cimarra:1,kiosko:1},k2={inspector:"none",cris:"exclamation",sub_directora:"none",director:"none",soccer_player_1:"none",soccer_player_2:"none",soccer_player_3:"none",soccer_player_4:"none",soccer_player_5:"none",ariel:"none",mati:"none",dani:"none",chini:"none",jose:"none",nico:"none",mile:"none",lino:"none",maton_3:"none",andy:"none",xime:"none",nora:"none",profe_vero:"none",cancha:"none",leo:"none",teo:"none",estudiante_h_1:"none",estudiante_h_5:"none",estudiante_h_6:"none",estudiante_h_10:"none",estudiante_h_2:null,estudiante_h_3:null,estudiante_h_4:null,estudiante_h_7:null,estudiante_h_8:null,estudiante_h_9:null,cimarra:"none",kiosko:"none"},G2={inspector:y2,cris:c2,sub_directora:x2,director:g2,ariel:bf,soccer_player_5:w2,maton_3:M2,andy:P2,xime:b2,nora:A2,mati:f2,jose:v2,nico:S2,mile:T2,lino:C2,profe_vero:E2,chini:m2,dani:p2,cancha:Mf,leo:R2,teo:O2,estudiante_h_1:L2,estudiante_h_5:F2,estudiante_h_6:I2,estudiante_h_10:D2,estudiante_h_2:null,estudiante_h_3:null,estudiante_h_4:null,estudiante_h_7:null,estudiante_h_8:null,estudiante_h_9:null,cimarra:wf,kiosko:Af},{setQuestStatus:Mh}=Xi();let Xa=!0;const he=i=>{Xa=i},ne={principal:"off",leo:"off",teo:"off",item_1:"off",item_2:"off",item_3:"off",item_4:"off",item_5:"off",item_6:"off"},yt=(i,t,s)=>{switch(i){case 1:ne[t]&&(ne[t]=s,Mh(Un(1)));break;case 2:Jt[t]&&(Jt[t]=s,Mh(Un(2)));break;case 3:Ht[t]&&(Ht[t]=s,Mh(Un(3)));break}["principal","leo","teo","ale","alan","profe"].includes(t)&&s==="finished"&&ut.quest&&ut.quest()},N2=(i,t)=>{i===1?(ne.principal=t.scene1.principal,ne.leo=t.scene1.leo,ne.teo=t.scene1.teo,ne.cancha=t.scene1.cancha,ne.item_1=t.scene1.item_1,ne.item_2=t.scene1.item_2,ne.item_3=t.scene1.item_3,ne.item_4=t.sce
6278ne1.item_4,ne.item_5=t.scene1.item_5,ne.item_6=t.scene1.item_6):i===2?(Jt.principal=t.scene2.principal,Jt.ale=t.scene2.ale,Jt.alan=t.scene2.alan,Jt.profe=t.scene2.profe,Jt.soccer=t.scene2.soccer,Jt.h_1=t.scene2.h_1,Jt.item_1=t.scene2.item_1,Jt.item_2=t.scene2.item_2,Jt.item_3=t.scene2.item_3,Jt.item_4=t.scene2.item_4,Jt.item_5=t.scene2.item_5,Jt.item_6=t.scene2.item_6):i===3&&(Ht.principal=t.scene3.principal,Ht.discriminacion=t.scene3.discriminacion,Ht.bullying=t.scene3.bullying,Ht.subdire_1=t.scene3.subdire_1,Ht.profe_vero_1=t.scene3.profe_vero_1,Ht.gradas_1=t.scene3.gradas_1,Ht.subdire_2=t.scene3.subdire_2,Ht.profe_vero_2=t.scene3.profe_vero_2,Ht.gradas_2=t.scene3.gradas_2,Ht.no_meterse_2=t.scene3.no_meterse_2,Ht.bullying_crying=t.scene3.bullying_crying,Ht.discriminador=t.scene3.discriminador,Ht.item_1=t.scene3.item_1,Ht.item_2=t.scene3.item_2,Ht.item_3=t.scene3.item_3,Ht.item_4=t.scene3.item_4,Ht.item_5=t.scene3.item_5,Ht.item_6=t.scene3.item_6),Mh(Un(i))},Ih=(i,t)=>{switch(i){case 1:return ne[t];case 2:return Jt[t];case 3:return Ht[t];default:return null}},Fe=(i,t,s,c)=>{let C=null;switch(i){case 1:C=ne;break;case 2:C=Jt;break;case 3:C=Ht;break}let S=-1;for(const l of s)C[t]===l.str&&(S=l.n);return S===-1&&c&&(S=c),S},nd=i=>{switch(i){case 0:return"0";case 1:return"1";case 2:return"2";case 3:return"3";case 4:return"4";case 5:return"5";case 6:return"6";default:return"0"}},Hx=()=>[ne.item_1,ne.item_2,ne.item_3,ne.item_4,ne.item_5,ne.item_6].filter(i=>i==="finished").length,$x=()=>[Jt.item_1,Jt.item_2,Jt.item_3,Jt.item_4,Jt.item_5,Jt.item_6].filter(i=>i==="finished").length,jx=()=>[Ht.item_1,Ht.item_2,Ht.item_3,Ht.item_4,Ht.item_5,Ht.item_6].filter(i=>i==="finished").length,Un=i=>{switch(i){case 1:const t=Hx();return[{name:"Misión Principal",status:ne.principal==="finished",step:ne.principal,key:"principal"},{name:"Misión Secundaria 1",status:ne.leo==="finished",step:ne.leo,key:"leo"},{name:"Misión Secundaria 2",status:ne.teo==="finished",step:ne.teo,key:"teo"},{name:"Misión Extra",status:t===6,step:nd(t),key:"item"}];case 2:const s=$x();return[{name:"Misión Principal",status:Jt.principal==="finished",step:Jt.principal,key:"principal"},{name:"Misión Secundaria 1",status:Jt.ale==="finished",step:Jt.ale,key:"ale"},{name:"Misión Secundaria 2",status:Jt.alan==="finished",step:Jt.alan,key:"alan"},{name:"Misión Secundaria 3",status:Jt.profe==="finished",step:Jt.profe,key:"profe"},{name:"Misión Extra",status:s===6,step:nd(s),key:"item"}];case 3:const c=jx();return[{name:"Misión Principal",status:Ht.principal==="finished",step:Ht.principal,key:"principal"},{name:"Misión Secundaria 1",status:Ht.bullying==="finished",step:Ht.bullying,key:"bullying"},{name:"Misión Secundaria 2",status:Ht.discriminacion==="finished",step:Ht.discriminacion,key:"discriminacion"},{name:"Misión Extra",status:c===6,step:nd(c),key:"item"}];default:return[]}},V2=i=>{const t=[{status:"running",name:"soccer_player_1",x:18,y:10},{status:"running",name:"soccer_player_2",x:21,y:8},{status:"running",name:"soccer_player_3",x:25,y:9},{status:"running",name:"soccer_player_4",x:26,y:7},{status:"idle",name:"soccer_player_5",x:22.5,y:11.2},{status:"idle",name:"mati",x:36,y:14.3},{status:"idle",name:"jose",x:37,y:14.4},{status:"idle",name:"dani",x:36.3,y:15.2},{status:"idle",name:"cris",x:24.1,y:29.3},{status:"idle",name:"maton_1",x:27,y:15},{status:"crying",name:"leo",x:27.5,y:15},{status:"idle",name:"maton_2",x:16,y:4.5},{status:"crying",name:"teo",x:16.7,y:4.5},{status:"idle",name:"sub_directora",x:21,y:19},{status:"idle",name:"director",x:18.5,y:22},{status:"idle",name:"ariel",x:22.5,y:4},{status:"idle",name:"nico",x:23,y:3},{status:"idle",name:"mile",x:24,y:3.4},{status:"idle",name:"lino",x:23.7,y:4.5},{status:"idle",name:"ale",x:16,y:14},{status:"idle",name:"ariel",x:26,y:22},{status:"idle",name:"andy",x:23,y:19},{status:"idle",name:"chini",x:20,y:13},{status:"idle",name:"mia",x:20,y:4.6},{status:"idle",name:"josefina",x:18.3,y:4},{status:"idle",name:"tere",x:19.1,y:3.5},{status:"idle",name:"alan",x:34.5,y:9.5},{status:"idle",name:"inspector",x:22.6,y:30.1}];switch(i){case 1:if(ne.leo==="finished"){const c=t.findIndex(S=>S.name==="maton_1");c!==-1&&(t[c].status="none");const C=t.findIndex(S=>S.name==="leo");C!==-1&&(t[C].status="idle")}if(ne.teo==="finished"){const c=t.findIndex(S=>S.name==="maton_2");c!==-1&&(t[c].status="none");const C=t.findIndex(S=>S.name==="teo");C!==-1&&(t[C].status="idle")}return t;case 2:const s=Ps.findIndex(c=>c.name==="sub_directora");if(["started6","started7","started8"].includes(Jt.principal)?s!==-1&&(Ps[s].status="idle"):s!==-1&&(Ps[s].status="none"),Jt.soccer==="finished"){const c=Ps.findIndex(S=>S.name==="soccer_player_6");c!==-1&&(Ps[c].status="none");const C=Ps.findIndex(S=>S.name==="soccer_player_7");C!==-1&&(Ps[C].status="none")}if(Jt.h_1==="finished"){const c=Ps.findIndex(C=>C.name==="profesor_1");c!==-1&&(Ps[c].status="none")}return Ps;case 3:if(Ht.bullying==="finished"&&Ht.bullying_crying==="finished"){const c=fr.findIndex(l=>l.name==="andy");c!==-1&&(fr[c].status="idle");const C=fr.findIndex(l=>l.name==="xime");C!==-1&&(fr[C].status="none");const S=fr.findIndex(l=>l.name==="nora");S!==-1&&(fr[S].status="none")}return fr;default:return[]}},z2={player:1,cris:1,ale:1,lino:1,mile:1,nico:1,ariel:1,director:1,sub_directora:1,teo:1,maton_2:1,leo:1,maton_1:1,dani:1,jose:1,mati:1,soccer_player_1:1,soccer_player_2:1,soccer_player_3:1,soccer_player_4:1,soccer_player_5:1,andy:1,chini:1,mia:1,josefina:1,tere:1,profesor_1:1,profe_vero:1,estudiante_h_5:1,estudiante_h_1:1,alan:1,inspector:1,cancha:1,estudiante_h_10:1,estudiante_h_6:1,cimarra:1,kiosko:1},Y2={player:null,cris:"exclamation",ale:"none",lino:"none",mile:null,nico:"none",ariel:"none",director:"none",sub_directora:"none",teo:"none",maton_2:null,leo:"none",maton_1:null,dani:null,jose:null,mati:null,soccer_player_1:null,
6278soccer_player_2:null,soccer_player_3:null,soccer_player_4:null,soccer_player_5:"none",andy:"none",chini:"none",mia:"none",josefina:"none",tere:"none",profesor_1:"none",profe_vero:"none",estudiante_h_5:"none",estudiante_h_1:"none",alan:"none",inspector:"none",cancha:"none",estudiante_h_2:null,estudiante_h_3:null,estudiante_h_4:null,estudiante_h_7:null,estudiante_h_8:null,estudiante_h_9:null,estudiante_h_6:"none",estudiante_h_10:"none",cimarra:"none",kiosko:"none"},X2={player:null,cris:pS,ale:PS,lino:CS,mile:null,nico:null,ariel:bf,director:yS,sub_directora:xS,teo:SS,maton_2:null,leo:TS,maton_1:null,dani:mS,jose:null,mati:gS,soccer_player_1:null,soccer_player_2:null,soccer_player_3:null,soccer_player_4:null,soccer_player_5:ES,andy:bS,chini:MS,mia:wS,josefina:AS,tere:RS,profesor_1:OS,estudiante_h_5:LS,estudiante_h_1:FS,alan:IS,inspector:DS,cancha:Mf,estudiante_h_10:kS,estudiante_h_6:BS,cimarra:wf,kiosko:Af};js();const{saveCharState:U2}=Gr(),{getEpilogo:W2,setEpilogoAll:H2}=Xi(),$2={player:"Tú",cris:"Cris",ale:"Ale",lino:"Lino",mile:"Mile",nico:"Nico",ariel:"Ariel",director:"Director",sub_directora:"Sub Directora",teo:"Teo",maton_2:"Alonso",leo:"Leo",maton_1:"Pepe",maton_3:"Pepe",dani:"Dani",jose:"Jose",mati:"Mati",soccer_player_1:"Jugador 1",soccer_player_2:"Jugador 2",soccer_player_3:"Jugador 3",soccer_player_4:"Jugador 4",soccer_player_5:"Miguel",soccer_player_6:"Hugo",soccer_player_7:"Sergio",alan:"Alan",chini:"Chini",estudiante_h_1:"Rafa",estudiante_h_2:"Donny",estudiante_h_3:"Leo",estudiante_h_4:"Mike",estudiante_h_5:"Claudio",inspector:"Inspector Juan",mia:"Mia",profesor_1:"Profesor Javier",secretaria:"Secretaria Marcela",tere:"Tere",alex:"Alex",josefina:"Josefina",xime:"Xime",andy:"Andy",nora:"Nora",profe_vero:"Profesora Verónica",cancha:"Miguel",gonzalo:"Gonzalo",estudiante_h_6:"Aldo",estudiante_h_7:"Jon",estudiante_h_8:"Tito",estudiante_h_9:"Juve",estudiante_h_10:"Marcelo"};let In=null,Be=null,Le=null;const jh=(i,t,s)=>{switch(i){case 1:(t||!Be)&&(Be=z2),(t||!Le)&&(Le=Y2),(t||!In)&&(In=X2);break;case 2:(t||!Be)&&(Be=h2),(t||!Le)&&(Le=u2),(t||!In)&&(In=d2);break;case 3:(t||!Be)&&(Be=B2),(t||!Le)&&(Le=k2),(t||!In)&&(In=G2);break;default:Be=null,Le=null}if(s){const{state:c,quest:C,journal:S,epilogo:l}=JSON.parse(s);s&&c&&(Be=c),s&&C&&(Le=C),s&&S&&N2(i,S),s&&l&&H2(l)}},j2=i=>!!Le[i],ai=(i,t)=>{t!=null&&t.length&&t.forEach(s=>{s.delay?setTimeout(()=>{to(i,s.key,s.status,!0),s.step&&(Be[s.key]=s.step)},s.delay):(Le[s.key]=s.status,s.step&&(Be[s.key]=s.step),!s.step&&s.stepSelector&&Be&&(Be[s.key]=s.stepSelector()))}),Le&&Object.keys(Le).forEach(s=>{const c=Le[s];s!=="player"&&(c&&c!=="none"?to(i,s,c,!0):(to(i,s,"exclamation",!1),to(i,s,"question",!1),to(i,s,"dialog",!1)))})},K2=i=>{Be&&Object.keys(Be).forEach(t=>{if(t==="player")return;const s=i.find(C=>C.char===t),c=t;s&&(s.n?Be[c]=s.n:Be[c]=s.stepSelector())})},Vp=(i,t)=>{t.n?Be[i]=t.n:t.next?Be[i]++:t.prev&&Be[i]--},Z2=i=>{if(!In[i])return{fullname:null,dialog:null};const{fullname:t,dialogs:s}=In[i],c=Be[i].toString();return{fullname:t||null,dialog:s[c]||null}},J2=()=>{const i=W2();return JSON.stringify({state:Be,quest:Le,journal:{scene1:ne,scene2:Jt,scene3:Ht},epilogo:i})},Oa=async()=>{const i=J2();await U2(i)},Q2=(i,t)=>{i.characters&&i.characters[t.char]&&i.characters[t.char].destroy();const s=[4,5,6,7],c=Math.floor(Math.random()*s.length),C=s[c];t.animState==="running"?i.anims.create({key:`${t.char}_${t.animState}`,frames:[{key:`${t.char}_${t.animState}_2`},{key:`${t.char}_${t.animState}_1`},{key:`${t.char}_${t.animState}_3`},{key:`${t.char}_${t.animState}_1`}],frameRate:5,repeat:-1}):i.anims.create({key:`${t.char}_${t.animState}`,frames:[{key:`${t.char}_${t.animState}_1`},{key:`${t.char}_${t.animState}_2`}],frameRate:C,repeat:-1});const S=i.physics.add.sprite(0,0,t.char).setOrigin(0,0);return S.anims.play(`${t.char}_${t.animState}`),{char:t.char,data:S}},Ba=(i,t)=>{console.log("LOAD CHARACTERS",t);const s=V2(t);i.characters={},s.forEach(c=>{se(i,c)})},se=(i,t)=>{if(t.x===void 0||t.y===void 0||t.status==="none")return;i.characters||(i.characters={});const s=i.add.container(t.x*At.TILE_SIZE,t.y*At.TILE_SIZE),c=Q2(i,{char:t.name,animState:t.status});if(!c)return;const C=c.data;C.setScale(i.playerScale),C.body.immovable=!0;const S=i.add.image(-10,-25,"exclamacion").setOrigin(0,0);S.setScale(.7),S.setVisible(!1);const l=i.add.image(-10,-25,"question").setOrigin(0,0);l.setScale(.7),l.setVisible(!1);const T=i.add.image(-10,-25,"dialogo").setOrigin(0,0);
6278T.setScale(.7),T.setVisible(!1),s.add([C,S,l,T]),i.physics.add.collider(i.player,s),i.physics.world.enable([C,i.player]),i.characters[t.name]=s,aE(i,t.name,async()=>{console.log(t.name),await qi(i,t.name,!0)})},{showRmDialog:q2,hideRmDialog:_2,show:tE}=fn(),{openGame:eE,showGameModal:iE}=js();let xi=null;const Kx=i=>{i.player.setVelocity(0,0),i.isPointerDown=!1,i.isPointerLeft=!1,i.isPointerRight=!1,i.isPointerTop=!1,i.isWalking=!1,re.step()},vr=i=>{i.isDisplayingText=!1,Kx(i),_2()},Vn={x:0,y:0},sE=(i,t)=>{Vn.x!==i&&(Vn.x=0),Vn.y!==t&&(Vn.y=0)},qi=async(i,t,s)=>{if(console.log("INTERACT !"),Vn.x===i.player.x&&Vn.y===i.player.y||tE.value||(t==="maton_1"&&(t="leo"),t==="maton_2"&&(t="teo"),i.isDisplayingText||!j2(t)))return;const{dialog:c}=Z2(t);if(!c)return;i.isDisplayingText=!0,s?xi=c.find(e=>e.id===1):xi=c.find(e=>e.id===xi.id+1);const C=`${xi.emitter}_${xi.mood}`,S=$2[xi.emitter]||"Tú",l=xi.actions||[],T={char:t,portrait:C,charName:S,mood:xi.mood,text:xi.text,actions:l.map(e=>({text:e.text,cb:async()=>{switch(e.dispatch){case"complete":ai(i,e.onComplete),xi=null,vr(i);break;case"close":xi=null,Vn.x=i.player.x,Vn.y=i.player.y,vr(i);break;case"next":vr(i),xi&&!!c.find(g=>g.id===xi.id+1)&&await qi(i,t,!1);break;case"set":e.onSet&&e.onSet.data.length&&K2(e.onSet.data),xi=null,e.onSet&&e.onSet.next?(vr(i),await qi(i,e.onSet.next,!0)):vr(i);break;case"game":if(vr(i),i.isDisplayingText=!0,e.game){Ia.bg&&re.bg(),await e.game.onLoad();const{type:g,winCb:r,loseCb:a,closeCb:h,onComplete:n,level:o}=e.game,f=async()=>{var m;
6278i.isDisplayingText=!1,r&&r(),console.log("INVOKE WIN"),n&&n.win.data.forEach(p=>{Vp(p.char,{n:p.n}),p.status&&Le&&Le[p.char]&&(Le[p.char]=p.status)}),(m=n==null?void 0:n.win)!=null&&m.next&&await qi(i,n.win.next,!0),n!=null&&n.win.cb&&n.win.cb(),await Oa()},u=async()=>{i.isDisplayingText=!1,console.log("INVOKE LOSE"),a&&a(),await Oa()},v=async()=>{console.log("INVOKE CLOSE"),h&&h(),vr(i),n&&(n.data.forEach(m=>{m.key?ai(i,m):Vp(m.char,{n:m.n})}),n!=null&&n.next&&await qi(i,n.next,!0))};!iE.value&&eE(g,{winCb:f,loseCb:u,closeCb:v,level:o}),Kx(i)}break}e.cb&&e.cb(),await Oa()}}))};ut.dialog&&ut.dialog(),q2(T)},{showGameModal:nE}=js(),{hasLoadedAnims:zp}=Te(),{modalUserDataState:Cl}=$s(),ls=i=>{i.cursors={up:!1,down:!1,left:!1,right:!1,upArrow:i.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.UP),downArrow:i.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.DOWN),leftArrow:i.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.LEFT),rightArrow:i.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.RIGHT)}},Zs=i=>{i.cameras.main.setZoom(1),i.isPointerDown=!1,i.player=i.physics.add.sprite(0,0,"player_idle_1").setOrigin(0,0);const t=rS(i.initialPlayerPosition.x,i.initialPlayerPosition.y);i.player.setVelocity(0,0),i.player.setX(t.x),i.player.setY(t.y),i.cameras.main.startFollow(i.player,!0),i.player.setScale(i.playerScale),i.player.body.setSize(38,56),i.player.setDepth(1),i.anims.create({key:"player_walk_left",frames:[{key:"player_walk_left_2"},{key:"player_walk_left_1"},{key:"player_walk_left_3"},{key:"player_walk_left_1"}],frameRate:6,repeat:-1}),i.anims.create({key:"player_walk_right",frames:[{key:"player_walk_right_2"},{key:"player_walk_right_1"},{key:"player_walk_right_3"},{key:"player_walk_right_1"}],frameRate:6,repeat:-1}),i.anims.create({key:"player_walk_up",frames:[{key:"player_walk_up_2"},{key:"player_walk_up_1"},{key:"player_walk_up_3"},{key:"player_walk_up_1"}],frameRate:6,repeat:-1}),i.anims.create({key:"player_walk_down",frames:[{key:"player_walk_down_2"},{key:"player_walk_down_1"},{key:"player_walk_down_3"},{key:"player_walk_down_1"}],frameRate:6,repeat:-1}),i.anims.create({key:"player_idle",frames:[{key:"player_idle_2"},{key:"player_idle_1"}],frameRate:4,repeat:-1})},Js=(i,t)=>{i.input.on("pointerup",()=>{i.player.setVelocityX(0),i.player.setVelocityY(0),i.isPointerDown=!1,i.isPointerLeft=!1,i.isPointerRight=!1,i.isPointerTop=!1,i.isPointerBottom=!1,t&&sessionStorage.setItem("playerPosition",JSON.stringify({x:i.player.x,y:i.player.y}))}),i.input.on("pointerdown",s=>{if(!i.isMovableClick||nE.value)return;const c=i.cameras.main.getWorldPoint(s.x,s.y),C={top:i.player.y,bottom:i.player.y+Math.floor(At.TILE_SIZE*i.playerScale),left:i.player.x,right:i.player.x+Math.floor(At.TILE_SIZE*i.playerScale)};c.x<C.left?i.isPointerLeft=!0:c.x>C.right&&(i.isPointerRight=!0),c.y<C.top?i.isPointerTop=!0:c.y>C.bottom&&(i.isPointerBottom=!0),i.isPointerDown=!0,i.isPointerLeft?i.player.play(i.isDisplayingText?"player_idle":"player_walk_left"):i.isPointerRight?i.player.play(i.isDisplayingText?"player_idle":"player_walk_right"):i.isPointerTop?i.player.play(i.isDisplayingText?"player_idle":"player_walk_up"):i.isPointerBottom&&i.player.play(i.isDisplayingText?"player_idle":"player_walk_down")})},{show:rE}=fn(),Qs=i=>{var s,c,C,S,l,T;if(rE.value)return;if(sE(i.player.x,i.player.y),!i.isPlayingWalkSound&&i.isWalking&&(i.isPlayingWalkSound=!0),i.isWalking||(re.step&&re.step(),i.isPlayingWalkSound=!1),zp.value||i.player.setTexture("player_idle_1"),!i.isPointerDown&&!i.frontPlayerAnim&&zp.value&&(i.frontPlayerAnim=!0,i.player.play("player_idle"),i.isWalking=!1),!i.isPointerDown||!i.isMovableClick||i.isDisplayingMenu||i.isDisplayingText){if(!i.isPointerDown&&!i.isDisplayingMenu&&!i.isDisplayingText){i.isWalking=!0;const e=i.cursors&&(i.cursors.leftArrow.isDown||i.cursors.left.isDown)&&!Cl.value,d=i.cursors&&i.cursors.rightArrow.isDown&&!Cl.value,g=i.cursors&&i.cursors.upArrow.isDown&&!Cl.value,r=i.cursors&&i.cursors.downArrow.isDown&&!Cl.value;e&&((s=i.player.anims)!=null&&s.currentAnim&&i.player.anims.currentAnim.key!=="player_walk_left"&&i.player.play("player_walk_left"),i.player.setVelocityX(-At.MOVE_SPEED)),d&&(i.player.setVelocityX(At.MOVE_SPEED),(c=i.player.anims)!=null&&c.currentAnim&&i.player.anims.currentAnim.key!=="player_walk_right"&&i.player.play("player_walk_right")),g&&!e&&!d&&(i.player.setVelocityY(-At.MOVE_SPEED),(C=i.player.anims)!=null&&C.currentAnim&&i.player.anims.currentAnim.key!=="player_walk_up"&&i.player.play("player_walk_up")),r&&!e&&!d&&((S=i.player.anims)!=null&&S.currentAnim&&i.player.anims.currentAnim.key!=="player_walk_down"&&i.player.play("player_walk_down"),i.player.setVelocityY(At.MOVE_SPEED)),!e&&!d&&i.player.setVelocityX(0),!g&&!r&&i.player.setVelocityY(0),i.player.body.velocity.x===0&&i.player.body.velocity.y===0&&(l=i.player.anims)!=null&&l.currentAnim&&i.player.anims.currentAnim.key!=="player_idle"&&i.player.play("player_idle")}else i.player.setVelocityX(0),i.player.setVelocityY(0),(T=i.player.anims)!=null&&T.currentAnim&&i.player.anims.currentAnim.key!=="player_idle"&&i.player.play("player_idle");return}i.isWalking=!0;const t=At.MOVE_SPEED;i.frontPlayerAnim=!1,i.isPointerLeft?i.player.setVelocityX(-t):i.isPointerRight&&i.player.setVelocityX(t),i.isPointerTop?i.player.setVelocityY(-t):i.isPointerBottom&&i.player.setVelocityY(t)},Rf=()=>{const i=sessionStorage.getItem("playerPosition");return i?JSON.parse(i):null},Zx=()=>{sessionStorage.removeItem("playerPosition")},to=(i,t,s,c)=>{var S;const C={exclamation:1,question:2,dialog:3};(S=i.characters[t])!=null&&S.list[C[s]]&&i.characters[t].list[C[s]].setVisible(c)},rd={ale:null,lino:null,mile:null,nico:null,ariel:null,director:null,sub_directora:null,teo:null,maton_2:null,leo:null,maton_1:null,cris:null,dani:null,jose:null,mati:null,soccer_player_1:null,
6278soccer_player_2:null,soccer_player_3:null,soccer_player_4:null,soccer_player_5:null,soccer_player_6:null,soccer_player_7:null,alan:null,chini:null,estudiante_h_1:null,estudiante_h_2:null,estudiante_h_3:null,estudiante_h_4:null,estudiante_h_5:null,inspector:null,mia:null,profesor_1:null,secretaria:null,tere:null,alex:null,josefina:null,andy:null,nora:null,xime:null,profe_vero:null,maton_3:null},aE=(i,t,s)=>{rd[t]&&rd[t].destroy(),rd[t]=i.physics.add.collider(i.player,i.characters[t].list[0],s),i.characters[t].list[0].setSize(43,45)};class oE extends $e.Scene{constructor(){super({key:"WorldScene"});rt(this,"pnj",null);rt(this,"player",null);rt(this,"entrance",null);rt(this,"messageContainer",null);rt(this,"messageBackground",null);rt(this,"mensaje",null);rt(this,"isMovableClick",!0);rt(this,"playerX",640);rt(this,"playerY",640)}init(s){s.playerX&&s.playerY&&(this.playerX=s.playerX,this.playerY=s.playerY)}create(){const s=this.make.tilemap({key:"map",tileHeight:64,tileWidth:64}),c=s.addTilesetImage("colors_set","colors_pack");s.createLayer("ground",c,0,0);const C=s.createLayer("walls",c,0,0),S=s.createLayer("buildings",c,0,0);C.setCollisionByProperty({obstacle:!0}),S.setCollisionByProperty({obstacle:!0}),this.entrance=this.add.rectangle(64*6,64*7,64*3,66,"0xc8c8c8",.5).setOrigin(0,0),this.physics.add.existing(this.entrance),this.entrance.body.immovable=!0,ls(this),this.player=this.physics.add.sprite(this.playerX,this.playerY,"player").setOrigin(0,0),this.pnj=this.physics.add.sprite(900,1e3,"player"),this.pnj.body.immovable=!0,this.physics.add.collider(this.player,C),this.physics.add.collider(this.player,S),this.physics.add.collider(this.player,this.entrance),this.physics.add.collider(this.player,this.pnj,(T,e)=>{console.log(e.body.touching,T.body.touching)}),this.mensaje=this.add.text(0,0,"Mensaje que no sigue la cámara y que es muy largo y podria estar en varias lineas, de hecho lo voya hacer super largo para que se salga de la caja contenedora por la parte inferior, ¿resultó?, no? entonces tengo que seguir escribiendo para que funcione, ahora si, incluso podria añadirle más texto para que tengo otra lÃnea adicional y aun asi es demasiado corto, creo que debo añadirle otra linea de texto ",{fontSize:"24px",fill:"#FFFFFF",wordWrap:{width:400,useAdvancedWrap:!0}}).setScrollFactor(0),this.messageContainer=this.add.container(0,0,[]),this.messageBackgroun
6278d=this.add.rectangle(0,0,100,100,"0x000000",.5).setOrigin(0,0).setScrollFactor(0),this.messageContainer.add(this.messageBackground),this.messageContainer.add(this.mensaje);const l=this.add.graphics();l.fillStyle(16777215),l.fillRect(-200,-200,400,400),this.messageContainer.mask=new Phaser.Display.Masks.GeometryMask(this,l),this.messageBackground.setInteractive(),this.messageBackground.on("pointerdown",()=>{console.log("click"),this.scene.start("InnerScene",{playerX:this.player.x,playerY:this.player.y})}),this.cameras.main.startFollow(this.player,!0),window.addEventListener("resize",this.posicionarSprite.bind(this)),this.posicionarSprite(),this.input.on("pointerdown",T=>{console.log("POINTER"),Phaser.Geom.Rectangle.Contains(this.messageBackground.getBounds(),T.x,T.y)?(console.log("IN"),this.isMovableClick=!1):this.isMovableClick=!0}),this.messageContainer.setVisible(!0)}update(){const c=this.player,C=Math.floor(c.x/32),S=Math.floor(c.y/32);if(this.input.activePointer.isDown&&this.isMovableClick){const l=this.input.activePointer.position.x,T=this.input.activePointer.position.y;l<420?c.setVelocityX(-290):l>520&&c.setVelocityX(290),T<420?c.setVelocityY(-290):T>520&&c.setVelocityY(290),C>10&&C<18&&S<17&&S>15?(console.log("ENTRANCE"),this.messageContainer.setVisible(!0)):(console.log("OUT"),this.messageContainer.setVisible(!1))}else c.setVelocityX(0),c.setVelocityY(0)}posicionarSprite(){const s=window.innerWidth,c=window.innerHeight;this.messageContainer.x=20,this.messageContainer.y=c-170,this.messageBackgroun
6278d.width=s-40,this.messageBackground.height=150,this.messageBackground.input.hitArea=new Phaser.Geom.Rectangle(0,0,s-40,200),this.mensaje.x=10,this.mensaje.y=10,this.mensaje.setStyle({wordWrap:{width:s-50,useAdvancedWrap:!0}})}}class lE extends $e.Scene{constructor(){super({key:"InnerScene"});rt(this,"playerWorldX",0);rt(this,"playerWorldY",0)}init(s){s&&(this.playerWorldX=s.playerX,this.playerWorldY=s.playerY)}create(){ls(this),this.rect=this.add.rectangle(64*6,64,64,64,"0xFFFFFF",1).setOrigin(0,0),this.player=this.physics.add.sprite(640,640,"player").setOrigin(0,0),this.cameras.main.startFollow(this.player,!0),this.rect.setInteractive(),this.rect.on("pointerdown",()=>{this.scene.start("WorldScene",{playerX:this.playerWorldX,playerY:this.playerWorldY})}),this.player.play("player_idle")}update(){const c=this.player;if(this.input.activePointer.isDown){const C=this.input.activePointer.position.x,S=this.input.activePointer.position.y;C<420?c.setVelocityX(-290):C>520&&c.setVelocityX(290),S<420?c.setVelocityY(-290):S>520&&c.setVelocityY(290)}else c.setVelocityX(0),c.setVelocityY(0)}}const{loadPlayerImages:hE,getActualStage:uE}=Te(),{checkStatus:dE,selectionState:cE,showCharSelectionModal:fE,setCb:_tt}=Gr();class vE extends $e.Scene{constructor(){super({key:"PreloaderScene"});rt(this,"loadingBar",null);rt(this,"loadingText",null)}preload(){kT.load({custom:{families:["pixel"],urls:["pixel.ttf"]}}),this.load.image("player","assets/anim/blank.png"),this.load.image("player_walk_left_1","assets/anim/blank.png"),this.load.image("player_walk_left_2","assets/anim/blank.png"),this.load.image("player_walk_left_3","assets/anim/blank.png"),this.load.image("player_walk_right_1","assets/anim/blank.png"),this.load.image("player_walk_right_2","assets/anim/blank.png"),this.load.image("player_walk_right_3","assets/anim/blank.png"),this.load.image("player_walk_down_1","assets/anim/blank.png"),this.load.image("player_walk_down_2","assets/anim/blank.png"),this.load.image("player_walk_down_3","assets/anim/blank.png"),this.load.image("player_walk_up_1","assets/anim/blank.png"),this.load.image("player_walk_up_2","assets/anim/blank.png"),this.load.image("player_walk_up_3","assets/anim/blank.png"),this.load.image("player_idle_1","assets/anim/blank.png"),this.load.image("player_idle_2","assets/anim/blank.png"),this.load.image("sala_tp","assets/tiles/sala_interior_tp.png"),this.load.tilemapTiledJSON("classroom_map","assets/tiles/classroom_map.json"),this.load.image("colegio_tp","assets/tiles/colegio_tp.png"),this.load.tilemapTiledJSON("map","assets/tiles/map_tile.json"),this.load.image("biblio_tp","assets/tiles/biblio_tp.png"),this.load.tilemapTiledJSON("biblio_map","assets/tiles/biblio_map.json"),this.load.image("bano_tp","assets/tiles/bano_tp.png"),this.load.tilemapTiledJSON("bano_map","assets/tiles/bano_map.json"),this.load.image("casino_tp","assets/tiles/casino_tp.png"),this.load.tilemapTiledJSON("casino_map","assets/tiles/casino_map.json"),this.load.image("casino_tp","assets/tiles/casino_tp.png"),this.load.tilemapTiledJSON("casino_map","assets/tiles/casino_map.json"),this.load.image("gym_tp","assets/tiles/gym_tp.png"),this.load.tilemapTiledJSON("gym_map","assets/tiles/gym_map.json"),this.load.image("nursery_tp","assets/tiles/nursery_tp.png"),this.load.tilemapTiledJSON("nursery_map","assets/tiles/nursery_map.json"),this.load.image("principal_tp","assets/tiles/principal_tp.png"),this.load.tilemapTiledJSON("principal_map","assets/tiles/principal_map.json"),this.load.image("nube_01","assets/imgs/nubes/nube_01.png"),this.load.image("nube_02","assets/imgs/nubes/nube_02.png"),this.load.image("nube_03","assets/imgs/nubes/nube_03.png"),this.load.image("nube_04","assets/imgs/nubes/nube_04.png"),this.load.image("nube_05","assets/imgs/nubes/nube_05.png"),this.load.image("nube_06","assets/imgs/nubes/nube_06.png"),this.load.image("logo","assets/imgs/logo_decide_full.png"),this.load.image("bg_rt","assets/imgs/bg/RT.png"),this.load.image("bg_lt","assets/imgs/bg/LT.png"),this.load.image("bg_tc","assets/imgs/bg/TC.png"),this.load.image("bg_rb","assets/imgs/bg/RB.png"),this.load.image("bg_lb","assets/imgs/bg/LB.png"),this.load.image("bg_bc","assets/imgs/bg/BC.png"),this.load.image("bg_rc","assets/imgs/bg/RC.png"),this.load.image("bg_lc","assets/imgs/bg/LC.png"),this.load.image("bg_cc","assets/imgs/bg/CC.png"),this.load.image("dialog_rt","assets/imgs/dialog/RT.png"),this.load.image("dialog_lt","assets/imgs/dialog/LT.png"),this.load.image("dialog_tc","assets/imgs/dialog/TC.png"),this.load.image("dialog_rb","assets/imgs/dialog/RB.png"),this.load.image("dialog_lb","assets/imgs/dialog/LB.png"),this.load.image("dialog_bc","assets/imgs/dialog/BC.png"),this.load.image("dialog_rc","assets/imgs/dialog/RC.png"),this.load.image("dialog_lc","assets/imgs/dialog/LC.png"),this.load.image("dialog_cc","assets/imgs/dialog/CC.png"),this.load.image("btn_l","assets/imgs/btn/btn_l.png"),this.load.image("btn_c","assets/imgs/btn/btn_c.png"),this.load.image("btn_r","assets/imgs/btn/btn_r.png"),this.load.image("soccer_player_1","assets/chars/JUGADOR1.png"),this.load.image("soccer_player_2","assets/chars/JUGADOR2.png"),this.load.image("soccer_player_3","assets/chars/JUGADOR3.png"),this.load.image("soccer_player_4","assets/chars/JUGADOR4.png"),this.load.image("soccer_player_5","assets/chars/JUGADOR5.png"),this.load.image("mati","assets/chars/MATI.png"),this.load.image("jose","assets/chars/JOSE.png"),this.load.image("dani","assets/chars/DANI.png"),this.load.image("cris","assets/chars/CR
6278IS.png"),this.load.image("maton_1","assets/chars/MATON1-TAPER.png"),this.load.image("leo_llorando","assets/chars/LEO-LLORANDO.png"),this.load.image("maton_2","assets/chars/MATON2-CUADERNO.png"),this.load.image("teo_llorando","assets/chars/TEO-LLORANDO.png"),this.load.image("director","assets/chars/DIRECTOR.png"),this.load.image("sub_directora","assets/chars/SUBDIRECTORA.png"),this.load.image("ariel","assets/chars/ARIEL.png"),this.load.image("nico","assets/chars/NICO.png"),this.load.image("mile","assets/chars/MILE.png"),this.load.image("lino","assets/chars/LINO.png"),this.load.image("ale","assets/chars/ALE.png"),this.load.image("exclamacion","assets/chars/exclamacion.png"),this.load.image("question","assets/chars/question.png"),this.load.image("dialogo","assets/chars/dialogo.png"),this.load.image("alan_neutral","assets/portraits/alan-neutral.jpg"),this.load.image("tere_neutral","assets/portraits/tere-neutral.jpg"),this.load.image("alex_neutral","assets/portraits/alex-neutral.png"),this.load.image("chini_neutral","assets/portraits/chini-neutral.jpg"),this.load.image("inspector_neutral","assets/portraits/inspector-neutral.jpg"),this.load.image("mia_neutral","assets/portraits/mia-neutral.jpg"),this.load.image("josefina_neutral","assets/portraits/josefina-neutral.jpg"),this.load.image("estudiante_h_1_neutral","assets/portraits/estudiante_h_1-neutral.jpg"),this.load.image("estudiante_h_5_neutral","assets/portraits/estudiante_h_5-neutral.jpg"),this.load.image("estudiante_h_2_neutral","assets/portraits/estudiante_h_2-neutral.jpg"),this.load.image("estudiante_h_3_neutral","assets/portraits/estudiante_h_3-neutral.jpg"),this.load.image("estudiante_h_4_neutral","assets/portraits/estudiante_h_4-neutral.jpg"),this.load.image("soccer_player_6_neutral","assets/portraits/soccer_player_6-neutral.jpg"),this.load.image("soccer_player_7_neutral","assets/portraits/soccer_player_7-neutral.jpg"),this.load.image("profesor_1_neutral","assets/portraits/profesor_1-neutral.png"),this.load.image("player_neutral","assets/portraits/jugador-neutral.png"),this.load.image("cris_neutral","assets/portraits/cris-neutral.png"),this.load.image("dani_neutral","assets/portraits/dani-neutral.png"),this.load.image("jose_neutral","assets/portraits/jose-neutral.png"),this.load.image("mati_neutral","assets/portraits/mati-neutral.png"),this.load.image("sub_directora_neutral","assets/portraits/sub_directora-neutral.png"),this.load.image("director_neutral","assets/portraits/director-neutral.png"),this.load.image("ariel_neutral","assets/portraits/ariel-neutral.png"),this.load.image("nico_neutral","assets/portraits/nico-neutral.png"),this.load.image("lino_neutral","assets/portraits/lino-neutral.png"),this.load.image("mile_neutral","assets/portraits/mile-neutral.png"),this.load.image("leo_crying","assets/portraits/leo-crying.png"),this.load.image("leo_neutral","assets/portraits/leo-neutral.png"),this.load.image("maton_1_neutral","assets/portraits/maton_1-neutral.png"),this.load.image("teo_crying","assets/portraits/teo-crying.png"),this.load.image("teo_neutral","assets/portraits/teo-neutral.png"),this.load.image("maton_2_neutral","assets/portraits/maton_2-neutral.png"),this.load.image("soccer_player_5_neutral","assets/portraits/soccer_player_5-neutral.png"),this.load.image("ale_neutral","assets/portraits/ale-neutral.png"),this.load.image("director_idle_1","assets/anim/director_idle/1.png"),this.load.image("director_idle_2","assets/anim/director_idle/2.png"),this.load.image("sub_directora_idle_1","assets/anim/sub_directora_idle/1.png"),this.load.image("sub_directora_idle_2","assets/anim/sub_directora_idle/2.png"),this.load.image("cris_idle_1","assets/anim/cris_idle/1.png"),this.load.image("cris_idle_2","assets/anim/cris_idle/2.png"),this.load.image("ariel_idle_1","assets/anim/ariel_idle/1.png"),this.load.image("ariel_idle_2","assets/anim/ariel_idle/2.png"),this.load.image("dani_idle_1","assets/anim/dani_idle/1.png"),this.load.image("dani_idle_2","assets/anim/dani_idle/2.png"),this.load.image("ale_idle_1","assets/anim/ale_idle/1.png"),this.load.image("ale_idle_2","assets/anim/ale_idle/2.png"),this.load.image("jose_idle_1","assets/anim/jose_idle/1.png"),this.load.image("jose_idle_2","assets/anim/jose_idle/2.png"),this.load.image("mati_idle_1","assets/anim/mati_idle/1.png"),this.load.image("mati_idle_2","assets/anim/mati_idle/2.png"),this.load.image("nico_idle_1","assets/anim/nico_idle/1.png"),this.load.image("nico_idle_2","assets/anim/nico_idle/2.png"),this.load.image("mile_idle_1","assets/anim/mile_idle/1.png"),this.load.image("mile_idle_2","assets/anim/mile_idle/2.png"),this.load.image("maton_1_idle_1","assets/anim/maton_1_idle/1.png"),this.load.image("maton_1_idle_2","assets/anim/maton_1_idle/2.png"),this.load.image("maton_2_idle_1","assets/anim/maton_2_idle/1.png"),this.load.image("maton_2_idle_2","assets/anim/maton_2_idle/2.png"),this.load.image("leo_crying_1","assets/anim/leo_crying/1.png"),this.load.image("leo_crying_2","assets/anim/leo_crying/2.png"),this.load.image("leo_idle_1","assets/anim/leo_idle/1.png"),this.load.image("leo_idle_2","assets/anim/leo_idle/2.png"),this.load.image("teo_crying_1","assets/anim/teo_crying/1.png"),this.load.image("teo_crying_2","assets/anim/teo_crying/2.png"),this.load.image("teo_idle_1","assets/anim/teo_idle/1.png"),this.load.image("teo_idle_2","assets/anim/teo_idle/2.png"),this.load.image("lino_idle_1","assets/anim/lino_idle/1.png"),this.load.image("lino_idle_2","assets/anim/lino_idle/2.png"),this.load.image("soccer_player_5_idle_1","assets/anim/soccer_player_5_idle/1.png"),this.load.image("soccer_player_5_idle_2","assets/anim/soccer_player_5_idle/2.png"),this.load.image("soccer_player_1_running_1","assets/anim/soccer_player_1_running/1.png"),this.load.image("soccer_player_1_running_2","assets/anim/soccer_player_1_running/2.png"),this.load.image("soccer_player_1_running_3","assets/anim/soccer_player_1_running/3.png"),this.load.image("soccer_player_2_running_1","assets/anim/soccer_player_2_running/1.png"),this.load.image("soccer_player_2_running_2","assets/anim/soccer_player_2_running/2.png"),this.load.image("soccer_player_2_running_3","assets/anim/soccer_player_2_running/3.png"),this.load.image("soccer_player_3_running_1","assets/anim/soccer_player_3_running/1.png"),this.load.image("soccer_player_3_running_2","assets/anim/soccer_player_3_running/2.png"),this.load.image("soccer_player_3_running_3","assets/anim/soccer_player_3_running/3.png"),this.load.image("soccer_player_4_running_1","assets/anim/soccer_player_4_running/1.png"),this.load.image("soccer_player_4_running_2","assets/anim/soccer_player_4_running/2.png"),this.load.image("soccer_player_4_running_3","assets/anim/soccer_player_4_running/3.png"),this.load.image("soccer_player_6_running_1","assets/anim/soccer_player_6_running/1.png"),this.load.image("soccer_player_6_running_2","assets/anim/soccer_player_6_running/2.png"),this.load.image("soccer_player_6_running_3","assets/anim/soccer_player_6_running/3.png"),this.load.image("soccer_player_7_running_1","assets/anim/soccer_player_7_running/1.png"),this.load.image("soccer_player_7_running_2","assets/anim/soccer_player_7_running/2.png"),this.load.image("soccer_player_7_running_3","assets/anim/soccer_player_7_running/3.png"),this.load.image("soccer_player_1_idle_1","assets/anim/soccer_player_1_idle/1.png"),this.load.image("soccer_player_1_idle_2","assets/anim/soccer_player_1_idle/2.png"),this.load.image("soccer_player_2_idle_1","assets/anim/soccer_player_2_idle/1.png"),this.load.image("soccer_player_2_idle_2","assets/anim/soccer_player_2_idle/2.png"),this.load.image("soccer_player_3_idle_1","assets/anim/soccer_player_3_idle/1.png"),this.load.image("soccer_player_3_idle_2","assets/anim/soccer_player_3_idle/2.png"),this.load.image("soccer_player_4_idle_1","assets/anim/soccer_player_4_idle/1.png"),this.load.image("soccer_player_4_idle_2","assets/anim/soccer_player_4_idle/2.png"),this.load.image("alan_idle_1","assets/anim/alan_idle/1.png"),this.load.image("alan_idle_2","assets/anim/alan_idle/2.png"),this.load.image("chini_idle_1","assets/anim/chini_idle/1.png"),this.load.image("chini_idle_2","assets/anim/chini_idle/2.png"),this.load.image("inspector_idle_1","assets/anim/inspector_idle/1.png"),this.load.image("inspector_idle_2","assets/anim/inspector_idle/2.png"),this.load.image("profesor_1_idle_1","assets/anim/profesor_1_idle/1.png"),this.load.image("profesor_1_idle_2","assets/anim/profesor_1_idle/2.png"),this.load.image("secretaria_idle_1","assets/anim/secretaria_idle/1.png"),this.load.image("secretaria_idle_2","assets/anim/secretaria_idle/2.png"),this.load.image("tere_idle_1","assets/anim/tere_idle/1.png"),this.load.image("tere_idle_2","assets/anim/tere_idle/2.png"),this.load.image("mia_idle_1","assets/anim/mia_idle/1.png"),this.load.image("mia_idle_2","assets/anim/mia_idle/2.png"),this.load.image("estudiante_h_1_idle_1","assets/anim/estudiante_h_1_idle/1.png"),this.load.image("estudiante_h_1_idle_2","assets/anim/estudiante_h_1_idle/2.png"),this.load.image("estudiante_h_2_idle_1","assets/anim/estudiante_h_2_idle/1.png"),this.load.image("estudiante_h_2_idle_2","assets/anim/estudiante_h_2_idle/2.png"),this.load.image("estudiante_h_3_idle_1","assets/anim/estudiante_h_3_idle/1.png"),this.load.image("estudiante_h_3_idle_2","assets/anim/estudiante_h_3_idle/2.png"),this.load.image("estudiante_h_4_idle_1","assets/anim/estudiante_h_4_idle/1.png"),this.load.image("estudiante_h_4_idle_2","assets/anim/estudiante_h_4_idle/2.png"),this.load.image("estudiante_h_5_idle_1","assets/anim/estudiante_h_5_idle/1.png"),this.load.image("estudiante_h_5_idle_2","assets/anim/estudiante_h_5_idle/2.png"),this.load.image("alex_idle_1","assets/anim/alex_idle/1.png"),this.load.image("alex_idle_2","assets/anim/alex_idle/2.png"),this.load.image("josefina_idle_1","assets/anim/josefina_idle/1.png"),this.load.image("josefina_idle_2","assets/anim/josefina_idle/2.png"),this.load.image("andy_idle_1","assets/anim/andy_idle/1.png"),this.load.image("andy_idle_2","assets/anim/andy_idle/2.png"),this.load.image("andy_crying_1","assets/anim/andy_crying/1.png"),this.load.image("andy_crying_2","assets/anim/andy_crying/2.png"),this.load.image("profe_vero_idle_1","assets/anim/profe_vero_idle/1.png"),this.load.image("profe_vero_idle_2","assets/anim/profe_vero_idle/2.png"),this.load.image("xime_idle_1","assets/anim/xime_idle/1.png"),this.load.image("xime_idle_2","assets/anim/xime_idle/2.png"),this.load.image("nora_
6278idle_1","assets/anim/nora_idle/1.png"),this.load.image("nora_idle_2","assets/anim/nora_idle/2.png"),this.load.image("maton_3_idle_1","assets/anim/maton_3_idle/1.png"),this.load.image("maton_3_idle_2","assets/anim/maton_3_idle/2.png"),this.load.image("pelota_1","assets/anim/ball/1.png"),this.load.image("pelota_2","assets/anim/ball/2.png"),this.load.image("pelota_3","assets/anim/ball/3.png"),this.load.audio("dialogo_snd","assets/sounds/dialogo.wav"),this.load.audio("quest_snd","assets/sounds/quest.mp3"),this.load.audio("intro_snd","assets/sounds/intro.wav"),this.load.audio("bg_snd","assets/sounds/bg.wav"),this.load.audio("game_snd","assets/sounds/game.wav"),this.load.audio("win_snd","assets/sounds/win.mp3"),this.load.audio("lose_snd","assets/sounds/lose.mp3"),this.load.audio("click_snd","assets/sounds/click.wav"),this.load.audio("step_snd","assets/sounds/step.wav"),this.load.audio("move_block_snd","assets/sounds/move-block.wav"),this.load.audio("rotate_block_snd","assets/sounds/rotate-block.wav"),this.load.audio("destroy_blocks_snd","assets/sounds/destroy-blocks.wav"),this.load.audio("move_block_down_snd","assets/sounds/move-block-down.wav"),this.load.audio("block_new_snd","assets/sounds/block-new.wav"),this.load.audio("right_snd","assets/sounds/right.mp3"),this.load.audio("wrong_snd","assets/sounds/wrong.mp3"),this.load.audio("turn_snd","assets/sounds/turn.mp3"),this.load.audio("neutral_snd","assets/sounds/neutral.wav"),this.load.audio("end_snd","assets/sounds/end.wav"),this.load.image("gonzalo_idle_1","assets/anim/lino_idle/1.png"),this.load.image("gonzalo_idle_2","assets/anim/lino_idle/2.png"),this.load.image("estudiante_h_6_idle_1","assets/anim/estudiante_h_1_idle/1.png"),this.load.image("estudiante_h_6_idle_2","assets/anim/estudiante_h_1_idle/2.png"),this.load.image("estudiante_h_7_idle_1","assets/anim/estudiante_h_2_idle/1.png"),this.load.image("estudiante_h_7_idle_2","assets/anim/estudiante_h_2_idle/2.png"),this.load.image("estudiante_h_8_idle_1","assets/anim/estudiante_h_3_idle/1.png"),this.load.image("estudiante_h_8_idle_2","assets/anim/estudiante_h_3_idle/2.png"),this.load.image("estudiante_h_9_idle_1","assets/anim/estudiante_h_4_idle/1.png"),this.load.image("estudiante_h_9_idle_2","assets/anim/estudiante_h_4_idle/2.png"),this.load.image("estudiante_h_10_idle_1","assets/anim/estudiante_h_5_idle/1.png"),this.load.image("estudiante_h_10_idle_2","assets/anim/estudiante_h_5_idle/2.png"),this.load.image("red_cross","assets/red_cross.png"),this.load.image("item_1","assets/items/item_1.png"),this.load.image("item_2","assets/items/item_2.png"),this.load.image("item_3","assets/items/item_3.png"),this.load.image("item_4","assets/items/item_4.png"),this.load.image("item_5","assets/items/item_5.png"),this.load.image("item_6","assets/items/item_6.png"),this.load.audio("item_snd","assets/items/item_snd.wav"),this.load.audio("quest_complete_snd","assets/sounds/quest_complete.wav"),this.load.image("casino_entry","assets/fixed_tiles/casino_entry.jpg"),this.load.image("library_entry","assets/fixed_tiles/library_entry.jpg"),this.load.image("class_entry","assets/fixed_tiles/class_entry.jpg"),this.load.image("nursery_entry","assets/fixed_tiles/nursery_entry.jpg"),this.load.image("principal_entry","assets/fixed_tiles/principal_entry.jpg");const s=this.cameras.main.width/2,c=this.cameras.main.height/2;this.loadingBar=this.add.graphics(),this.load.on("progress",function(C){this.loadingBar.clear(),this.loadingBar.fillStyle(16777215,1);const S=this.cameras.main.width-200,l=30;this.loadingBar.fillRect(s-S/2,c-l/2,S*C,l)},this),this.loadingText=this.add.text(s,c-50,"Cargando...",{fontSize:"24px",fill:"#ffffff"}),this.loadingText.setOrigin(.5)}create(){const s=this,c=()=>hE(s),C=()=>c().then(()=>{s.loadingBar.destroy(),s.loadingText.destroy();const{state:l,stage:T}=uE();switch(jh(T,!1,l),T){case 1:s.scene.start(jt.COLLEGE);break;case 2:s.scene.start(jt.COLLEGE_2);break;case 3:s.scene.start(jt.COLLEGE_3);break;default:s.scene.start(jt.COLLEGE);break}}),{accountId:S}=os();S?dE().then(()=>{cE.value.hasSelection?C():(s.loadingBar.destroy(),s.loadingText.destroy(),s.scene.start(jt.MAIN),fE())}):(s.loadingBar.destroy(),s.loadingText.destroy(),s.scene.start(jt.MAIN))}}class xt{constructor(t){this.scene=t,this.displayList=t.sys.displayList,this.updateList=t.sys.updateList,t.events.once("destroy",this.destroy,this)}destroy(){this.scene=null,this.displayList=null,this.updateList=null}static register(t,s){xt.prototype[t]=s}}var pE=function(i){return i===void 0&&(i=mE),this.getFrameNameCallback=i,this},mE=function(i,t,s){return s==="__BASE"?`${i},${t}`:`${s}_${i},${t}`};/** 6279 * @author Richard Davey <[email protected]> 6280 * @copyright 2018 Photon Storm Ltd. 6281 * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} 6282 */var gE=function(i){if(typeof i!="object"||i.nodeType||i===i.window)return!1;try{if(i.constructor&&!{}.hasOwnProperty.call(i.constructor.prototype,"isPrototypeOf"))return!1}catch{return!1}return!0},zi=function(i){var t,s,c;if(i==null||typeof i!="object")return i;if(t=Array.isArray(i)?[]:{},gE(i))for(c in i)s=i[c],t[c]=zi(s);else t=i;return t},xE=function(i,t,s,c){Array.isArray(t)&&(c=s,s=t,t=void 0),t==null&&(t="__BASE"),typeof s=="number"&&arguments.length>=6?(s=[arguments[2],void 0,arguments[3]],c=[arguments[4],void 0,arguments[5]]):(s=zi(s),c=zi(c)),this.textureKey=i,this.baseFrameName=t,this.columns.data=s,this.columns.count=s?s.length:0,this.columns.stretch=0,this.columns.minWidth=0,this.columns.scale=1,this.rows.data=c,this.rows.count=c?c.length:0,this.rows.stretch=0,this.rows.minHeight=0,this.rows.scale=1;var C=this.scene.sys.textures.get(i);if(!C)return this.clear(),this;if(!s||!c)return this.clear(),this;for(var S=C.get(t),l=S.width,T=0,e=0,d=s.length;e<d;e++)s[e]===void 0?T++:typeof s[e]=="number"?l-=s[e]:l-=s[e].width;for(var g=l/T,r=S.height,a=0,e=0,d=c.length;e<d;e++)c[e]===void 0?a++:typeof c[e]=="number"?r-=c[e]:r-=c[e].width;for(var h=r/a,n,o,f,u,v,m=0,p=0,x=0,y=c.length;x<y;x++){c[x]===void 0&&(c[x]=h),typeof c[x]=="number"&&(c[x]={height:c[x],stretch:x%2}),n=c[x],f=n.height,this.rows.stretch+=n.stretch|0,this.rows.minHeight+=n.stretch>0?0:f,m=0;for(var e=0,P=s.length;e<P;e++){if(s[e]===void 0&&(s[e]=g),typeof s[e]=="number"&&(s[e]={width:s[e],stretch:e%2}),o=s[e],u=o.width,x===0&&(this.columns.stretch+=o.stretch|0,this.columns.minWidth+=o.stretch>0?0:u),u>=1&&f>=1){v=this.getFrameNameCallback(e,x,t);var b=typeof v;(b==="string"||b==="number")&&C.add(v,0,m+S.cutX,p+S.cutY,u,f)}m+=u}p+=f}return this.updateTexture(),this},yE=function(){if(this.clear(),this.textureKey===void 0)return this;var i=this.scene.sys.textures.get(this.textureKey);if(!i)return this;var t=this.columns.minWidth*this.maxFixedPartScaleX,s=this.rows.minHeight*this.maxFixedPartScaleY,c=this.width-t,C=this.height-s,S=c>=0?this.maxFixedPartScaleX:this.width/t,l=C>
6282=0?this.maxFixedPartScaleY:this.height/s;if(this.preserveRatio){var T=Math.min(S,l);if(S>T){var e=(S-T)*t;c>=0?c+=e:c=e,S=T}if(l>T){var d=(l-T)*s;C>=0?C+=d:C=d,l=T}}this.columns.scale=S,this.rows.scale=l;var g;c>0?g=this.columns.stretch>0?c/this.columns.stretch:0:g=0;var r;C>0?r=this.rows.stretch>0?C/this.rows.stretch:0:r=0;var a,h,n,o,f,u=0,v=0,m;this._beginDraw();for(var p=0,x=this.rows.count;p<x;p++){n=this.rows.data[p],f=n.stretch===0?n.height*l:r*n.stretch,u=0;for(var y=0,P=this.columns.count;y<P;y++)h=this.columns.data[y],o=h.stretch===0?h.width*S:g*h.stretch,a=this.getFrameNameCallback(y,p,this.baseFrameName),i.has(a)&&o>0&&f>0&&(n.stretch===0&&h.stretch===0||this.getStretchMode(y,p)===0?m=0:m=1,m===0?this._drawImage(this.textureKey,a,u,v,o,f):this._drawTileSprite(this.textureKey,a,u,v,o,f)),u+=o;v+=f}this._endDraw()};const CE=Phaser.Utils.Objects.IsPlainObject,Yp=Phaser.Utils.Objects.GetValue;var TE=function(i){return CE(i)?(this.stretchMode.edge=ad(Yp(i,"edge",0)),this.stretchMode.internal=ad(Yp(i,"internal",0))):(i=ad(i),this.stretchMode.edge=i,this.stretchMode.internal=i),this},ad=function(i){return typeof i=="string"&&(i=SE[i]),i};const SE={scale:0,repeat:1};var EE=function(i,t){return i===0||i===this.columns.count-1||t===0||t===this.rows.count-1},PE=function(i,t){return EE.call(this,i,t)?this.stretchMode.edge:this.stretchMode.internal},bE=function(i){return i==null&&(i=!0),this.preserveRatio=i,this},ME=function(i,t){return t===void 0&&(t=i),this.maxFixedPartScaleX=i,this.maxFixedPartScaleY=t,this},ci=function(){};const wE={_beginDraw:ci,_drawImage:ci,_drawTileSprite:ci,_endDraw:ci,setGetFrameNameCallback:pE,setBaseTexture:xE,updateTexture:yE,setStretchMode:TE,getStretchMode:PE,setPreserveRatio:bE,setMaxFixedPartScale:ME},eo=Phaser.Utils.Objects.IsPlainObject,Zt=Phaser.Utils.Objects.GetValue;var Jx=function(i,t){class s extends i{constructor(C,S,l,T,e,d,g,r,a,h){if(eo(S)?(h=S,S=Zt(h,"x",0),l=Zt(h,"y",0),T=Zt(h,"width",1),e=Zt(h,"height",1),d=Zt(h,"key",void 0),g=Zt(h,"baseFrame",void 0),r=Zt(h,"columns",void 0),a=Zt(h,"rows",void 0)):eo(T)?(h=T,T=Zt(h,"width",1),e=Zt(h,"height",1),d=Zt(h,"key",void 0),g=Zt(h,"baseFrame",void 0),r=Zt(h,"columns",void 0),a=Zt(h,"rows",void 0)):eo(d)?(h=d,d=Zt(h,"key",void 0),g=Zt(h,"baseFrame",void 0),r=Zt(h,"columns",void 0),a=Zt(h,"rows",void 0)):eo(g)?(h=g,g=Zt(h,"baseFrame",void 0),r=Zt(h,"columns",void 0),a=Zt(h,"rows",void 0)):Array.isArray(g)?(h=a,a=r,r=g,g=Zt(h,"baseFrame",void 0)):eo(r)&&(h=r,r=Zt(h,"columns",void 0),a=Zt(h,"rows",void 0)),r===void 0){var n=Zt(h,"leftWidth",void 0),o=Zt(h,"rightWidth",void 0);n!==void 0&&o!==void 0&&(r=[n,void 0,o])}if(a===void 0){var f=Zt(h,"topHeight",void 0),u=Zt(h,"bottomHeight",void 0);f!==void 0&&u!==void 0&&(a=[f,void 0,u])}super(C),this.type=t,this.setPosition(S,l).setSize(T,e).setOrigin(.5,.5),this.columns={},this.rows={},this.stretchMode={},this._tileSprite=void 0,this._image=void 0,this.setGetFrameNameCallback(Zt(h,"getFrameNameCallback",void 0)),this.setStretchMode(Zt(h,"stretchMode",0)),this.setPreserveRatio(Zt(h,"preserveRatio",!0));var v=Zt(h,"maxFixedPartScale",1),m=Zt(h,"maxFixedPartScaleX",v),p=Zt(h,"maxFixedPartScaleY",void 0);this.setMaxFixedPartScale(m,p),this.setBaseTexture(d,g,r,a)}get minWidth(){return this.columns.minWidth}get minHeight(){return this.rows.minHeight}get fixedPartScaleX(){return this.columns.scale}get fixedPartScaleY(){return this.rows.scale}resize(C,S){return this.width===C&&this.height===S?this:(super.resize?super.resize(C,S):super.setSize(C,S),this.updateTexture(),this)}}return Object.assign(s.prototype,wE),s};const AE=Phaser.Game;var Xp=function(i){return i instanceof AE};const RE=Phaser.Scene;var Fr=function(i){return i instanceof RE},Ir=function(i){if(i==null||typeof i!="object")return null;if(Xp(i))return i;if(Xp(i.game))return i.game;if(Fr(i))return i.sys.game;if(Fr(i.scene))return i.scene.sys.game};const OE=Phaser.GameObjects;var Tn=void 0,Qx=function(i,t){if(Tn||(Tn={},Ir(i).events.once("destroy",function(){for(var c in Tn)Tn[c].destroy();Tn=void 0})),!Tn.hasOwnProperty(t)){var s=Ir(i).scene.systemScene,i=new OE[t](s);i.setOrigin(0),Tn[t]=i}return Tn[t]},LE=function(i,t,s,c,C,S){var l=Qx(this,"Image").setTexture(i,t).setDisplaySize(C,S);this.draw(l,s,c)},FE=function(i,t,s,c,C,S){var l=Qx(this,"TileSprite").setTexture(i,t).setSize(C,S);this.draw(l,s,c)};const IE=Phaser.GameObjects.RenderTexture;let Kh=class extends Jx(IE,"rexNinePatch"){};var DE={_drawImage:LE,_drawTileSprite:FE};Object.assign(Kh.prototype,DE);var qx=function(i){return i==null||i===""||i.length===0},BE=function(i,t,s){var c=i;
6282if(!qx(t)){typeof t=="string"&&(t=t.split("."));for(var C,S=0,l=t.length;S<l;S++){if(C=t[S],c[C]==null||typeof c[C]!="object"){var T;S===l-1?s===void 0?T={}:T=s:T={},c[C]=T}c=c[C]}}return c},mt=function(i,t,s,c){if(c===void 0&&(c="."),typeof i=="object"){if(qx(t)){if(s==null)return;typeof s=="object"&&(i=s)}else{typeof t=="string"&&(t=t.split(c));var C=t.pop(),S=BE(i,t);S[C]=s}return i}};xt.register("ninePatch",function(i,t,s,c,C,S,l,T){var e=new Kh(this.scene,i,t,s,c,C,S,l,T);return this.scene.add.existing(e),e});mt(window,"RexPlugins.UI.NinePatch",Kh);const kE=Phaser.GameObjects.GetCalcMatrix;var GE=function(i,t,s,c){var C=t.getRenderList();if(C.length!==0){s.addToRenderList(t);var S=i.pipelines.set(t.pipeline),l=t.frame.glTexture,T=S.setGameObject(t),e=s.roundPixels,d=kE(t,s,c),g=S.calcMatrix.copyFrom(d.calc),r=t._displayOriginX,a=t._displayOriginY,h=s.alpha*t.alpha;i.pipelines.preBatch(t);for(var n=0,o=C.length;n<o;n++)C[n].webglRender(S,g,h,r,a,l,T,e);i.pipelines.postBatch(t)}};const NE=Phaser.Renderer.Canvas.SetTransform;var VE=function(i,t,s,c){var C=i.currentContext,S=t.getRenderList();if(!(S.length===0||!NE(i,C,t,s,c))){s.addToRenderList(t);var l=s.roundPixels,T=-t._displayOriginX,e=-t._displayOriginY;C.translate(T,e);for(var d=0,g=S.length;d<g;d++)S[d].canvasRender(C,T,e,l);C.restore()}};const zE={renderWebGL:GE,renderCanvas:VE};var YE=function(i,t){return this.texture=this.scene.sys.textures.get(i),this.frame=this.texture.get(t),this},Up=function(i,t){if(this.width===i&&this.height===t)return this;this.width=i,this.height=t,this.updateDisplayOrigin();var s=this.input;return s&&!s.customHitArea&&(s.hitArea.width=i,s.hitArea.height=t),this},XE=function(i){return this.lastAppendedChildren.length=0,Array.isArray(i)?(this.children.add(i),this.lastAppendedChildren.push(...i)):(this.children.add(i),this.lastAppendedChildren.push(i)),this};const UE=Phaser.Utils.Array.Remove;var WE=function(i){return this.poolManager&&this.poolManager.free(i),UE(this.children.list,i),this.lastAppendedChildren.length=0,this.dirty=!0,this},Wp=function(){return this.poolManager&&this.poolManager.freeMultiple(this.children.list),this.children.list.length=0,this.lastAppendedChildren.length=0,this.dirty=!0,this},HE=function(){return this.lastAppendedChildren},$E=function(){return this.children.list};const jE={setTint(i){return this.tint=i,this.tintFill=!1,this},setTintFill(i){return this.tint=i,this.tintFill=!0,this},clearTint(){return this.setTint(16777215),this}};var _x={setTexture:YE,resize:Up,setSize:Up,addChild:XE,removeChild:WE,removeChildren:Wp,clear:Wp,getLastAppendedChildren:HE,getChildren:$E};Object.assign(_x,jE);class zs{constructor(){this.items=[]}destroy(){this.clear(),this.items=void 0}pop(){return this.items.length>0?this.items.pop():null}push(t){return this.items.push(t),this}pushMultiple(t){return this.items.push.apply(this.items,t),t.length=0,this}clear(){return this.items.length=0,this}}const KE=Phaser.Utils.Objects.GetValue;var ZE={};let JE=class{constructor(t){this.pools=KE(t,"pools",ZE)}destroy(){this.pools=void 0}free(t){if(!this.pools)return this;var s=t.type;return this.pools.hasOwnProperty(s)||(this.pools[s]=new zs),this.pools[s].push(t),t.onFree(),this}freeMultiple(t){if(!this.pools)return this;for(var s=0,c=t.length;s<c;s++)this.free(t[s]);return this}allocate(t){return!this.pools||!this.pools.hasOwnProperty(t)?null:this.pools[t].pop()}};const QE=60;var Hp=!1,Zh=function(i){if(!Hp){i===void 0&&(i=QE);var t=parseInt(Phaser.VERSION.match(/\.(\d+)\./)[1]);t<i&&console.error(`Minimum supported version : 3.${i}`),Hp=!0}};Zh();const qE=Phaser.GameObjects.GameObject,_E=Phaser.Utils.Objects.IsPlainObject,io=Phaser.Utils.Objects.GetValue,tP=Phaser.Structs.List,eP=Phaser.Utils.Array.StableSort;class ty extends qE{constructor(t,s,c,C,S,l){_E(s)&&(l=s,s=io(l,"x",0),c=io(l,"y",0),C=io(l,"texture"),S=io(l,"frame")),s===void 0&&(s=0),c===void 0&&(c=0),super(t,"rexBlitter"),this.children=new tP,this.renderList=[],this.displayListDirty=!1,this.lastAppendedChildren=[];var T=io(l,"reuseBob",!0);this.poolManager=T?new JE(l):void 0,this.setTexture(C,S),this.setPosition(s,c),this.setOrigin(0,0),this.clearTint(),this.initPipeline(),this.initPostPipeline()}preDestroy(){this.removeChildren(),this.children.destroy(),this.renderList.length=0,this.poolManager&&this.poolManager.destroy()}getRenderList(){if(this.displayListDirty){this.renderList.length=0;for(var t=!1,s=this.children.list,c=0,C=s.length;c<C;c++){var S=s[c];iP(S)&&(this.renderList.push(S),t||(t=S.depth!==0))}t&&eP(this.renderList,sP),this.displayListDirty=!1}return this.renderList}}var iP=function(i){return i.active&&i.visible&&i.alpha>0},sP=function(i,t){return i._depth-t._depth};const Wi=Phaser.GameObjects.Components;Phaser.Class.mixin(ty,[Wi.Alpha,Wi.BlendMode,Wi.ComputedSize,Wi.Depth,Wi.GetBounds,Wi.Mask,Wi.Origin,Wi.Pipeline,Wi.PostPipeline,Wi.ScrollFactor,Wi.Transform,Wi.Visible,zE,_x]);const ey="image";/** 6283 * @author Richard Davey <[email protected]> 6284 * @copyright 2019 Photon Storm Ltd. 6285 * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} 6286 */var le=function(i,t,s){if(!i||typeof i=="number")return s;if(i.hasOwnProperty(t))return i[t];if(t.indexOf(".")!==-1){for(var c=t.split("."),C=i,S=s,l=0;l<c.length;l++)if(C.hasOwnProperty(c[l]))S=C[c[l]],C=C[c[l]];else{S=s;break}return S}else return s},un=function(i){if(typeof i!="object"||i===null)return i;if(Array.isArray(i))i.length=0;
6286else for(var t in i)delete i[t];return i};const Jh={enableData(){return this.data===void 0&&(this.data={}),this},setData(i,t){if(this.enableData(),arguments.length===1){var s=i;for(i in s)this.data[i]=s[i]}else this.data[i]=t;return this},getData(i,t){return this.enableData(),i===void 0?this.data:le(this.data,i,t)},incData(i,t,s){return s===void 0&&(s=0),this.enableData(),this.setData(i,this.getData(i,s)+t),this},mulData(i,t,s){return s===void 0&&(s=0),this.enableData(),this.setData(i,this.getData(i,s)*t),this},clearData(){return this.data&&un(this.data),this}};let iy=class{constructor(t,s){this.type=s,this.data=void 0,this.setParent(t).reset().setActive()}destroy(){this.parent&&this.parent.removeChild(this)}setParent(t){return this.parent=t,this}setDisplayListDirty(t){return t&&this.parent&&(this.parent.displayListDirty=!0),this}get active(){return this._active}set active(t){this.setDisplayListDirty(this._active!=t),this._active=t}setActive(t){return t===void 0&&(t=!0),this.active=t,this}modifyPorperties(t){return this}reset(){this.clearData()}onFree(){this.reset().setActive(!1).setParent()}};Object.assign(iy.prototype,Jh);const nP=Phaser.Math.DegToRad,rP=Phaser.Math.RadToDeg,Qr=Phaser.Utils.Objects.GetValue;let aP=class extends iy{get visible(){return this._visible}set visible(t){this.setDisplayListDirty(this._visible!=t),this._visible=t}setVisible(t){return t===void 0&&(t=!0),this.visible=t,this}get alpha(){return this._alpha}set alpha(t){this.setDisplayListDirty(!!this._alpha!=!!t),this._alpha=t}setAlpha(t){return this.alpha=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setPosition(t,s){return this.x=t,this.y=s,this}setRotation(t){return this.rotation=t,this}get angle(){return rP(this.rotation)}set angle(t){this.rotation=nP(t)}setAngle(t){return this.angle=t,this}setScaleX(t){return this.scaleX=t,this}get width(){return this._width}set width(t){this._width=t}setWidth(t,s){return s===void 0&&(s=!1),this.width=t,s&&(this.scaleY=this.scaleX),this}setScaleY(t){return this.scaleY=t,this}setScale(t,s){return s===void 0&&(s=t),this.scaleX=t,this.scaleY=s,this}get height(){return this._height}set height(t){this._height=t}setHeight(t,s){return s===void 0&&(s=!1),this.height=t,s&&(this.scaleX=this.scaleY),this}setScale(t,s){return s===void 0&&(s=t),this.scaleX=t,this.scaleY=s,this}get displayWidth(){return this._width*this.scaleX}set displayWidth(t){this.scaleX=t/this._width}setDisplayWidth(t,s){return s===void 0&&(s=!1),this.displayWidth=t,s&&(this.scaleY=this.scaleX),this}get displayHeight(){return this._height*this.scaleY}set displayHeight(t){this.scaleY=t/this._height}setDisplayHeight(t,s){return s===void 0&&(s=!1),this.displayHeight=t,s&&(this.scaleX=this.scaleY),this}setOriginX(t){return this.originX=t,this._displayOriginX=this.width*t,this}setOriginY(t){return this.originY=t,this._displayOriginY=this.height*t,this}setOrigin(t,s){return s===void 0&&(s=t),this.setOriginX(t).setOriginY(s),this}get depth(){return this._depth}set depth(t){this.setDisplayListDirty(this._depth!=t),this._depth=t}setDepth(t){return t===void 0&&(t=0),this.depth=t,this}modifyPorperties(t){if(!t)return this;t.hasOwnProperty("x")&&this.setX(t.x),t.hasOwnProperty("y")&&this.setY(t.y),t.hasOwnProperty("rotation")?this.setRotation(t.rotation):t.hasOwnProperty("angle")&&this.setAngle(t.angle),t.hasOwnProperty("alpha")&&this.setAlpha(t.alpha);var s=Qr(t,"width",void 0),c=Qr(t,"height",void 0),C=Qr(t,"scale",void 0),S=Qr(t,"scaleX",C),l=Qr(t,"scaleY",C);s!==void 0?c===void 0&&l===void 0?this.setWidth(s,!0):this.setWidth(s):S!==void 0?this.setScaleX(S):t.hasOwnProperty("displayWidth")&&this.setDisplayWidth(t.displayWidth),c!==void 0?s===void 0&&S===void 0?this.setHeight(c,!0):this.setHeight(c):l!==void 0?this.setScaleY(l):t.hasOwnProperty("displayHeight")&&this.setDisplayHeight(t.displayHeight);var T=Qr(t,"origin",void 0);return T!==void 0?this.setOrigin(T):(t.hasOwnProperty("originX")&&this.setOriginX(t.originX),t.hasOwnProperty("originY")&&this.setOriginY(t.originY)),t.hasOwnProperty("depth")&&this.setDepth(t.depth),this}reset(){return super.reset(),this.setVisible().setAlpha(1).setPosition(0,0).setRotation(0).setScale(1,1).setOrigin(0).setDepth(0),this}
6286webglRender(t,s,c,C,S,l,T,e){}canvasRender(t,s,c,C){}};const oP=Phaser.GameObjects.Components.TransformMatrix,lP=Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlpha;var Tl=new oP,hP=function(i,t,s,c,C,S,l,T){var e=this._width,d=this._height,g=e*this.originX,r=d*this.originY,a=this.x-c,h=this.y-C,n=1,o=1;this.flipX&&(a+=e-g*2,n=-1),this.flipY&&(h+=d-r*2,o=-1),Tl.applyITRS(a,h,this.rotation,this.scaleX*n,this.scaleY*o),t.multiply(Tl,Tl);var f=-g,u=-r,v=f+e,m=u+d,p=Tl.setQuad(f,u,v,m,T),x=this.frame.u0,y=this.frame.v0,P=this.frame.u1,b=this.frame.v1,E=lP(this.tint,this.alpha*s);i.batchQuad(this.parent,p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],x,y,P,b,E,E,E,E,this.tintFill,S,l)},uP=function(i,t,s,c){i.save();var C=this._width,S=this._height,l=C*this.originX,T=S*this.originY,e=this.x-l,d=this.y-T,g=1,r=1;this.flipX&&(e+=C,g=-1),this.flipY&&(d+=S,r=-1),c&&(e=Math.round(e),d=Math.round(d)),i.translate(e,d),i.rotate(this.rotation),i.scale(this.scaleX*g,this.scaleY*r);var a=this.frame;i.drawImage(a.source.image,a.cutX,a.cutY,C,S,0,0,C,S),i.restore()};const dP=Phaser.Utils.Objects.IsPlainObject;let sy=class extends aP{constructor(t,s){super(t,ey),this.setFrame
6286(s)}get width(){return this._width}set width(t){}get height(){return this._height}set height(t){}setFrame(t){return arguments.length>0&&!dP(t)&&(t=this.parent.texture.get(t)),this.frame=t,this._width=t?t.width:0,this._height=t?t.height:0,this}setFlipX(t){return t===void 0&&(t=!0),this.flipX=t,this}setFlipY(t){return t===void 0&&(t=!0),this.flipY=t,this}resetFlip(){return this.flipX=!1,this.flipY=!1,this}get tint(){return this._tint===void 0?this.parent.tint:this._tint}set tint(t){this._tint=t}setTint(t){return this.tint=t,this.tintFill=!1,this}setTintFill(t){return this.tint=t,this.tintFill=!0,this}clearTint(){return this.setTint(16777215),this}resetTint(){return this.tint=void 0,this.tintFill=void 0,this}get tintFill(){return this._tintFill===void 0?this.parent.tintFill:this._tintFill}set tintFill(t){this._tintFill=t}reset(){return super.reset(),this.resetFlip().resetTint().setFrame(),this}modifyPorperties(t){return t?(t.hasOwnProperty("width")&&(t.displayWidth=t.width,delete t.width),t.hasOwnProperty("height")&&(t.displayHeight=t.height,delete t.height),t.hasOwnProperty("frame")&&this.setFrame
6286(t.frame),super.modifyPorperties(t),t.hasOwnProperty("flipX")&&this.setFlipX(t.flipX),t.hasOwnProperty("flipY")&&this.setFlipY(t.flipY),t.hasOwnProperty("tint")&&this.setTint(t.tint),t.hasOwnProperty("tintFill")&&this.setTintFill(t.tintFill),this):this}};var cP={webglRender:hP,canvasRender:uP};Object.assign(sy.prototype,cP);var ny=function(i,t){typeof t=="string"&&(t={frame:t});var s=i.poolManager?i.poolManager.allocate(ey):null;return s===null?s=new sy(i):s.setParent(i).setActive(),s.modifyPorperties(t),i.addChild(s),s},fP=function(i,t,s,c,C,S){ny(this,{frame:t,x:s,y:c,width:C,height:S})},vP=function(i,t,s,c,C,S){var l=this.texture.get(t),T=l.width,e=l.height,d=Math.floor(C/T),g=Math.floor(S/e);s+=(C-d*T)/2,c+=(S-g*e)/2;for(var r=0;r<d;r++)for(var a=0;a<g;a++)ny(this,{frame:t,x:s+r*T,y:c+a*e})};const pP={_drawImage:fP,_drawTileSprite:vP};class Of extends Jx(ty,"rexNinePatch2"){setBaseTexture(t,s,c,C){return this.setTexture(t,s),super.setBaseTexture(t,s,c,C),this}}Object.assign(Of.prototype,pP);xt.register("ninePatch2",function(i,t,s,c,C,S,l,T){var e=new Of(this.scene,i,t,s,c,C,S,l,T);return this.scene.add.existing(e),e});mt(window,"RexPlugins.UI.NinePatch2",Of);const Dn=Phaser.Utils.Objects.GetValue;let ry=class{constructor(t,s,c,C,S){t===void 0&&(t=0),s===void 0&&(s=t),c===void 0&&(c=0),C===void 0&&(C=0),S===void 0&&(S=0),this.cornerRadius={},this._width=0,this._height=0,this.setTo(t,s,c,C,S)}setTo(t,s,c,C,S){return this.setPosition(t,s),this.setRadius(S),this.setSize(c,C),this}setPosition(t,s){return this.x=t,this.y=s,this}setRadius(t){return t===void 0&&(t=0),this.radius=t,this}setSize(t,s){return this.width=t,this.height=s,this}get minWidth(){var t=this.cornerRadius;return Math.max(t.tl.x+t.tr.x,t.bl.x+t.br.x)}get minHeight(){var t=this.cornerRadius;return Math.max(t.tl.y+t.bl.y,t.tr.y+t.br.y)}get width(){return this._width}set width(t){t==null&&(t=0),this._width=Math.max(t,this.minWidth)}get height(){return this._height}set height(t){t==null&&(t=0),this._height=Math.max(t,this.minHeight)}get radius(){var t=this.cornerRadius;return Math.max(t.tl.x,t.tl.y,t.tr.x,t.tr.y,t.bl.x,t.bl.y,t.br.x,t.br.y)}set radius(t){var s,c;typeof t=="number"?(s=t,c=t):(s=Dn(t,"x",0),c=Dn(t,"y",0));var C=this.cornerRadius;C.tl=Sl(Dn(t,"tl",void 0),s,c),C.tr=Sl(Dn(t,"tr",void 0),s,c),C.bl=Sl(Dn(t,"bl",void 0),s,c),C.br=Sl(Dn(t,"br",void 0),s,c)}get radiusTL(){var t=this.cornerRadius.tl;return Math.max(t.x,t.y)}set radiusTL(t){El(this.cornerRadius.tl,t)}get radiusTR(){var t=this.cornerRadius.tr;return Math.max(t.x,t.y)}set radiusTR(t){El(this.cornerRadius.tr,t)}get radiusBL(){var t=this.cornerRadius.bl;return Math.max(t.x,t.y)}set radiusBL(t){El(this.cornerRadius.bl,t)}get radiusBR(){var t=this.cornerRadius.br;return Math.max(t.x,t.y)}set radiusBR(t){El(this.cornerRadius.br,t)}};var Sl=function(i,t,s){return i===void 0?i={x:t,y:s}:typeof i=="number"&&(i={x:i,y:i}),ay(i),i},El=function(i,t){typeof t=="number"?(i.x=t,i.y=t):(i.x=Dn(t,"x",0),i.y=Dn(t,"y",0)),ay(i)},ay=function(i){i.convex=i.x>=0||i.y>=0,i.x=Math.abs(i.x),i.y=Math.abs(i.y)},Ys=function(i,t,s){var c=s.length;if(c>=2){var C=s[c-2],S=s[c-1];if(i===C&&t===S)return s}return s.push(i,t),s};const $p=Phaser.Math.DegToRad;var qe=function(i,t,s,c,C,S,l,T,e){l&&S>C?S-=360:!l&&S<C&&(S+=360);var d=S-C,g=$p(d)/T;C=$p(C);for(var r=0;r<=T;r++){var a=C+g*r,h=i+s*Math.cos(a),n=t+c*Math.sin(a);Ys(h,n,e)}return e},mP=Phaser.Renderer.WebGL.Utils,oy=function(i,t,s,c,C,S){for(var l=mP.getTintAppendFloatAlpha(s.fillColor,s.fillAlpha*c),T=s.pathData,e=s.pathIndexes,d=0;d<e.length;d+=3){var g=e[d]*2,r=e[d+1]*2,a=e[d+2]*2,h=T[g+0]-C,n=T[g+1]-S,o=T[r+0]-C,f=T[r+1]-S,u=T[a+0]-C,v=T[a+1]-S,m=t.getX(h,n),p=t.getY(h,n),x=t.getX(o,f),y=t.getY(o,f),P=t.getX(u,v),b=t.getY(u,v);i.batchTri(s,m,p,x,y,P,b,0,0,1,1,l,l,l,2)}},gP=Phaser.Renderer.WebGL.Utils,Qh=function(i,t,s,c,C){var S=i.strokeTint,l=gP.getTintAppendFloatAlpha(t.strokeColor,t.strokeAlpha*s);S.TL=l,S.TR=l,S.BL=l,S.BR=l;var T=t.pathData,e=T.length-1,d=t.lineWidth,g=d/2,r=T[0]-c,a=T[1]-C;t.closePath||(e-=2);for(var h=2;h<e;h+=2){var n=T[h]-c,o=T[h+1]-C;i.batchLine(r,a,n,o,g,g,d,h-2,t.closePath?h===e-1:!1),r=n,a=o}};const xP=Phaser.GameObjects.GetCalcMatrix;var yP=function(i,t,s,c){t.dirty&&(t.updateData(),t.dirty=!1),s.addToRenderList(t);
6286var C=i.pipelines.set(t.pipeline),S=xP(t,s,c),l=C.calcMatrix.copyFrom(S.calc),T=t._displayOriginX,e=t._displayOriginY,d=s.alpha*t.alpha;i.pipelines.preBatch(t),t.isFilled&&oy(C,l,t,d,T,e),t.isStroked&&Qh(C,t,d,T,e),i.pipelines.postBatch(t)},Xo=function(i,t,s,c){var C=s||t.fillColor,S=c||t.fillAlpha,l=(C&16711680)>>>16,T=(C&65280)>>>8,e=C&255;i.fillStyle="rgba("+l+","+T+","+e+","+S+")"},Uo=function(i,t,s,c){var C=s||t.strokeColor,S=c||t.strokeAlpha,l=(C&16711680)>>>16,T=(C&65280)>>>8,e=C&255;i.strokeStyle="rgba("+l+","+T+","+e+","+S+")",i.lineWidth=t.lineWidth};const CP=Phaser.Renderer.Canvas.SetTransform;var TP=function(i,t,s,c){t.dirty&&(t.updateData(),t.dirty=!1),s.addToRenderList(t);var C=i.currentContext;if(CP(i,C,t,s,c)){var S=t._displayOriginX,l=t._displayOriginY,T=t.pathData,e=T.length-1,d=T[0]-S,g=T[1]-l;C.beginPath(),C.moveTo(d,g),t.closePath||(e-=2);for(var r=2;r<e;r+=2){var a=T[r]-S,h=T[r+1]-l;C.lineTo(a,h)}C.closePath(),t.isFilled&&(Xo(C,t),C.fill()),t.isStroked&&(Uo(C,t),C.stroke()),C.restore()}};const SP={renderWebGL:yP,renderCanvas:TP},EP=Phaser.GameObjects.Shape,PP=Phaser.Utils.Objects.IsPlainObject,jp=Phaser.Utils.Objects.GetValue,bP=Phaser.Geom.Polygon.Earcut;let Qn=class extends EP{constructor(t,s,c,C,S,l,T,e){var d,g,r,a;if(PP(s)){var h=s;s=h.x,c=h.y,C=h.width,S=h.height,l=h.radius,T=h.color,e=h.alpha,d=h.strokeColor,g=h.strokeAlpha,r=h.strokeWidth,a=h.shape}s===void 0&&(s=0),c===void 0&&(c=0),C===void 0&&(C=1),S===void 0&&(S=C),l===void 0&&(l=0),a===void 0&&(a=0);var n=new ry;if(super(t,"rexRoundRectangleShape",n),this.setShapeType(a),this.shapeType===0){var o=jp(l,"radius",l);n.setTo(0,0,C,S,o)}else{var o={x:C/2,y:S/2};n.setTo(0,0,C,S,o)}var f=jp(l,"iteration",void 0);this.setIteration(f),this.setPosition(s,c),this.setFillStyle(T,e),d!==void 0&&r===void 0&&(r=2),this.setStrokeStyle(r,d,g),this.updateDisplayOrigin(),this.dirty=!0}get fillColor(){return this._fillColor}set fillColor(t){this._fillColor=t,this.isFilled=t!=null&&this._fillAlpha>0}get fillAlpha(){return this._fillAlpha}set fillAlpha(t){this._fillAlpha=t,this.isFilled=t>0&&this._fillColor!=null}setFillStyle(t,s){return s===void 0&&(s=1),this.fillColor=t,this.fillAlpha=s,this}get strokeColor(){return this._strokeColor}set strokeColor(t){this._strokeColor=t,this.isStroked=t!=null&&this._strokeAlpha>0&&this._lineWidth>0}get strokeAlpha(){return this._strokeAlpha}set strokeAlpha(t){this._strokeAlpha=t,this.isStroked=t>0&&this._strokeColor!=null&&this._lineWidth>0}get lineWidth(){return this._lineWidth}set lineWidth(t){this._lineWidth=t,this.isStroked=t>0&&this._strokeColor!=null}setStrokeStyle(t,s,c){return c===void 0&&(c=1),this.lineWidth=t,this.strokeColor=s,this.strokeAlpha=c,this}updateData(){var t=this.geom,s=this.pathData;s.length=0;var c=t.width,C=t.height,S=t.cornerRadius,l,T=this.iteration+1;if(l=S.tl,Pl(l))if(l.convex){var e=l.x,d=l.y;qe(e,d,l.x,l.y,180,270,!1,T,s)}else{var e=0,d=0;qe(e,d,l.x,l.y,90,0,!0,T,s)}else Ys(0,0,s);if(l=S.tr,Pl(l))if(l.convex){var e=c-l.x,d=l.y;qe(e,d,l.x,l.y,270,360,!1,T,s)}else{var e=c,d=0;qe(e,d,l.x,l.y,180,90,!0,T,s)}else Ys(c,0,s);if(l=S.br,Pl(l))if(l.convex){var e=c-l.x,d=C-l.y;qe(e,d,l.x,l.y,0,90,!1,T,s)}else{var e=c,d=C;qe(e,d,l.x,l.y,270,180,!0,T,s)}else Ys(c,C,s);if(l=S.bl,Pl(l))if(l.convex){var e=l.x,d=C-l.y;qe(e,d,l.x,l.y,90,180,!1,T,s)}else{var e=0,d=C;qe(e,d,l.x,l.y,360,270,!0,T,s)}else Ys(0,C,s);return s.push(s[0],s[1]),this.pathIndexes=bP(s),this}setShapeType(t){return typeof t=="string"&&(t=MP[t]),this.shapeType=t,this}get width(){return this.geom.width}set width(t){this.resize(t,this.height)}get height(){return this.geom.height}set height(t){this.resize(this.width,t)}setSize(t,s){if(s===void 0&&(s=t),this.geom.width===t&&this.geom.height===s)return this;this.geom.setSize(t,s),this.shapeType===1&&this.setRadius({x:t/2,y:s/2}),this.updateDisplayOrigin(),this.dirty=!0;var c=this.input;return c&&!c.customHitArea&&(c.hitArea.width=t,c.hitArea.height=s),this}resize(t,s){return this.setSize(t,s),this}get radius(){return this.geom.radius}set radius(t){this.geom.setRadius(t),this.updateDisplayOrigin(),this.dirty=!0}get radiusTL(){return this.geom.radiusTL}set radiusTL(t){this.geom.radiusTL=t,this.dirty=!0}get radiusTR(){return this.geom.radiusTR}set radiusTR(t){this.geom.radiusTR=t,this.dirty=!0}get radiusBL(){return this.geom.radiusBL}set radiusBL(t){this.geom.radiusBL=t,this.dirty=!0}get radiusBR(){return this.geom.radiusBR}set radiusBR(t){this.geom.radiusBR=t,this.dirty=!0}setRadius(t){return t===void 0&&(t=0),this.radius=t,this}setRadiusTL(t){return t===void 0&&(t=0),this.radiusTL=t,this}setRadiusTR(t){return t===void 0&&(t=0),this.radiusTR=t,this}setRadiusBL(t){return t===void 0&&(t=0),this.radiusBL=t,this}setRadiusBR(t){return t===void 0&&(t=0),this.radiusBR=t,this}get cornerRadius(){return this.geom.cornerRadius}set cornerRadius(t){this.radius=t}setCornerRadius(t){return this.setRadius(t)}get iteration(){return this._iteration}set iteration(t){if(this._iteration===void 0){this._iteration=t;return}this._iteration!==t&&(this._iteration=t,this.dirty=!0)}setIteration(t){return t===void 0&&(t=6),this.iteration=t,this}};var Pl=function(i){return i.x>0&&i.y>0};const MP={rectangle:0,circle:1};Object.assign(Qn.prototype,SP);xt.register("roundRectangle",function(i,t,s,c,C,S,l){var T=new Qn(this.scene,i,t,s,c,C,S,l);return this.scene.add.existing(T),T});mt(window,"RexPlugins.UI.RoundRectangle",Qn);const wP=Phaser.Renderer.WebGL.Utils;var AP=function(i,t,s,c){if(t.dirty&&(t.updateTexture(),t.dirty=!1),!(t.width===0||t.height===0)){s.addToRenderList(t);var C=t.frame,S=C.width,l=C.height,T=wP.getTintAppendFloatAlpha,e=i.pipelines.set(t.pipeline,t),d=e.setTexture2D(C.glTexture,t);i.pipelines.preBatch(t),e.batchTexture(t,C.glTexture,S,l,t.x,t.y,S/t.resolution,l/t.resolution,t.scaleX,t.scaleY,t.rotation,t.flipX,t.flipY,t.scrollFactorX,t.scrollFactorY,t.displayOriginX,t.displayOriginY,0,0,S,l,T(t.tintTopLeft,s.alph
6286a*t._alphaTL),T(t.tintTopRight,s.alpha*t._alphaTR),T(t.tintBottomLeft,s.alpha*t._alphaBL),T(t.tintBottomRight,s.alpha*t._alphaBR),t.tintFill,0,0,s,c,!1,d),i.pipelines.postBatch(t)}},RP=function(i,t,s,c){t.dirty&&(t.updateTexture(),t.dirty=!1),!(t.width===0||t.height===0)&&(s.addToRenderList(t),i.batchSprite(t,t.frame,s,c))};const OP={renderWebGL:AP,renderCanvas:RP},LP=Phaser.Display.Color,FP={clear(){return this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this.dirty=!0,this},fill(i){return this.context.fillStyle=i,this.context.fillRect(0,0,this.canvas.width,this.canvas.height),this.dirty=!0,this},drawFrame(i,t,s,c,C,S,l,T,e,d){var g=this.scene.sys.textures.getFrame(i,t);if(!g)return this;var r=g.cutWidth,a=g.cutHeight;s===void 0&&(s=0),c===void 0&&(c=0),C===void 0&&(C=r),S===void 0&&(S=a),l===void 0&&(l=0),T===void 0&&(T=0),e===void 0&&(e=r),d===void 0&&(d=a);var h=g.cutX+l,n=g.cutY+T;return this.context.drawImage(g.source.image,h,n,e,d,s,c,C,S),this.dirty=!0,this},getDataURL(i,t){return this.canvas.toDataURL(i,t)},getPixel(i,t,s){s===void 0&&(s=new LP);var c=this.context.getImageData(i,t,1,1);return s.setTo(c.data[0],c.data[1],c.data[2],c.data[3]),s},setPixel(i,t,s,c,C,S){if(typeof s!="number"){var l=s;s=l.red,c=l.green,C=l.blue,S=l.alpha}S===void 0&&(S=s!==0||c!==0||C!==0?255:0);var T=this.context.createImageData(1,1);return T.data[0]=s,T.data[1]=c,T.data[2]=C,T.data[3]=S,this.context.putImageData(T,i,t),this.dirty=!0,this}};var ly=function(i,t,s,c,C,S,l){var T=i.sys.textures,e=i.renderer;c===void 0&&(c=0),C===void 0&&(C=0),S===void 0&&(S=t.width),l===void 0&&(l=t.height);var d;T.exists(s)?d=T.get(s):d=T.createCanvas(s,S,l);var g=d.getSourceImage();g.width!==S&&(g.width=S),g.height!==l&&(g.height=l);var r=g.getContext("2d",{willReadFrequently:!0});r.clearRect(0,0,S,l),r.drawImage(t,c,C,S,l),e.gl&&d&&e.canvasToTexture(g,d.source[0].glTexture,!0,0)};const IP={updateTexture(i,t){i&&(t?i.call(t,this.canvas,this.context):i(this.canvas,this.context)),(this.canvas.width!==this.frame.width||this.canvas.height!==this.frame.height)&&this.frame.setSize(this.canvas.width,this.canvas.height),this.renderer&&this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(this.canvas,this.frame.source.glTexture,!0),this.frame.glTexture=this.frame.source.glTexture),this.dirty=!1;var s=this.input;return s&&!s.customHitArea&&(s.hitArea.width=this.width,s.hitArea.height=this.height),this},generateTexture(i,t,s,c,C){var S=this.canvas;return c===void 0?c=S.width:c*=this.resolution,C===void 0?C=S.height:C*=this.resolution,ly(this.scene,S,i,t,s,c,C),this},loadTexture(i,t){var s=this.scene.sys.textures.getFrame(i,t);return s?(this.width!==s.cutWidth||this.height!==s.cutHeight?this.setSize(s.cutWidth,s.cutHeight):this.clear(),this.drawFrame(i,t),this.dirty=!0,this):this}};Zh();const Kp=Phaser.Display.Canvas.CanvasPool,DP=Phaser.GameObjects.GameObject;let qn=class extends DP{constructor(t,s,c,C,S){s===void 0&&(s=0),c===void 0&&(c=0),C===void 0&&(C=1),S===void 0&&(S=1),super(t,"rexCanvas"),this.renderer=t.sys.game.renderer,this.resolution=1,this._width=C,this._height=S,C=Math.max(Math.ceil(C*this.resolution),1),S=Math.max(Math.ceil(S*this.resolution),1),this.canvas=Kp.create(this,C,S),this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this.dirty=!1,this.setPosition(s,c),this.setOrigin(.5,.5),this.initPipeline(),this.initPostPipeline(!0),this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.frame.source.resolution=this.resolution,this.renderer&&this.renderer.gl&&(this.renderer.deleteTexture(this.frame.source.glTexture),this.frame.source.glTexture=null),this.dirty=!0}preDestroy(){Kp.remove(this.canvas),this.texture.destroy(),this.canvas=null,this.context=null}get width(){return this._width}set width(t){this.setSize(t,this._height)}get height(){return this._height}set height(t){this.setSize(this._width,t)}setCanvasSize(t,s){return this._width===t&&this._height===s?this:(this._width=t,this._height=s,this.updateDisplayOrigin(),t=Math.max(Math.ceil(t*this.resolution),1),s=Math.max(Math.ceil(s*this.resolution),1),this.canvas.width=t,this.canvas.height=s,this.frame.setSize(t,s),this.dirty=!0,this)}setSize(t,s){return this.setCanvasSize(t,s),this}get displayWidth(){return this.scaleX*this._width}set displayWidth(t){this.scaleX=t/this._width}get displayHeight(){return this.scaleY*this._height}set displayHeight(t){this.scaleY=t/this._height}
6286setDisplaySize(t,s){return this.displayWidth=t,this.displayHeight=s,this}getCanvas(t){return t||(this.dirty=!0),this.canvas}getContext(t){return t||(this.dirty=!0),this.context}needRedraw(){return this.dirty=!0,this}resize(t,s){return this.setSize(t,s),this}};const yi=Phaser.GameObjects.Components;Phaser.Class.mixin(qn,[yi.Alpha,yi.BlendMode,yi.Crop,yi.Depth,yi.Flip,yi.GetBounds,yi.Mask,yi.Origin,yi.Pipeline,yi.PostPipeline,yi.ScrollFactor,yi.Tint,yi.Transform,yi.Visible,OP,FP,IP]);const BP=Phaser.Utils.String.Pad;var Yt=function(i,t,s){if(i==null)return i;switch(typeof i){case"string":return i;case"number":return`#${BP(Math.floor(i).toString(16),6,"0",1)}`;case"function":return i(t,s);case"object":return i.hasOwnProperty("r")?i.hasOwnProperty("a")?`rgba(${i.r},${i.g},${i.b},${i.a})`:`rgb(${i.r},${i.g},${i.b})`:i.hasOwnProperty("h")?i.hasOwnProperty("a")?`hsla(${i.h},${i.s},${i.l},${i.a})`:`hsl(${i.h},${i.s},${i.l})`:i;default:return i}};const Zp=Phaser.Math.DegToRad;var hy=function(i,t,s,c,C,S,l){var T=new ry(t,s,c,C,S),e=T.minWidth,d=T.minHeight,g=c>=e?1:c/e,r=C>=d?1:C/d,a=T.cornerRadius,h,n,o,f,u,v,m;i.save(),i.beginPath(),i.translate(t,s),h=a.tl,Ml(h)?(n=h.x*g,o=h.y*r,bl(h)?(f=n,u=o,Sn(i,f,u,n,o,180,270,!1,l)):(f=0,u=0,Sn(i,f,u,n,o,90,0,!0,l)),v=0,m=o):(i.lineTo(0,0),v=0,m=0),h=a.tr,Ml(h)?(n=h.x*g,o=h.y*r,bl(h)?(f=c-n,u=o,Sn(i,f,u,n,o,270,360,!1,l)):(f=c,u=0,Sn(i,f,u,n,o,180,90,!0,l))):i.lineTo(c,0),h=a.br,Ml(h)?(n=h.x*g,o=h.y*r,bl(h)?(f=c-n,u=C-o,Sn(i,f,u,n,o,0,90,!1,l)):(f=c,u=C,Sn(i,f,u,n,o,270,180,!0,l))):i.lineTo(c,C),h=a.bl,Ml(h)?(n=h.x*g,o=h.y*r,bl(h)?(f=n,u=C-o,Sn(i,f,u,n,o,90,180,!1,l)):(f=0,u=C,Sn(i,f,u,n,o,360,270,!0,l))):i.lineTo(0,C),i.lineTo(v,m),i.closePath(),i.restore()},bl=function(i){return!i.hasOwnProperty("convex")||i.convex},Ml=function(i){return i.x>0&&i.y>0},Sn=function(i,t,s,c,C,S,l,T,e){if(T&&l>S?l-=360:!T&&l<S&&(l+=360),S=Zp(S),l=Zp(l),e==null)i.ellipse(t,s,c,C,0,S,l,T);else{e+=1;for(var d,g,r,a=(l-S)/e,h=0;h<=e;h++)r=S+a*h,d=t+c*Math.cos(r),g=s+C*Math.sin(r),i.lineTo(d,g)}},kP=function(i,t,s,c,C,S,l,T,e,d,g,r,a){if(hy(t,s,c,C,S,l,a),T!=null){if(g!=null){var h;r?h=t.createLinearGradient(0,0,C,0):h=t.createLinearGradient(0,0,0,S),h.addColorStop(0,T),h.addColorStop(1,g),T=h}t.fillStyle=T,t.fill()}e!=null&&d>0&&(t.strokeStyle=e,t.lineWidth=d,t.stroke())},Lf=function(i,t,s,c,C,S,l,T){if(!(t==null&&s==null)){var e=i.canvas.width,d=i.canvas.height;s==null&&(c=0);var g=c/2;e=Math.max(1,e-c),d=Math.max(1,d-c),kP(i.canvas,i.context,g,g,e,d,C,t,s,c,S,l,T)}},GP=function(){Lf(this,this.fillStyle,this.strokeStyle,this.lineWidth,this.radius,this.fillColor2,this.isHorizontalGradient,this.iteration)};const Jp=Phaser.Utils.Objects.GetValue;let uy=class extends qn{constructor(t,s,c,C,S,l,T,e,d,g,r){s===void 0&&(s=0),c===void 0&&(c=0),C===void 0&&(C=1),S===void 0&&(S=C),l===void 0&&(l=0),super(t,s,c,C,S),this.type="rexRoundRectangleCanvas";var a=Jp(l,"radius",l),h=Jp(l,"iteration",void 0);this.setRadius(a),this.setIteration(h),this.setFillStyle(T,g,r),this.setStrokeStyle(e,d)}get radius(){return this._radius}set radius(t){this.dirty|=this._radius!=t,this._radius=t}setRadius(t){return this.radius=t,this}get iteration(){return this._iteration}set iteration(t){this.dirty|=this._iteration!=t,this._iteration=t}setIteration(t){return this.iteration=t,this}get fillStyle(){return this._fillStyle}set fillStyle(t){t=Yt(t,this.canvas,this.context),this.dirty|=this._fillStyle!=t,this._fillStyle=t}get fillColor2(){return this._fillColor2}set fillColor2(t){t=Yt(t,this.canvas,this.context),this.dirty|=this._fillColor2!=t,this._fillColor2=t}get isHorizontalGradient(){return this._isHorizontalGradient}set isHorizontalGradient(t){this.dirty|=this._isHorizontalGradient!=t,this._isHorizontalGradient=t}setFillStyle(t,s,c){return c===void 0&&(c=!0),this.fillStyle=t,this.fillColor2=s,this.isHorizontalGradient=c,this}get strokeStyle(){return this._strokeStyle}set strokeStyle(t){t=Yt(t,this.canvas,this.context),this.dirty|=this._strokeStyle!=t,this._strokeStyle=t}get lineWidth(){return this._lineWidth}set lineWidth(t){this.dirty|=this._lineWidth!=t,this._lineWidth=t}setStrokeStyle(t,s){return this.strokeStyle=t,this.lineWidth=s,this}updateTexture(){return this.clear(),GP.call(this),super.updateTexture(),this}};xt.register("roundRectangleCanvas",function(i,t,s,c,C,S,l,T,e,d){var g=new uy(this.scene,i,t,s,c,C,S,l,T,e,d);return this.scene.add.existing(g),g});mt(window,"RexPlugins.UI.RoundRectangleCanvas",uy);/** 6287 * @author Richard Davey <[email protected]> 6288 * @copyright 2019 Photon Storm Ltd. 6289 * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} 6290 */var NP=Phaser.Renderer.WebGL.Utils,VP=function(i,t,s,c){if(!(t.width===0||t.height===0)){s.addToRenderList(t);var C=t.frame,S=C.width,l=C.height,T=NP.getTintAppendFloatAlpha,e=i.pipelines.set(t.pipeline,t),d=e.setTexture2D(C.glTexture,t);i.pipelines.preBatch(t),e.batchTexture(t,C.glTexture,S,l,t.x,t.y,S/t.style.resolution,l/t.style.resolution,t.scaleX,t.scaleY,t.rotation,t.flipX,t.flipY,t.scrollFactorX,t.scrollFactorY,t.displayOriginX,t.displayOriginY,0,0,S,l,T(t.tintTopLeft,s.alph
6290a*t._alphaTL),T(t.tintTopRight,s.alpha*t._alphaTR),T(t.tintBottomLeft,s.alpha*t._alphaBL),T(t.tintBottomRight,s.alpha*t._alphaBR),t.tintFill,0,0,s,c,!1,d),i.pipelines.postBatch(t)}};/** 6291 * @author Richard Davey <[email protected]> 6292 * @copyright 2019 Photon Storm Ltd. 6293 * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} 6294 */var zP=function(i,t,s,c){t.width===0||t.height===0||(s.addToRenderList(t),i.batchSprite(t,t.frame,s,c))};const YP={renderWebGL:VP,renderCanvas:zP},od=Phaser.Display.Canvas.CanvasPool;var XP=function(i,t,s){s===void 0&&(s={});var c=od.create(this),C=c.getContext("2d",{willReadFrequently:!0});i.syncFont(c,C);var S=C.measureText(t),l=Math.ceil(S.width*i.baselineX),T=l,e=2*T;if(T=T*i.baselineY|0,c.width=l,c.height=e,C.fillStyle="#f00",C.fillRect(0,0,l,e),C.font=i._font,C.textBaseline="alphabetic",C.fillStyle="#000",C.fillText(i.testString,0,T),s.left=0,l===0||e===0||!C.getImageData(0,0,l,e))return od.remove(c),s;for(var d=C.getImageData(0,0,l,e).data,g=!1,r=0;r<l;r++){for(var a=0;a<e;a++){var h=(a*l+r)*4;if(d[h]!==255){s.left=r,g=!0;break}}if(g)break}return od.remove(c),s};Zh();const UP=Phaser.GameObjects.GameObject;class dy extends UP{setStyle(t){return this.style.setStyle(t)}setFont(t){return this.style.setFont(t)}setFontFamily(t){return this.style.setFontFamily(t)}setFontSize(t){return this.style.setFontSize(t)}setFontStyle(t){return this.style.setFontStyle(t)}setTestString(t){return this.style.setTestString(t)}setFixedSize(t,s){return this.style.setFixedSize(t,s)}setBackgroundColor(t,s,c){return this.style.setBackgroundColor(t,s,c)}setBackgroundStrokeColor(t,s){return this.style.setBackgroundStrokeColor(t,s)}setBackgroundCornerRadius(t,s){return this.style.setBackgroundCornerRadius(t,s)}setFill(t){return this.style.setFill(t)}setColor(t){return this.style.setColor(t)}setStroke(t,s){return this.style.setStroke(t,s)}setShadow(t,s,c,C,S,l){return this.style.setShadow(t,s,c,C,S,l)}setShadowOffset(t,s){return this.style.setShadowOffset(t,s)}setShadowColor(t){return this.style.setShadowColor(t)}setShadowBlur(t){return this.style.setShadowBlur(t)}setShadowStroke(t){return this.style.setShadowStroke(t)}setShadowFill(t){return this.style.setShadowFill(t)}setWrapMode(t){return this.style.setWrapMode(t)}setWrapWidth(t){return this.style.setWrapWidth(t)}setWordWrapWidth(t){return this.style.setWrapWidth(t)}setAlign(t){return this.style.setHAlign(t)}setHAlign(t){return this.style.setHAlign(t)}setVAlign(t){return this.style.setVAlign(t)}setLineSpacing(t){return this.style.setLineSpacing(t)}set lineSpacing(t){this.setLineSpacing(t)}get lineSpacing(){return this.style.lineSpacing}setXOffset(t){return this.style.setXOffset(t)}setMaxLines(t){return this.style.setMaxLines(t)}setResolution(t){return this.style.setResolution(t)}getTextMetrics(){return this.style.getTextMetrics()}setTextMetrics(t,s){return this.style.setTextMetrics(t,s)}measureTextMargins(t,s){return XP(this.style,t,s)}}const vi=Phaser.GameObjects.Components;Phaser.Class.mixin(dy,[vi.Alpha,vi.BlendMode,vi.ComputedSize,vi.Crop,vi.Depth,vi.Flip,vi.GetBounds,vi.Mask,vi.Origin,vi.Pipeline,vi.PostPipeline,vi.ScrollFactor,vi.Tint,vi.Transform,vi.Visible,YP]);var WP={backgroundColor:["backgroundColor",null,Yt],backgroundColor2:["backgroundColor2",null,Yt],backgroundHorizontalGradient:["backgroundHorizontalGradient",!0,null],backgroundStrokeColor:["backgroundStrokeColor",null,Yt],backgroundStrokeLineWidth:["backgroundStrokeLineWidth",2,null],backgroundCornerRadius:["backgroundCornerRadius",0,null],backgroundCornerIteration:["backgroundCornerIteration",null,null],fontFamily:["fontFamily","Courier",null],fontSize:["fontSize","16px",null],fontStyle:["fontStyle","",null],color:["color","#fff",Yt],stroke:["stroke","#fff",Yt],strokeThickness:["strokeThickness",0,null],shadowOffsetX:["shadow.offsetX",0,null],shadowOffsetY:["shadow.offsetY",0,null],shadowColor:["shadow.color","#000",Yt],shadowBlur:["shadow.blur",0,null],shadowStroke:["shadow.stroke",!1,null],shadowFill:["shadow.fill",!1,null],underlineColor:["underline.color","#000",Yt],underlineThickness:["underline.thickness",0,null],underlineOffset:["underline.offset",0,null],strikethroughColor:["strikethrough.color","#000",Yt],strikethroughThickness:["strikethrough.thickness",0,null],strikethroughOffset:["strikethrough.offset",0,null],halign:["halign","left",null],valign:["valign","top",null],maxLines:["maxLines",0,null],fixedWidth:["fixedWidth",0,null],fixedHeight:["fixedHeight",0,null],resolution:["resolution",0,null],lineSpacing:["lineSpacing",0,null],xOffset:["xOffset",0,null],rtl:["rtl",!1,null],testString:["testString","|MÃâ°qgy",null],baselineX:["baselineX",1.2,null],baselineY:["baselineY",1.4,null],wrapMode:["wrap.mode",0,null],wrapWidth:["wrap.width",0,null],wrapCallback:["wrap.callback",null],wrapCallbackScope:["wrap.callbackScope",null]};/** 6295 * @author Richard Davey <[email protected]> 6296 * @copyright 2018 Photon Storm Ltd. 6297 * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} 6298 */const wl=Phaser.Display.Canvas.CanvasPool;var Qp=function(i){var t=wl.create(this),s=t.getContext("2d",{willReadFrequently:!0});i.syncFont(t,s);var c=s.measureText(i.testString);if("actualBoundingBoxAscent"in c){var C=c.actualBoundingBoxAscent,S=c.actualBoundingBoxDescent,d={ascent:C,descent:S,fontSize:C+S};return wl.remove(t),d}var l=Math.ceil(c.width*i.baselineX),T=l,e=2*T;T=T*i.baselineY|0,t.width=l,t.height=e,s.fillStyle="#f00",s.fillRect(0,0,l,e),s.font=i._font,s.textBaseline="alphabetic",s.fillStyle="#000",s.fillText(i.testString,0,T);var d={ascent:0,descent:0,fontSize:0};if(!s.getImageData(0,0,l,e))return d.ascent=T,d.descent=T+6,d.fontSize=d.ascent+d.descent,wl.remove(t),d;var g=s.getImageData(0,0,l,e).data,r=g.length,a=l*4,h,n,o=0,f=!1;for(h=0;h<T;h++){for(n=0;n<a;n+=4)if(g[o+n]!==255){f=!0;break}if(!f)o+=a;else break}for(d.ascent=T-h,o=r-a,f=!1,h=e;h>T;h--){for(n=0;n<a;n+=4)if(g[o+n]!==255){f=!0;break}if(!f)o-=a;else break}return d.descent=h-T,d.fontSize=d.ascent+d.descent,wl.remove(t),d}
6298,je={NO_NEWLINE:0,RAW_NEWLINE:1,WRAPPED_NEWLINE:2,NO_WRAP:0,WORD_WRAP:1,CHAR_WRAP:2,SPLITREGEXP:/(?:\r\n|\r|\n)/};const HP=Phaser.Utils.Objects.GetAdvancedValue,Li=Phaser.Utils.Objects.GetValue;let Ff=class{constructor(t,s,c){this.parent=t,c===void 0&&(c=WP),this.propertyMap=c,this.backgroundColor,this.backgroundColor2,this.backgroundHorizontalGradient,this.backgroundStrokeColor,this.backgroundStrokeLineWidth,this.backgroundCornerRadius,this.backgroundCornerIteration,this.fontFamily,this.fontSize,this.fontStyle,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.underlineColor,this.underlineThickness,this.underlineOffset,this.strikethroughColor,this.strikethroughThickness,this.strikethroughOffset,this.halign,this.valign,this.maxLines,this.fixedWidth,this.fixedHeight,this.resolution,this.lineSpacing,this.xOffset,this.rtl,this.testString,this.baselineX,this.baselineY,this.wrapMode,this.wrapWidth,this.wrapCallback,this.wrapCallbackScope,this._font,this.setStyle(s,!1,!0)}get isWrapFitMode(){return this.fixedWidth>0&&this.wrapMode!==je.NO_WRAP&&this.wrapWidth===0}setStyle(t,s,c){if(s===void 0&&(s=!0),c===void 0&&(c=!1),t&&t.hasOwnProperty("wrap")){var C=t.wrap;if(C.hasOwnProperty("mode")){var S=C.mode;typeof S=="string"&&(C.mode=qp[S])}else C.hasOwnProperty("width")&&(C.mode=1)}t&&t.rtl&&c&&!t.hasOwnProperty("halign")&&(t.halign="right"),t&&t.hasOwnProperty("fontSize")&&typeof t.fontSize=="number"&&(t.fontSize=t.fontSize.toString()+"px");var l=this.propertyMap;for(var T in l){var e=l[T],d=e[0],g=c?e[1]:this[T],r=e[2];if(T==="wrapCallback"||T==="wrapCallbackScope")this[T]=Li(t,d,g);else{var a=HP(t,d,g);r&&(a=r(a)),this[T]=a}}var h=Li(t,"font",null);h===null?this._font=this.fontStyle+" "+this.fontSize+" "+this.fontFamily:this._font=h;var n=Li(t,"fill",null);n!==null&&(this.color=Yt(n));var o=Li(t,"metrics",!1);return o?this.metrics={ascent:Li(o,"ascent",0),descent:Li(o,"descent",0),fontSize:Li(o,"fontSize",0)}:(s||!this.metrics)&&(this.metrics=Qp(this)),s?this.parent.updateText():this.parent}syncFont(t,s){s.font=this._font}syncStyle(t,s){s.textBaseline="alphabetic",s.fillStyle=this.color,s.strokeStyle=this.stroke,s.lineWidth=this.strokeThickness,s.lineCap="round",s.lineJoin="round"}syncShadow(t,s){s?(t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY,t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur):(t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowColor=0,t.shadowBlur=0)}update(t){return t&&(this._font=`${this.fontStyle} ${this.fontSize} ${this.fontFamily}`.trim(),this.metrics=Qp(this)),this.parent.updateText(t)}buildFont(){var t=`${this.fontStyle} ${this.fontSize} ${this.fontFamily}`.trim();return t!==this._font&&(this._font=t),this}setFont(t){return typeof t=="string"?(this.fontFamily=t,this.fontSize="",this.fontStyle=""):(this.fontFamily=Li(t,"fontFamily","Courier"),this.fontSize=Li(t,"fontSize","16px"),this.fontStyle=Li(t,"fontStyle","")),this.update(!0)}setFontFamily(t){return this.fontFamily=t,this.update(!0)}setFontStyle(t){return this.fontStyle=t,this.update(!0)}setFontSize(t){return typeof t=="number"&&(t=t.toString()+"px"),this.fontSize=t,this.update(!0)}setTestString(t){return this.testString=t,this.update(!0)}setFixedSize(t,s){return this.fixedWidth=t,this.fixedHeight=s,t&&(this.parent.width=t),s&&(this.parent.height=s),this.update(this.isWrapFitMode)}setResolution(t){return this.resolution=t,this.update(!1)}setLineSpacing(t){return this.lineSpacing=t,this.update(!1)}setXOffset(t){return this.xOffset=t,this.update(!1)}setBackgroundColor(t,s,c){return c===void 0&&(c=!0),this.backgroundColor=Yt(t,this.parent.canvas,this.parent.context),this.backgroundColor2=Yt(s,this.parent.canvas,this.parent.context),this.backgroundHorizontalGradient=c,this.update(!1)}setBackgroundStrokeColor(t,s){return this.backgroundStrokeColor=Yt(t,this.parent.canvas,this.parent.context),this.backgroundStrokeLineWidth=s,this.update(!1)}setBackgroundCornerRadius(t,s){return this.backgroundCornerRadius=t,this.backgroundCornerIteration=s,this.update(!1)}setFill(t){return this.color=Yt(t,this.parent.canvas,this.parent.context),this.update(!1)}setColor(t){return this.color=Yt(t,this.parent.canvas,this.parent.context),this.update(!1)}setStroke(t,s){return t===void 0?this.strokeThickness=0:(s===void 0&&(s=this.strokeThickness),this.stroke=Yt(t,this.parent.canvas,this.parent.context),this.strokeThickness=s),this.update(!0)}setShadow(t,s,c,C,S,l){return t===void 0&&(t=0),s===void 0&&(s=0),c===void 0&&(c="#000"),C===void 0&&(C=0),S===void 0&&(S=!1),l===void 0&&(l=!0),this.shadowOffsetX=t,this.shadowOffsetY=s,this.shadowColor=Yt(c,this.parent.canvas,this.parent.context),this.shadowBlur=C,this.shadowStroke=S,this.shadowFill=l,this.update(!1)}setShadowOffset(t,s){return t===void 0&&(t=0),s===void 0&&(s=t),this.shadowOffsetX=t,this.shadowOffsetY=s,this.update(!1)}setShadowColor(t){return t===void 0&&(t="#000"),this.shadowColor=Yt(t,this.parent.canvas,this.parent.context),this.update(!1)}setShadowBlur(t){return t===void 0&&(t=0),this.shadowBlur=t,this.update(!1)}setShadowStroke(t){return this.shadowStroke=t,this.update(!1)}setShadowFill(t){return this.shadowFill=t,this.update(!1)}setUnderline(t,s,c){return t===void 0&&(t="#000"),s===void 0&&(s=0),c===void 0&&(c=0),this.underlineColor=Yt(t,this.parent.canvas,this.parent.context),this.underlineThickness=s,this.underlineOffset=c,this.update(!1)}setUnderlineColor(t){return t===void 0&&(t="#000"),this.underlineColor=Yt(t,this.parent.canvas,this.parent.context),this.update(!1)}setUnderlineThickness(t){return t===void 0&&(t=0),this.underlineThickness=t,this.update(!1)}setUnderlineOffset(t){return t===void 0&&(t=0),this.underlineOffset=t,this.update(!1)}setStrikethrough(t,s,c){return t===void 0&&(t="#000"),s===void 0&&(s=0),c===void 0&&(c=0),this.strikethroughColor=Yt(t,this.parent.canvas,this.parent.context),this.strikethroughThickness=s,this.strikethroughOffset=c,this.update(!1)}setStrikethroughColor(t){return t===void 0&&(t="#000"),this.strikethroughColor=Yt(t,this.parent.canvas,this.parent.context),this.update(!1)}setStrikethroughThickness(t){return t===void 0&&(t=0),this.strikethroughThickness=t,this.update(!1)}setStrikethroughOffset(t){return t===void 0&&(t=0),this.strikethroughOffset=t,this.update(!1)}setWrapMode(t){return typeof t=="string"&&(t=qp[t.toLowerCase()]||0),this.wrapMode=t,this.update(!0)}setWrapWidth(t){return this.wrapWidth=t,this.update(!1)}setAlign(t,s){return t===void 0&&(t="left"),s===void 0&&(s="top"),this.halign=t,this.valign=s,this.update(!1)}setHAlign(t){return t===void 0&&(t="left"),this.halign=t,this.update(!1)}setVAlign(t){return t===void 0&&(t="top"),this.valign=t,this.update(!1)}setMaxLines(t){return t===void 0&&(t=0),this.maxLines=t,this.update(!1)}getTextMetrics(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}}setTextMetrics(t,s){return this.metrics.ascent=t.ascent,this.metrics.descent=t.descent,this.metrics.fontSize=t.fontSize,s&&(typeof s=="string"?(this.fontFamily=s,this.fontSize="",this.fontStyle=""):(this.fontFamily=Li(s,"fontFamily",this.fontFamily),this.fontSize=Li(s,"fontSize",this.fontSize),this.fontStyle=Li(s,"fontStyle",this.fontStyle))),this.parent.updateText(!0)}get lineHeight(){return this.metrics.fontSize+this.strokeThickness+this.lineSpacing}toJSON(){var t={},s=this.propertyMap;for(var c in s)t[c]=this[c];return t.metrics=this.getTextMetrics(),t}destroy(){this.parent=void 0}};const qp={none:je.NO_WRAP,word:je.WORD_WRAP,char:je.CHAR_WRAP,character:je.CHAR_WRAP},$P={draw(i,t,s,c){var C=this.penManager;this.hitAreaManager.clear();var S=this.context;S.save();var l=this.defaultStyle;this.clear(),Lf(this,l.backgroundColor,l.backgroundStrokeColor,l.backgroundStrokeLineWidth,l.backgroundCornerRadius,l.backgroundColor2,l.backgroundHorizontalGradient,l.backgroundCornerIteration),i+=this.startXOffset,t+=this.startYOffset;var T=l.halign,e=l.valign,d,g=l.lineHeight,r=C.lines,a=r.length,h=l.maxLines,n,o,f;h>0&&a>h?(n=h,e==="center"?o=Math.floor((a-n)/2):e==="bottom"?o=a-n:o=0):(n=a,o=0),f=o+n;var u,v,m=this.rtl,p=m?this.parent.width:void 0;e==="center"?v=Math.max((c-n*g)/2,0):e==="bottom"?v=Math.max(c-n*g-2,0):v=0,v+=t;
6298for(var x=o;x<f;x++)if(d=C.getLineWidth(x),d!==0){for(var y=r[x],P=y.length,b=T,E=0;E<P;E++){var M=y[E].prop.align;if(M!==void 0){b=M;break}}b==="center"?u=(s-d)/2:b==="right"?u=m?0:s-d:u=m?s-d:0,u+=i;for(var E=0;E<P;E++)this.drawPen(y[E],u,v,p)}S.restore()},drawPen(i,t,s,c){t+=i.x,s+=i.y+(i.prop.y||0),c!==void 0&&(t=c-t);var C=this.canvas,S=this.context;S.save();var l=this.parser.propToContextStyle(this.defaultStyle,i.prop);if(l.buildFont(),l.syncFont(C,S),l.syncStyle(C,S),l.underlineThickness>0&&i.width>0){var T=s+l.underlineOffset-l.underlineThickness/2;this.drawLine(t,T,i.width,l.underlineThickness,l.underlineColor,l)}if(i.isTextPen&&this.drawText(t,s,i.text,l),i.isImagePen&&this.drawImage(t,s,i.prop.img,l),l.strikethroughThickness>0&&i.width>0){var T=s+l.strikethroughOffset-l.strikethroughThickness/2;this.drawLine(t,T,i.width,l.strikethroughThickness,l.strikethroughColor,l)}if(S.restore(),i.hasAreaMarker&&i.width>0){var e,d=i.prop.area;if(d)e={key:d};else{var g=i.prop.url;e={key:`url:${g}`,url:g}}this.hitAreaManager.add(t,s-this.startYOffset,i.width,this.defaultStyle.lineHeight,e)}},clear(){var i=this.canvas;this.context.clearRect(0,0,i.width,i.height)},drawLine(i,t,s,c,C,S){this.autoRound&&(i=Math.round(i),t=Math.round(t));var l=this.context;S.syncShadow(l,S.shadowStroke);var T=l.lineCap;l.lineCap="butt",l.strokeStyle=C,l.lineWidth=c,l.beginPath(),l.moveTo(i,t),l.lineTo(i+s,t),l.stroke(),l.lineCap=T},drawText(i,t,s,c){this.autoRound&&(i=Math.round(i),t=Math.round(t));var C=this.context;c.stroke&&c.stroke!=="none"&&c.strokeThickness>0&&(c.syncShadow(C,c.shadowStroke),C.strokeText(s,i,t)),c.color&&c.color!=="none"&&(c.syncShadow(C,c.shadowFill),C.fillText(s,i,t))},drawImage(i,t,s,c){t-=this.startYOffset,this.parent.imageManager.draw(s,this.context,i,t,this.autoRound)}},pr=Phaser.Utils.Objects.GetValue,jP=je.NO_NEWLINE,_p=je.RAW_NEWLINE;class KP{constructor(t){this.prop={},this.resetFromJSON(t)}resetFromJSON(t){this.text=pr(t,"text",""),this.x=pr(t,"x",0),this.y=pr(t,"y",0),this.width=pr(t,"width",0);var s=pr(t,"prop",null);s===null&&(s={}),this.prop=s,this.newLineMode=pr(t,"newLineMode",0),this.startIndex=pr(t,"startIndex",0)}get plainText(){var t=this.text;return this.newLineMode===_p&&(t+=` 6299`),t}get wrapText(){var t=this.text;return this.newLineMode!==jP&&(t+=` 6300`),t}get rawTextLength(){var t=this.text.length;return this.newLineMode===_p&&(t+=1),t}get endIndex(){return this.startIndex+this.rawTextLength}get lastX(){return this.x+this.width}get isTextPen(){return this.text!==""}get isImagePen(){return!!this.prop.img}get hasAreaMarker(){return!!this.prop.area||!!this.prop.url}}var Kn=function(i,t){var s=Array.isArray(i);if(t===void 0?t=s?[]:{}:un(t),s){t.length=i.length;for(var c=0,C=i.length;c<C;c++)t[c]=i[c]}else for(var S in i)t[S]=i[S];return t};const tm=Phaser.Utils.Objects.GetFastValue,em=je.NO_NEWLINE,ZP=je.WRAPPED_NEWLINE;class If{constructor(t){this.pens=[],this.lines=[],this.maxLinesWidth=void 0,this.pensPool=t.pensPool,this.linesPool=t.linesPool,this.tagToText=tm(t,"tagToText",ci),this.tagToTextScope=tm(t,"tagToTextScope",void 0)}destroy(){this.clear(),this.tagToText=void 0,this.tagToTextScope=void 0}clear(){for(var t=0,s=this.lines.length;t<s;t++)this.lines[t].length=0;this.pensPool.pushMultiple(this.pens),this.linesPool.pushMultiple(this.lines),this.maxLinesWidth=void 0}addTextPen(t,s,c,C,S,l){var T=this.pensPool.pop();return T==null&&(T=new KP),mr.text=t,mr.x=s,mr.y=c,mr.width=C,mr.prop=S,mr.newLineMode=l,T.resetFromJSON(mr),this.addPen(T),this}addImagePen(t,s,c,C){return this.addTextPen("",t,s,c,C,em),this}addNewLinePen(){var t=this.lastPen,s=t?t.lastX:0,c=t?t.y:0,C=t?Kn(t.prop):null;return this.addTextPen("",s,c,0,C,ZP),this}addPen(t){var s=this.lastPen;s==null?t.startIndex=0:t.startIndex=s.endIndex,this.pens.push(t);var c=this.lastLine;c==null&&(c=this.linesPool.pop()||[],this.lines.push(c)),c.push(t),t.newLineMode!==em&&(c=this.linesPool.pop()||[],this.lines.push(c)),this.maxLinesWidth=void 0}clone(t){t==null&&(t=new If),t.clear();for(var s=0,c=this.lines.length;s<c;s++)for(var C=this.lines[s],S=0,l=C.length;S<l;S++){var T=C[S];t.addPen(T.text,T.x,T.y,T.width,Kn(T.prop),T.newLineMode)}return t}get lastPen(){return this.pens[this.pens.length-1]}get lastLine(){return this.lines[this.lines.length-1]}getLineStartIndex(t){if(t>=this.lines.length)return this.getLineEndIndex(t);var s=this.lines[t];return s&&s[0]?s[0].startIndex:0}getLineEndIndex(t){t>=this.lines.length&&(t=this.lines.length-1);var s,c=!1,C;for(s=t;s>=0&&(C=this.lines[s],c=C!=null&&C.length>0,!c);s--);if(!c)return 0;var S=C[C.length-1];return S.endIndex}getLineWidth(t){var s=this.lines[t];if(!s)return 0;var c=s[s.length-1];if(c==null)return 0;var C=c.lastX;return C}getMaxLineWidth(){if(this.maxLinesWidth!==void 0)return this.maxLinesWidth;for(var t,s=0,c=0,C=this.lines.length;c<C;c++)t=this.getLineWidth(c),t>s&&(s=t);return this.maxLinesWidth=s,s}getLineWidths(){for(var t=[],s=0,c=this.lines.length;s<c;s++)t.push(this.getLineWidth(s));return t}get linesCount(){return this.lines.length}get plainText(){for(var t="",s=this.pens,c=0,C=s.length;c<C;c++)t+=s[c].plainText;return t}get rawTextLength(){for(var t=0,s=this.pens,c=0,C=this.pens.length;c<C;c++)t+=s[c].rawTextLength;return t}getSliceTagText(t,s,c){var C=this.lastPen;if(C==null)return"";var S=C.endIndex;(t===void 0||t===0)&&(t=-1),(s===void 0||s===S)&&(s=S+1),c===void 0&&(c=!1);for(var l="",T,e,d,g,r,a,h,n=0,o=this.pens.length;n<o&&(T=this.pens[n],g=T.endIndex,!(!(g<=t)&&(T=this.pens[n],e=c?T.wrapText:T.plainText,a=T.prop,d=T.startIndex,r=d>=t&&g<=s,r||(e=e.substring(t-d,s-d)),this.tagToTextScope?l+=this.tagToText.call(this.tagToTextScope,e,a,h):l+=this.tagToText(e,a,h),h=a,g>=s)));n++);return l}get length(){return this.lines.length}set length(t){this.clear()}}var mr={};const JP=Phaser.Geom.Rectangle;var im=new zs;class QP{constructor(){this.hitAreas=[]}destroy(){this.clear()}clear(){for(var t=0,s=this.hitAreas.length;t<s;t++)un(this.hitAreas[t].data);
6300return im.pushMultiple(this.hitAreas),this}add(t,s,c,C,S){var l=im.pop();return l===null?l=new JP(t,s,c,C):l.setTo(t,s,c,C),l.data=S,this.hitAreas.push(l),this}getFirst(t,s){for(var c=0,C=this.hitAreas.length;c<C;c++){var S=this.hitAreas[c];if(S.contains(t,s))return S}return null}getByKey(t){for(var s=0,c=this.hitAreas.length;s<c;s++){var C=this.hitAreas[s];if(C.data.key===t)return C}return null}drawBounds(t,s,c){s===void 0&&(s=16777215),c&&t.save().scaleCanvas(c.scaleX,c.scaleY).rotateCanvas(c.rotation).translateCanvas(c.x,c.y);for(var C=0,S=this.hitAreas.length;C<S;C++){var l=this.hitAreas[C];t.lineStyle(1,s).strokeRect(l.x,l.y,l.width,l.height)}return c&&t.restore(),this}}var qP=function(){this.parent.on("pointerdown",_P,this).on("pointerup",tb,this).on("pointermove",ld,this).on("pointerover",ld,this).on("pointerout",function(i,t){ld.call(this,i,null,null,t)},this)},_P=function(i,t,s,c){var C=this.hitAreaManager.getFirst(t,s);if(C!==null){var S=C.data.key;La.call(this,"areadown",S,i,t,s,c),C.data.isDown=!0}},tb=function(i,t,s,c){var C=this.hitAreaManager.getFirst(t,s);if(C!==null){var S=C.data,l=S.key;
6300if(La.call(this,"areaup",l,i,t,s,c),S.isDown){La.call(this,"areaclick",l,i,t,s,c);var T=S.url;T&&window.open(T,"_blank")}S.isDown=!1}},ld=function(i,t,s,c){if(t===null){this.lastHitAreaKey!==null&&(La.call(this,"areaout",this.lastHitAreaKey,i,t,s,c),this.hitAreaManager.getByKey(this.lastHitAreaKey).isDown=!1,this.lastHitAreaKey=null);return}var C=this.hitAreaManager.getFirst(t,s),S=C?C.data.key:null;if(this.lastHitAreaKey!==S){if(this.lastHitAreaKey!==null){La.call(this,"areaout",this.lastHitAreaKey,i,t,s,c);var l=this.hitAreaManager.getByKey(this.lastHitAreaKey);this.urlTagCursorStyle&&l.data.url&&(this.scene.input.manager.canvas.style.cursor=""),l.isDown=!1}S!==null&&(La.call(this,"areaover",S,i,t,s,c),this.urlTagCursorStyle&&C.data.url&&(this.scene.input.manager.canvas.style.cursor=this.urlTagCursorStyle)),this.lastHitAreaKey=S}},La=function(i,t,s,c,C,S){this.parent.emit(`${i}-${t}`,s,c,C,S),this.parent.emit(i,t,s,c,C,S)};const eb=je.NO_NEWLINE,ib=je.RAW_NEWLINE,hd=je.WRAPPED_NEWLINE,sm=je.NO_WRAP,sb=je.WORD_WRAP,nb=je.CHAR_WRAP,rb=je.SPLITREGEXP;var cy=function(i,t,s,c,C,S){c<=0&&(s=sm);var l=[];if(!i||!i.length)return l;for(var T=s===sm,e=s===sb,d=i.split(rb),g,r,a,h=0,n=d.length;h<n;h++){if(g=d[h],a=h===n-1?eb:ib,T){var o=t(g);l.push(S.getLine(g,o,a));continue}if(r=h===0?c-C:c,g.length<=100){var o=t(g);if(o<=r){l.push(S.getLine(g,o,a));continue}}var f,u;e?(f=g.split(" "),u=f[f.length-1]==="",u&&(f.length-=1)):f=g;for(var v,m,p,x="",y=0,P,b=e?t(" "):void 0,E=0,M=f.length;E<M;E++){if(v=f[E],m=t(v),p=E===M-1,e&&(!p||u)&&(v+=" ",m+=b),e&&m>c){x!==""?l.push(S.getLine(x,y,hd)):E===0&&C>0&&l.push(S.getLine("",0,hd)),l.push(...cy(v,t,nb,c,0,S));var w=l.pop();x=w.text,y=w.width,S.freeLine(w),x===" "&&(x="",y=0);continue}P=y+m,P>r?(l.push(S.getLine(x,y,hd)),x=v,y=m,r=c):(x+=v,y=P),p&&l.push(S.getLine(x,y,a))}}return l};const ud=Phaser.Utils.Objects.GetValue,ab=je.NO_WRAP,ob=je.NO_NEWLINE;class fy{constructor(t){this.parent=t.parent,this.scene=this.parent.scene,this.context=ud(t,"context",null),this.canvas=this.context.canvas,this.parser=ud(t,"parser",null),this.defaultStyle=ud(t,"style",null),this.autoRound=!0,this.pensPool=t.pensPool,this.linesPool=t.linesPool,this.wrapTextLinesPool=t.wrapTextLinesPool,this.penManager=this.newPenManager(),this._tmpPenManager=null,this.hitAreaManager=new QP,this.lastHitAreaKey=null,this.urlTagCursorStyle=null;var s=this.context;this.getTextWidth=function(c){return s.measureText(c).width}}destroy(){this.parent=void 0,this.scene=void 0,this.context=void 0,this.canvas=void 0,this.parser=void 0,this.defaultStyle=void 0,this.penManager&&(this.penManager.destroy(),this.penManager=void 0),this._tmpPenManager&&(this._tmpPenManager.destroy(),this._tmpPenManager=void 0),this.hitAreaManager&&(this.hitAreaManager.destroy(),this.hitAreaManager=void 0),this.pensPool=void 0,this.linesPool=void 0,this.wrapTextLinesPool=void 0}updatePenManager(t,s,c,C,S){if(S===void 0&&(S=this.penManager),S.clear(),t==="")return S;var l=this.parent.style;if(l.isWrapFitMode){var T=this.parent.padding;c=l.fixedWidth-T.left-T.right}for(var e=this.canvas,d=this.context,g=function(O){return d.measureText(O).width},r=0,a=0,h=l.wrapCallback,n=l.wrapCallbackScope,o=!0,f,u,v,m=this.parser.splitText(t),p,x,y=this.wrapTextLinesPool,P=0,b=m.length;P<b;P++)if(p=this.parser.tagTextToProp(m[P],u),f=p.plainText,u=p.prop,u.img){var E=this.imageManager.getOuterWidth(u.img);c>0&&s!==ab&&c<r+E&&(S.addNewLinePen(),a+=C,r=0),S.addImagePen(r,a,E,Kn(u)),r+=E}else if(f!==""){if(d.save(),v=this.parser.propToContextStyle(this.defaultStyle,u),v.buildFont(),v.syncFont(e,d),v.syncStyle(e,d),!h)x=cy(f,g,s,c,r,y);
6300else{x=h.call(n,f,g,c,r),typeof x=="string"&&(x=x.split(` 6301`));for(var A,M=0,w=x.length;M<w;M++)A=x[M],typeof A=="string"?x[M]=y.getLine(A,g(A),M<w-1?2:0):o=!1}for(var A,M=0,w=x.length;M<w;M++)A=x[M],S.addTextPen(A.text,r,a,A.width,Kn(u),A.newLineMode),A.newLineMode!==ob?(r=0,a+=C):r+=A.width;o&&y.freeLines(x),x=null,d.restore()}for(var P=0,b=this.lines.length;P<b;P++){var R=this.lines[P],L=R[R.length-1];L&&(L.width+=this.parser.getStrokeThinkness(this.defaultStyle,L.prop))}return S}get startXOffset(){var t=this.defaultStyle;return t.strokeThickness/2+t.xOffset}get startYOffset(){var t=this.defaultStyle;return t.strokeThickness/2+t.metrics.ascent}get lines(){return this.penManager.lines}get desplayLinesCount(){var t=this.penManager.linesCount,s=this.defaultStyle.maxLines;return s>0&&t>s&&(t=s),t}get linesWidth(){return Math.ceil(this.penManager.getMaxLineWidth())}get linesHeight(){var t=this.desplayLinesCount,s=this.defaultStyle.lineHeight*t;return t>0&&(s-=this.defaultStyle.lineSpacing),s}get imageManager(){return this.parent.imageManager}get rtl(){return this.parent.style.rtl}newPenManager(){return new If({pensPool:this.pensPool,linesPool:this.linesPool,tagToText:this.parser.propToTagText,tagToTextScope:this.parser})}get tmpPenManager(){return this._tmpPenManager===null&&(this._tmpPenManager=this.newPenManager()),this._tmpPenManager}getPlainText(t,s,c){var C;if(t==null)C=this.penManager.plainText;else{var S=this.parser.splitText(t,1);C="";for(var l=0,T=S.length;l<T;l++)C+=S[l]}return(s!=null||c!=null)&&(s==null&&(s=0),c==null&&(c=C.length),C=C.substring(s,c)),C}getPenManager(t,s){if(t===void 0)return this.copyPenManager(s,this.penManager);s===void 0&&(s=this.newPenManager());var c=this.defaultStyle;return this.updatePenManager(t,c.wrapMode,c.wrapWidth,c.lineHeight,s),s}getText(t,s,c,C){if(t==null)return this.penManager.getSliceTagText(s,c,C);var S=this.tmpPenManager,l=this.defaultStyle;return this.updatePenManager(t,l.wrapMode,l.wrapWidth,l.lineHeight,S),S.getSliceTagText(s,c,C)}copyPenManager(t,s){return s===void 0&&(s=this.penManager),s.copy(t)}getTextWidth(t){return t===void 0&&(t=this.penManager),t.getMaxLineWidth()}getLastPen(t){return t===void 0&&(t=this.penManager),t.lastPen}}var lb={setInteractive:qP};Object.assign(fy.prototype,$P,lb);class nm extends zs{freeLine(t){if(t)return this.push(t),this}freeLines(t){if(t)return this.pushMultiple(t),this}getLine(t,s,c){var C=this.pop();return C===null&&(C={}),C.text=t,C.width=s,C.newLineMode=c,C}}const hb=Phaser.Utils.Objects.IsPlainObject,so=Phaser.Utils.Objects.GetValue;var dd=function(i,t){hb(i)?(t=i,i=t.key):t===void 0&&(t={key:i}),t.hasOwnProperty("key")||(t.key=i);var s=t.key,c=t.frame,C=t.width,S=t.height;if(C===void 0||S===void 0){var l=this.textureManager.getFrame(s,c),T=l?l.cutWidth:0,e=l?l.cutHeight:0;C===void 0&&S===void 0?(C=T,S=e):C===void 0?C=T*(S/e):S===void 0&&(S=e*(C/T))}this.images[i]={key:s,frame:c,width:C,height:S,y:so(t,"y",0),left:so(t,"left",0),right:so(t,"right",0),originX:so(t,"originX",0),originY:so(t,"originY",0)}},ub=function(i,t,s,c,C){var S=this.get(i),l=this.textureManager.getFrame(S.key,S.frame),T=S.width,e=S.height;s+=S.left-S.originX*T,c+=S.y-S.originY*e,C&&(s=Math.round(s),c=Math.round(c)),t.drawImage(l.source.image,l.cutX,l.cutY,l.cutWidth,l.cutHeight,s,c,T,e)};class Df{constructor(t){this.textureManager=t.sys.textures,this.images={}}destroy(){this.textureManager=void 0,this.images=void 0}add(t,s){if(typeof t=="string")dd.call(this,t,s);else if(Array.isArray(t))for(var c=t,C=0,S=c.length;C<S;C++)dd.call(this,c[C]);else{var c=t;for(var t in c)dd.call(this,t,c[t])}return this}has(t){return this.images.hasOwnProperty(t)}remove(t){return this.has(t)&&delete this.images[t],this}get(t){return this.has(t)||this.textureManager.exists(t)&&this.add(t),this.images[t]}getOuterWidth(t){var s=this.get(t);return s?s.width+s.left+s.right:0}getFrame(t){var s=this.get(t);return s?this.textureManager.getFrame(s.key,s.frame):void 0}hasTexture(t){return!!this.getFrame(t)}}var db={draw:ub};Object.assign(Df.prototype,db);var vy=function(i,t){!i&&i!==0&&(i=""),t===void 0&&(t=!0),Array.isArray(i)&&(i=i.join(` 6302`));var s;return t?s=`${this.text} 6303${i}`:s=`${this.text}${i}`,s!=this.text&&this.setText(s),this};
6303const cb=Phaser.Utils.Objects.IsPlainObject,rm=Phaser.DOM.AddToDOM,am=Phaser.Display.Canvas.CanvasPool,fb=Phaser.GameObjects.GameObject,Ci=Phaser.Utils.Objects.GetValue,vb=Phaser.DOM.RemoveFromDOM,pb=je.SPLITREGEXP;var qr=null,cd=null,fd=null;class Bf extends dy{constructor(t,s,c,C,S,l,T){if(cb(s)){var e=s;s=Ci(e,"x",0),c=Ci(e,"y",0),C=Ci(e,"text",""),S=Ci(e,"style")}if(s===void 0&&(s=0),c===void 0&&(c=0),super(t,l),this.renderer=t.sys.game.renderer,this.setPosition(s,c),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(!0),this.canvas=am.create(this),this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this._imageManager=void 0,S){if(S.hasOwnProperty("align")){var d=S.align;delete S.align,S.halign=d}S.hasOwnProperty("stroke")&&!S.hasOwnProperty("strokeThickness")&&(S.strokeThickness=1)}this.style=new Ff(this,S);var g=Ci(S,"images",void 0);g&&this.addImage(g),this.autoRound=!0,this._text=void 0,this.padding={left:0,right:0,top:0,bottom:0},this.width=1,this.height=1,this.dirty=!1,this.style.resolution===0&&(this.style.resolution=1),this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),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);var r=Ci(S,"sharedPool",!0),a,h,n;r?(qr||(qr={},cd=new zs,fd=new nm,this.scene.game.events.once("destroy",function(){qr=null,cd=null,fd=null})),qr.hasOwnProperty(l)||(qr[l]=new zs),a=qr[l],h=cd,n=fd):(a=new zs,h=new zs,n=new nm),this.canvasText=new fy({parent:this,context:this.context,parser:T,style:this.style,pensPool:a,linesPool:h,wrapTextLinesPool:n}),this.parser=T,this.initRTL(),S&&S.padding&&this.setPadding(S.padding),this.setText(C),this.setUrlTagCursorStyle(Ci(S,"urlTagCursorStyle","pointer")),Ci(S,"interactive",!1)&&this.setInteractive()}preDestroy(){vb(this.canvas),this.canvasText.destroy(),this.canvasText=void 0,this._imageManager&&(this._imageManager.destroy(),this._imageManager=void 0),am.remove(this.canvas),this.texture.destroy()}set text(t){this.setText(t)}get text(){return this._text}initRTL(){this.style.rtl&&(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",rm(this.canvas,this.scene.sys.canvas),this.originX=1)}setRTL(t){t===void 0&&(t=!0);var s=this.style;if(s.rtl===t)return this;if(s.rtl=t,t?(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",rm(this.canvas,this.scene.sys.canvas)):(this.canvas.dir="ltr",this.context.direction="ltr"),s.halign==="left"?s.halign="right":s.halign==="right"&&(s.halign="left"),this._imageManager){var c=this._imageManager.images;for(var C in c)c[C].originX=1-c[C].originX}return this}setText(t){return t==null?t="":Array.isArray(t)?t=t.join(` 6304`):t=t.toString(),t===this._text?this:(this._text=t,this.updateText(),this)}setPadding(t,s,c,C){if(typeof t=="object"){var S=t,l=Ci(S,"x",null);l!==null?(t=l,c=l):(t=Ci(S,"left",0),c=Ci(S,"right",t));var T=Ci(S,"y",null);T!==null?(s=T,C=T):(s=Ci(S,"top",0),C=Ci(S,"bottom",s))}else t===void 0&&(t=0),s===void 0&&(s=t),c===void 0&&(c=t),C===void 0&&(C=s);return this.padding.left=t,this.padding.top=s,this.padding.right=c,this.padding.bottom=C,this.updateText(!1)}updateText(t){t===void 0&&(t=!0);var s=this.canvasText,c=this.style;t&&s.updatePenManager(this._text,c.wrapMode,c.wrapWidth,c.lineHeight);var C=this.padding,S,l,T=Math.ceil(s.linesWidth);c.fixedWidth===0?(this.width=T+C.left+C.right,S=T):(this.width=c.fixedWidth,S=this.width-C.left-C.right,S<T&&(S=T)),c.fixedHeight===0?(this.height=s.linesHeight+C.top+C.bottom,l=s.linesHeight):(this.height=c.fixedHeight,l=this.height-C.top-C.bottom,l<s.linesHeight&&(l=s.linesHeight));var e=this.width,d=this.height;this.updateDisplayOrigin();var g=c.resolution;e*=g,d*=g,e=Math.max(Math.ceil(e),1),d=Math.max(Math.ceil(d),1);var r=this.canvas,a=this.context;r.width!==e||r.height!==d?(r.width=e,r.height=d,this.frame.setSize(e,d)):a.clearRect(0,0,e,d),a.save(),a.scale(g,g);var h=this.style.rtl?C.right:C.left,n=C.top;
6304s.draw(h,n,S,l),a.restore(),this.renderer&&this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(r,this.frame.source.glTexture,!0),this.frame.glTexture=this.frame.source.glTexture),this.dirty=!0;var o=this.input;return o&&!o.customHitArea&&(o.hitArea.width=this.width,o.hitArea.height=this.height),this}toJSON(){var t=Components.ToJSON(this),s={autoRound:this.autoRound,text:this._text,style:this.style.toJSON(),resolution:this.resolution,padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=s,t}setInteractive(t,s,c){var C=!!this.input;return fb.prototype.setInteractive.call(this,t,s,c),C||this.canvasText.setInteractive(),this}setUrlTagCursorStyle(t){return this.urlTagCursorStyle=t,this}get urlTagCursorStyle(){return this.canvasText.urlTagCursorStyle}set urlTagCursorStyle(t){this.canvasText.urlTagCursorStyle=t}getWrappedText(t,s,c){return typeof t=="number"&&(c=s,s=t,t=void 0),t=this.canvasText.getText(t,s,c,!0),t.split(pb)}getPlainText(t,s,c){return typeof t=="number"&&(c=s,s=t,t=void 0),this.canvasText.getPlainText(t,s,c)}getText(t,s,c,C){return typeof t=="number"&&(C=c,c=s,s=t,t=void 0),C===void 0&&(C=!1),this.canvasText.getText(t,s,c,C)}getSubString(t,s,c){return typeof t=="number"&&(c=s,s=t,t=void 0),this.getText(t,s,c)}copyPenManager(t){return this.canvasText.copyPenManager(t)}getPenManager(t,s){return this.canvasText.getPenManager(t,s)}setSize(t,s){return this.setFixedSize(t,s)}resize(t,s){return this.setFixedSize(t,s)}get imageManager(){return this._imageManager||(this._imageManager=new Df(this.scene)),this._imageManager}addImage(t,s){return this.imageManager.add(t,s),this}drawAreaBounds(t,s){return this.canvasText.hitAreaManager.drawBounds(t,s,this),this}generateTexture(t,s,c,C,S){var l=this.canvas;return C===void 0?C=l.width:C*=this.resolution,S===void 0?S=l.height:S*=this.resolution,ly(this.scene,l,t,s,c,C,S),this}}var mb={appendText:vy};Object.assign(Bf.prototype,mb);var gb=function(i,t){for(var s=this.tagRegex,c=[],C=0,S=!1,l=!1;;){var T=s.RE_SPLITTEXT.exec(i);if(!T)break;var e=T[0];if(l)if(s.RE_ESC_CLOSE.test(e))l=!1;else continue;else if(S)if(s.RE_RAW_CLOSE.test(e))S=!1;else continue;else s.RE_ESC_OPEN.test(e)?l=!0:s.RE_RAW_OPEN.test(e)&&(S=!0);var d=s.RE_SPLITTEXT.lastIndex,g=d-e.length;if(C<g){var r=i.substring(C,g);c.push(r)}t===void 0&&c.push(e),C=d}var a=i.length;return C<a&&c.push(i.substring(C,a)),c};const Ye=!1,Ve=!0;var xb={plainText:null,prevProp:null},yb=function(i,t){var s=this.tagRegex;t==null&&(t={});var c="";if(t.img&&$t(t,Ye,"img"),t.esc)s.RE_ESC_CLOSE.test(i)?$t(t,Ye,"esc"):c=i;else if(t.raw)s.RE_RAW_CLOSE.test(i)?$t(t,Ye,"raw"):c=i;else if(s.RE_ESC_OPEN.test(i))$t(t,Ve,"esc",!0);else if(s.RE_ESC_CLOSE.test(i))$t(t,Ye,"esc");else if(s.RE_RAW_OPEN.test(i))$t(t,Ve,"raw",!0);else if(s.RE_RAW_CLOSE.test(i))$t(t,Ye,"raw");else if(s.RE_BLOD_OPEN.test(i))$t(t,Ve,"b",!0);else if(s.RE_BLOD_CLOSE.test(i))$t(t,Ye,"b");else if(s.RE_ITALICS_OPEN.test(i))$t(t,Ve,"i",!0);else if(s.RE_ITALICS_CLOSE.test(i))$t(t,Ye,"i");else if(s.RE_WEIGHT_OPEN.test(i)){var C=i.match(s.RE_WEIGHT_OPEN);$t(t,Ve,"weight",C[1])}else if(s.RE_WEIGHT_CLOSE.test(i))$t(t,Ye,"weight");else if(s.RE_SIZE_OPEN.test(i)){var C=i.match(s.RE_SIZE_OPEN);$t(t,Ve,"size",`${C[1]}px`)}else if(s.RE_SIZE_CLOSE.test(i))$t(t,Ye,"size");else if(s.RE_COLOR_OPEN.test(i)){var C=i.match(s.RE_COLOR_OPEN);$t(t,Ve,"color",C[1])}else if(s.RE_COLOR_CLOSE.test(i))$t(t,Ye,"color");else if(s.RE_UNDERLINE_OPEN.test(i))$t(t,Ve,"u",!0);else if(s.RE_UNDERLINE_OPENC.test(i)){var C=i.match(s.RE_UNDERLINE_OPENC);$t(t,Ve,"u",C[1])}else if(s.RE_UNDERLINE_CLOSE.test(i))$t(t,Ye,"u");else if(s.RE_STRIKETHROUGH_OPEN.test(i))$t(t,Ve,"s",!0);else if(s.RE_STRIKETHROUGH_OPENC.test(i)){var C=i.match(s.RE_STRIKETHROUGH_OPENC);$t(t,Ve,"s",C[1])}else if(s.RE_STRIKETHROUGH_CLOSE.test(i))$t(t,Ye,"s");else if(s.RE_SHADOW_OPEN.test(i))$t(t,Ve,"shadow",!0);else if(s.RE_SHADOW_CLOSE.test(i))$t(t,Ye,"shadow");else if(s.RE_STROKE_OPEN.test(i))$t(t,Ve,"stroke",!0);else if(s.RE_STROKE_OPENC.test(i)){var C=i.match(s.RE_STROKE_OPENC);$t(t,Ve,"stroke",C[1])}else if(s.RE_STROKE_CLOSE.test(i))$t(t,Ye,"stroke");else if(s.RE_OFFSETY_OPEN.test(i)){var C=i.match(s.RE_OFFSETY_OPEN);$t(t,Ve,"y",parseFloat(C[1]))}else if(s.RE_OFFSETY_CLOSE.test(i))$t(t,Ye,"y");else if(s.RE_IMAGE_OPEN.test(i)){var C=i.match(s.RE_IMAGE_OPEN);$t(t,Ve,"img",C[1])}else if(s.RE_IMAGE_CLOSE.test(i))$t(t,Ye,"img");else if(s.RE_AREA_OPEN.test(i)){var C=i.match(s.RE_AREA_OPEN);$t(t,Ve,"area",C[1])}else if(s.RE_AREA_CLOSE.test(i))$t(t,Ye,"area");else if(s.RE_URL_OPEN.test(i)){var C=i.match(s.RE_URL_OPEN);$t(t,Ve,"url",C[1])}else if(s.RE_URL_CLOSE.test(i))$t(t,Ye,"url");else if(s.RE_ALIGN_OPEN.test(i)){var C=i.match(s.RE_ALIGN_OPEN);$t(t,Ve,"align",C[1])}else s.RE_ALIGN_CLOSE.test(i)?$t(t,Ye,"align"):c=i;var S=xb;return S.plainText=c,S.prop=t,S},$t=function(i,t,s,c){return t===Ve?i[s]=c:i.hasOwnProperty(s)&&delete i[s],i},Cb=function(i,t){var s=Sb;if(t.hasOwnProperty("img"))s.image=t.img;else{if(s.image=null,t.hasOwnProperty("family")?s.fontFamily=t.family:s.fontFamily=i.fontFamily,t.hasOwnProperty("size")){var c=t.size;typeof c=="number"&&(c=`${c}px`),s.fontSize=c}else s.fontSize=i.fontSize;s.fontStyle=Tb(t),t.hasOwnProperty("color")?s.color=t.color:s.color=i.color,t.hasOwnProperty("stroke")?t.stroke===!0?(s.stroke=i.stroke,s.strokeThickness=i.strokeThickness):(s.stroke=t.stroke,s.strokeThickness=i.strokeThickness):(s.stroke=i.stroke,s.strokeThickness=0)}return t.hasOwnProperty("shadow")?t.shadow===!0?(s.shadowColor=i.shadowColor,s.shadowOffsetX=i.shadowOffsetX,s.shadowOffsetY=i.shadowOffsetY,s.shadowBlur=i.shadowBlur,s.shadowStroke=!0,s.shadowFill=!0):(s.shadowColor=t.shadow,s.shadowOffsetX=i.shadowOffsetX,s.shadowOffsetY=i.shadowOffsetY,s.shadowBlur=i.shadowBlur,s.shadowStroke=!0,s.shadowFill=!0):(s.shadowColor="#000",s.shadowOffsetX=0,s.shadowOffsetY=0,s.shadowBlur=0,s.shadowStroke=!1,s.shadowFill=!1),t.hasOwnProperty("u")?t.u===!0?(s.underlineColor=i.underlineColor,s.underlineThickness=i.underlineThickness,s.underlineOffset=i.underlineOffset):(s.underlineColor=t.u,s.underlineThickness=i.underlineThickness,s.underlineOffset=i.underlineOffset):(s.underlineColor="#000",s.underlineThickness=0,s.underlineOffset=0),t.hasOwnProperty("s")?t.s===!0?(s.strikethroughColor=i.strikethroughColor,s.strikethroughThickness=i.strikethroughThickness,s.strikethroughOffset=i.strikethroughOffset):(s.strikethroughColor=t.s,s.strikethroughThickness=i.strikethroughThickness,s.strikethroughOffset=i.strikethroughOffset):(s.strikethroughColor="#000",s.str
6304ikethroughThickness=0,s.strikethroughOffset=0),s},Tb=function(i){var t=i.b,s=i.weight,c=i.i;return t||s||c?c?t?"bold italic":s?`${s} italic`:"italic":t?"bold":s.toString():""},Sb=new Ff,Eb=function(i,t,s){s==null&&(s=Pb);var c=this.delimiters[0],C=this.delimiters[1],S=[];for(var l in s)t.hasOwnProperty(l)||S.push(`${c}/${l}${C}`);for(var l in t){var T=t[l];if(s[l]!==T)switch(l){case"size":S.push(`${c}size=${T.replace("px","")}${C}`);break;case"color":case"weight":case"stroke":case"y":case"img":case"area":case"url":case"align":S.push(`${c}${l}=${T}${C}`);break;case"u":case"s":T===!0?S.push(`${c}${l}${C}`):S.push(`${c}${l}=${T}${C}`);break;default:S.push(`${c}${l}${C}`);break}}return S.push(i),S.join("")},Pb={},ka=function(i){return i.replace(bb,"\\$&").replace(Mb,"\\x2d")},bb=/[|\\{}()[\]^$+*?.]/g,Mb=/-/g,om,lm,Kt={},Xe=function(i,t,s,c){return c===void 0?`${i}${s}${t}`:`${i}${s}=(${c})${t}`},li=function(i,t,s){return`${i}/${s}${t}`},vd="[-.0-9]+",Al="[a-z]+|#[0-9abcdef]+",Rl="[^\\]]+",py=function(i,t){if(t===void 0){var s=i;i=s[0],t=s[1]}if(om===i&&lm===t)return!1;om=i,lm=t,i=ka(i),t=ka(t);var c="esc",C=Xe(i,t,c),S=li(i,t,c),l="raw",T=Xe(i,t,l),e=li(i,t,l),d="b",g=Xe(i,t,d),r=li(i,t,d),a="i",h=Xe(i,t,a),n=li(i,t,a),o="weight",f=Xe(i,t,o,vd),u=li(i,t,o),v="size",m=Xe(i,t,v,vd),p=li(i,t,v),x="color",y=Xe(i,t,x,Al),P=li(i,t,x),b="u",E=Xe(i,t,b),M=Xe(i,t,b,Al),w=li(i,t,b),A="s",R=Xe(i,t,A),L=Xe(i,t,A,Al),O=li(i,t,A),I="shadow",D=Xe(i,t,I),B=li(i,t,I),z="stroke",X=Xe(i,t,z),W=Xe(i,t,z,Al),j=li(i,t,z),N="y",Y=Xe(i,t,N,vd),F=li(i,t,N),G="img",k=Xe(i,t,G,Rl),V=li(i,t,G),U="area",$=Xe(i,t,U,Rl),K=li(i,t,U),J="url",_=Xe(i,t,J,Rl),tt=li(i,t,J),st="align",ht=Xe(i,t,st,Rl),lt=li(i,t,st);return Kt.RE_ESC_OPEN=new RegExp(C,"i"),Kt.RE_ESC_CLOSE=new RegExp(S,"i"),Kt.RE_RAW_OPEN=new RegExp(T,"i"),Kt.RE_RAW_CLOSE=new RegExp(e,"i"),Kt.RE_BLOD_OPEN=new RegExp(g,"i"),Kt.RE_BLOD_CLOSE=new RegExp(r,"i"),Kt.RE_ITALICS_OPEN=new RegExp(h,"i"),Kt.RE_ITALICS_CLOSE=new RegExp(n,"i"),Kt.RE_WEIGHT_OPEN=new RegExp(f,"i"),Kt.RE_WEIGHT_CLOSE=new RegExp(u,"i"),Kt.RE_SIZE_OPEN=new RegExp(m,"i"),Kt.RE_SIZE_CLOSE=new RegExp(p,"i"),Kt.RE_COLOR_OPEN=new RegExp(y,"i"),Kt.RE_COLOR_CLOSE=new RegExp(P,"i"),Kt.RE_UNDERLINE_OPEN=new RegExp(E,"i"),Kt.RE_UNDERLINE_OPENC=new RegExp(M,"i"),Kt.RE_UNDERLINE_CLOSE=new RegExp(w,"i"),Kt.RE_STRIKETHROUGH_OPEN=new RegExp(R,"i"),Kt.RE_STRIKETHROUGH_OPENC=new RegExp(L,"i"),Kt.RE_STRIKETHROUGH_CLOSE=new RegExp(O,"i"),Kt.RE_SHADOW_OPEN=new RegExp(D,"i"),Kt.RE_SHADOW_CLOSE=new RegExp(B,"i"),Kt.RE_STROKE_OPEN=new RegExp(X,"i"),Kt.RE_STROKE_OPENC=new RegExp(W,"i"),Kt.RE_STROKE_CLOSE=new RegExp(j,"i"),Kt.RE_OFFSETY_OPEN=new RegExp(Y,"i"),Kt.RE_OFFSETY_CLOSE=new RegExp(F,"i"),Kt.RE_IMAGE_OPEN=new RegExp(k,"i"),Kt.RE_IMAGE_CLOSE=new RegExp(V,"i"),Kt.RE_AREA_OPEN=new RegExp($,"i"),Kt.RE_AREA_CLOSE=new RegExp(K,"i"),Kt.RE_URL_OPEN=new RegExp(_,"i"),Kt.RE_URL_CLOSE=new RegExp(tt,"i"),Kt.RE_ALIGN_OPEN=new RegExp(ht,"i"),Kt.RE_ALIGN_CLOSE=new RegExp(lt,"i"),Kt.RE_SPLITTEXT=new RegExp([T,e,C,S,g,r,h,n,f,u,m,p,y,P,E,M,w,R,L,O,D,B,X,W,j,Y,F,k,V,$,K,_,tt,ht,lt].join("|"),"ig"),!0},hm=function(i,t){return i!==void 0&&py(i,t),Object.assign({},Kt)};const wb=Phaser.Utils.Objects.GetValue;let my=class{constructor(t){var s=wb(t,"delimiters","[]");this.tagRegex=hm(s),this.delimiters=s}getStrokeThinkness(t,s){var c;return s.hasOwnProperty("stroke")?c=t.strokeThickness:c=0,c}setDelimiters(t,s){return py(t,s)&&(this.tagRegex=hm()),this}};var Ab={splitText:gb,tagTextToProp:yb,propToContextStyle:Cb,propToTagText:Eb};Object.assign(my.prototype,Ab);class kf extends Bf{constructor(t,s,c,C,S){var l=new my(S);super(t,s,c,C,S,"rexBBCodeText",l)}setDelimiters(t,s){return this.parse.setDelimiters(t,s),this}}xt.register("BBCodeText",function(i,t,s,c){var C=new kf(this.scene,i,t,s,c);return this.scene.add.existing(C),C});mt(window,"RexPlugins.UI.BBCodeText",kf);var Rb={plainText:null,prevProp:null},Ob=new Ff;let Lb=class{constructor(t){t===void 0&&(t={}),this.tags=t}addTag(t,s){this.tags[t]=s}getTag(t){return this.tags[t]}splitText(t,s){for(var c=[],C=0;;){var S=pd.exec(t);if(!S)break;var l=S[0],T=pd.lastIndex-l.length;if(C<T&&c.push(t.substring(C,T)),s===void 0)c.push(l);else if(s===1){if(dm.test(l)){var e=l.match(cm);c.push(e[2])}else if(fm.test(l)){var e=l.match(vm);c.push(e[2])}}C=pd.lastIndex}var d=t.length;return C<d&&c.push(t.substring(C,d)),c}tagTextToProp(t,s){var c,C;if(dm.test(t)){var S=t.match(cm);if(S!=null){var l=S[1],T=this.tags;T.hasOwnProperty(l)?C=T[l]:C={},C._class=l,c=S[2]}}else if(fm.test(t)){var S=t.match(vm);if(S!=null){var e=S[1];C=Fb(e),C._style=e,c=S[2]}}c==null&&(c=t),C==null&&(C={});var d=Rb;return d.plainText=c,d.prop=C,d}propToContextStyle(t,s){var c=Ob;if(s.hasOwnProperty("img"))c.image=s.img;else{if(c.image=null,s.hasOwnProperty("family")||s.hasOwnProperty("fontFamily")||s.hasOwnProperty("font-family")){var C=s.hasOwnProperty("family")?s.family:s.hasOwnProperty("fontFamily")?s.fontFamily:s["font-family"];c.fontFamily=C}else c.fontFamily=t.fontFamily;if(s.hasOwnProperty("size")||s.hasOwnProperty("fontSize")||s.hasOwnProperty("font-size")){var S=s.hasOwnProperty("size")?s.size:s.hasOwnProperty("fontSize")?s.fontSize:s["font-size"];typeof S=="number"&&(S=`${S}px`),c.fontSize=S}else c.fontSize=t.fontSize;if(s.hasOwnProperty("style")||s.hasOwnProperty("fontStyle")||s.hasOwnProperty("font-style")){var l=s.hasOwnProperty("style")?s.style:s.hasOwnProperty("fontStyle")?s.fontStyle:s["font-style"];c.fontStyle=l}else c.fontStyle=t.fontStyle;if(s.hasOwnProperty("color")||s.hasOwnProperty("font-color")){var T=s.hasOwnProperty("color")?s.color:s["font-color"];c.color=T}else c.color=t.color;if(s.hasOwnProperty("stroke")){var e=s.stroke;c.stroke=e.hasOwnProperty("color")?e.color:t.stroke,c.strokeThickness=e.hasOwnProperty("thickness")?e.thickness:t.strokeThickness}else c.stroke=t.stroke,c.strokeThickness=t.strokeThickness}if(s.hasOwnProperty("shadow")){var d=s.shadow;c.shadowColor=d.hasOwnProperty("color")?d.color:t.shadowColor,c.shadowOffsetX=d.hasOwnProperty("offsetX")?d.offsetX:t.shadowOffsetX,c.shadowOffsetY=d.hasOwnProperty("offsetY")?d.offsetY:t.shadowOffsetY,c.shadowBlur=d.hasOwnProperty("blur")?d.blur:t.shadowBlur,c.shadowStroke=!0,c.shadowFill=!0}else c.shadowColor=t.shadowColor,c.shadowOffsetX=t.shadowOffsetX,c.shadowOffsetY=t.shadowOffsetY,c.shadowBlur=t.shadowBlur,c.shadowStroke=t.shadowStroke,c.shadowFill=t.shadowFill;if(s.hasOwnProperty("u")||s.hasOwnProperty("underline")){var g=s.hasOwnProperty("u")?s.u:s.underline;c.underlineColor=g.hasOwnProperty("color")?g.color:t.underlineColor,c.underlineThickness=g.hasOwnProperty("thickness")?g.thickness:t.underlineThickness,c.underlineOffset=g.hasOwnProperty("offset")?g.offset:t.underlineOffset}else c.underlineColor=t.underlineColor,c.underlineThickness=t.underlineThickness,c.underlineOffset=t.underlineOffset;
6304if(s.hasOwnProperty("s")||s.hasOwnProperty("strikethrough")){var r=s.hasOwnProperty("s")?s.s:s.strikethrough;c.strikethroughColor=r.hasOwnProperty("color")?r.color:t.strikethroughColor,c.strikethroughThickness=r.hasOwnProperty("thickness")?r.thickness:t.strikethroughThickness,c.strikethroughOffset=r.hasOwnProperty("offset")?r.offset:t.strikethroughOffset}else c.strikethroughColor=t.strikethroughColor,c.strikethroughThickness=t.strikethroughThickness,c.strikethroughOffset=t.strikethroughOffset;return c}getStrokeThinkness(t,s){var c;if(s.hasOwnProperty("stroke")){var C=s.stroke;c=C.hasOwnProperty("thickness")?C.thickness:t.strokeThickness}else c=t.strokeThickness;return c}propToTagText(t,s,c){return s.hasOwnProperty("_class")?t===""&&this.isTextTag(s._class)?"":`<class='${s._class}'>${t}</class>`:s.hasOwnProperty("_style")?`<style='${s._style}'>${t}</style>`:t}destroy(){this.tags=void 0}isTextTag(t){var s=this.tags[t];return s?s.img==null:!1}};var Fb=function(i){i=i.split(";");for(var t={},s,c,C,S=0,l=i.length;S<l;S++)if(s=i[S].split(":"),c=s[0],C=s[1],!(um(c)||um(C))){switch(c){case"stroke":var T=C.split(" "),e=T.length;C={},e>=1&&(C.color=T[0]),e>=2&&(C.thickness=parseInt(T[1].replace("px","")));break;case"shadow":var T=C.split(" "),e=T.length;C={},e>=1&&(C.color=T[0]),e>=2&&(C.offsetX=parseInt(T[1].replace("px",""))),e>=3&&(C.offsetY=parseInt(T[2].replace("px",""))),e>=4&&(C.blur=parseInt(T[3].replace("px","")));break;case"u":case"underline":case"s":case"strikethrough":var T=C.split(" "),e=T.length;C={},e>=1&&(C.color=T[0]),e>=2&&(C.thickness=parseInt(T[1].replace("px",""))),e>=3&&(C.offset=parseInt(T[2].replace("px",""))),c==="underline"?c="u":c==="strikethrough"&&(c="s");break;case"y":C=parseFloat(C);break}t[c]=C}return t},um=function(i){return i=i.replace(Ib,""),i.length===0},pd=/<\s*class=["|']([^"|']+)["|']\s*\>([\s\S]*?)<\s*\/class\s*\>|<\s*style=["|']([^"|']+)["|']\s*\>([\s\S]*?)<\s*\/style\s*\>/g,dm=/<\s*class=/i,cm=/<\s*class=["|']([^"|']+)["|']\s*\>([\s\S]*?)<\s*\/class\s*\>/,fm=/<\s*style=/i,vm=/<\s*style=["|']([^"|']+)["|']\s*\>([\s\S]*?)<\s*\/style\s*\>/,Ib=/^\s+|\s+$/;const Db=Phaser.Utils.Objects.GetValue;class gy extends Bf{constructor(t,s,c,C,S){var l=Db(S,"tags",void 0),T=new Lb(l);super(t,s,c,C,S,"rexTagText",T)}addTag(t,s){return this.parser.addTag(t,s),this.updateText(!0)}addTags(t){for(var s in t)this.parser.addTag(s,t[s]);return this.updateText(!0)}getTag(t){return this.parser.getTag(t)}preDestroy(){super.preDestroy(),this.parser.destroy(),this.parser=void 0}}xt.register("tagText",function(i,t,s,c){var C=new gy(this.scene,i,t,s,c);return this.scene.add.existing(C),C});mt(window,"RexPlugins.UI.TagText",gy);const Ol=Phaser.Utils.Objects.GetValue;var wh=function(i,t){return t===void 0?i:i[t]},Wn=function(i,t,s){i===void 0&&(i={}),t===void 0&&(t=0);var c=typeof t;return c==="string"?i[t]=s:c==="number"?(i.left=t,i.right=t,i.top=t,i.bottom=t):(i.left=Ol(t,"left",0),i.right=Ol(t,"right",0),i.top=Ol(t,"top",0),i.bottom=Ol(t,"bottom",0)),i};let Gf=class{constructor(t,s){this.setParent(t),this.type=s,this.renderable=!1,this.reset().setActive()}destroy(){this.parent.removeChild(this)}setParent(t){return this.parent=t,this}get scene(){return this.parent.scene}get canvas(){return this.parent?this.parent.canvas:null}get context(){return this.parent?this.parent.context:null}setDirty(t){return t&&this.parent&&(this.parent.dirty=!0),this}get active(){return this._active}set active(t){this.setDirty(this._active!=t),this._active=t}setActive(t){return t===void 0&&(t=!0),this.active=t,this}modifyPorperties(t){return this}onFree(){this.reset().setParent()}reset(){return this}render(){}contains(t,s){return!1}};Object.assign(Gf.prototype,Jh);const Bb={renderContent(){},render(){if(!this.willRender)return this;var i=this.context;if(i.save(),i.globalAlpha=this.alpha,this.toLocalPosition){var t=this.drawX,s=this.drawY;this.autoRound&&(t=Math.round(t),s=Math.round(s)),i.translate(t,s),i.scale(this.scaleX,this.scaleY),i.rotate(this.rotation)}return this.drawBelowCallback&&this.drawBelowCallback(this),this.renderContent(),this.drawAboveCallback&&this.drawAboveCallback(this),i.restore(
6304),this}},kb=Phaser.Math.RotateAround;var Gb=function(i,t,s,c){return c===void 0?c={}:c===!0&&(md===void 0&&(md={}),c=md),c.x=(i-s.drawX)/s.scaleX,c.y=(t-s.drawY)/s.scaleY,s.rotation!==0&&kb(c,0,0,-s.rotation),c},md;const Nb=Phaser.Geom.Rectangle;var Vb=function(i,t){if(this.width===0||this.height===0)return!1;var s=Gb(i,t,this,!0);return zb(this).contains(s.x,s.y)},zb=function(i){Ll===void 0&&(Ll=new Nb);var t=i.drawTLX,s=i.drawTLY;return Ll.setTo(t,s,i.drawTRX-t,i.drawBLY-s),Ll},Ll;const Yb=Phaser.Math.RotateAround;var xy=function(i,t,s,c){return c===void 0?c={}:c===!0&&(gd===void 0&&(gd={}),c=gd),c.x=t,c.y=s,i.rotation!==0&&Yb(c,0,0,i.rotation),c.x=c.x*i.scaleX+i.drawX,c.y=c.y*i.scaleY+i.drawY,c},gd;const pm=Phaser.GameObjects.Components.TransformMatrix;var Xb=function(i,t,s,c){c===void 0?c={}:c===!0&&(c=Ub);var C=t-i.width*i.originX,S=s-i.height*i.originY;return no===void 0&&(no=new pm,mm=new pm),i.parentContainer?i.getWorldTransformMatrix(no,mm):no.applyITRS(i.x,i.y,i.rotation,i.scaleX,i.scaleY),no.transformPoint(C,S,c),c},no,mm,Ub={},Wb=function(i,t,s,c,C){var S=xy(t,s,c,!0),l=Xb(i,S.x,S.y,C);return l},yy=function(i,t,s,c,C){typeof s!="number"&&(C=s,s=0,c=0);var S=t.drawCenterX+s,l=t.drawCenterY+c;return Wb(i,t,S,l,C)},Hb=function(i,t,s){return yy(this.parent,this,i,t,s)},Cy={contains:Vb,getWorldPosition:Hb};Object.assign(Cy,Bb);const $b=Phaser.Math.DegToRad,jb=Phaser.Math.RadToDeg,Fl=Phaser.Utils.Objects.GetValue;class Nr extends Gf{constructor(t,s){super(t,s),this.renderable=!0,this.scrollFactorX=1,this.scrollFactorY=1,this.toLocalPosition=!0,this.originX=0,this.offsetX=0,this.offsetY=0}get visible(){return this._visible}set visible(t){this.setDirty(this._visible!=t),this._visible=t}setVisible(t){return t===void 0&&(t=!0),this.visible=t,this}get alpha(){return this._alpha}set alpha(t){this.setDirty(this._alpha!=t),this._alpha=t}setAlpha(t){return this.alpha=t,this}get x(){return this._x}set x(t){this.setDirty(this._x!=t),this._x=t}setX(t){return this.x=t,this}get y(){return this._y}set y(t){this.setDirty(this._y!=t),this._y=t}setY(t){return this.y=t,this}setPosition(t,s){return this.x=t,this.y=s,this}setInitialPosition(t,s){return this.x0=t,this.y0=s,this}setScrollFactorX(t){return this.scrollFactorX=t,this}setScrollFactorY(t){return this.scrollFactorY=t,this}setScrollFactor(t,s){return s===void 0&&(s=t),this.scrollFactorX=t,this.scrollFactorY=s,this}get rotation(){return this._rotation}set rotation(t){this.setDirty(this._rotation!=t),this._rotation=t}setRotation(t){return this.rotation=t,this}get angle(){return jb(this._rotation)}set angle(t){this.rotation=$b(t)}setAngle(t){return this.angle=t,this}get scaleX(){return this._scaleX}set scaleX(t){this.setDirty(this._scaleX!==t),this._scaleX=t}setScaleX(t){return this.scaleX=t,this}get width(){return 0}set width(t){}setWidth(t,s){return s===void 0&&(s=!1),this.width=t,s&&(this.scaleY=this.scaleX),this}get leftSpace(){return this._leftSpace}set leftSpace(t){this.setDirty(this._leftSpace!==t),this._leftSpace=t}setLeftSpace(t){return this.leftSpace=t,this}get rightSpace(){return this._rightSpace}set rightSpace(t){this.setDirty(this._rightSpace!==t),this._rightSpace=t}setRightSpace(t){return this.rightSpace=t,this}get outerWidth(){return this.width+this.leftSpace+this.rightSpace}get scaleY(){return this._scaleY}set scaleY(t){this.setDirty(this._scaleY!==t),this._scaleY=t}setScaleY(t){return this.scaleY=t,this}get height(){return 0}set height(t){}setHeight(t,s){return s===void 0&&(s=!1),this.height=t,s&&(this.scaleX=this.scaleY),this}setScale(t,s){return s===void 0&&(s=t),this.scaleX=t,this.scaleY=s,this}setOrigin(t){return this.originX=t,this}setAlign(t){return this.align=t,this}modifyPorperties(t){if(!t)return this;t.hasOwnProperty("x")&&this.setX(t.x),t.hasOwnProperty("y")&&this.setY(t.y),t.hasOwnProperty("rotation")?this.setRotation(t.rotation):t.hasOwnProperty("angle")&&this.setAngle(t.angle),t.hasOwnProperty("alpha")&&this.setAlpha(t.alpha);var s=Fl(t,"width",void 0),c=Fl(t,"height",void 0),C=Fl(t,"scaleX",void 0),S=Fl(t,"scaleY",void 0);return s!==void 0?c===void 0&&S===void 0?this.setWidth(s,!0):this.setWidth(s):C!==void 0&&this.setScaleX(C),c!==void 0?s===void 0&&C===void 0?this.setHeight(c,!0):this.setHeight(c):S!==void 0&&this.setScaleY(S),t.hasOwnProperty("leftSpace")&&this.setLeftSpace(t.leftSpace),t.hasOwnProperty("rightSpace")&&this.setRightSpace(t.rightSpace),t.hasOwnProperty("align")&&this.setAlign(t.align),this}setDrawBelowCallback(t){return this.drawBelowCallback=t,this}setDrawAboveCallback(t){return this.drawAboveCallback=t,this}reset(){return this.setVisible().setAlpha(1).setPosition(0,0).setRotation(0).setScale(1,1).setLeftSpace(0).setRightSpace(0).setOrigin(0).setAlign().setDrawBelowCallback().setDrawAboveCallback(),this}get willRender(){return this.visible&&this.alpha>0}get drawX(){var t=this.x+this.leftSpace+this.offsetX-this.originX*this.width;return this.parent._textOX*this.scrollFactorX+t}get drawY(){var t=this.y+this.offsetY;return this.parent._textOY*this.scrollFactorY+t}get drawTLX(){return 0}get drawTLY(){return 0}get drawBLX(){return 0}get drawBLY(){return 0}get drawTRX(){return 0}get drawTRY(){return 0}get drawBRX(){return 0}get drawBRY(){return 0}get drawCenterX(){return(this.drawTRX+this.drawTLX)/2}get drawCenterY(){return(this.drawBLY+this.drawTLY)/2}}Object.assign(Nr.prototype,Cy);var zn=function(i,t,s){return t.hasOwnProperty(i)?t[i]:s[i]};
6304const gr=Phaser.Utils.Objects.GetValue;class Kb extends Nr{constructor(t,s){super(t,"background"),this.setScrollFactor(0),this.setColor(gr(s,"color",null),gr(s,"color2",null),gr(s,"horizontalGradient",!0)),this.setStroke(gr(s,"stroke",null),gr(s,"strokeThickness",2)),this.setCornerRadius(gr(s,"cornerRadius",0),gr(s,"cornerIteration",null))}set color(t){t=Yt(t,this.canvas,this.context),this.setDirty(this._color!=t),this._color=t}get color(){return this._color}set color2(t){t=Yt(t,this.canvas,this.context),this.setDirty(this._color2!=t),this._color2=t}get color2(){return this._color2}set horizontalGradient(t){this.setDirty(this._horizontalGradient!=t),this._horizontalGradient=t}get horizontalGradient(){return this._horizontalGradient}setColor(t,s,c){return c===void 0&&(c=!0),this.color=t,this.color2=s,this.horizontalGradient=c,this}set stroke(t){t=Yt(t,this.canvas,this.context),this.setDirty(this._stroke!=t),this._stroke=t}get stroke(){return this._stroke}set strokeThickness(t){this.setDirty(this._strokeThickness!=t),this._strokeThickness=t}get strokeThickness(){return this._strokeThickness}setStroke(t,s){return t!=null&&s===void 0&&(s=2),this.stroke=t,this.strokeThickness=s,this}set cornerRadius(t){this.setDirty(this._cornerRadius!=t),this._cornerRadius=t}get cornerRadius(){return this._cornerRadius}set cornerIteration(t){this.setDirty(this._cornerIteration!=t),this._cornerIteration=t}get cornerIteration(){return this._cornerIteration}modifyStyle(t){return t.hasOwnProperty("color")&&this.setColor(t.color,zn("color2",t,this),zn("horizontalGradient",t,this)),t.hasOwnProperty("stroke")&&this.setStroke(t.stroke,zn("strokeThickness",t,this)),t.hasOwnProperty("cornerRadius")&&this.setCornerRadius(t.cornerRadius,zn("cornerIteration",t,this)),this}modifyPorperties(t){return super.modifyPorperties(t),this.modifyStyle(t),this}setCornerRadius(t,s){return this.cornerRadius=t,this.cornerIteration=s,this}renderContent(){Lf(this.parent,this.color,this.stroke,this.strokeThickness,this.cornerRadius,this.color2,this.horizontalGradient,this.cornerIteration)}}const En=Phaser.Utils.Objects.GetValue;class Zb extends Nr{constructor(t,s){super(t,"innerbounds"),this.setScrollFactor(0),this.setColor(En(s,"color",null),En(s,"color2",null),En(s,"horizontalGradient",!0)),this.setStroke(En(s,"stroke",null),En(s,"strokeThickness",2))}set color(t){t=Yt(t,this.canvas,this.context),this.setDirty(this._color!=t),this._color=t}get color(){return this._color}set color2(t){t=Yt(t,this.canvas,this.context),this.setDirty(this._color2!=t),this._color2=t}get color2(){return this._color2}set horizontalGradient(t){this.setDirty(this._horizontalGradient!=t),this._horizontalGradient=t}get horizontalGradient(){return this._horizontalGradient}setColor(t,s,c){return c===void 0&&(c=!0),this.color=t,this.color2=s,this.horizontalGradient=c,this}set stroke(t){t=Yt(t,this.canvas,this.context),this.setDirty(this._stroke!=t),this._stroke=t}get stroke(){return this._stroke}set strokeThickness(t){this.setDirty(this._strokeThickness!=t),this._strokeThickness=t}get strokeThickness(){return this._strokeThickness}setStroke(t,s){return t!=null&&s===void 0&&(s=2),this.stroke=t,this.strokeThickness=s,this}modifyPorperties(t){super.modifyPorperties(t),t.hasOwnProperty("color")&&this.setColor(t.color,En(t,"color2",null),En(t,"horizontalGradient",!0)),t.hasOwnProperty("stroke")&&this.setStroke(t.stroke,En(t,"strokeThickness",2))}renderContent(){var t=this.parent.padding,s=t.left,c=t.top,C=this.parent.width-t.left-t.right,S=this.parent.height-t.top-t.bottom,l=this.context;if(this.color!=null){var T;if(this.color2!=null){var e;this.horizontalGradient?e=l.createLinearGradient(0,0,C,0):e=l.createLinearGradient(0,0,0,S),e.addColorStop(0,this.color),e.addColorStop(1,this.color2),T=e}else T=this.color;l.fillStyle=T,l.fillRect(s,c,C,S)}this.stroke!=null&&this.strokeThickness>0&&(l.strokeStyle=this.stroke,l.lineWidth=this.strokeThickness,l.strokeRect(s,c,C,S))}}const Ue=Phaser.Utils.Objects.GetValue;class qh{constructor(t,s){this.parent=t,this.set(s)}toJSON(){return{bold:this.bold,italic:this.italic,fontSize:this.fontSize,fontFamily:this.fontFamily,color:this.color,stroke:this.stroke,strokeThickness:this.strokeThickness,shaodwColor:this.shadowColor,shadowBlur:this.shadowBlur,shadowOffsetX:this.shadowOffsetX,shadowOffsetY:this.shadowOffsetY,offsetX:this.offsetX,offsetY:this.offsetY,leftSpace:this.leftSpace,rightSpace:this.rightSpace,backgroundHeight:this.backgroundHeight,backgroundBottomY:this.backgroundBottomY,align:this.align}}set(t){return this.setBold(Ue(t,"bold",!1)),this.setItalic(Ue(t,"italic",!1)),this.setFontSize(Ue(t,"fontSize","16px")),this.setFontFamily(Ue(t,"fontFamily","Courier")),this.setColor(Ue(t,"color","#fff")),this.setStrokeStyle(Ue(t,"stroke",null),Ue(t,"strokeThickness",0)),this.setShadow(Ue(t,"shadowColor",null),Ue(t,"shadowOffsetX",0),Ue(t,"shadowOffsetY",0),Ue(t,"shadowBlur",0)),this.setOffset(Ue(t,"offsetX",0),Ue(t,"offsetY",0)),this.setSpace(Ue(t,"leftSpace",0),Ue(t,"rightSpace",0)),this.setAlign(Ue(t,"align",void 0)),this.setBackgroun
6304dColor(Ue(t,"backgroundColor",null)),this.setBackgroundHeight(Ue(t,"backgroundHeight",void 0)),this.setBackgroundBottomY(Ue(t,"backgroundBottomY",void 0)),this}modify(t){return t.hasOwnProperty("bold")&&this.setBold(t.bold),t.hasOwnProperty("italic")&&this.setItalic(t.italic),t.hasOwnProperty("fontSize")&&this.setFontSize(t.fontSize),t.hasOwnProperty("fontFamily")&&this.setFontFamily(t.fontFamily),t.hasOwnProperty("color")&&this.setColor(t.color),(t.hasOwnProperty("stroke")||t.hasOwnProperty("strokeThickness"))&&this.setStrokeStyle(zn("stroke",t,this),zn("strokeThickness",t,this)),t.hasOwnProperty("shadowColor")&&this.setShadowColor(t.shadowColor),(t.hasOwnProperty("shadowOffsetX")||t.hasOwnProperty("shadowOffsetY"))&&this.setShadowOffset(zn("shadowOffsetX",t,this),zn("shadowOffsetY",t,this)),t.hasOwnProperty("shadowBlur")&&this.setShadowBlur(t.shaodwBlur),t.hasOwnProperty("offsetX")&&this.setOffsetX(t.offsetX),t.hasOwnProperty("offsetY")&&this.setOffsetY(t.offsetY),t.hasOwnProperty("leftSpace")&&this.setLeftSpace(t.leftSpace),t.hasOwnProperty("rightSpace")&&this.setRightSpace(t.rightSpace),t.hasOwnProperty("align")&&this.setAlign(t.align),t.hasOwnProperty("backgroundColor")&&this.setBackgroundColor(t.backgroundColor),t.hasOwnProperty("backgroundHeight")&&this.setBackgroundHeight(t.backgroundHeight),t.hasOwnProperty("backgroundBottomY")&&this.setBackgroundBottomY(t.backgroundBottomY),this}setUpdateTextFlag(){return this.parent&&(this.parent.updateTextFlag=!0),this}clone(){return new qh(null,this.toJSON())}copyFrom(t){return this.set(t.toJSON()),this}copyTo(t){return t.set(this.toJSON()),this}setBold(t){return t===void 0&&(t=!0),this.bold=t,this.setUpdateTextFlag(),this}setItalic(t){return t===void 0&&(t=!0),this.italic=t,this.setUpdateTextFlag(),this}get fontStyle(){return this.bold&&this.italic?"bold italic":this.bold?"bold":this.italic?"italic":""}setFontSize(t){return typeof t=="number"&&(t=`${t}px`),this.fontSize=t,this.setUpdateTextFlag(),this}setFontFamily(t){return this.fontFamily=t,this.setUpdateTextFlag(),this}get font(){return`${this.fontStyle} ${this.fontSize} ${this.fontFamily}`}setColor(t){return this.color=Yt(t),this}get hasFill(){return this.color!=null}setStrokeStyle(t,s){return this.stroke=Yt(t),s!==void 0&&(this.strokeThickness=s),this}setStrokeThickness(t){return this.strokeThickness=t,this}get hasStroke(){return this.stroke!=null&&this.strokeThickness>0}setShadowColor(t){return this.shadowColor=Yt(t),this}setShadowOffset(t,s){return t===void 0&&(t=0),s===void 0&&(s=0),this.shadowOffsetX=t,this.shadowOffsetY=s,this}setShadowBlur(t){return t===void 0&&(t=0),this.shaodwBlur=t,this}setShadow(t,s,c,C){return this.setShadowColor(t).setShadowOffset(s,c).setShadowBlur(C),this}setBackgroundColor(t){return this.backgroundColor=Yt(t),this}get hasBackgroundColor(){return this.backgroundColor!=null}setBackgroundHeight(t){return this.backgroundHeight=t,this}setBackgroundBottomY(t){return this.backgroundBottomY=t,this}setOffsetX(t){return t===void 0&&(t=0),this.offsetX=t,this}setOffsetY(t){return t===void 0&&(t=0),this.offsetY=t,this}setOffset(t,s){return this.setOffsetX(t).setOffsetY(s),this}setLeftSpace(t){return t===void 0&&(t=0),this.leftSpace=t,this}setRightSpace(t){return t===void 0&&(t=0),this.rightSpace=t,this}setSpace(t,s){return this.setLeftSpace(t).setRightSpace(s),this}setAlign(t){return this.align=t,this}syncFont(t){return t.font=this.font,this}syncStyle(t){t.textBaseline="alphabetic";var s=this.hasFill,c=this.hasStroke;return t.fillStyle=s?this.color:"#000",t.strokeStyle=c?this.stroke:"#000",t.lineWidth=c?this.strokeThickness:0,t.lineCap="round",t.lineJoin="round",this}syncShadow(t){t.shadowColor!=null?(t.shadowColor=this.shadowColor,t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY,t.shadowBlur=this.shadowBlur):(t.shadowColor=0,t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowBlur=0)}getTextMetrics(t,s){return this.syncFont(t).syncStyle(t),t.measureText(s)}}var Jb=function(i,t){return i===void 0&&(i=0),t===void 0&&(t=0),this.fixedWidth===i&&this.fixedHeight===t?this:(this.fixedWidth=i,this.fixedHeight=t,this.dirty=!0,this.setCanvasSize(i>0?i:this.width,t>0?t:this.height),this)},Qb=function(i,t){var s=this.padding,c=s.left,C=s.right,S=s.top,l=s.bottom;return Wn(s,i,t),this.dirty=this.dirty||c!=s.left||C!=s.right||S!=s.top||l!=s.bottom,this},qb=function(i){return wh(this.padding,i)},_b=function(i){return this.textStyle.modify(i),this},tM=function(i){return this.defaultTextStyle.modify(i),this},eM=function(){return this.textStyle.copyFrom(this.defaultTextStyle),this},iM=function(i){return this.testString=i,this};const sM=Phaser.Utils.Array.Remove;var nM=function(i){return this.poolManager.free(i),sM(this.children,i),this.lastAppendedChildren.length=0,this.lastOverChild=null,this.dirty=!0,this},rM=function(){return this.poolManager.freeMultiple(this.children),this.children.length=0,this.lastAppendedChildren.length=0,this.lastOverChild=null,this.dirty=!0,this};const aM=Phaser.Utils.Array.Remove;var oM=function(i){return aM(this.children,i),this.lastAppendedChildren.length=0,this.lastOverChild=null,this.dirty=!0,this},lM=function(){return this.setText(),this},hM=function(i,t){var s=Array.isArray(i);return t===void 0||t===this.children.length?s?this.children.push(...i):this.children.push(i):s?this.children.splice(t,0,...i):this.children.splice(t,0,i),this.lastAppendedChildren.length=0,s?this.lastAppendedChildren.push(...i):this.lastAppendedChildren.push(i),this};const _n="text",Ty="image",Sy="drawer",Ey="space",Nf="command";var Py=function(i){return i.type===_n&&i.text===` 6305`},by=function(i){return i.type===_n&&i.text==="\f"},uM=function(i){return i.type===_n&&i.text===" "},Ga=function(i){return i.type===_n},dM=function(i){return i.type===Nf};class My extends Nr{constructor(t,s,c){super(t,_n),this.updateTextFlag=!1,this.style=new qh(this,c),this.setText(s)}get autoRound(){return this.parent.autoRound}get offsetX(){return this.style.offsetX}set offsetX(t){this.style&&(this.style.offsetX=t)}get offsetY(){return this.style.offsetY}set offsetY(t){this.style&&(this.style.offsetY=t)}get leftSpace(){return this.style.leftSpace*this.scaleX}set leftSpace(t){this.style&&(this.style.leftSpace=t),super.leftSpace=t}get rightSpace(){return this.style.rightSpace*this.scaleX}set rightSpace(t){this.style&&(this.style.rightSpace=t),super.rightSpace=t}get align(){return this.style.align}set align(t){this.style&&(this.style.align=t)}modifyStyle(t){return this.setDirty(!0),this.style.modify(t),this.updateTextFlag&&this.updateTextSize(),this}modifyPorperties(t){return t?(this.modifyStyle(t),super.modifyPorperties(t),this):this}setText(t){return this.setDirty(this.text!=t),this.text=t,this.updateTextSize(),this}updateTextSize(){var t=this.text;if(t===` 6306`||t==="\f"||t==="")this.clearTextSize();else{var s=this.style.getTextMetrics(this.context,this.text);this.textWidth=s.width;var c,C;"actualBoundingBoxAscent"in s?(c=s.actualBoundingBoxAscent,C=s.actualBoundingBoxDescent):(c=0,C=0),this.textHeight=c+C,this.ascent=c,this.descent=C}return this.updateTextFlag=!1,this}clearTextSize(){return this.textWidth=0,this.textHeight=0,this.ascent=0,this.descent=0,this}copyTextSize(t){return this.textWidth=t.textWidth,this.textHeight=t.textHeight,this.ascent=t.ascent,this.descent=t.descent,this}get width(){return this.textWidth*this.scaleX}set width(t){this.textWidth>0?this.scaleX=t/this.textWidth:this.scaleX=1}get height(){return this.textHeight*this.scaleY}set height(t){this.textHeight>0?this.scaleY=t/this.textHeight:this.scaleY=1}get willRender(){return this.textWidth===0?!1:super.willRender}renderContent(){var t=this.context,s=this.style;
6306if(s.hasBackgroundColor){t.fillStyle=s.backgroundColor;var c=this.drawTLX,C=this.drawTRX-c,S=s.backgroundBottomY;S==null&&(S=this.drawBLY);var l=s.backgroundHeight;l==null&&(l=S-this.drawTLY);var T=S-l;t.fillRect(c,T,C,l)}var e=s.hasFill,d=s.hasStroke;!e&&!d||(s.syncFont(t).syncStyle(t),d&&(s.syncShadow(t),t.strokeText(this.text,0,0)),e&&(s.syncShadow(t),t.fillText(this.text,0,0)))}get drawTLX(){return-this.leftSpace}get drawTLY(){return-this.ascent}get drawBLX(){return-this.leftSpace}get drawBLY(){return this.descent}get drawTRX(){return this.textWidth+this.rightSpace}get drawTRY(){return-this.ascent}get drawBRX(){return this.textWidth+this.rightSpace}get drawBRY(){return this.descent}}var cM=function(i,t){t&&this.textStyle.modify(t);var s=this.poolManager.allocate(_n);return s===null?s=new My(this,i,this.textStyle):s.setParent(this).setActive().modifyStyle(this.textStyle).setText(i),s},fM=function(i,t){t&&this.textStyle.modify(t);for(var s=[],c=0,C=i.length;c<C;c++){var S=i.charAt(c),l=this.poolManager.allocate(_n);l===null?l=new My(this,S,this.textStyle):l.setParent(this).setActive().modifyStyle(this.textStyle).setText(S),s.push(l)}return s},Wo=function(i,t){var s=this.createCharChildren(i,t);return this.addChild(s),this},vM=function(i,t){return i===void 0&&(i=""),this.removeChildren(),Wo.call(this,i,t),this.dirty=!0,this},pM=function(i,t,s){var c=this.createCharChildren(t,s);return i=this.getCharChildIndex(i,!0),this.addChild(c,i),this},mM=function(i,t){t===void 0&&(t=1);for(var s=0;s<t;s++){var c=this.getCharChildIndex(i,!0);if(c===void 0)break;this.removeChild(this.children[c])}return this},gM=function(i){var t="";return this.forEachCharChild(function(s){t+=s.text},void 0,i),t};class xM extends Nr{constructor(t,s,c){super(t,Ty),this.setTexture(s,c)}get frameWidth(){return this.frameObj?this.frameObj.cutWidth:0}get frameHeight(){return this.frameObj?this.frameObj.cutHeight:0}get offsetY(){return-this.height}set offsetY(t){}get key(){return this._key}set key(t){this.setDirty(this._key!=t),this._key=t}get frame(){return this._frame}set frame(t){this.setDirty(this._frame!=t),this._frame=t}setTexture(t,s){return this.key=t,this.frame=s,this.frameObj=this.scene.sys.textures.getFrame(t,s),this}get width(){return this.frameWidth*this.scaleX}set width(t){this.setDirty(this.width!==t),this.scaleX=t/this.frameWidth}get height(){return this.frameHeight*this.scaleY}set height(t){this.setDirty(this.height!==t),this.scaleY=t/this.frameHeight}setHeight(t,s){return s===void 0&&(s=!1),this.height=t,s&&(this.scaleX=this.scaleY),this}renderContent(){var t=this.context,s=this.frameObj,c=this.frameWidth,C=this.frameHeight;t.drawImage(s.source.image,s.cutX,s.cutY,c,C,0,0,c,C)}get drawTLX(){return-this.leftSpace}get drawTLY(){return 0}get drawBLX(){return-this.leftSpace}get drawBLY(){return this.frameHeight}get drawTRX(){return this.frameWidth+this.rightSpace}get drawTRY(){return 0}get drawBRX(){return this.frameWidth+this.rightSpace}get drawBRY(){return this.frameHeight}}var yM=function(i,t,s){var c=this.poolManager.allocate(Ty);return c===null?c=new xM(this,i,t):c.setParent(this).setActive().setTexture(i,t),c.modifyPorperties(s),c},wy=function(i,t,s){var c=this.createImageChild(i,t,s);return this.addChild(c),this};class CM extends Nr{constructor(t,s,c,C){super(t,Sy),this.setRenderCallback(s),this.setDrawerSize(c,C)}setRenderCallback(t){return t?this.renderContent=t.bind(this):delete this.renderContent,this}setDrawerSize(t,s){return t===!0?(this.toLocalPosition=!1,t=void 0,s=void 0):this.toLocalPosition=!0,t===void 0&&(t=0),s===void 0&&(s=t),this.drawerWidth=t,this.drawerHeight=s,this}onFree(){super.onFree(),this.setRenderCallback()}get width(){return this.drawerWidth*this.scaleX}set width(t){this.setDirty(this.width!==t),this.scaleX=this.drawerWidth>0?t/this.drawerWidth:1}get height(){return this.drawerHeight*this.scaleY}set height(t){this.setDirty(this.height!==t),this.scaleY=this.drawerHeight>0?t/this.drawerHeight:1}get offsetY(){return-this.height}set offsetY(t){}get drawTLX(){return-this.leftSpace}get drawTLY(){return 0}get drawBLX(){return-this.leftSpace}get drawBLY(){return this.drawerHeight}get drawTRX(){return this.drawerWidth+this.rightSpace}get drawTRY(){return 0}get drawBRX(){return this.drawerWidth+this.rightSpace}get drawBRY(){return this.drawerHeight}}var TM=function(i,t,s){var c=this.poolManager.allocate(Sy);return c===null?c=new CM(this,i,t,s):c.setParent(this).setActive().setRenderCallback(i).setDrawerSize(t,s),c},SM=function(i,t,s){var c=this.createDrawerChild(i,t,s);return this.addChild(c),this};
6306let EM=class extends Nr{constructor(t,s){super(t,Ey),this.setSpaceWidth(s)}get width(){return this.spaceWidth*this.scaleX}set width(t){this.spaceWidth>0?this.scaleX=t/this.spaceWidth:this.scaleX=1}setSpaceWidth(t){return this.spaceWidth=t,this}};var PM=function(i){var t=this.poolManager.allocate(Ey);return t===null?t=new EM(this,i):t.setParent(this).setActive().setSpaceWidth(i),t},Ay=function(i){var t=this.createSpaceChild(i);return this.addChild(t),this};class bM extends Gf{constructor(t,s,c,C,S){super(t,Nf),this.setName(s).setParameter(C).setCallback(c,S)}setName(t){return this.name=t,this}setParameter(t){return this.param=t,this}setCallback(t,s){return this.callback=t,this.scope=s,this}exec(){var t;return this.scope?t=this.callback.call(this.scope,this.param,this.name):t=this.callback(this.param,this.name),t}onFree(){super.onFree(),this.setName().setCallback().setParameter()}}var MM=function(i,t,s,c){var C=this.poolManager.allocate(Nf);return C===null?C=new bM(this,i,t,s,c):C.setParent(this).setActive().setName(i).setCallback(t,c).setParameter(s),C},It=function(i,t,s,c){var C=this.createCommandChild(i,t,s,c);return this.addChild(C),this},wM=function(i){return i===void 0?i={}:typeof i=="object"&&(i=zi(i)),this.wrapConfig=i,this},Ry=function(i){var t={callback:void 0,start:0,isLastPage:!1,maxLines:void 0,padding:void 0,letterSpacing:void 0,hAlign:void 0,vAlign:void 0,children:[],lines:[],maxLineWidth:0,linesHeight:0,lineHeight:void 0,maxLineHeight:0,linesWidth:0,lineWidth:void 0};return Object.assign(t,i)},AM=function(i,t,s,c){c===void 0&&(c={word:[],width:0}),c.word.length=0;for(var C=i.length,S=t,l=c.word,T=0;S<C;){var e=i[S];if(!e.renderable){l.push(e),S++;continue}var d=e.type===_n?e.text:null;if(d!==null&&d!==" "&&d!==` 6307`&&d!=="\f")l.push(e),T+=e.outerWidth,S++;else{S===t&&(l.push(e),T+=e.outerWidth);break}if(s)break}return c.width=T,c},Oy=function(i){for(var t=0,s=i.length;t<s;t++){var c=i[t];if(c.align!==void 0)return c.align}},Ly=function(i,t,s){if(!(t===0&&s===0))for(var c=0,C=i.length;c<C;c++){var S=i[c];S.renderable&&(S.x+=t,S.y+=s)}},RM=function(i,t,s){var c=i.hAlign,C=i.vAlign,S,l,T=i.linesHeight;switch(C){case 1:case"center":l=(s-T)/2;break;case 2:case"bottom":l=s-T;break;default:l=0;break}for(var e=i.lines,d=0,g=e.length;d<g;d++){var r=e[d],a=r.width,h=r.children,n=Oy(h);switch(n===void 0&&(n=c),n){case 1:case"center":S=(t-a)/2;break;case 2:case"right":S=t-a;break;default:S=0;break}Ly(h,S,l)}},gm=function(){var i=this.defaultTextStyle.getTextMetrics(this.context,this.testString),t,s;return"actualBoundingBoxAscent"in i?(t=i.actualBoundingBoxAscent,s=i.actualBoundingBoxDescent):(t=0,s=0),Il.ascent=t,Il.descent=s,Il.height=t+s,Il},Il={};const Fi=Phaser.Utils.Objects.GetValue;var OM=function(i){var t=Fi(i,"start",0);Wn(this.wrapPadding,Fi(i,"padding",0));var s=this.padding.top+this.padding.bottom+this.wrapPadding.top+this.wrapPadding.bottom,c=this.padding.left+this.padding.right+this.wrapPadding.left+this.wrapPadding.right,C=Fi(i,"lineHeight"),S=Fi(i,"ascent",C),l;if(C===void 0){var T=Fi(i,"useDefaultTextHeight",!1);if(l=Fi(i,"maxLines",0),this.fixedHeight>0&&!T){var V=this.fixedHeight-s;if(l>0)C=V/l;else{var e=gm.call(this);C=e.height,S=e.ascent,l=Math.floor((V-S)/C)}}else{var e=gm.call(this);C=e.height,S=e.ascent}}else if(this.fixedHeight>0){if(l=Fi(i,"maxLines"),l===void 0){var V=this.fixedHeight-s;l=Math.floor(V/C)}}else l=Fi(i,"maxLines",0);S===void 0&&(S=C);var d=l===0,g=Fi(i,"wrapWidth",void 0);g===void 0&&(this.fixedWidth>0?g=this.fixedWidth-c:g=1/0);for(var r=Fi(i,"letterSpacing",0),a=Fi(i,"hAlign",0),h=Fi(i,"vAlign",0),n=Fi(i,"charWrap",!1),o=Ry({callback:"runWordWrap",start:t,padding:this.wrapPadding,letterSpacing:r,maxLines:l,hAlign:a,vAlign:h,ascent:S,lineHeight:C,wrapWidth:g,charWrap:n}),f=this.children,u=0,v=f.length;u<v;u++)f[u].setActive(!1);g+=r;for(var m=this.padding.left+this.wrapPadding.left,p=this.padding.top+this.wrapPadding.top+S,x=m,y=p,P=g,b=t,E=f.length,M=o.children,w=o.lines,A=[],R=0,L=0,O,I=!1;b<E;){O=AM(f,b,n,O);var D=O.word,B=D.length,z=O.width+B*r;b+=B;var X=Py(D[0]);I=by(D[0]);var W=X||I;if(P<z||W){if(W){var j=D[0];j.setActive().setPosition(x,y),M.push(j),A.push(j)}x=m,y+=C,P=g,w.push({children:A,width:R}),L=Math.max(L,R),R=0,A=[];var N=I||!d&&w.length===l;if(N)break;if(W)continue}P-=z,R+=z;
6307for(var u=0,v=D.length;u<v;u++){var Y=D[u];Y.setActive(),M.push(Y),A.push(Y),Y.renderable&&(Y.setPosition(x,y),x+=Y.outerWidth+r)}}A.length>0&&(w.push({children:A,width:R}),L=Math.max(L,R)),o.start+=M.length,o.isLastPage=!I&&o.start===E,o.maxLineWidth=L,o.linesHeight=w.length*C;var F=this.fixedWidth>0?this.fixedWidth:o.maxLineWidth+c,G=this.fixedHeight>0?this.fixedHeight:o.linesHeight+s,k=F-c,V=G-s;RM(o,k,V),this.setCanvasSize(F,G);for(var u=0,v=M.length;u<v;u++){var Y=M[u];Y.renderable&&(Y.x0=Y.x,Y.y0=Y.y)}return o};const LM=Phaser.Utils.Objects.Merge;var FM=function(i){return i===void 0&&(i={}),OM.call(this,LM(i,this.wrapConfig))},IM=function(i,t,s){var c=i.hAlign,C=i.vAlign,S,l,T=i.rtl,e=i.lines,d=i.lineWidth,g=i.linesWidth;switch(c){case 1:case"center":S=(t-g)/2;break;case 2:case"right":S=t-g;break;default:S=0;break}T&&(S+=d);for(var r=0,a=e.length;r<a;r++){var h=e[T?a-r-1:r],n=h.children,o=h.height,f=Oy(n);switch(f===void 0&&(f=C),f){case 1:case"center":l=(s-o)/2;break;case 2:case"bottom":l=s-o;break;default:l=0;break}Ly(n,S,l),S+=d}};const Ii=Phaser.Utils.Objects.GetValue;var DM=function(i){var t=Ii(i,"start",0);Wn(this.wrapPadding,Ii(i,"padding",0));var s=this.padding.top+this.padding.bottom+this.wrapPadding.top+this.wrapPadding.bottom,c=this.padding.left+this.padding.right+this.wrapPadding.left+this.wrapPadding.right,C=Ii(i,"lineWidth",void 0),S;if(C===void 0)if(S=Ii(i,"maxLines",0),this.fixedWidth>0){var j=this.fixedWidth-c;C=j/S}else C=0;else if(this.fixedWidth>0){if(S=Ii(i,"maxLines",void 0),S===void 0){var j=this.fixedWidth-c;S=Math.floor(j/C)+1}}else S=Ii(i,"maxLines",0);var l=S===0,T=Ii(i,"fixedCharacterHeight",void 0);if(T===void 0){var e=Ii(i,"charPerLine",void 0);if(e!==void 0){var N=this.fixedHeight-s;T=Math.floor(N/e)}}var d=Ii(i,"wrapHeight",void 0);d===void 0&&(this.fixedHeight>0?d=this.fixedHeight-s:d=1/0);for(var g=Ii(i,"letterSpacing",0),r=Ii(i,"rtl",!0),a=Ii(i,"hAlign",r?2:0),h=Ii(i,"vAlign",0),n=Ry({callback:"runVerticalWrap",start:t,padding:this.wrapPadding,letterSpacing:g,maxLines:S,hAlign:a,vAlign:h,lineWidth:C,fixedCharacterHeight:T,wrapHeight:d,rtl:r}),o=this.children,f=0,u=o.length;f<u;f++)o[f].setActive(!1);d+=g;
6307for(var v=this.padding.left+this.wrapPadding.left,m=this.padding.top+this.wrapPadding.top,p=v,x=m,y=d,P=t,b=o.length,E=n.children,M=n.lines,w=[],A=0,R=0;P<b;){var L=o[P];if(P++,!L.renderable){L.setActive(),E.push(L),w.push(L);continue}var O=(T!==void 0?T:L.height)+g,I=Py(L),D=by(L),B=I||D;if(y<O||B){I&&(L.setActive().setPosition(p,x).setOrigin(.5),E.push(L),w.push(L)),p=v,x=m,y=d,M.push({children:w,height:A}),R=Math.max(R,A),A=0,w=[];var z=D||!l&&M.length===S;if(z)break;if(B)continue}y-=O,A+=O,L.setActive().setPosition(p,x).setOrigin(.5),E.push(L),w.push(L),x+=O}w.length>0&&(M.push({children:w,height:A}),R=Math.max(R,A)),n.start+=E.length,n.isLastPage=n.start===b,n.maxLineHeight=R,n.linesWidth=M.length*C;var X=this.fixedWidth>0?this.fixedWidth:n.linesWidth+c,W=this.fixedHeight>0?this.fixedHeight:n.maxLineHeight+s,j=X-c,N=W-s;IM(n,j,N),this.setCanvasSize(X,W);for(var f=0,u=E.length;f<u;f++){var L=E[f];L.renderable&&(L.x0=L.x,L.y0=L.y)}return n};const BM=Phaser.Utils.Objects.Merge;var kM=function(i){return i===void 0&&(i={}),DM.call(this,BM(i,this.wrapConfig))};const xm=Phaser.Utils.Objects.GetValue;var GM=function(i){var t=xm(this.wrapConfig,"callback");return t||(t=xm(i,"callback",this.runWordWrap)),typeof t=="string"&&(t=this[t]),t.call(this,i)};const NM={setVAlign(i){return this.wrapConfig.vAlign=i,this},setHAlign(i){return this.wrapConfig.hAlign=i,this}},VM={setTextOX(i){return i===this._textOX?this:(this._textOX=i,this)},setTextOY(i){return i===this._textOY?this:(this._textOY=i,this)},setTextOXY(i,t){if(!(i===this._textOX&&t===this._textOY))return this._textOX=i,this._textOY=t,this},addTextOX(i){return this.setTextOX(this._textOX+i),this},addTextOY(i){return this.setTextOY(this._textOY+i),this},addTextOXY(i,t){return this.setTextOXY(this._textOX+i,this._textOY+t),this}};var zM=function(){this.clear(),this.setCanvasSize(this.width,this.height),this.background.active&&this.background.render();for(var i,t=0,s=this.children.length;t<s;t++)i=this.children[t],i.active&&i.render();this.innerBounds.active&&this.innerBounds.render()},YM=function(i,t,s){s===void 0&&(s=!0);for(var c=this.children,C=0,S=0,l=c.length;S<l;S++){var T=c[S];if(!(s&&!T.active)){var e;if(t?e=i.call(this,T,C,c):e=i(T,C,c),C++,e)break}}return this},XM=function(i,t,s){s===void 0&&(s=!0);for(var c=this.children,C=0,S=0,l=c.length;S<l;S++){var T=c[S];if(!(s&&!T.active)&&T.renderable&&!T.removed){var e;if(t?e=i.call(this,T,C,c):e=i(T,C,c),C++,e)break}}return this},UM=function(i,t,s){s===void 0&&(s=!0);for(var c=this.children,C=0,S=0,l=c.length;S<l;S++){var T=c[S];if(!(s&&!T.active)&&Ga(T)&&!T.removed){var e;if(t?e=i.call(this,T,C,c):e=i(T,C,c),C++,e)break}}return this},WM=function(){return this.children};const HM=Phaser.Utils.Array.GetAll;var $M=function(){return HM(this.children,"active",!0)},jM=function(i,t){return t===void 0&&(t=[]),this.forEachCharChild(function(s){t.push(s)},void 0,i),t},KM=function(){return this.lastAppendedChildren},ZM=function(i,t,s,c){typeof t!="number"&&(c=t,t=0,s=0);var C=i.drawCenterX+t,S=i.drawCenterY+s;return xy(i,C,S,c)};const JM=Phaser.Math.Distance.BetweenPointsSquared;var QM=function(i,t){var s={x:i,y:t},c=1/0,C=null;return this.forEachRenderableChild(function(S){var l=JM(s,ZM(S,!0));c>l&&(c=l,C=S)}),C},qM=function(i,t,s,c){return typeof i=="number"&&(i=this.getCharChild(i,!0)),yy(this,i,t,s,c)},_M=function(){for(var i=this.children,t=0,s=0,c=0,C=i.length;c<C;c++){var S=i[c];if(!(!S.renderable||!S.active||!S.visible)){var l=S.x0!==void 0?S.x0:S.x,T=S.y0!==void 0?S.y0:S.y;t=Math.max(t,l),s=Math.max(s,T)}}var e=t+this.padding.left+this.padding.right+this.wrapPadding.left+this.wrapPadding.right,d=s+this.padding.top+this.padding.bottom+this.wrapPadding.top+this.wrapPadding.bottom;return(this.width!==e||this.height!==d)&&(this.dirty=!0,this.setCanvasSize(e,d)),this},tw=function(i,t){t===void 0&&(t=!0);for(var s=this.children,c=0,C=s.length;c<C;c++){var S=s[c];if(!(t&&!S.active)&&Ga(S)&&!S.removed){if(i===0)return c;i--}}},ew=function(i,t){t===void 0&&(t=!0);for(var s=this.children,c=0,C=s.length;c<C;c++){var S=s[c];if(!(t&&!S.active)&&Ga(S)&&!S.removed){if(i===0)return S;i--}}},iw=function(i,t){if(typeof i!="number"&&(i=this.children.indexOf(i),i<0))return null;t===void 0&&(t=!0);var s=this.children;i>=s.length&&(i=s.length);for(var c=0,C=0;C<i;C++){var S=s[C];t&&!S.active||Ga(S)&&!S.removed&&c++}return c},sw=function(i){return i===void 0&&(i=!0),this.childrenInteractiveEnable!==i&&(this.lastOverChild=null),this.childrenInteractiveEnable=i,this},Vf=function(c,t,s){for(var c=c,C=0,S=c.length;C<S;C++){var l=c[C];if(!(!l.active||!l.renderable)&&l.contains(t,s))return l}return null},nw=function(){return this.on("pointerdown",rw,this).on("pointerdown",aw,this).on("pointermove",xd,this).on("pointerover",xd,this).on("pointerout",function(i,t){xd.call(this,i,null,null,t)},this),this},rw=function(i,t,s,c){if(this.childrenInteractiveEnable){var C=Vf(this.children,t,s);
6307C&&this.emit("child.pointerdown",C,i,t,s,c)}},aw=function(i,t,s,c){if(this.childrenInteractiveEnable){var C=Vf(this.children,t,s);C&&this.emit("child.pointerup",C,i,t,s,c)}},xd=function(i,t,s,c){if(this.childrenInteractiveEnable){if(t===null){this.lastOverChild!==null&&(this.emit("child.pointerout",this.lastOverChild,i,t,s,c),this.lastOverChild=null);return}var C=Vf(this.children,t,s);C!==this.lastOverChild&&(this.lastOverChild!==null&&this.emit("child.pointerout",this.lastOverChild,i,t,s,c),C!==null&&this.emit("child.pointerover",C,i,t,s,c),this.lastOverChild=C)}};const ow=Phaser.GameObjects.GameObject;var lw=function(i,t,s){var c=!!this.input;return ow.prototype.setInteractive.call(this,i,t,s),c||nw.call(this),this};const hw=Phaser.Utils.Array.BringToTop,uw=Phaser.Utils.Array.SendToBack,dw=Phaser.Utils.Array.MoveUp,cw=Phaser.Utils.Array.MoveDown,fw=Phaser.Utils.Array.MoveAbove,vw=Phaser.Utils.Array.MoveBelow,pw={moveChildToFist(i){return uw(this.children,i),this},moveChildToLast(i){return hw(this.children,i),this},movechildUp(i){return dw(this.children,i),this},movechildDown(i){return cw(this.children,i),this},movechildAbove(i,t){return fw(this.children,i,t),this},movechildBelow(i,t){return vw(this.children,i,t),this}},mw={setBackgroundColor(i,t,s){return this.background.setColor(i,t,s),this},setBackgroundStroke(i,t){return this.background.setStroke(i,t),this},setBackgroundCornerRadius(i,t){return this.background.setCornerRadius(i,t),this}},gw={setInnerBoundsColor(i,t,s){return this.innerBounds.setColor(i,t,s),this},setInnerBoundsStroke(i,t){return this.innerBounds.setStroke(i,t),this}};var Fy={setFixedSize:Jb,setPadding:Qb,getPadding:qb,modifyTextStyle:_b,modifyDefaultTextStyle:tM,resetTextStyle:eM,setTestString:iM,removeChild:nM,removeChildren:rM,popChild:oM,clearContent:lM,addChild:hM,createCharChild:cM,createCharChildren:fM,setText:vM,appendText:Wo,insertText:pM,removeText:mM,getText:gM,createImageChild:yM,appendImage:wy,createDrawerChild:TM,appendDrawer:SM,createSpaceChild:PM,appendSpace:Ay,createCommandChild:MM,appendCommand:It,setWrapConfig:wM,runWordWrap:FM,runVerticalWrap:kM,runWrap:GM,renderContent:zM,forEachChild:YM,forEachRenderableChild:XM,forEachCharChild:UM,getChildren:WM,getActiveChildren:$M,getCharChildren:jM,getLastAppendedChildren:KM,getNearestChild:QM,getCharWorldPosition:qM,setToMinSize:_M,getCharChildIndex:tw,getCharChild:ew,getCharIndex:iw,setChildrenInteractiveEnable:sw,setInteractive:lw};Object.assign(Fy,pw,mw,gw,NM,VM);const xw=Phaser.Utils.Objects.GetFastValue;var yw={};class Cw{constructor(t){this.pools=xw(t,"pools",yw)}free(t){if(!this.pools)return this;var s=t.type;return this.pools.hasOwnProperty(s)||(this.pools[s]=new zs),this.pools[s].push(t),t.onFree(),this}freeMultiple(t){if(!this.pools)return this;for(var s=0,c=t.length;s<c;s++)this.free(t[s]);return this}allocate(t){return!this.pools||!this.pools.hasOwnProperty(t)?null:this.pools[t].pop()}}const ym=Phaser.Utils.Objects.IsPlainObject,Ti=Phaser.Utils.Objects.GetValue;class Ua extends qn{constructor(t,s,c,C,S,l){ym(s)?(l=s,s=Ti(l,"x",0),c=Ti(l,"y",0),C=Ti(l,"width",0),S=Ti(l,"height",0)):ym(C)&&(l=C,C=Ti(l,"width",0),S=Ti(l,"height",0));var T=C===0?1:C,e=S===0?1:S;super(t,s,c,T,e),this.type="rexDynamicText",this.autoRound=!0,this.padding=Wn(),this.wrapPadding=Wn();var d=Ti(l,"style",void 0);this.defaultTextStyle=new qh(null,d),this.textStyle=this.defaultTextStyle.clone(),this.setTestString(Ti(l,"testString","|MÃqgy")),this._textOX=0,this._textOY=0,this.background=new Kb(this,Ti(l,"background",void 0)),this.innerBounds=new Zb(this,Ti(l,"innerBounds",void 0)),this.children=[],this.lastAppendedChildren=[],this.lastOverChild=null,this.poolManager=new Cw(l),this.setFixedSize(C,S),this.setPadding(Ti(l,"padding",0)),this.setWrapConfig(Ti(l,"wrap",void 0)),this.setChildrenInteractiveEnable(Ti(l,"childrenInteractive",!1));var g=Ti(l,"text",void 0);g&&this.setText(g)}updateTexture(){return this.renderContent(),super.updateTexture(),this}get text(){return this.getText(!0)}set text(t){this.setText(t)}setSize(t,s){return this.setFixedSize(t,s),this}get textOX(){return this._textOX}set textOX(t){this.setTextOX(t)}
6307get textOY(){return this._textOY}set textOY(t){this.setTextOY(t)}}Object.assign(Ua.prototype,Fy);xt.register("dynamicText",function(i,t,s,c,C){var S=new Ua(this.scene,i,t,s,c,C);return this.scene.add.existing(S),S});mt(window,"RexPlugins.UI.DynamicText",Ua);const Wa={setEventEmitter(i,t){return t===void 0&&(t=Phaser.Events.EventEmitter),this._privateEE=i===!0||i===void 0,this._eventEmitter=this._privateEE?new t:i,this},destroyEventEmitter(){return this._eventEmitter&&this._privateEE&&this._eventEmitter.shutdown(),this},getEventEmitter(){return this._eventEmitter},on:function(){return this._eventEmitter&&this._eventEmitter.on.apply(this._eventEmitter,arguments),this},once:function(){return this._eventEmitter&&this._eventEmitter.once.apply(this._eventEmitter,arguments),this},off:function(){return this._eventEmitter&&this._eventEmitter.off.apply(this._eventEmitter,arguments),this},emit:function(i){return this._eventEmitter&&i&&this._eventEmitter.emit.apply(this._eventEmitter,arguments),this},addListener:function(){return this._eventEmitter&&this._eventEmitter.addListener.apply(this._eventEmitter,arguments),this},removeListener:function(){return this._eventEmitter&&this._eventEmitter.removeListener.apply(this._eventEmitter,arguments),this},removeAllListeners:function(){return this._eventEmitter&&this._eventEmitter.removeAllListeners.apply(this._eventEmitter,arguments),this},listenerCount:function(){return this._eventEmitter?this._eventEmitter.listenerCount.apply(this._eventEmitter,arguments):0},listeners:function(){return this._eventEmitter?this._eventEmitter.listeners.apply(this._eventEmitter,arguments):[]},eventNames:function(){return this._eventEmitter?this._eventEmitter.eventNames.apply(this._eventEmitter,arguments):[]}},Tw={hasProperty(i){var t=this.gameObject;if(t.hasOwnProperty(i))return!0;var s=t[i];return s!==void 0},getProperty(i){return this.gameObject[i]},setProperty(i,t){return this.gameObject[i]=t,this},easeProperty(i,t,s,c,C,S,l,T){T===void 0&&(T=this.gameObject);var e=this.tweens,d=e[i];d&&d.remove();var g={targets:T,duration:s,ease:c,repeat:C,yoyo:S,onComplete:function(){e[i].remove(),e[i]=null,l&&l(T,i)},onCompleteScope:this};return g[i]=t,d=this.scene.tweens.add(g),d.timeScale=this.timeScale,e[i]=d,this},getTweenTask(i){return this.tweens[i]},freeTweens(){var i=this.tweens,t;for(var s in i)t=i[s],t&&t.remove(),i[s]=null;return this}},Sw={hasMethod(i){return typeof this.gameObject[i]=="function"},call(i,...t){if(!this.hasMethod(i))return this;var s=this.gameObject;return s[i].apply(s,t),this}},Ew={hasData(i){var t=this.gameObject;return t.data?t.data.has(i):!1},getData(i){return this.gameObject.getData(i)},setData(i,t){return this.gameObject.setData(i,t),this}};class zf{constructor(t,s,c){this.GOManager=t,this.tweens={},this.effects={},this.setGO(s,c)}get scene(){return this.GOManager.scene}get timeScale(){return this.GOManager.timeScale}destroy(){this.freeGO(),this.GOManager=void 0}freeGO(){return this.freeTweens(),this.gameObject.destroy(),this.gameObject=void 0,this}setGO(t,s){return t.setName(s),this.gameObject=t,this.name=s,this.freeTweens(),this}setTimeScale(t){var s=this.tweens;for(var c in s){var C=s[c];C&&(C.timeScale=t)}return this}}Object.assign(zf.prototype,Tw,Sw,Ew);var Yf=function(i){for(var t in i)return!1;return!0},Ee=function(i,t){if(!i)return!1;if(i.hasOwnProperty(t))return!0;for(;i;){if(Object.getOwnPropertyDescriptor(i,t))return!0;i=i.__proto__}return!1},fi=function(i){return i.preFX?i.preFX:i.postFX?i.postFX:null},Ie=function(i,t){i._effectSwitchNames||(i._effectSwitchNames=[],i.clearAllEffects=function(){for(var s=i._effectSwitchNames,c=0,C=s.length;c<C;c++)i[s[c]]=null;return i},i.on("destroy",i.clearAllEffects,i)),i._effectSwitchNames.push(t)},Pw=function(i){if(Ee(i,"barrel"))return i;var t=fi(i);if(!t)return i;var s;return Object.defineProperty(i,"barrel",{get:function(){return s},set:function(c){s!==c&&(s=c,s===null||s===!1?i._barrelEffect&&(t.remove(i._barrelEffect),i._barrelEffect=void 0):(i._barrelEffect||(i._barrelEffect=t.addBarrel()),i._barrelEffect.amount=s))}}),i.barrel=null,Ie(i,"barrel"),i},oi=function(i,t,s){if(Ee(i,t))return i;var c=fi(i);if(!c)return i;var C=`_${t}Effect`,S;return Object.defineProperty(i,t,{get:function(){return S},set:function(l){if(S!==l)if(S=l,S===null||S===!1)i[C]&&(c.remove(i[C]),i[C]=void 0);else{i[C]||(i[C]=c.addColorMatrix());var T=i[C];T[t](s===1?l:void 0)}}}),i[t]=null,Ie(i,t),i},bw=function(i){return oi(i,"blackWhite"),i},Mw=function(i){if(Ee(i,"bloomColor"))return i;var t=fi(i);if(!t)return i;var s,c=1,C=1,S=1,l=1,T=4;return Object.defineProperty(i,"bloomColor",{get:function(){return s},set:function(e){s!==e&&(s=e,s===null||s===!1?i._bloom&&(t.remove(i._bloom),i._bloom=void 0,t.setPadding(0)):(i._bloom||(i._bloom=t.addBloom(s,c,C,S,l,T),t.setPadding(Math.max(c,C)+1)),i._bloom.color=s))}}),Object.defineProperty(i,"bloomOffsetX",{get:function(){return c},set:function(e){if(c!==e&&(c=e,i._bloom)){var d=Math.max(c,C);t.setPadding(d+1),i._bloom.offsetX=c}}}),Object.defineProperty(i,"bloomOffsetY",{get:function(){return C},set:function(e){if(C!==e&&(C=e,i._bloom)){var d=Math.max(c,C);t.setPadding(d+1),i._bloom.offsetY=C}}}),Object.defineProperty(i,"bloomBlurStrength",{get:function(){return S}
6307,set:function(e){S!==e&&(S=e,i._bloom&&(i._bloom.blurStrength=S))}}),Object.defineProperty(i,"bloomStrength",{get:function(){return l},set:function(e){l!==e&&(l=e,i._bloom&&(i._bloom.strength=l))}}),Object.defineProperty(i,"bloomSteps",{get:function(){return T},set:function(e){T!==e&&(T=e,i._bloom&&(i._bloom.steps=T))}}),i.bloomColor=null,Ie(i,"bloomColor"),i},ww=function(i){if(Ee(i,"blurColor"))return i;var t=fi(i);if(!t)return i;var s,c=0,C=1,S=1,l=1,T=4;return Object.defineProperty(i,"blurColor",{get:function(){return s},set:function(e){s!==e&&(s=e,s===null||s===!1?i._blur&&(t.remove(i._blur),i._blur=void 0,t.setPadding(0)):(i._blur||(i._blur=t.addBlur(c,C,S,l,s,T),t.setPadding(Math.max(C,S)+1)),i._blur.color=s))}}),Object.defineProperty(i,"blurQuality",{get:function(){return c},set:function(e){c!==e&&(c=e,i._blur&&(i._blur.quality=c))}}),Object.defineProperty(i,"blurX",{get:function(){return C},set:function(e){if(C!==e&&(C=e,i._blur)){var d=Math.max(C,S);t.setPadding(d+1),i._blur.x=C}}}),Object.defineProperty(i,"blurY",{get:function(){return S},set:function(e){if(S!==e&&(S=e,i._blur)){var d=Math.max(C,S);t.setPadding(d+1),i._blur.y=S}}}),Object.defineProperty(i,"blurStrength",{get:function(){return l},set:function(e){l!==e&&(l=e,i._blur&&(i._blur.strength=l))}}),Object.defineProperty(i,"blurSteps",{get:function(){return T},set:function(e){T!==e&&(T=e,i._blur&&(i._blur.steps=T))}}),i.blurColor=null,Ie(i,"blurColor"),i},Aw=function(i){if(Ee(i,"bokehRadius"))return i;var t=fi(i);if(!t)return i;var s,c=1,C=.2;return Object.defineProperty(i,"bokehRadius",{get:function(){return s},set:function(S){s!==S&&(s=S,s===null||s===!1?i._bokeh&&(t.remove(i._bokeh),i._bokeh=void 0):(i._bokeh||(i._bokeh=t.addBokeh(s,c,C)),i._bokeh.radius=s))}}),Object.defineProperty(i,"bokehAmount",{get:function(){return c},set:function(S){c!==S&&(c=S,i._bokeh&&(i._bokeh.amount=c))}}),Object.defineProperty(i,"bokehContrast",{get:function(){return C},set:function(S){C!==S&&(C=S,i._bokeh&&(i._bokeh.contrast=C))}}),i.bokehRadius=null,Ie(i,"bokehRadius"),i},Rw=function(i){return oi(i,"brightness",1),i},Ow=function(i){return oi(i,"brown"),i},Lw=function(i){if(Ee(i,"circleColor"))return i;var t=fi(i);if(!t)return i;var s,c=8,C=0,S=.4,l=1,T=.005;return Object.defineProperty(i,"circleColor",{get:function(){return s},set:function(e){s!==e&&(s=e,s===null||s===!1?i._circle&&(t.remove(i._circle),i._circle=void 0):(i._circle||(i._circle=t.addCircle(c,s,C,l,T),i.circleBackgroundAlpha=S),i._circle.color=s))}}),Object.defineProperty(i,"circleThickness",{get:function(){return c},set:function(e){c!==e&&(c=e,i._circle&&(i._circle.thickness=c))}}),Object.defineProperty(i,"circleBackgroundColor",{get:function(){return C},set:function(e){C!==e&&(C=e,i._circle&&(i._circle.backgroundColor=C))}}),Object.defineProperty(i,"circleBackgroundAlpha",{get:function(){return S},set:function(e){S!==e&&(S=e,i._circle&&(i._circle.glcolor2[3]=S))}}),Object.defineProperty(i,"circleScale",{get:function(){return l},set:function(e){l!==e&&(l=e,i._circle&&(i._circle.scale=l))}}),Object.defineProperty(i,"circleFeather",{get:function(){return T},set:function(e){T!==e&&(T=e,i._circle&&(i._circle.feather=T))}}),i.circleColor=null,Ie(i,"circleColor"),i},Fw=function(i){return oi(i,"contrast",1),i},Iw=function(i){return oi(i,"desaturate",1),i},Dw=function(i){return oi(i,"desaturateLuminance"),i},Bw=function(i){if(Ee(i,"displacementKey"))return i;var t=fi(i);if(!t)return i;var s,c=.005,C=.005;return Object.defineProperty(i,"displacementKey",{get:function(){return s},set:function(S){s!==S&&(s=S,s===null||s===!1?i._displacement&&(t.remove(i._displacement),i._displacement=void 0):(i._displacement||(i._displacement=t.addDisplacement(s,c,C)),i._displacement.setTexture(s)))}}),Object.defineProperty(i,"displacementX",{get:function(){return c},set:function(S){c!==S&&(c=S,i._displacement&&(i._displacement.x=c))}}),Object.defineProperty(i,"displacementY",{get:function(){return C},set:function(S){C!==S&&(C=S,i._displacement&&(i._displacement.y=C))}}),i.displacementKey=null,Ie(i,"displacementKey"),i},kw=function(i){if(Ee(i,"glowColor"))return i;var t=fi(i);if(!t)return i;var s,c=4,C=0;return Object.defineProperty(i,"glowColor",{get:function(){return s},set:function(S){s!==S&&(s=S,s===null||s===!1?i._glow&&(t.remove(i._glow),i._glow=void 0,t.setPadding(0)):(i._glow||(i._glow=t.addGlow(s,c,C),t.setPadding(c+1)),i._glow.color=s))}}),Object.defineProperty(i,"glowOuterStrength",{get:function(){return c},set:function(S){c!==S&&(c=S,i._glow&&(t.setPadding(c+1),i._glow.outerStrength=c))}}),Object.defineProperty(i,"glowInnerStrength",{get:function(){return C},set:function(S){C!==S&&(C=S,i._glow&&(i._glow.innerStrength=C))}}),i.glowColor=null,Ie(i,"glowColor"),i},Gw=function(i){if(Ee(i,"gradientColor"))return i;var t=fi(i);if(!t)return i;var s,c,C=.5,S=0,l=0,T=0,e=1,d=0;return Object.defineProperty(i,"gradientColor",{get:function(){return[s,c]},set:function(g){var r,a;g===null||g===!1?(r=null,a=null):(r=g[0],a=g[1]),!(s===r&&c===a)&&(s=r,c=a,s===null||s===!1?i._gradient&&(t.remove(i._gradient),i._gradient=void 0):(i._gradient||(i._gradient=t.addGradient(s,c,C,S,l,T,e,d)),i._gradient.color1=s,i._gradient.color2=c))}}),Object.defineProperty(i,"gradientColor1",{get:function(){return s},set:function(g){if(g===null||g===!1){i.gradientColor=g;return}s!==g&&(s=g,i._gradient&&(i._gradient.color1=s))}}),Object.defineProperty(i,"gradientColor2",{get:function(){return c},set:function(g){if(g===null||g===!1){i.gradientColor=g;return}c!==g&&(c=g,i._gradient&&(i._gradient.color2=c))}}),Object.defineProperty(i,"gradientAlpha",{get:function(){return C},set:function(g){C!==g&&(C=g,i._gradient&&(i._gradient.alpha=C))}}),Object.defineProperty(i,"gradientFromX",{get:function(){return S},set:function(g){S!==g&&(S=g,i._gradient&&(i._gradient.fromX=S))}}),Object.defineProperty(i,"gradientFromY",{get:function(){return l},set:function(g){l!==g&&(l=g,i._gradient&&(i._gradient.fromY=l))}}),Object.defineProperty(i,"gradientToX",{get:function(){return T},set:function(g){T!==g&&(T=g,i._gradient&&(i._gradient.toX=T))}}),Object.defineProperty(i,"gradientToY",{get:function(){return e},set:function(g){e!==g&&(e=g,i._gradient&&(i._gradient.toY=e))}}),Object.defineProperty(i,"gradientSize",{get:function(){return d}
6307,set:function(g){d!==g&&(d=g,i._gradient&&(i._gradient.size=d))}}),i.gradientColor=null,Ie(i,"gradientColor"),i},Nw=function(i){return oi(i,"grayscale",1),i},Vw=function(i){return oi(i,"hue",1),i},zw=function(i){return oi(i,"kodachrome"),i},Yw=function(i){return oi(i,"lsd"),i},Xw=function(i){return oi(i,"negative"),i},Uw=function(i){if(Ee(i,"pixelate"))return i;var t=fi(i);if(!t)return i;var s;return Object.defineProperty(i,"pixelate",{get:function(){return s},set:function(c){s!==c&&(s=c,s===null||s===!1?i._pixelateEffect&&(t.remove(i._pixelateEffect),i._pixelateEffect=void 0):(i._pixelateEffect||(i._pixelateEffect=t.addPixelate()),i._pixelateEffect.amount=s))}}),i.pixelate=null,Ie(i,"pixelate"),i},Ww=function(i){return oi(i,"polaroid"),i},Hw=function(i){if(Ee(i,"revealLeft"))return i;var t=fi(i);if(!t)return i;var s,c,C,S,l=.1,T=function(){s=null,c=null,C=null,S=null},e=function(d){d._revealEffect&&(t.remove(d._revealEffect),d._revealEffect=void 0)};return Object.defineProperty(i,"revealLeft",{get:function(){return s},set:function(d){s!==d&&(T(),s=d,s===null||s===!1?e(i):(i._revealEffect||(i._revealEffect=t.addReveal(l,0,0)),i._revealEffect.direction=1,i._revealEffect.axis=0,i._revealEffect.progress=s))}}),Object.defineProperty(i,"revealRight",{get:function(){return c},set:function(d){c!==d&&(T(),c=d,c===null||c===!1?e(i):(i._revealEffect||(i._revealEffect=t.addReveal(l,0,0)),i._revealEffect.direction=0,i._revealEffect.axis=0,i._revealEffect.progress=c))}}),Object.defineProperty(i,"revealUp",{get:function(){return C},set:function(d){C!==d&&(T(),C=d,C===null||C===!1?e(i):(i._revealEffect||(i._revealEffect=t.addReveal(l,0,0)),i._revealEffect.direction=1,i._revealEffect.axis=1,i._revealEffect.progress=C))}}),Object.defineProperty(i,"revealDown",{get:function(){return S},set:function(d){S!==d&&(T(),S=d,S===null||S===!1?e(i):(i._revealEffect||(i._revealEffect=t.addReveal(l,0,0)),i._revealEffect.direction=0,i._revealEffect.axis=1,i._revealEffect.progress=S))}}),Object.defineProperty(i,"revealWidth",{get:function(){return l},set:function(d){l!==d&&(l=d,i._revealEffect&&(i._revealEffect.wipeWidth=l))}}),i.revealLeft=null,Ie(i,"revealLeft"),Ie(i,"revealRight"),Ie(i,"revealUp"),Ie(i,"revealDown"),i},$w=function(i){return oi(i,"saturate",1),i},jw=function(i){return oi(i,"sepia"),i},Kw=function(i){if(Ee(i,"shadowColor"))return i;var t=fi(i);if(!t)return i;var s,c=0,C=0,S=.1,l=1,T=6,e=1;return Object.defineProperty(i,"shadowColor",{get:function(){return s},set:function(d){s!==d&&(s=d,s===null||s===!1?i._shadow&&(t.remove(i._shadow),i._shadow=void 0):(i._shadow||(i._shadow=t.addShadow(c,C,S,l,s,T,e)),i._shadow.color=s))}}),Object.defineProperty(i,"shadowX",{get:function(){return c},set:function(d){c!==d&&(c=d,i._shadow&&(i._shadow.x=c))}}),Object.defineProperty(i,"shadowY",{get:function(){return C},set:function(d){C!==d&&(C=d,i._shadow&&(i._shadow.y=C))}}),Object.defineProperty(i,"decay",{get:function(){return S},set:function(d){S!==d&&(S=d,i._shadow&&(i._shadow.decay=S))}}),Object.defineProperty(i,"shadowPower",{get:function(){return l},set:function(d){l!==d&&(l=d,i._shadow&&(i._shadow.power=l))}}),Object.defineProperty(i,"shadowSamples",{get:function(){return T},set:function(d){T!==d&&(T=d,i._shadow&&(i._shadow.samples=T))}}),Object.defineProperty(i,"shadowIntensity",{get:function(){return e},set:function(d){e!==d&&(e=d,i._shadow&&(i._shadow.intensity=e))}}),i.shadowColor=null,Ie(i,"shadowColor"),i},Zw=function(i){return oi(i,"shiftToBGR"),i},Jw=function(i){if(Ee(i,"shineSpeed"))return i;var t=fi(i);if(!t)return i;var s,c=.5,C=3;return Object.defineProperty(i,"shineSpeed",{get:function(){return s},set:function(S){s!==S&&(s=S,s===null||s===!1?i._shine&&(t.remove(i._shine),i._shine=void 0):(i._shine||(i._shine=t.addShine(s,c,C)),i._shine.speed=s))}}),Object.defineProperty(i,"shineLineWidth",{get:function(){return c},set:function(S){c!==S&&(c=S,i._shine&&(i._shine.lineWidth=c))}}),Object.defineProperty(i,"shineGradient",{get:function(){return C},set:function(S){C!==S&&(C=S,i._shine&&(i._shine.gradient=C))}}),i.shineSpeed=null,Ie(i,"shineSpeed"),i},Qw=function(i){return oi(i,"technicolor"),i},qw=function(i){if(Ee(i,"tiltShiftRadius"))return i;var t=fi(i);if(!t)return i;var s,c=1,C=.2,S=1,l=1,T=1;return Object.defineProperty(i,"tiltShiftRadius",{get:function(){return s},set:function(e){s!==e&&(s=e,s===null||s===!1?i._tiltShift&&(t.remove(i._tiltShift),i._tiltShift=void 0):(i._tiltShift||(i._tiltShift=t.addTiltShift(s,c,C,S,l,T)),i._tiltShift.radiu
6307s=s))}}),Object.defineProperty(i,"tiltShiftAmount",{get:function(){return c},set:function(e){c!==e&&(c=e,i._tiltShift&&(i._tiltShift.amount=c))}}),Object.defineProperty(i,"tiltShiftContrast",{get:function(){return C},set:function(e){C!==e&&(C=e,i._tiltShift&&(i._tiltShift.contrast=C))}}),Object.defineProperty(i,"tiltShiftBlurX",{get:function(){return S},set:function(e){S!==e&&(S=e,i._tiltShift&&(i._tiltShift.blurX=S))}}),Object.defineProperty(i,"tiltShiftBlurY",{get:function(){return l},set:function(e){l!==e&&(l=e,i._tiltShift&&(i._tiltShift.blurY=l))}}),Object.defineProperty(i,"tiltShiftStrength",{get:function(){return T},set:function(e){T!==e&&(T=e,i._tiltShift&&(i._tiltShift.strength=T))}}),i.tiltShiftRadius=null,Ie(i,"tiltShiftRadius"),i},_w=function(i){if(Ee(i,"vignetteColor"))return i;var t=fi(i);if(!t)return i;var s,c=.5,C=.5,S=.5;return Object.defineProperty(i,"vignetteRadius",{get:function(){return s},set:function(l){s!==l&&(s=l,s===null||s===!1?i._vignette&&(t.remove(i._vignette),i._vignette=void 0):(i._vignette||(i._vignette=t.addVignette(c,C,s,S)),i._vignette.radius=s))}}),Object.defineProperty(i,"vignetteX",{get:function(){return c},set:function(l){c!==l&&(c=l,i._vignette&&(i._vignette.x=c))}}),Object.defineProperty(i,"vignetteY",{get:function(){return C},set:function(l){C!==l&&(C=l,i._vignette&&(i._vignette.y=C))}}),Object.defineProperty(i,"vignetteStrength",{get:function(){return S},set:function(l){S!==l&&(S=l,i._vignette&&(i._vignette.strength=S))}}),i.vignetteRadius=null,Ie(i,"vignetteRadius"),i},t3=function(i){return oi(i,"vintagePinhole"),i},e3=function(i){if(Ee(i,"wipeLeft"))return i;var t=fi(i);if(!t)return i;var s,c,C,S,l=.1,T=function(){s=null,c=null,C=null,S=null},e=function(d){d._wipeEffect&&(t.remove(d._wipeEffect),d._wipeEffect=void 0)};return Object.defineProperty(i,"wipeLeft",{get:function(){return s},set:function(d){s!==d&&(T(),s=d,s===null||s===!1?e(i):(i._wipeEffect||(i._wipeEffect=t.addWipe(l,0,0)),i._wipeEffect.direction=1,i._wipeEffect.axis=0,i._wipeEffect.progress=s))}}),Object.defineProperty(i,"wipeRight",{get:function(){return c},set:function(d){c!==d&&(T(),c=d,c===null||c===!1?e(i):(i._wipeEffect||(i._wipeEffect=t.addWipe(l,0,0)),i._wipeEffect.direction=0,i._wipeEffect.axis=0,i._wipeEffect.progress=c))}}),Object.defineProperty(i,"wipeUp",{get:function(){return C},set:function(d){C!==d&&(T(),C=d,C===null||C===!1?e(i):(i._wipeEffect||(i._wipeEffect=t.addWipe(l,0,0)),i._wipeEffect.direction=1,i._wipeEffect.axis=1,i._wipeEffect.progress=C))}}),Object.defineProperty(i,"wipeDown",{get:function(){return S},set:function(d){S!==d&&(T(),S=d,S===null||S===!1?e(i):(i._wipeEffect||(i._wipeEffect=t.addWipe(l,0,0)),i._wipeEffect.direction=0,i._wipeEffect.axis=1,i._wipeEffect.progress=S))}}),Object.defineProperty(i,"wipeWidth",{get:function(){return l},set:function(d){l!==d&&(l=d,i._wipeEffect&&(i._wipeEffect.wipeWidth=l))}}),i.wipeLeft=null,Ie(i,"wipeLeft"),Ie(i,"wipeRight"),Ie(i,"wipeUp"),Ie(i,"wipeDown"),i};const Dl={barrel:Pw,blackWhite:bw,bloom:Mw,blur:ww,bokeh:Aw,brightness:Rw,brown:Ow,circle:Lw,contrast:Fw,desaturate:Iw,desaturateLuminance:Dw,displacement:Bw,glow:kw,gradient:Gw,grayscale:Nw,hue:Vw,kodachrome:zw,lsd:Yw,negative:Xw,pixelate:Uw,polaroid:Ww,reveal:Hw,saturate:$w,sepia:jw,shadow:Kw,shiftToBGR:Zw,shine:Jw,technicolor:Qw,tiltShift:qw,vignette:_w,vintagePinhole:t3,wipe:e3};var _h=function(i,t){if(t===void 0)t=!0;else if(typeof t=="string")t={config:!0};else if(Array.isArray(t))for(var s=t,t={},c=0,C=s.length;c<C;c++)t[s[c]]=!0;if(t===!0)for(var S in Dl)Dl[S](i);else for(var S in t)t[S]&&Dl[S]&&Dl[S](i);return i};const Iy=0,Dy=1,qc=2,By=3,ky=4,_c=5,i3={tint:Iy,alpha:Dy,revealUp:qc,revealDown:By,revealLeft:ky,revealRight:_c},s3={setGOFadeMode(i){return typeof i=="string"&&(i=i3[i]),this.fadeMode=i,this},setGOFadeTime(i){return this.fadeTime=i,this},useTintFadeEffect(i){return(this.fadeMode===void 0||this.fadeMode===Iy)&&this.fadeTime>0&&i.setTint!==void 0},useAlphaFadeEffect(i){return(this.fadeMode===void 0||this.fadeMode===Dy)&&this.fadeTime>0&&i.setAlpha!==void 0},useRevealEffect(i){return this.fadeMode>=qc&&this.fadeMode<=_c&&this.fadeTime>0&&(i.preFX||i.postFX)},fadeBob(i,t,s,c){var C=i.gameObject;if(this.useTintFadeEffect(C))t!==void 0&&i.setProperty("tintGray",255*t),i.easeProperty("tintGray",Math.floor(255*s),this.fadeTime,"Linear",0,!1,c);else if(this.useAlphaFadeEffect(C))t!==void 0&&i.setProperty("alpha",t),i.easeProperty("alpha",s,this.fadeTime,"Linear",0,!1,c);else if(this.useRevealEffect(C)){_h(C,"reveal");var S;switch(this.fadeMode){case qc:S="revealUp";break;case By:S="revealDown";break;case ky:S="revealLeft";break;case _c:S="revealRight";break}t===void 0&&(t=0),C[S]=t,i.easeProperty(S,s,this.fadeTime,"Linear",0,!1,c),i.getTweenTask(S).once("complete",function(){C[S]=null})}else c&&c(C);return this}};var Bo=function(i){return i>>16&255},ko=function(i){return i>>8&255},Go=function(i){return i&255};const n3=~(255<<16)&16777215,r3=16711935,a3=16776960;var o3=function(i,t){return(t&255)<<16|i&n3},l3=function(i,t){return(t&255)<<8|i&r3},h3=function(i,t){return t&255|i&a3},u3=function(i,t,s,c){return(t&255)<<16|(s&255)<<8|c&255},d3=function(i,t){if(i.hasOwnProperty("tintR"))return i;t===void 0&&(t=16777215);var s=Bo(t),c=ko(t),C=Go(t);return Object.defineProperty(i,"tint",{get:function(){return t},set:function(S){S=Math.floor(S)&16777215,i.setTint&&i.setTint(S),t!==S&&(t=S,s=Bo(t),c=ko(t),C=Go(t))}}),Object.defineProperty(i,"tintR",{get:function(){return s},set:function(S){S=Math.floor(S)&255,s!==S&&(s=S,i.tint=o3(t,S))}}),Object.defineProperty(i,"tintG",{get:function(){return c},set:function(S){S=Math.floor(S)&255,c!==S&&(c=S,i.tint=l3(t,S))}}),Object.defineProperty(i,"tintB",{get:function(){return C},set:function(S){S=Math.floor(S)&255,C!==S&&(C=S,i.tint=h3(t,S))}}),Object.defineProperty(i,"tintGray",{get:function(){return Math.floor((s+c+C)/3)}
6307,set:function(S){S=Math.floor(S)&255,(s!==S||c!==S||C!==S)&&(s=S,c=S,C=S,i.tint=u3(t,S,S,S))}}),i.tint=t,i};const c3=Phaser.Events.EventEmitter;var f3=function(i){if(i.events)return i;var t=new c3,s=i.x;Object.defineProperty(i,"x",{get:function(){return s},set:function(l){s!==l&&(s=l,t.emit("update",i))}});var c=i.y;Object.defineProperty(i,"y",{get:function(){return c},set:function(l){c!==l&&(c=l,t.emit("update",i))}});var C=i.width;Object.defineProperty(i,"width",{get:function(){return C},set:function(l){C!==l&&(C=l,t.emit("update",i))}});var S=i.height;return Object.defineProperty(i,"height",{get:function(){return S},set:function(l){S!==l&&(S=l,t.emit("update",i))}}),i.events=t,i},v3=function(i,t,s,c,C,S){return S===void 0?S={}:S===!0&&(S=p3),typeof s!="number"&&(s=0,c=0),S.x=C.x+C.width*i+s,S.y=C.y+C.height*t+c,S},p3={},m3=function(i,t,s,c,C,S,l){if(i.hasOwnProperty("vp"))return i;typeof s=="function"&&(l=s,s=void 0),typeof C=="function"&&(l=C,C=void 0),s===void 0&&(s=.5),c===void 0&&(c=.5),C===void 0&&(C=0),S===void 0&&(S=0),l===void 0&&(l=v3),f3(t);var T=t.events;i.vp=t;var e=function(){l(s,c,C,S,t,i)};T.on("update",e),i.once("destroy",function(){T.off("update",e),i.vp=void 0}),Object.defineProperty(i,"vpx",{get:function(){return s},set:function(d){s!==d&&(s=d,e())}}),Object.defineProperty(i,"vpy",{get:function(){return c},set:function(d){c!==d&&(c=d,e())}}),Object.defineProperty(i,"vpxOffset",{get:function(){return C},set:function(d){C!==d&&(C=d,e())}}),Object.defineProperty(i,"vpyOffset",{get:function(){return S},set:function(d){S!==d&&(S=d,e())}}),e()};const g3=Phaser.Utils.Array.Remove,x3={has(i){return this.bobs.hasOwnProperty(i)},exists(i){return this.bobs.hasOwnProperty(i)},get(i){return this.bobs[i]},getGO(i){var t=this.get(i);return t?t.gameObject:null},addGO(i,t){this.remove(i,!0),this.useTintFadeEffect(t)&&d3(t),this.viewportCoordinateEnable&&m3(t,this.viewport),this.effectPropertiesConfig&&_h(t,this.effectPropertiesConfig),t.once("destroy",function(){g3(this.removedGOs,t),this.isEmpty&&this.emit("empty")},this);var s=new this.BobClass(this,t,i);return this.bobs[i]=s,this},add(i,...t){var s=this.createGameObjectCallback,c=this.createGameObjectScope,C=s.call(c,this.scene,...t);this.addGO(i,C);var S=this.get(i);return this.fadeBob(S,0,1),this},forEachGO(i,t){for(var s in this.bobs){var c=this.bobs[s].gameObject,C;if(t?C=i.call(t,c,s,this):C=i(c,s,this),C)break}return this}},y3={remove(i,t){if(!this.has(i))return this;var s=this.get(i);return delete this.bobs[i],this.removedGOs.push(s.gameObject),t?s.destroy():this.fadeBob(s,void 0,0,function(){s.destroy()}),this},removeAll(){var i=this.bobs;for(var t in i)this.remove(t);return this},clear(i){i===void 0&&(i=!0);var t=this.bobs;for(var s in t)i&&t[s].destroy(),delete t[s];return this.removedGOs.length=0,this}},C3={hasProperty(i,t){return this.has(i)?this.get(i).hasProperty(t):!1},getProperty(i,t){if(this.has(i))return this.get(i).getProperty(t)},isNumberProperty(i,t){var s=this.getProperty(i,t);return typeof s=="number"},setProperty(i,t,s){return this.has(i)?(this.symbols&&typeof s=="string"&&this.isNumberProperty(i,t)&&(s in this.symbols?s=this.symbols[s]:console.warn(`Can't find symbol ${s}`)),this.get(i).setProperty(t,s),this):this},easeProperty(i,t,s,c,C,S,l,T){return this.has(i)?(c===void 0&&(c=1e3),C===void 0&&(C="Linear"),S===void 0&&(S=0),l===void 0&&(l=!1),this.symbols&&typeof s=="string"&&this.isNumberProperty(i,t)&&(s in this.symbols?s=this.symbols[s]:console.warn(`Can't find symbol ${s}`)),this.get(i).easeProperty(t,s,c,C,S,l,T),this):this},hasTweenTask(i,t){if(!this.has(i))return!1;var s=this.get(i).tweens;return s.hasOwnProperty(t)},getTweenTask(i,t){if(!this.has(i))return null;var s=this.get(i).tweens,c=s[t];return c||null}},T3={hasMethod(i,t){return this.has(i)?this.get(i).hasMethod(t):!1},call(i,t,...s){return this.has(i)?(this.get(i).call(t,...s),this):this}},S3={hasData(i,t){return this.has(i)?this.get(i).hasData(t):!1},getData(i,t){if(this.has(i))return this.get(i).getData(t)},setData(i,t,s){return this.has(i)?(this.get(i).setData(t,s),this):this}};var de=function(i){return i.displayWidth!==void 0?i.displayWidth:i.width},ie=function(i){return i.displayHeight!==void 0?i.displayHeight:i.height};const Cm=Phaser.Geom.Rectangle,Zn=Phaser.Math.Vector2,E3=Phaser.Math.RotateAroun
6307d;var Xf=function(i,t){if(t===void 0?t=new Cm:t===!0&&(yd===void 0&&(yd=new Cm),t=yd),i.getBounds)return i.getBounds(t);var s,c,C,S,l,T,e,d;if(i.parentContainer){var g=i.parentContainer.getBoundsTransformMatrix();tf(i,t),g.transformPoint(t.x,t.y,t),s=t.x,c=t.y,ef(i,t),g.transformPoint(t.x,t.y,t),C=t.x,S=t.y,sf(i,t),g.transformPoint(t.x,t.y,t),l=t.x,T=t.y,nf(i,t),g.transformPoint(t.x,t.y,t),e=t.x,d=t.y}else tf(i,t),s=t.x,c=t.y,ef(i,t),C=t.x,S=t.y,sf(i,t),l=t.x,T=t.y,nf(i,t),e=t.x,d=t.y;return t.x=Math.min(s,C,l,e),t.y=Math.min(c,S,T,d),t.width=Math.max(s,C,l,e)-t.x,t.height=Math.max(c,S,T,d)-t.y,t},yd=void 0,tf=function(i,t,s){return t===void 0?t=new Zn:t===!0&&(ns===void 0&&(ns=new Zn),t=ns),i.getTopLeft?i.getTopLeft(t):(t.x=i.x-de(i)*i.originX,t.y=i.y-ie(i)*i.originY,tu(i,t,s))},ef=function(i,t,s){return t===void 0?t=new Zn:t===!0&&(ns===void 0&&(ns=new Zn),t=ns),i.getTopRight?i.getTopRight(t):(t.x=i.x-de(i)*i.originX+de(i),t.y=i.y-ie(i)*i.originY,tu(i,t,s))},sf=function(i,t,s){return t===void 0?t=new Zn:t===!0&&(ns===void 0&&(ns=new Zn),t=ns),i.getBottomLeft?i.getBottomLeft(t):(t.x=i.x-de(i)*i.originX,t.y=i.y-ie(i)*i.originY+ie(i),tu(i,t,s))},nf=function(i,t,s){return t===void 0?t=new Zn:t===!0&&(ns===void 0&&(ns=new Zn),t=ns),i.getBottomRight?i.getBottomRight(t):(t.x=i.x-de(i)*i.originX+de(i),t.y=i.y-ie(i)*i.originY+ie(i),tu(i,t,s))},ns=void 0,tu=function(i,t,s){if(s===void 0&&(s=!1),i.rotation!==0&&E3(t,i.x,i.y,i.rotation),s&&i.parentContainer){var c=i.parentContainer.getBoundsTransformMatrix();c.transformPoint(t.x,t.y,t)}return t};const ro=Phaser.Utils.Objects.GetValue;var Gy=function(i,t,s){var c,C,S,l,T;if(typeof s=="number"?c=s:(c=ro(s,"color"),C=ro(s,"lineWidth"),S=ro(s,"fillColor"),l=ro(s,"fillAlpha",1),T=ro(s,"padding",0)),Array.isArray(i))for(var e=0,d=i.length;e<d;e++)Tm(i[e],t,c,C,S,l,T);else Tm(i,t,c,C,S,l,T)},Tm=function(i,t,s,c,C,S,l){var T=i.getBounds||i.width!==void 0&&i.height!==void 0;if(T){s===void 0&&(s=16777215),c===void 0&&(c=1),C===void 0&&(C=null),S===void 0&&(S=1),l===void 0&&(l=0);var e=tf(i,_r[0]);e.x-=l,e.y-=l;var d=ef(i,_r[1]);d.x+=l,d.y-=l;var g=nf(i,_r[2]);g.x+=l,g.y+=l;var r=sf(i,_r[3]);r.x-=l,r.y+=l,C!==null&&t.fillStyle(C,S).fillPoints(_r,!0,!0),s!==null&&t.lineStyle(c,s).strokePoints(_r,!0,!0)}},_r=[{x:0,y:0},{x:0,y:0},{x:0,y:0},{x:0,y:0}],P3=function(i,t){return this.forEachGO(function(s){s.drawBounds?s.drawBounds(i,t):Gy(s,i,t)}),this},Ny={drawGameObjectsBounds:P3};Object.assign(Ny,s3,x3,y3,C3,T3,S3);const b3=Phaser.Cameras.Scene2D.BaseCamera;var M3=function(i){return i instanceof b3};const Vy=Phaser.Geom.Rectangle;var Ha=function(i,t,s){return M3(t)||(s=t,t=void 0),s===void 0?s=new Vy:s===!0&&(s=w3),t?i.scale.getViewPort(t,s):i.scale.getViewPort(s)},w3=new Vy;const Hi=Phaser.Utils.Objects.GetValue;class eu{constructor(t,s){this.scene=t,this.BobClass=Hi(s,"BobClass",zf),this.setCreateGameObjectCallback(Hi(s,"createGameObject"),Hi(s,"createGameObjectScope")),this.setEventEmitter(Hi(s,"eventEmitter",void 0));var c=Hi(s,"fade",500);typeof c=="number"?(this.setGOFadeMode(),this.setGOFadeTime(c)):(this.setGOFadeMode(Hi(c,"mode")),this.setGOFadeTime(Hi(c,"time",500)));var C=Hi(s,"viewportCoordinate",!1);C!==!1?(this.setViewportCoordinateEnable(Hi(s,"enable",!0)),this.setViewport(Hi(C,"viewport"))):this.setViewportCoordinateEnable(!1);var S=Hi(s,"effectProperties",!1);this.setEffectPropertiesConfig(S),this.setSymbols(Hi(s,"symbols")),this.bobs={},this.removedGOs=[],this._timeScale=1}destroy(t){this.clear(!t),this.createGameObjectCallback=void 0,this.viewport=void 0,this.scene=void 0}set timeScale(t){if(this._timeScale!==t){this._timeScale=t;var s=this.bobs;for(var c in s)s[c].setTimeScale(t)}}get timeScale(){return this._timeScale}setTimeScale(t){return this.timeScale=t,this}setCreateGameObjectCallback(t,s){return this.createGameObjectCallback=t,this.createGameObjectScope=s,this}setViewportCoordinateEnable(t){return t===void 0&&(t=!0),this.viewportCoordinateEnable=t,this}setEffectPropertiesConfig(t){return t===void 0&&(t=!0),this.effectPropertiesConfig=t,this}setViewport(t){return t===void 0&&(t=Ha(this.scene,this.scene.cameras.main)),this.viewport=t,this}setSymbols(t){return this.symbols=t,this}get isEmpty(){return Yf(this.bobs)&&this.removedGOs.length===0}}Object.assign(eu.prototype,Wa,Ny);var hn=function(i,t){if(i.length<=1)return i;t===void 0&&(t=!1);var s,c=i[0];return c.displayList?s=c.displayList:c.parentContainer?s=c.parentContainer.list:s=c.scene.sys.displayList,s.depthSort&&(s.depthSort(),s=s.list),t?i.sort(function(C,S){return s.indexOf(S)-s.indexOf(C)}):i.sort(function(C,S){return s.indexOf(C)-s.indexOf(S)}),i};
6307const A3=Phaser.Utils.Objects.GetValue;class R3 extends eu{constructor(t,s){s===void 0?s={}:Array.isArray(s)&&(s={layers:s}),s.hasOwnProperty("fade")||(s.fade=0),s.viewportCoordinate=!1,super(t,s);var c=A3(s,"layers");if(c)for(var C=0,S=c.length;C<S;C++)this.add(c[C])}setCreateGameObjectCallback(t,s){return t||(t=O3),super.setCreateGameObjectCallback(t,s),this}addGO(t,s){return super.addGO(t,s),s.name=t,this}getLayer(t){return this.getGO(t)}getLayers(t){return t===void 0&&(t=[]),this.forEachGO(function(s){t.push(s)}),hn(t,!1),t}addToLayer(t,s){var c=this.getGO(t);if(!c){console.warn(`Can't get layer "${t}"`);return}return s.isRexContainerLite?s.addToLayer(c):c.add(s),this}removeFromLayer(t,s,c){var C=this.getGO(t);if(!C){console.warn(`Can't get layer "${t}"`);return}return c===void 0&&(c=!0),s.isRexContainerLite?s.removeFromLayer(C,c):(C.remove(s),c&&s.addToDisplayList()),this}clearLayer(t,s){s===void 0&&(s=!0);var c=this.getGO(t);if(!c){console.warn(`Can't get layer "${t}"`);return}if(s)for(var C=c.getAll(),S=0,l=C.length;S<l;S++)C.destroy();else c.removeAll();return this}}var O3=function(i,t){var s=i.add.layer();return t!==void 0&&s.setDepth(t),s},L3=function(i){return Fr(i)?i.sys.sound:i.sound},Ho=function(i){return i==null||typeof i!="object"?null:Fr(i)?i:i.scene&&Fr(i.scene)?i.scene:i.parent&&i.parent.scene&&Fr(i.parent.scene)?i.parent.scene:null};const F3=Phaser.Utils.Objects.GetValue;class ke{constructor(t,s){this.setParent(t),this.isShutdown=!1,this.setEventEmitter(F3(s,"eventEmitter",!0)),this.parent&&(this.parent===this.scene?this.scene.sys.events.once("shutdown",this.onEnvDestroy,this):this.parent===this.game?this.game.events.once("shutdown",this.onEnvDestroy,this):this.parent.once&&this.parent.once("destroy",this.onParentDestroy,this))}shutdown(t){this.isShutdown||(this.parent&&(this.parent===this.scene?this.scene.sys.events.off("shutdown",this.onEnvDestroy,this):this.parent===this.game?this.game.events.off("shutdown",this.onEnvDestroy,this):this.parent.once&&this.parent.off("destroy",this.onParentDestroy,this)),this.destroyEventEmitter(),this.parent=void 0,this.scene=void 0,this.game=void 0,this.isShutdown=!0)}destroy(t){this.shutdown(t)}onEnvDestroy(){this.destroy(!0)}onParentDestroy(t,s){this.destroy(s)}setParent(t){return this.parent=t,this.scene=Ho(t),this.game=Ir(t),this}}Object.assign(ke.prototype,Wa);const I3=Phaser.Utils.Objects.GetValue;class iu extends ke{constructor(t,s){super(t,s),this._isRunning=!1,this.isPaused=!1,this.tickingState=!1,this.setTickingMode(I3(s,"tickingMode",1))}boot(){this.tickingMode===2&&!this.tickingState&&this.startTicking()}shutdown(t){this.isShutdown||(this.stop(),this.tickingState&&this.stopTicking(),super.shutdown(t))}setTickingMode(t){typeof t=="string"&&(t=D3[t]),this.tickingMode=t}startTicking(){this.tickingState=!0}stopTicking(){this.tickingState=!1}get isRunning(){return this._isRunning}set isRunning(t){this._isRunning!==t&&(this._isRunning=t,this.tickingMode===1&&t!=this.tickingState&&(t?this.startTicking():this.stopTicking()))}start(){return this.isPaused=!1,this.isRunning=!0,this}pause(){return this.isRunning&&(this.isPaused=!0,this.isRunning=!1),this}resume(){return this.isPaused&&(this.isRunning=!0),this}stop(){return this.isPaused=!1,this.isRunning=!1,this}complete(){this.isPaused=!1,this.isRunning=!1,this.emit("complete",this.parent,this)}}const D3={no:0,lazy:1,always:2},B3=Phaser.Utils.Objects.GetValue;class k3 extends iu{constructor(t,s){super(t,s);var c=this.scene?"update":"step";this.tickEventName=B3(s,"tickEventName",c),this.isSceneTicker=!G3(this.tickEventName)}startTicking(){super.startTicking(),this.isSceneTicker?this.scene.sys.events.on(this.tickEventName,this.update,this):this.game.events.on(this.tickEventName,this.update,this)}stopTicking(){super.stopTicking(),this.isSceneTicker&&this.scene?this.scene.sys.events.off(this.tickEventName,this.update,this):this.game&&this.game.events.off(this.tickEventName,this.update,this)}}var G3=function(i){return i==="step"||i==="poststep"};const en=Phaser.Utils.Objects.GetValue,Sm=Phaser.Math.Clamp;let zy=class{constructor(t){this.resetFromJSON(t)}resetFromJSON(t){this.state=en(t,"state",ao),this.timeScale=en(t,"timeScale",1),this.delay=en(t,"delay",0),this.repeat=en(t,"repeat",0),this.repeatCounter=en(t,"repeatCounter",0),this.repeatDelay=en(t,"repeatDelay",0),this.duration=en(t,"duration",0),this.nowTime=en(t,"nowTime",0),this.justRestart=en(t,"justRestart",!1)}toJSON(){return{state:this.state,timeScale:this.timeScale,delay:this.delay,repeat:this.repeat,repeatCounter:this.repeatCounter,repeatDelay:this.repeatDelay,duration:this.duration,nowTime:this.nowTime,justRestart:this.justRestart}}destroy(){}setTimeScale(t){return this.timeScale=t,this}setDelay(t){return t===void 0&&(t=0),this.delay=t,this}setDuration(t){return this.duration=t,this}setRepeat(t){return this.repeat=t,this}setRepeatInfinity(){return this.repeat=-1,this}setRepeatDelay(t){return this.repeatDelay=t,this}start(){return this.nowTime=this.delay>0?-this.delay:0,this.state=this.nowTime>=0?ta:oo,this.repeatCounter=0,this}stop(){return this.state=ao,this}update(t,s){this.state===ao||this.state===Bl||s===0||this.timeScale===0||(this.nowTime+=s*this.timeScale,this.justRestart=!1,this.nowTime>=this.duration?this.repeat===-1||this.repeatCounter<this.repeat?(this.repeatCounter++,this.justRestart=!0,this.nowTime-=this.duration,this.repeatDelay>0&&(this.nowTime-=this.repeatDelay,this.state=Em)):(this.nowTime=this.duration,this.state=Bl):this.nowTime>=0&&(this.state=ta))}get t(){var t;switch(this.state){case ao:case oo:case Em:t=0;break;case ta:t=this.nowTime/this.duration;break;case Bl:t=1;break}return Sm(t,0,1)}set t(t){t=Sm(t,-1,1),t<0?(this.state=oo,this.nowTime=-this.delay*t):(this.state=ta,this.nowTime=this.duration*t,t===1&&this.repeat!==0&&this.repeatCounter++)}setT(t){return this.t=t,this}get isIdle(){return this.state===ao}get isDelay(){return this.state===oo}get isCountDown(){return this.state===ta}get isRunning(){return this.state===oo||this.state===ta}get isDone(){return this.state===Bl}get isOddIteration(){return(this.repeatCounter&1)===1}get isEvenIteration(){return(this.repeatCounter&1)===0}};const ao=0,oo=1,ta=2,Em=3,Bl=-1;
6307class N3 extends k3{constructor(t,s){super(t,s),this.timer=new zy}shutdown(t){this.isShutdown||(super.shutdown(t),this.timer.destroy(),this.timer=void 0)}start(){return this.timer.start(),super.start(),this}stop(){return this.timer.stop(),super.stop(),this}complete(){return this.timer.stop(),super.complete(),this}}const lo=Phaser.Utils.Objects.GetValue,Pm=Phaser.Utils.Objects.GetAdvancedValue,V3=Phaser.Tweens.Builders.GetEaseFunction;class Vr extends N3{resetFromJSON(t){return this.timer.resetFromJSON(lo(t,"timer")),this.setEnable(lo(t,"enable",!0)),this.setTarget(lo(t,"target",this.parent)),this.setDelay(Pm(t,"delay",0)),this.setDuration(Pm(t,"duration",1e3)),this.setEase(lo(t,"ease","Linear")),this.setRepeat(lo(t,"repeat",0)),this}setEnable(t){return t==null&&(t=!0),this.enable=t,this}setTarget(t){return t===void 0&&(t=this.parent),this.target=t,this}setDelay(t){return this.delay=t,this}setDuration(t){return this.duration=t,this}setRepeat(t){return this.repeat=t,this}setRepeatDelay(t){return this.repeatDelay=t,this}setEase(t){return t===void 0&&(t="Linear"),this.ease=t,this.easeFn=V3(t),this}start(){return this.timer.isRunning?this:(super.start(),this)}restart(){return this.timer.stop(),this.start.apply(this,arguments),this}stop(t){return t===void 0&&(t=!1),super.stop(),t&&(this.timer.setT(1),this.updateGameObject(this.target,this.timer),this.complete()),this}update(t,s){if(!this.isRunning||!this.enable||!this.parent.active)return this;var c=this.target,C=this.timer;return C.update(t,s),C.isDelay||this.updateGameObject(c,C),this.emit("update",c,this),C.isDone&&this.complete(),this}updateGameObject(t,s){}}const z3=Phaser.Sound.BaseSound;var Uf=function(i){return i instanceof z3};const bm=Phaser.Utils.Objects.GetValue,Mm=Phaser.Utils.Objects.GetAdvancedValue,Y3=Phaser.Math.Linear;let Yy=class extends Vr{constructor(t,s,c){Uf(t)&&(c=s,s=t,t=void 0),s.active=!0,s.scene=t,s.game=s.manager.game,super(s,c),this.volume={},this.resetFromJSON(c)}resetFromJSON(t){return super.resetFromJSON(t),this.setMode(bm(t,"mode",0)),this.setEnable(bm(t,"enable",!0)),this.setVolumeRange(Mm(t,"volume.start",this.parent.volume),Mm(t,"volume.end",0)),this}setMode(t){return typeof t=="string"&&(t=X3[t]),this.mode=t,this}setVolumeRange(t,s){return this.volume.start=t,this.volume.end=s,this}start(){return this.timer.isRunning?this:(this.parent.setVolume(this.volume.start),this.timer.setDelay(this.delay).setDuration(this.duration),super.start(),this)}updateGameObject(t,s){t.volume=Y3(this.volume.start,this.volume.end,s.t)}complete(){switch(super.complete(),this.mode){case 1:this.parent.stop();break;case 2:this.parent.destroy();break}return this}};const X3={stop:1,destroy:2};var su=function(i,t,s,c,C){Uf(i)&&(C=c,c=s,s=t,t=i,i=void 0),c===void 0&&(c=1),C===void 0&&(C=0);var S={mode:0,volume:{start:C,end:c},duration:s};typeof t=="string"&&(t=i.sys.sound.add(t));var l;return t.hasOwnProperty("_fade")?(l=t._fade,l.stop().resetFromJSON(S)):(l=new Yy(i,t,S),t._fade=l),l.start(),t.isPlaying||t.setVolume(C).play(),t},Na=function(i,t,s,c){Uf(i)&&(c=s,s=t,t=i,i=void 0),c===void 0&&(c=!0);var C={mode:c?2:1,volume:{start:t.volume,end:0},duration:s},S;return t.hasOwnProperty("_fade")?(S=t._fade,S.stop().resetFromJSON(C)):(S=new Yy(i,t,C),t._fade=S),S.start(),t.isPlaying||t.play(),t};const ho=Phaser.Utils.Objects.GetValue,U3={setBackgroundMusicLoop(i){return i===void 0&&(i=!0),this.backgroundMusicLoop=i,this},setBackgroundMusicFadeTime(i){return this.backgroundMusicFadeTime=i,this},getBackgroundMusic(){return this.backgroundMusic},setCurrentBackgroundMusic(i){return this.backgroundMusic=i,i&&(i.once("complete",function(){this.backgroundMusic===i&&(this.backgroundMusic.destroy(),this.backgroundMusic=void 0)},this).once("destroy",function(){this.backgroundMusic===i&&(this.backgroundMusic=void 0)},this),i.isPlaying||i.play()),this},playBackgroundMusic(i,t){if(this.backgroundMusic&&this.backgroundMusic.key===i)return this;this.stopBackgroundMusic();var s=this.sound.add(i,{loop:ho(t,"loop",this.backgroundMusicLoop),mute:ho(t,"mute",this.backgroundMusicMute),volume:ho(t,"volume",this.backgroundMusicVolume),detune:ho(t,"detune",0),rate:ho(t,"rate",1)});
6307return this.setCurrentBackgroundMusic(s),this.backgroundMusicFadeTime>0&&this.fadeInBackgroundMusic(this.backgroundMusicFadeTime),this},pauseBackgroundMusic(){return this.backgroundMusic&&this.backgroundMusic.pause(),this},resumeBackgroundMusic(){return this.backgroundMusic&&this.backgroundMusic.resume(),this},stopBackgroundMusic(){return this.backgroundMusic&&(this.backgroundMusicFadeTime>0?this.fadeOutBackgroundMusic(this.backgroundMusicFadeTime,!0):(this.backgroundMusic.stop(),this.backgroundMusic.destroy(),this.backgroundMusic=void 0)),this},fadeInBackgroundMusic(i){return this.backgroundMusic&&su(this.backgroundMusic,i,this.backgroundMusicVolume,0),this},fadeOutBackgroundMusic(i,t){return this.backgroundMusic&&Na(this.backgroundMusic,i,t),this},crossFadeBackgroundMusic(i,t){var s=this.backgroundMusicFadeTime;return this.backgroundMusicFadeTime=0,this.fadeOutBackgroundMusic(t,!0).playBackgroundMusic(i).fadeInBackgroundMusic(t),this.backgroundMusicFadeTime=s,this},setBackgroundMusicMute(i){return i===void 0&&(i=!0),this.backgroundMusicMute=i,this},setBackgroundMusicVolume(i){return this.backgroundMusicVolume=i,this},setBackgroundMusicRate(i){return this.backgroundMusic&&this.backgroundMusic.setRate(i),this},setBackgroundMusicDetune(i){return this.backgroundMusic&&this.backgroundMusic.setDetune(i),this}},uo=Phaser.Utils.Objects.GetValue,W3={setBackgroundMusic2Loop(i){return i===void 0&&(i=!0),this.backgroundMusic2Loop=i,this},setBackgroundMusic2FadeTime(i){return this.backgroundMusic2FadeTime=i,this},getBackgroundMusic2(){return this.backgroundMusic2},setCurrentBackgroundMusic2(i){return this.backgroundMusic2=i,i&&(i.once("complete",function(){this.backgroundMusic2===i&&(this.backgroundMusic2.destroy(),this.backgroundMusic2=void 0)},this).once("destroy",function(){this.backgroundMusic2===i&&(this.backgroundMusic2=void 0)},this),i.isPlaying||i.play()),this},playBackgroundMusic2(i,t){if(this.backgroundMusic2&&this.backgroundMusic2.key===i)return this;this.stopBackgroundMusic2();var s=this.sound.add(i,{loop:uo(t,"loop",this.backgroundMusicLoop),mute:uo(t,"mute",this.backgroundMusic2Mute),volume:uo(t,"volume",this.backgroundMusic2Volume),detune:uo(t,"detune",0),rate:uo(t,"rate",1)});return this.setCurrentBackgroundMusic2(s),this.backgroundMusic2FadeTime>0&&this.fadeInBackgroundMusic2(this.backgroundMusic2FadeTime),this},pauseBackgroundMusic2(){return this.backgroundMusic2&&this.backgroundMusic2.pause(),this}
6307,resumeBackgroundMusic2(){return this.backgroundMusic2&&this.backgroundMusic2.resume(),this},stopBackgroundMusic2(){return this.backgroundMusic2&&(this.backgroundMusic2FadeTime>0?this.fadeOutBackgroundMusic2(this.backgroundMusic2FadeTime,!0):(this.backgroundMusic2.stop(),this.backgroundMusic2.destroy(),this.backgroundMusic2=void 0)),this},fadeInBackgroundMusic2(i){return this.backgroundMusic2&&su(this.backgroundMusic2,i,this.backgroundMusic2Volume,0),this},fadeOutBackgroundMusic2(i,t){return this.backgroundMusic2&&Na(this.backgroundMusic2,i,t),this},crossFadeBackgroundMusic2(i,t){var s=this.backgroundMusic2FadeTime;return this.backgroundMusic2FadeTime=0,this.fadeOutBackgroundMusic2(t,!0).playBackgroundMusic2(i).fadeInBackgroundMusic2(t),this.backgroundMusic2FadeTime=s,this},setBackgroundMusic2Mute(i){return i===void 0&&(i=!0),this.backgroundMusic2Mute=i,this},setBackgroundMusic2Volume(i){return this.backgroundMusic2Volume=i,this},setBackgroundMusic2Rate(i){return this.backgroundMusic2&&this.backgroundMusic2.setRate(i),this},setBackgroundMusic2Detune(i){return this.backgroundMusic2&&this.backgroundMusic2.setDetune(i),this}},wm=Phaser.Utils.Array.Remove,kl=Phaser.Utils.Objects.GetValue,H3={getSoundEffects(){return this.soundEffects},getLastSoundEffect(){return this.soundEffects[this.soundEffects.length-1]},playSoundEffect(i,t){var s=this.sound.add(i,{mute:kl(t,"mute",this.soundEffectsMute),volume:kl(t,"volume",this.soundEffectsVolume),detune:kl(t,"detune",0),rate:kl(t,"rate",1)});return this.soundEffects.push(s),s.once("complete",function(){s.destroy(),this.sound&&wm(this.soundEffects,s)},this).once("destroy",function(){this.sound&&wm(this.soundEffects,s)},this).play(),this},stopAllSoundEffects(){for(var i=this.soundEffects.length-1;i>=0;i--){var t=this.soundEffects[i];t.stop(),t.destroy()}return this},fadeInSoundEffect(i){var t=this.getLastSoundEffect();return t&&su(t,i,this.soundEffectsVolume,0),this},fadeOutSoundEffect(i,t){var s=this.getLastSoundEffect();return s&&Na(s,i,t),this},fadeOutAllSoundEffects(i,t){for(var s=this.soundEffects.length-1;s>=0;s--)Na(this.soundEffects[s],i,t);return this},setSoundEffectMute(i,t){if(i===void 0&&(i=!0),t===void 0&&(t=!1),t){var s=this.getLastSoundEffect();s&&s.setMute(i)}else this.soundEffectsMute=i;return this},setSoundEffectVolume(i,t){if(t===void 0&&(t=!1),t){var s=this.getLastSoundEffect();s&&s.setVolume(i)}else this.soundEffectsVolume=i;return this},setSoundEffectDetune(i,t){t===void 0&&(t=!1);var s;t?s=[this.getLastSoundEffect()]:s=this.soundEffects;for(var c=0,C=s.length;c<C;c++)s[c].setDetune(i);return this},setSoundEffectRate(i,t){t===void 0&&(t=!1);var s;t?s=[this.getLastSoundEffect()]:s=this.soundEffects;for(var c=0,C=s.length;c<C;c++)s[c].setRate(i);return this}},Am=Phaser.Utils.Array.Remove,Gl=Phaser.Utils.Objects.GetValue,$3={getSoundEffects2(){return this.soundEffects2},getLastSoundEffect2(){return this.soundEffects2[this.soundEffects2.length-1]},playSoundEffect2(i,t){var s=this.sound.add(i,{mute:Gl(t,"mute",this.soundEffects2Mute),volume:Gl(t,"volume",this.soundEffects2Volume),detune:Gl(t,"detune",0),rate:Gl(t,"rate",1)});return this.soundEffects2.push(s),s.once("complete",function(){s.destroy(),this.sound&&Am(this.soundEffects2,s)},this).once("destroy",function(){this.sound&&Am(this.soundEffects2,s)},this).play(),this},stopAllSoundEffects2(){for(var i=this.soundEffects.length-1;i>=0;i--){var t=this.soundEffects[i];t.stop(),t.destroy()}return this},fadeInSoundEffect2(i){var t=this.getLastSoundEffect2();return t&&su(t,i,this.soundEffects2Volume,0),this},fadeOutSoundEffect2(i,t){var s=this.getLastSoundEffect2();return s&&Na(s,i,t),this},fadeOutAllSoundEffects2(i,t){for(var s=this.soundEffects2.length-1;s>=0;s--)Na(this.soundEffects2[s],i,t);return this},setSoundEffect2Mute(i,t){if(i===void 0&&(i=!0),t===void 0&&(t=!1),t){var s=this.getLastSoundEffect2();s&&s.setMute(i)}else this.soundEffects2Mute=i;return this},setSoundEffect2Volume(i,t){if(t===void 0&&(t=!1),t){var s=this.getLastSoundEffect2();s&&s.setVolume(i)}else this.soundEffects2Volume=i;return this},setSoundEffect2Detune(i,t){t===void 0&&(t=!1);var s;t?s=[this.getLastSoundEffect2()]:s=this.soundEffects2;for(var c=0,C=s.length;c<C;c++)s[c].setDetune(i);return this},setSoundEffect2Rate(i,t){t===void 0&&(t=!1);var s;t?s=[this.getLastSoundEffect2()]:s=this.soundEffects2;for(var c=0,C=s.length;c<C;c++)s[c].setRate(i);return this}};var Xy={};Object.assign(Xy,U3,W3,H3,$3);
vendor: 4,795 bytes, line 6307
6307const $i=Phaser.Utils.Objects.GetValue;class Uy{constructor(t,s){this.sound=L3(t),this.backgroundMusic=void 0,this._backgroundMusicVolume=$i(s,"bgm.volume",1),this._backgroundMusicMute=$i(s,"bgm.mute",!1),this.setBackgroundMusicLoop($i(s,"bgm.loop",!0)),this.setBackgroundMusicFadeTime($i(s,"bgm.fade",500)),this.backgroundMusic2=void 0,this._backgroundMusic2Volume=$i(s,"bgm2.volume",1),this._backgroundMusic2Mute=$i(s,"bgm2.mute",!1),this.setBackgroundMusic2Loop($i(s,"bgm2.loop",!0)),this.setBackgroundMusic2FadeTime($i(s,"bgm2.fade",500)),this.soundEffects=[],this._soundEffectsVolume=$i(s,"soundEffect.volume",1),this.soundEffects2=[],this._soundEffects2Volume=$i(s,"soundEffect2.volume",1);var c=$i(s,"bgm.initial",void 0);c&&this.setCurrentBackgroundMusic(c);var C=$i(s,"bgm2.initial",void 0);C&&this.setCurrentBackgroundMusic2(C)}destroy(){if(this.backgroundMusic&&this.backgroundMusic.destroy(),this.backgroundMusic=void 0,this.backgroundMusic2&&this.backgroundMusic2.destroy(),this.backgroundMusic2=void 0,this.soundEffects.length)for(var t=this.soundEffects.length-1;t>=0;t--)this.soundEffects[t].destroy();if(this.soundEffects.length=0,this.soundEffects2.length)for(var t=this.soundEffects2.length-1;t>=0;t--)this.soundEffects2[t].destroy();return this.soundEffects2.length=0,this.sound=void 0,this}get backgroundMusicMute(){return this._backgroundMusicMute}set backgroundMusicMute(t){this._backgroundMusicMute=t,this.backgroundMusic&&this.backgroundMusic.setMute(mute)}get backgroundMusicVolume(){return this._backgroundMusicVolume}set backgroundMusicVolume(t){this._backgroundMusicVolume=t,this.backgroundMusic&&this.backgroundMusic.setVolume(t)}get backgroundMusic2Mute(){return this._backgroundMusic2Mute}set backgroundMusic2Mute(t){this._backgroundMusic2Mute=t,this.backgroundMusic2&&this.backgroundMusic2.setMute(mute)}get backgroundMusic2Volume(){return this._backgroundMusic2Volume}set backgroundMusic2Volume(t){this._backgroundMusic2Volume=t,this.backgroundMusic2&&this.backgroundMusic2.setVolume(t)}get soundEffectsMute(){return this._soundEffectsMute}set soundEffectsMute(t){this._soundEffectsMute=t;for(var s=this.soundEffects,c=0,C=s.length;c<C;c++)s[c].setMute(t)}get soundEffectsVolume(){return this._soundEffectsVolume}set soundEffectsVolume(t){this._soundEffectsVolume=t;for(var s=this.soundEffects,c=0,C=s.length;c<C;c++)s[c].setVolume(t)}get soundEffects2Mute(){return this._soundEffects2Mute}set soundEffects2Mute(t){this._soundEffects2Mute=t;for(var s=this.soundEffects,c=0,C=soundEffects2.length;c<C;c++)s[c].setMute(t)}get soundEffects2Volume(){return this._soundEffects2Volume}set soundEffects2Volume(t){this._soundEffects2Volume=t;for(var s=this.soundEffects2,c=0,C=s.length;c<C;c++)s[c].setVolume(t)}}Object.assign(Uy.prototype,Xy);const Cd=Phaser.Utils.Objects.GetValue;class j3 extends iu{constructor(t,s){super(t,s),this.resetFromJSON(s),this.boot()}resetFromJSON(t){return this.isRunning=Cd(t,"isRunning",!1),this.timeScale=Cd(t,"timeScale",1),this.now=Cd(t,"now",0),this}toJSON(){return{isRunning:this.isRunning,timeScale:this.timeScale,now:this.now,tickingMode:this.tickingMode}}start(t){return t===void 0&&(t=0),this.delta=0,this.now=t,super.start(),this}seek(t){return this.now=t,this}setTimeScale(t){return this.timeScale=t,this}tick(t){return t*=this.timeScale,this.now+=t,this.delta=t,this.emit("update",this.now,this.delta),this}}class Wy extends j3{startTicking(){super.startTicking(),this.scene.sys.events.on("update",this.update,this)}stopTicking(){super.stopTicking(),this.scene&&this.scene.sys.events.off("update",this.update,this)}update(t,s){return!this.isRunning||this.timeScale===0?this:(this.tick(s),this)}}var Yi=function(i,t){return t===void 0&&(t=.5),i<=t?i=i/t:i=1-(i-t)/(1-t),i};const Rm=Phaser.Math.Clamp;class K3{constructor(t,s){this.setTimeline(t).reset(s)}setTimeline(t){return this.timeline=t,this}setName(t){return this.name=t,this}setCallbacks(t,s,c,C){return this.target=t,this.onStart=s,this.onProgress=c,this.onComplete=C,this}setDuration(t,s){return s===void 0&&(s=!1),this.duration=t,this.remainder=t,this.t=0,this.yoyo=s,this}setPaused(t){return this.isPaused=t,this}pause(){return this.isPaused=!0,this}resume(){return this.isPaused=!1,this}setRemoved(t){return this.removed=t,this}remove(){return this.removed=!0,this}seek(t){return this.remainder=this.duration*(1-t),this}reset(t){return this.setName(t.name).setDuration(t.duration,t.yoyo).setCallbacks(t.target,t.onStart,t.onProgress,t.onComplete).setPaused(!1).setRemoved(!1),this}onFree(){this.setTimeline().setCallbacks()}getProgress(){var t=1-this.remainder/this.duration;return t=Rm(t,0,1),this.yoyo&&(t=Yi(t)),t}setProgress(t){t=Rm(t,0,1),this.remainder=this.duration*(1-t)}runCallback(t){t&&t(this.target,this.t,this)}update(t,s){if(this.removed)return!0;
6307if(this.isPaused)return!1;this.remainder-=s,this.t=this.getProgress(),this.runCallback(this.onProgress);var c=this.remainder<=0;return c&&this.runCallback(this.onComplete),c}}let Z3=class extends zs{allocate(){return this.pop()}free(t){t.onFree(),this.push(t)}freeMultiple(t){for(var s=0,c=t.length;s<c;s++)this.free(t[s]);return this}};const J3=Phaser.Utils.Objects.GetValue,Q3=new Z3;class q3 extends Wy{constructor(t,s){super(t,s),this.addedTimers=[],this.timers=[],this.timerPool=J3(s,"pool",Q3)}shutdown(){this.isShutdown||(this.timerPool.freeMultiple(this.addedTimers).freeMultiple(this.timers),this.timerPool=void 0,this.addedTimers=void 0,this.timers=void 0,super.shutdown())}addTimer(t){var s=this.timerPool.allocate();return s?s.setTimeline(this).reset(t):s=new K3(this,t),this.addedTimers.push(s),s.runCallback(s.onStart),this.isRunning||this.start(),s}delayCall(t,s,c,C){var S=this.addTimer({duration:t,onComplete:function(l,T,e){c===void 0&&(c=[]),c.push(e),s.apply(C,c)}});return S}delayEvent(t,s){this.removeDelayEvent(s);var c=this.delayCall(t,function(){this.removeDelayEvent(s),this.emit(s)},[],this);return this.once(`_remove.${s}`,function(){c.remove(),c=void 0}),this}removeDelayEvent(t){return this.emit(`_remove.${t}`),this}getTimers(t){for(var s=[],c=[this.addedTimers,this.timers],C=0,S=c.length;C<S;C++)for(var l=c[C],T=0,e=l.length;T<e;T++){var d=l[T];d.name===t&&s.push(d)}return s}update(t,s){if(super.update(t,s),!!this.isRunning){this.timers.push(...this.addedTimers),this.addedTimers.length=0;for(var c=[],C=0,S=this.timers.length;C<S;C++){var l=this.timers[C],T=l.update(this.now,this.delta);T?this.timerPool.free(l):c.push(l)}this.timers=c,this.timers.length===0&&this.addedTimers.length===0&&this.complete()}}}const _3="_wait.complete",tA="_remove.wait";var eA=function(i,t,s,c,C){var S=Ho(i),l=S.time.delayedCall(t,function(){S.sys.events.once("preupdate",function(){s.call(c,C)})});return l};let Hy=class{constructor(t){t||(this.setEventEmitter(!0),t=this),this.parent=t,this.waitId=0,this.waitCompleteEventName=_3,this.removeWaitEventsEventName=tA}destroy(){this.removeWaitEvents(),this.clearWaitCompleteCallbacks(),this.parent=null}waitEvent(t,s,c){var C=this.getWaitCompleteTriggerCallback(c);return t.once(s,C,this),this.parent.once(this.removeWaitEventsEventName,function(){t.off(s,C,this)}),this.parent}getWaitCompleteTriggerCallback(t){t===void 0&&(t=!0);var s=this.waitId,c=this,C=function(){s<c.waitId||(c.waitId++,c.removeWaitEvents(),c.parent.emit(c.waitCompleteEventName))};if(t){var S=function(){eA(c.parent,0,C)};return S}else return C}removeWaitEvents(){return this.parent.emit(this.removeWaitEventsEventName),this}addWaitCompleteCallback(t,s){return this.parent.on(this.waitCompleteEventName,t,s),this}clearWaitCompleteCallbacks(){return this.parent.off(this.waitCompleteEventName),this}};Object.assign(Hy.prototype,Wa);const iA={waitTime(i){var t=this.parent.timeline;return t.delayEvent(i,"delay"),this.parent.once(this.removeWaitEventsEventName,function(){t.removeDelayEvent("delay")}),this.waitEvent(t,"delay")}};var sA=function(i,t){var s=`(?<!\\\\)\\${t}`,c=`\\${t}`;return i.split(new RegExp(s,"g")).map(function(C){return C.replace(c,t)})};const nA={setClickTarget(i){this.clickTarget=i,i?Fr(i)?this.clickEE=i.input:this.clickEE=i.setInteractive():this.clickEE=null},waitClick(){return this.clickEE?this.waitEvent(this.clickEE,"pointerdown"):this.waitTime(0)},waitKeyDown(i){var t=this.scene.input.keyboard;if(typeof i=="string"){if(i.indexOf("|")===-1)return this.waitEvent(t,`keydown-${i.toUpperCase()}`);for(var s=sA(i,"|"),c=0,C=s.length;c<C;c++)this.waitEvent(t,`keydown-${i.toUpperCase()}`);return this.parent}else return this.waitEvent(t,"keydown")}},rA={waitGameObjectTweenComplete(i,t,s){var c=this.parent.getGameObjectTweenTask(i,t,s);return c?this.waitEvent(c,"complete"):this.waitTime(0)},waitGameObjectDataFlag(i,t,s,c){var C=this.parent.getGameObject(i,t);if(!C)return this.waitTime(0);if(C.getData(s)===c)return this.waitTime(0);var S=`changedata-${s}`,l=function(T,e,d){e=!!e,e===c&&T.emit("_dataFlagMatch")};return C.on(S,l),this.parent.once(this.removeWaitEventsEventName,function(){C.off(S,l)}),this.waitEvent(C,"_dataFlagMatch")},waitGameObjectDestroy(i,t){var s=this.parent.getGameObject(i,t);return s?this.waitEvent(s,"destroy"):this.waitTime(0)},waitGameObjectManagerEmpty(i){if(i){var t=this.parent.getGameObjectManager(i);return t?this.waitEvent(t,"empty"):this.waitTime(0)}else{var s=this.parent.gameObjectManagers,c=!1;for(var C in s)c=!0,this.waitEvent(s[C],"empty");return c?this.parent:this.waitTime(0)}}},aA={setCameraTarget(i){return this.cameraTarget=i,this},waitCameraEffectComplete(i){var t=this.cameraTarget;if(!t)return this.waitTime(0);var s,c;switch(i){case"camera.fadein":s=t.fadeEffect,c="camerafadeincomplete";break;case"camera.fadeout":s=t.fadeEffect,c="camerafadeoutcomplete";break;case"camera.flash":s=t.flashEffect,c="cameraflashcomplete";break;case"camera.shake":s=t.shakeEffect,c="camerashakecomplete";break;case"camera.zoom":s=t.zoomEffect,c="camerazoomcomplete";break;case"camera.rotate":s=t.rotateToEffect,c="camerarotatecomplete";break;case"camera.scroll":s=t.panEffect,c="camerapancomplete";break}return s.isRunning?this.waitEvent(t,c):this.waitTime(0)}},oA={waitSoundEffectComplete(){if(!this.parent.soundManager)return this.waitTime(0);var i=this.parent.soundManager.getLastSoundEffect();return i?this.waitEvent(i,"complete"):this.waitTime(0)},waitSoundEffect2Complete(){if(!this.parent.soundManager)return this.waitTime(0);var i=this.parent.soundManager.getLastSoundEffect2();return i?this.waitEvent(i,"complete"):this.waitTime(0)}
6307,waitBackgroundMusicComplete(){if(!this.parent.soundManager)return this.waitTime(0);var i=this.parent.soundManager.getBackgroundMusic();return i?this.waitEvent(i,"complete"):this.waitTime(0)},waitBackgroundMusic2Complete(){if(!this.parent.soundManager)return this.waitTime(0);var i=this.parent.soundManager.getBackgroundMusic2();return i?this.waitEvent(i,"complete"):this.waitTime(0)}};var lA=function(i){if(!i)return this.waitTime(0);var t=!1;for(var s in i)switch(s){case"time":t=!0,this.waitTime(i.time);break;case"click":t=!0,this.waitClick(i.key);break;case"key":t=!0,this.waitKeyDown(i.key);break;case"bgm":t=!0,this.waitBackgroundMusicComplete();break;case"bgm2":t=!0,this.waitBackgroundMusic2Complete();break;case"se":t=!0,this.waitSoundEffectComplete();break;case"se2":t=!0,this.waitSoundEffect2Complete();break;case"camera":t=!0,this.waitCameraEffectComplete(`camera.${i.camera.toLowerCase()}`);break;default:var c=s.split(".");if(c.length===2){var C=c[0],S=c[1],l=this.parent.getGameObjectManager(void 0,C);if(!l)continue;if(S==="destroy")return this.waitGameObjectDestroy(void 0,C);var T=l.getProperty(C,S);if(typeof T=="number"){t=!0,this.waitGameObjectTweenComplete(void 0,C,S);continue}var e=S,d=e.startsWith("!");d&&(e=e.substring(1)),l.hasData(C,S)&&(t=!0,this.waitGameObjectDataFlag(void 0,C,e,!d))}break}return t||this.waitTime(0),this.parent};class $y extends Hy{constructor(t,s){super(t),this.waitCompleteEventName=le(s,"completeEventName",this.waitCompleteEventName),this.setClickTarget(le(s,"clickTarget",this.scene)),this.setCameraTarget(le(s,"camera",this.scene.cameras.main))}get clickTarget(){return this.parent.clickTarget}set clickTarget(t){this.parent.clickTarget=t}get cameraTarget(){return this.parent.cameraTarget}set cameraTarget(t){this.parent.cameraTarget=t}destroy(){super.destroy(),this.setClickTarget(),this.setCameraTarget()}get scene(){return this.parent.managersScene}}var hA={waitAny:lA};Object.assign($y.prototype,iA,nA,rA,aA,oA,hA);const Om=Phaser.Utils.Objects.GetValue;var uA=function(i,t){this.clickTarget=void 0,this.cameraTarget=void 0,this.managersScene=i,this.gameObjectManagers={};var s=Om(t,"layers",!1);s!==!1&&(this.gameObjectManagers.layer=new R3(i,s));var c=Om(t,"sounds");return c!==!1&&(this.soundManager=new Uy(i,c)),this.timeline=new q3(this),this.waitEventManager=new $y(this,t),this},dA=function(i){this.timeline.timeScale=i;for(var t in this.gameObjectManagers)this.gameObjectManagers[t].setTimeScale(i);return this},cA=function(){return this.timeline.timeScale},fA=function(i){this.waitEventManager.destroy(),this.waitEventManager=void 0;for(var t in this.gameObjectManagers)this.gameObjectManagers[t].destroy(i),delete this.gameObjectManagers[t];this.soundManager&&(this.soundManager.destroy(),this.soundManager=void 0),this.timeline&&(this.timeline.destroy(),this.timeline=void 0),this.clickTarget=void 0,this.cameraTarget=void 0,this.managersScene=void 0};const jy={addGameObjectManager(i,t){i===void 0&&(i={}),t===void 0&&(t=eu),i.createGameObjectScope||(i.createGameObjectScope=this);var s=new t(this.managersScene,i);return this.gameObjectManagers[i.name]=s,this},getGameObjectManager(i,t){if(i){var s=this.gameObjectManagers[i];return s}else for(var i in this.gameObjectManagers){var s=this.gameObjectManagers[i];if(s.has(t))return s}},getGameObjectManagerNames(){var i=[];for(var t in this.gameObjectManagers)i.push(t);return i},getGameObjectManagerName(i){for(var t in this.gameObjectManagers)if(this.gameObjectManagers[t].has(i))return t},hasGameObjectMananger(i){return i in this.gameObjectManagers}},vA={createGameObject(i,t,...s){return this.getGameObjectManager(i,t).add(t,...s),this},destroyGameObject(i,t){var s=this.getGameObjectManager(i,t);return t===void 0?s.removeAll():s.remove(t),this},hasGameObject(i,t){return!!this.getGameObjectManager(i,t)},callGameObjectMethod(i,t,s,...c){return this.getGameObjectManager(i,t).call(t,s,...c),this},setGameObjectProperty(i,t,s,c){return this.getGameObjectManager(i,t).setProperty(t,s,c),this},easeGameObjectProperty(i,t,s,c,C,S,l,T){return this.getGameObjectManager(i,t).easeProperty(t,s,c,C,S,l,T),this},getGameObjectTweenTask(i,t,s){return this.getGameObjectManager(i,t).getTweenTask(t,s)},getGameObject(i,t,s){var c=this.getGameObjectManager(i,t);if(typeof t=="string")return c.getGO(t);var C=t;C===void 0&&(C=c.bobs),s===void 0&&(s={});for(t in C)s[t]=c.getGO(t);return s},addGameObject(i,t,s){var c=this.getGameObjectManager(i,t);if(typeof t=="string")c.addGO(t,s);else{var C=t;
6307for(t in C)c.addGO(t,C[t])}return this},drawGameObjectsBounds(i,t,s){i instanceof Phaser.GameObjects.Graphics&&(s=t,t=i,i=void 0),i===void 0&&(i=this.getGameObjectManagerNames()),Array.isArray(i)||(i=[i]);for(var c=0,C=i.length;c<C;c++)this.getGameObjectManager(i[c]).drawGameObjectsBounds(t,s);return this}};var pA=function(i){class t extends i{}var s={initManagers:uA,setTimeScale:dA,getTimeScale:cA,destroyManagers:fA};return Object.assign(t.prototype,s,jy,vA),t},mA=/^\s*-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?\s*$/i,gA=/^0x[0-9A-F]+$/i,Wf=function(i){if(typeof i!="string")return i;if(i==="")i=null;else if(mA.test(i))i=parseFloat(i);else if(gA.test(i))i=parseInt(i,16);else switch(i){case"false":i=!1;break;case"true":i=!0;break;case"null":i=null;break;case"undefined":i=void 0;break}return i};let Ky=class{constructor(t){this.setEventEmitter(le(t,"eventEmitter",void 0)),this.setValueConverter(le(t,"valueConvert",!0)),this.setLoopEnable(le(t,"loop",!1)),this.setMultipleLinesTagEnable(le(t,"multipleLinesTag",!1));var s=le(t,"delimiters","<>");this.setDelimiters(s[0],s[1]),this.setTranslateTagNameCallback(le(t,"translateTagNameCallback")),this.isRunning=!1,this.isPaused=!1,this.skipEventFlag=!1,this.justCompleted=!1,this.lastTagStart=null,this.lastTagEnd=null,this.lastContent=null}shutdown(){this.destroyEventEmitter()}destroy(){this.shutdown()}setMultipleLinesTagEnable(t){return t===void 0&&(t=!0),this.multipleLinesTagEnable=t,this}setDelimiters(t,s){s===void 0&&(s=t[1],t=t[0]),this.delimiterLeft=t,this.delimiterRight=s,t=ka(this.delimiterLeft),s=ka(this.delimiterRight);var c=this.multipleLinesTagEnable?"gs":"gi";return this.reSplit=RegExp(`${t}(.+?)${s}`,c),this}setTranslateTagNameCallback(t){return this.translateTagNameCallback=t,this}setValueConverter(t){return t===!0?t=Wf:t||(t=xA),this.valueConverter=t,this}setLoopEnable(t){return t===void 0&&(t=!0),this.loopEnable=t,this}setSource(t){return this.source=t,this}resetIndex(t){return t===void 0&&(t=0),this.progressIndex=t,this.reSplit.lastIndex=t,this.lastTagStart=null,this.lastTagEnd=null,this.lastContent=null,this.justCompleted=!1,this.isRunning=!1,this}start(t){return this.setSource(t).restart(),this}restart(){this.resetIndex().next()}next(){if(this.isPaused&&this.onResume(),this.isRunning)return this;if(this.isRunning=!0,this.justCompleted)return this.isRunning=!1,this;this.reSplit.lastIndex===0&&this.onStart();var t=this.source,s=t.length;for(this.reSplit.lastIndex=this.progressIndex;;){var c=this.reSplit.exec(t);if(!c){if(this.progressIndex<s&&(this.onContent(t.substring(this.progressIndex,s)),this.isPaused)){this.progressIndex=s;break}this.onComplete(),this.isRunning=!1;return}var C=this.reSplit.lastIndex,S=C-c[0].length;if(this.progressIndex<S&&(this.onContent(t.substring(this.progressIndex,S)),this.isPaused)){this.progressIndex=S;break}if(this.onTag(c[1]),this.progressIndex=C,this.isPaused)break}return this.isRunning=!1,this}skipEvent(){return this.skipEventFlag=!0,this}pause(){return this.isPaused||this.onPause(),this}pauseUntilEvent(t,s){return this.isPaused?this:(this.pause(),t.once(s,function(){this.next()},this),this)}onContent(t){this.skipEventFlag=!1,this.emit("content",t),this.lastContent=t}onTag(t){}onStart(){this.isRunning=!0,this.emit("start",this)}onComplete(){this.isRunning=!1,this.justCompleted=!0,this.emit("complete",this),this.loopEnable&&this.resetIndex()}onPause(){this.isPaused=!0,this.emit("pause",this)}onResume(){this.isPaused=!1,this.emit("resume",this)}};const xA=function(i){return i};Object.assign(Ky.prototype,Wa);var yA=function(i,t){if(i==null)return[];t===void 0&&(t=Wf);for(var s=i.split(","),c=0,C=s.length;c<C;c++)s[c]=t(s[c]);return s};class CA extends Ky{constructor(t){t===void 0&&(t={}),t.hasOwnProperty("multipleLinesTag")||(t.multipleLinesTag=!1),super(t),this.setTagExpression(le(t,"regex.tag",void 0)),this.setValueExpression(le(t,"regex.value",void 0));var s=le(t,"delimiters","<>");this.setDelimiters(s[0],s[1])}setTagExpression(t){return t||(t=Nl),this.tagExpression=t,this}setValueExpression(t){return t||(t=Nl),this.valueExpression=t,this}setDelimiters(t,s){super.setDelimiters(t,s);var c=`(${this.tagExpression})(=(${this.valueExpression}))?`;if(this.reTag=RegExp(c,"i"),this.tagExpression!==Nl||this.valueExpression!==Nl){var
6307C=`${this.tagExpression}(=${this.valueExpression})?`,S=`/${this.tagExpression}`;t=ka(this.delimiterLeft),s=ka(this.delimiterRight);var l=this.multipleLinesTagEnable?"gs":"gi";this.reSplit=RegExp(`${t}((${C})|(${S}))${s}`,l)}return this}onTag(t){var s=t.match(this.reTag),c=s[1],C=c.charAt(0)==="/";if(C&&(c=c.substring(1,c.length)),this.translateTagNameCallback&&(c=this.translateTagNameCallback(c)),this.skipEventFlag=!1,C)this.emit(`-${c}`),this.skipEventFlag||this.emit("-",c),this.lastTagEnd=c;else{var S=yA(s[3],this.valueConverter);this.emit(`+${c}`,...S),this.skipEventFlag||this.emit("+",c,...S),this.lastTagStart=c}}}const Nl="[^=]+";var TA=function(i,t,s){var c="color",C;t.on("start",function(){C=i.textStyle.color}).on(`+${c}`,function(S){i.textStyle.setColor(S),t.skipEvent()}).on(`-${c}`,function(){i.textStyle.setColor(C),t.skipEvent()}).on("complete",function(){i.textStyle.setColor(C)})},SA=function(i,t,s){var c="stroke",C;t.on("start",function(){C=i.textStyle.stroke,i.textStyle.setStrokeStyle(null)}).on(`+${c}`,function(S){S===void 0&&(S=C),i.textStyle.setStrokeStyle(S),t.skipEvent()}).on(`-${c}`,function(){i.textStyle.setStrokeStyle(null),t.skipEvent()}).on("complete",function(){i.textStyle.setStrokeStyle(C)})},EA=function(i,t,s){var c="b";t.on("start",function(){i.textStyle.setBold(!1)}).on(`+${c}`,function(){i.textStyle.setBold(!0),t.skipEvent()}).on(`-${c}`,function(){i.textStyle.setBold(!1),t.skipEvent()})},PA=function(i,t,s){var c="i";t.on("start",function(){i.textStyle.setItalic(!1)}).on(`+${c}`,function(){i.textStyle.setItalic(!0),t.skipEvent()}).on(`-${c}`,function(){i.textStyle.setItalic(!1),t.skipEvent()})},bA=function(i,t,s){var c="size",C;t.on("start",function(){C=i.textStyle.fontSize}).on(`+${c}`,function(S){i.textStyle.setFontSize(S),t.skipEvent()}).on(`-${c}`,function(){i.textStyle.setFontSize(C),t.skipEvent()}).on("complete",function(){i.textStyle.setFontSize(C)})},MA=function(i,t,s){var c="y",C;t.on("start",function(){C=i.textStyle.offsetY,i.textStyle.setOffsetY(0)}).on(`+${c}`,function(S){S===void 0&&(S=C),i.textStyle.setOffsetY(S),t.skipEvent()}).on(`-${c}`,function(){i.textStyle.setOffsetY(0),t.skipEvent()}).on("complete",function(){i.textStyle.setOffsetY(0)})},wA=function(i,t,s){var c="x",C;t.on("start",function(){C=i.textStyle.offsetY,i.textStyle.setOffsetX(0)}).on(`+${c}`,function(S){S===void 0&&(S=C),i.textStyle.setOffsetX(S),t.skipEvent()}).on(`-${c}`,function(){i.textStyle.setOffsetX(0),t.skipEvent()}).on("complete",function(){i.textStyle.setOffsetX(0)})},AA=function(i,t,s){var c="left",C;t.on("start",function(){C=i.textStyle.leftSpace,i.textStyle.setLeftSpace(0)}).on(`+${c}`,function(S){S===void 0&&(S=C),i.textStyle.setLeftSpace(S),t.skipEvent()}).on(`-${c}`,function(){i.textStyle.setLeftSpace(0),t.skipEvent()}).on("complete",function(){i.textStyle.setLeftSpace(0)})},RA=function(i,t,s){var c="right",C;t.on("start",function(){C=i.textStyle.rightSpace,i.textStyle.setRightSpace(0)}).on(`+${c}`,function(S){S===void 0&&(S=C),i.textStyle.setRightSpace(S),t.skipEvent()}).on(`-${c}`,function(){i.textStyle.setRightSpace(0),t.skipEvent()}).on("complete",function(){i.textStyle.setRightSpace(0)})},OA=function(i,t,s){var c="shadow",C;t.on("start",function(){C=i.textStyle.shadowColor,i.textStyle.setShadowColor(null)}).on(`+${c}`,function(S){S===void 0&&(S=C),i.textStyle.setShadowColor(S),t.skipEvent()}).on(`-${c}`,function(){i.textStyle.setShadowColor(null),t.skipEvent()}).on("complete",function(){i.textStyle.setShadowColor(C)})},LA=function(i,t,s){var c="align";t.on(`+${c}`,function(C){i.textStyle.setAlign(C),t.skipEvent()}).on(`-${c}`,function(){i.textStyle.setAlign(),t.skipEvent()}).on("complete",function(){i.textStyle.setAlign()})},FA=function(i,t,s){var c="img";t.on(`+${c}`,function(C){var S=i.imageManager.get(C);wy.call(i,S.key,S.frame,{width:S.width,hieght:S.height,leftSpace:S.left,rightSpace:S.right}),t.skipEvent()}).on(`-${c}`,function(){t.skipEvent()})},IA=function(i,t,s){var c="space";t.on(`+${c}`,function(C){Ay.call(i,C),t.skipEvent()}).on(`-${c}`,function(){t.skipEvent()})},DA=function(i,t,s){var c="speed";t.on(`+${c}`,function(C){Lm(i,C),t.skipEvent()}).on(`-${c}`,function(){Lm(i,void 0),t.skipEvent()})},BA=function(i){this.typeWriter.setTypingSpeed(i)},Lm=function(i,t){It.call(i,"speed",BA,t,i)},kA=function(i,t,s){var c="se";t.on(`+${c}`,function(C,S){It.call(i,c,GA,[C,S],i),t.skipEvent()}).on(`-${c}`,function(){t.skipEvent()});var c="se2";t.on(`+${c}`,function(C,S){It.call(i,c,NA,[C,S],i),t.skipEvent()}).on(`-${c}`,function(){t.skipEvent()})},GA=function(i){if(!this.skipSoundEffect){var t=i[0],s=i[1];this.soundManager.playSoundEffect(t),s&&this.soundManager.fadeInSoundEffect(s)}},NA=function(i){if(!this.skipSoundEffect){var t=i[0],s=i[1];this.soundManager.playSoundEffect2(t),s&&this.soundManager.fadeInSoundEffect2(s)}},VA=function(i,t,s){var c="se.fadein";t.on(`+${c}`,function(C){It.call(i,c,zA,C,i),t.skipEvent()}).on(`-${c}`,function(){t.skipEvent()});var c="se2.fadein";t.on(`+${c}`,function(C){It.call(i,c,YA,C,i),t.skipEvent()}).on(`-${c}`,function(){t.skipEvent()})},zA=function(i){this.soundManager.fadeInSoundEffect(i)},YA=function(i){this.soundManager.fadeInSoundEffect2(i)},XA=function(i,t,s){var c="se.fadeout";t.on(`+${c}`,function(C,S){S=S==="stop",It.call(i,c,UA,[C,S],i),t.skipEvent()}).on(`-${c}`,function(){t.skipEvent()});var c="se2.fadeout";t.on(`+${c}`,function(C,S){S=S==="stop",It.call(i,c,WA,[C,S],i),t.skipEvent()}).on(`-${c}`,function(){t.skipEvent()})},UA=function(i){this.soundManager.fadeOutSoundEffect(...i)},WA=function(i){this.soundManager.fadeOutSoundEffect2(...i)},HA=function(i,t,s){var c="se.volume";t.on(`+${c}`,function(C){It.call(i,c,$A,C,i),t.skipEvent()}).on(`-${c}`,function(){t.skipEvent()});var c="se2.volume";t.on(`+${c}`,function(C){It.call(i,c,jA,C,i),t.skipEvent()}).on(`-${c}`,function(){t.skipEvent()})},$A=function(i){this.soundManager.setSoundEffectVolume(i,!0)},jA=function(i){this.soundManager.setSoundEffectVolume2(i,!0)},KA=function(i,t,s){var c="se.mute";t.on(`+${c}`,function(){It.call(i,c,ZA,void 0,i),t.skipEvent()}).on(`-${c}`,function(){t.skipEvent()});var c="se2.mute";t.on(`+${c}`,function(){It.call(i,c,JA,void 0,i),t.skipEvent()}).on(`-${c}`,function(){t.skipEvent()});var c="se.unmute";t.on(`+${c}`,function(){It.call(i,c,QA,void 0,i),t.skipEvent()}).on(`-${c}`,function(){t.skipEvent()});var c="se2.unmute";t.on(`+${c}`,function(){It.call(i,c,qA,void 0,i),t.skipEvent()}).on(`-${c}`,function(){t.skipEvent()})},ZA=function(){this.soundManager.setSoundEffectMute(!0)},JA=function(){this.soundManager.setSoundEffect2Mute(!0)},QA=function(){this.soundManager.setSoundEffectMute(!1)},qA=function(){this.soundManager.setSoundEffect2Mute(!1)},_A=function(i,t,s){var c="bgm";t.on(`+${c}`,function(C,S){It.call(i,c,tR,[C,S],i),t.skipEvent()}).on(`-${c}`,function(){It.call(i,"bgm.stop",eR,void 0,i),t.skipEvent()});var c="bgm2";t.on(`+${c}`,function(C,S){It.call(i,c,iR,[C,S],i),t.skipEvent()}).on(`-${c}`,function(){It.call(i,"bgm2.stop",sR,void 0,i),t.skipEvent()})},tR=function(i){var t=i[0],s=i[1];
6307this.soundManager.playBackgroundMusic(t),s&&this.soundManager.fadeInBackgroundMusic(s)},eR=function(){this.soundManager.stopBackgroundMusic()},iR=function(i){var t=i[0],s=i[1];this.soundManager.playBackgroundMusic2(t),s&&this.soundManager.fadeInBackgroundMusic2(s)},sR=function(){this.soundManager.stopBackgroundMusic2()},nR=function(i,t,s){var c="bgm.fadein";t.on(`+${c}`,function(C){It.call(i,c,rR,C,i),t.skipEvent()}).on(`-${c}`,function(){t.skipEvent()});var c="bgm2.fadein";t.on(`+${c}`,function(C){It.call(i,c,aR,C,i),t.skipEvent()}).on(`-${c}`,function(){t.skipEvent()})},rR=function(i){this.soundManager.fadeInBackgroundMusic(i)},aR=function(i){this.soundManager.fadeInBackgroundMusic2(i)},oR=function(i,t,s){var c="bgm.fadeout";t.on(`+${c}`,function(C,S){S=S==="stop",It.call(i,c,lR,[C,S],i),t.skipEvent()}).on(`-${c}`,function(){t.skipEvent()});var c="bgm2.fadeout";t.on(`+${c}`,function(C,S){S=S==="stop",It.call(i,c,hR,[C,S],i),t.skipEvent()}).on(`-${c}`,function(){t.skipEvent()})},lR=function(i){this.soundManager.fadeOutBackgroundMusic(...i)},hR=function(i){this.soundManager.fadeOutBackgroundMusic2(...i)},uR=function(i,t,s){var c="bgm.cross";t.on(`+${c}`,function(C,S){It.call(i,c,dR,[C,S],i),t.skipEvent()}).on(`-${c}`,function(){t.skipEvent()});var c="bgm2.cross";t.on(`+${c}`,function(C,S){It.call(i,c,cR,[C,S],i),t.skipEvent()}).on(`-${c}`,function(){t.skipEvent()})},dR=function(i){this.soundManager.crossFadeBackgroundMusic(...i)},cR=function(i){this.soundManager.crossFadeBackgroundMusic2(...i)},fR=function(i,t,s){var c="bgm.pause";t.on(`+${c}`,function(){It.call(i,c,vR,void 0,i),t.skipEvent()}).on(`-${c}`,function(){It.call(i,"bgm.resume",pR,void 0,i),t.skipEvent()});var c="bgm2.pause";t.on(`+${c}`,function(){It.call(i,c,mR,void 0,i),t.skipEvent()}).on(`-${c}`,function(){It.call(i,"bgm2.resume",gR,void 0,i),t.skipEvent()})},vR=function(){this.soundManager.pauseBackgroundMusic()}
6307,pR=function(){this.soundManager.resumeBackgroundMusic()},mR=function(){this.soundManager.pauseBackgroundMusic2()},gR=function(){this.soundManager.resumeBackgroundMusic2()},xR=function(i,t,s){var c="bgm.volume";t.on(`+${c}`,function(C){It.call(i,c,yR,C,i),t.skipEvent()}).on(`-${c}`,function(){t.skipEvent()});var c="bgm2.volume";t.on(`+${c}`,function(C){It.call(i,c,CR,C,i),t.skipEvent()}).on(`-${c}`,function(){t.skipEvent()})},yR=function(i){this.soundManager.setBackgroundMusicVolume(i)},CR=function(i){this.soundManager.setBackgroundMusicVolume2(i)},TR=function(i,t,s){var c="bgm.mute";t.on(`+${c}`,function(){It.call(i,c,SR,void 0,i),t.skipEvent()}).on(`-${c}`,function(){t.skipEvent()});var c="bgm2.mute";t.on(`+${c}`,function(){It.call(i,c,ER,void 0,i),t.skipEvent()}).on(`-${c}`,function(){t.skipEvent()});var c="bgm.unmute";t.on(`+${c}`,function(){It.call(i,c,PR,void 0,i),t.skipEvent()}).on(`-${c}`,function(){t.skipEvent()});var c="bgm2.unmute";t.on(`+${c}`,function(){It.call(i,c,bR,void 0,i),t.skipEvent()}).on(`-${c}`,function(){t.skipEvent()})},SR=function(){this.soundManager.setBackgroundMusicMute(!0)},ER=function(){this.soundManager.setBackgroundMusic2Mute(!0)},PR=function(){this.soundManager.setBackgroundMusicMute(!1)},bR=function(){this.soundManager.setBackgroundMusic2Mute(!1)},MR=function(i,t,s){var c="camera.fadein";t.on(`+${c}`,function(C,S,l,T){It.call(i,c,wR,[C,S,l,T],i),t.skipEvent()})},wR=function(i){this.cameraTarget.fadeIn(...i)},AR=function(i,t,s){var c="camera.fadeout";t.on(`+${c}`,function(C,S,l,T){It.call(i,c,RR,[C,S,l,T],i),t.skipEvent()})},RR=function(i){this.cameraTarget.fadeOut(...i)},OR=function(i,t,s){var c="camera.shake";t.on(`+${c}`,function(C,S){It.call(i,c,LR,[C,S],i),t.skipEvent()})},LR=function(i){this.cameraTarget.shake(...i)},FR=function(i,t,s){var c="camera.flash";t.on(`+${c}`,function(C,S,l,T){It.call(i,c,IR,[C,S,l,T],i),t.skipEvent()})},IR=function(i){this.cameraTarget.flash(...i)},DR=function(i,t,s){var c="camera.zoom";t.on(`+${c}`,function(C){It.call(i,c,BR,C,i),t.skipEvent()}).on(`+${c}.to`,function(C,S,l){It.call(i,"camera.zoom.to",kR,[C,S,l],i),t.skipEvent()})},BR=function(i){this.cameraTarget.setZoom(i)},kR=function(i){this.cameraTarget.zoomTo(...i)};const Fm=Phaser.Math.DegToRad;var GR=function(i,t,s){var c="camera.rotate";t.on(`+${c}`,function(C){C=Fm(C),It.call(i,c,NR,C,i),t.skipEvent()}).on(`+${c}.to`,function(C,S,l){C=Fm(C),It.call(i,"camera.rotate.to",VR,[C,S,l],i),t.skipEvent()})},NR=function(i){this.cameraTarget.setRotation(i)},VR=function(i){var t=i[0],s=i[1],c=i[2];this.cameraTarget.rotateTo(t,!1,s,c)},zR=function(i,t,s){var c="camera.scroll";t.on(`+${c}`,function(C,S){It.call(i,c,YR,[C,S],i),t.skipEvent()}).on(`+${c}.to`,function(C,S,l,T){It.call(i,"camera.scroll.to",XR,[C,S,l,T],i),t.skipEvent()})},YR=function(i){this.cameraTarget.setScroll(...i)},XR=function(i){var t=i[0],s=i[1],c=i[2],C=i[3],S=this.cameraTarget,l=S.scrollX,T=S.scrollY;S.setScroll(t,s),t+=S.centerX,s+=S.centerY,S.setScroll(l,T),S.pan(t,s,c,C)},UR=function(i,t,s){var c="wait",C="click";t.on(`+${c}`,function(S){Im(i,S),t.skipEvent()}).on(`-${c}`,function(){t.skipEvent()}).on(`+${C}`,function(){Im(i,"click"),t.skipEvent()}).on(`-${C}`,function(){t.skipEvent()})},WR=function(i){this.typeWriter.wait(i)},Im=function(i,t){It.call(i,"wait",WR,t,i)},HR=function(i,t,s){var c="r";t.on(`+${c}`,function(){Wo.call(i,` 6308`),t.skipEvent()}).on(`-${c}`,function(){t.skipEvent()})},$R=function(i,t,s){for(var c=["pagebreak","pb"],C=0,S=c.length;C<S;C++){var l=c[C];t.on(`+${l}`,function(){Wo.call(i,"\f"),t.skipEvent()}).on(`-${l}`,function(){t.skipEvent()})}},jR=function(i,t,s){var c="content.off";t.on(`+${c}`,function(){t.setContentOutputEnable(!1),t.skipEvent()})},KR=function(i,t,s){var c="content.on";t.on(`+${c}`,function(){t.setContentOutputEnable(),t.skipEvent()})},ZR=function(i,t,s){t.on("content",function(c){if(t.contentOutputEnable)Wo.call(i,c);else{var C=`+${t.lastTagStart}`;i.emit(`parser.${C}#content`,t,c)}})},JR=function(i,t,s){t.on("start",function(){i.emit("parser.start",t)}).on("+",function(c,...C){if(!t.skipEventFlag){var S=`+${c}`,l=C;i.emit(`parser.${S}`,t,...C,l),Dm(i,S,l)}}).on("-",function(c){if(!t.skipEventFlag){var C=`-${c}`,S=[];i.emit(`parser.${C}`,t,S),Dm(i,C,S)}}).on("complete",function(){i.emit("parser.complete",t)})},QR=function(i,t){var s=`tag.${t}`;
6308i==null?this.emit(s):this.emit(s,...i)},Dm=function(i,t,s){It.call(i,t,QR,s,i)};const Bm=[TA,SA,EA,PA,bA,OA,LA,MA,wA,AA,RA,FA,IA,DA,kA,VA,XA,HA,KA,_A,nR,oR,uR,fR,xR,TR,MR,AR,OR,FR,DR,GR,zR,UR,HR,$R,jR,KR,ZR,JR];var qR=function(i,t,s){for(var c=0,C=Bm.length;c<C;c++)Bm[c](i,t,s)},_R=function(i,t){for(var s=i.commentLineStart,c=t.split(` 6309`),C=0,S=c.length;C<S;C++){var l=c[C];l===""||(l.trim().length===0||s&&l.startsWith(s))&&(c[C]="")}return c.join("")};const tO=Phaser.Utils.Objects.GetValue;class eO extends CA{constructor(t,s){s===void 0&&(s={}),s.hasOwnProperty("delimiters")||(s.delimiters="[]"),super(s),qR(t,this,s),this.setCommentLineStartSymbol(tO(s,"comment","//")),this.setContentOutputEnable()}setCommentLineStartSymbol(t){return this.commentLineStart=t,this}setContentOutputEnable(t){return t===void 0&&(t=!0),this.contentOutputEnable=t,this}start(t){return super.start(_R(this,t)),this}}const iO={setDefaultTypingSpeed(i){return this.defaultSpeed=i,this},setTypingSpeed(i){return i===void 0&&(i=this.defaultSpeed),this.speed=i,this}},Rr="page.fadeout",rf="_remove.play",km=[Rr,rf];var sO=function(){if(!this.fadeOutPageCallback||!this.children)return this.emit(Rr),this;var i=this.children.filter(function(c){return c.renderable}),t=this.fadeOutPageCallback(i,this.fadeOutPageDuration);if(!t)this.emit(Rr);else if(t.once)t.once("complete",function(){this.emit(Rr)},this);else if(t.then){var s=this;t.then(function(){s.emit(Rr)})}else this.emit(Rr);return this},nu=function(i,t){return new Promise(function(s,c){i.once(t,function(){s()})})},ri=function(i){return nu(i,"complete")},nO=function(i){return this.children=i,this.index=0,this.isPageTyping=!0,this.onTypeStart&&this.onTypeStart(i),this.typing(),ri(this)};const rO="delay",Zy="anim";var Jy=function(i){i===void 0&&(i=0);var t=0;for(this.inTypingProcessLoop=!0;this.inTypingProcessLoop;){var s=this.getNextChild();if(!s){this.timeline.isRunning?this.timeline.once("complete",function(){this.isPageTyping=!1,this.emit("complete")},this):(this.isPageTyping=!1,this.emit("complete"));break}if(s.renderable){var c=this.animationConfig;if(c.duration>0){var C=this.timeline.addTimer({name:Zy,target:s,duration:c.duration,yoyo:c.yoyo,onStart:c.onStart,onProgress:c.onProgress,onComplete:c.onComplete});this.skipTypingAnimation&&C.seek(1)}else c.onStart&&c.onStart(s,0);this.minSizeEnable&&this.textPlayer.setToMinSize(),this.textPlayer.emit("typing",s);var S=this.nextChild;if(S&&!(this.skipSpaceEnable&&uM(S))){if(t+=this.speed+i,i=0,t>0){this.typingTimer=this.timeline.addTimer({name:rO,target:this,duration:t,onComplete:function(l,T,e){l.typingTimer=void 0,Jy.call(l,e.remainder)}});break}}}else dM(s)&&s.exec()}this.minSizeEnable&&this.textPlayer.setToMinSize(),this.inTypingProcessLoop=!1},aO=function(){return this.timeline.pause(),this},oO=function(){return this.timeline.resume(),this},lO=function(){return this.isTypingPaused?this:(this.typingTimer?(this.typingTimer.pause(),this.isTypingPaused=!0):this.inTypingProcessLoop&&(this.inTypingProcessLoop=!1,this.isTypingPaused=!0),this)},hO=function(i){return this.isTypingPaused?(i===void 0&&(i=0),this.typingTimer?(this.isTypingPaused=!1,this.typingTimer.resume(),this.typingTimer.remainder+=i):this.isTypingPaused&&(this.isTypingPaused=!1,this.typing(i)),this):this},uO=function(i){switch(i){case"camera.fadein":case"camera.fadeout":case"camera.flash":case"camera.shake":case"camera.zoom":case"camera.rotate":case"camera.scroll":return!0;default:return!1}},dO=function(i,t){var s=t.split(".");return i.gameObjectManagers.hasOwnProperty(s[0])},cO=function(i,t,s,c){var C=i.waitEventManager,S=t.split("."),l=S[0],T=i.getGameObjectManager(l),e=`wait.${l}`;switch(S.length){case 1:C.waitGameObjectManagerEmpty(l),i.emit(e);return;case 2:var d=S[1];C.waitGameObjectDestroy(l,d),i.emit(e,d);return;case 3:var d=S[1],g=S[2],r=T.getProperty(d,g);if(typeof r=="number"){C.waitGameObjectTweenComplete(l,d,g),i.emit(e,d,g);return}var a=g,h=a.startsWith("!");if(h&&(a=a.substring(1)),T.hasData(d,a)){C.waitGameObjectDataFlag(l,d,a,!h),i.emit(e,d,a);return}else{C.waitTime(0);return}}};const fO=Phaser.Input.Keyboard.KeyCodes;var Qy=function(i,t,s,c){var C=i.waitEventManager;C.clearWaitCompleteCallbacks().addWaitCompleteCallback(s,c),typeof t=="string"&&t.length>1&&t.indexOf("|")!==-1?t=t.split("|"):t=[t];for(var S=0,l=t.length;S<l;S++){var T=t[S];if(T==null||T==="wait"){var e=i.waitEventManager.getWaitCompleteTriggerCallback();i.emit("wait",e)}else if(typeof T=="number"||!isNaN(T)){var d=parseFloat(T);
6309C.waitTime(d),i.emit("wait.time",d)}else if(T==="click")C.waitClick(),i.emit("wait.click");else if(T==="se"){C.waitSoundEffectComplete();var g=i.soundManager.getLastSoundEffect();i.emit("wait.music",g)}else if(T==="se2"){C.waitSoundEffect2Complete();var g=i.soundManager.getLastSoundEffect2();i.emit("wait.music",g)}else if(T==="bgm"){C.waitBackgroundMusicComplete();var g=i.soundManager.getBackgroundMusic();i.emit("wait.music",g)}else if(T==="bgm2"){C.waitBackgroundMusic2Complete();var g=i.soundManager.getBackgroundMusic2();i.emit("wait.music",g)}else if(fO.hasOwnProperty(T.toUpperCase()))C.waitKeyDown(T),i.emit("wait.keydown",T);else if(uO(T))C.waitCameraEffectComplete(T),i.emit("wait.camera",T);else if(dO(i,T))cO(i,T);else{var e=i.waitEventManager.getWaitCompleteTriggerCallback();i.emit(`wait.${T}`,e)}}},vO=function(i){return this.ignoreWait?this:(this.pauseTyping(),Qy(this.textPlayer,i,this.resumeTyping,this),this)},pO=function(i){return i===void 0&&(i=!0),this.ignoreWait=i,this},mO=function(i){return i===void 0&&(i=!0),this.skipSpaceEnable=i,this},gO=function(i){if(i===void 0&&(i=!0),this.skipTypingAnimation=i,i)for(var t=this.timeline.getTimers(Zy),s=0,c=t.length;s<c;s++)t[s].seek(1);return this},xO=function(i){if(i===void 0&&(i=!0),this.skipSoundEffect=i,i){var t=this.textPlayer._soundManager;t&&t.fadeOutAllSoundEffects(100,!0)}return this},yO=function(){return this.typingTimer&&this.typingTimer.seek(1),this},qy={fadeOutPage:sO,start:nO,typing:Jy,pause:aO,resume:oO,pauseTyping:lO,resumeTyping:hO,wait:vO,setIgnoreWait:pO,setSkipSpaceEnable:mO,setSkipTypingAnimation:gO,setSkipSoundEffect:xO,skipCurrentTypingDelay:yO};Object.assign(qy,iO);const ea=Phaser.Utils.Objects.GetValue;class _y{constructor(t,s){this.setEventEmitter(),this.textPlayer=t,this.isPageTyping=!1,this.typingTimer=void 0,this.pauseTypingTimer=void 0,this.inTypingProcessLoop=!1,this.isTypingPaused=!1,this.setIgnoreWait(!1),this.setSkipTypingAnimation(!1),this.setTypingStartCallback(ea(s,"onTypingStart",TO)),this.setDefaultTypingSpeed(ea(s,"speed",250)),this.setTypingSpeed(),this.setSkipSpaceEnable(ea(s,"skipSpace",!1)),this.setAnimationConfig(ea(s,"animation",void 0)),this.setMinSizeEnable(ea(s,"minSizeEnable",!1)),this.setFadeOutPageCallback(ea(s,"fadeOutPage"))}destroy(){this.destroyEventEmitter(),this.textPlayer=void 0,this.typingTimer=void 0,this.pauseTypingTimer=void 0,this.onTypeStart=void 0,this.animationConfig=void 0}get timeline(){return this.textPlayer.timeline}setTypingStartCallback(t){return this.onTypeStart=t,this}setAnimationConfig(t){return t||(t={}),t.hasOwnProperty("duration")||(t.duration=0),t.hasOwnProperty("onStart")||(t.onStart=CO),this.animationConfig=t,this}setFadeOutPageCallback(t){return this.fadeOutPageCallback=t,this}setMinSizeEnable(t){return t===void 0&&(t=!0),this.minSizeEnable=t,this}getNextChild(){var t=this.nextChild;return this.index=Math.min(this.index+1,this.children.length),this._nextChild=void 0,t}get nextChild(){return this._nextChild||(this._nextChild=this.children[this.index]),this._nextChild}}var CO=function(i){i.setVisible&&i.setVisible()},TO=function(i){for(var t=0,s=i.length;t<s;t++){var c=i[t];c.setVisible&&c.setVisible(!1)}};Object.assign(_y.prototype,Wa,qy);class SO extends zf{playAnimation(t){return this.gameObject.anims.timeScale=this.timeScale,this.gameObject.play(t),this}stopAnimation(){return this.gameObject.stop(),this}chainAnimation(t){return this.gameObject.chain(t),this}pauseAnimation(){return this.gameObject.anims.pause(),this}setTimeScale(t){return super.setTimeScale(t),this.gameObject.anims&&(this.gameObject.anims.timeScale=t),this}}const EO={playAnimation(i,t){return this.has(i)||this.add(i),this.get(i).playAnimation(t),this},stopAnimation(i){return this.has(i)?(this.get(i).stopAnimation(),this):this},chainAnimation(i,t){return this.has(i)?(this.get(i).chainAnimation(t),this):this},pauseAnimation(i){return this.has(i)?(this.get(i).pauseAnimation(),this):this}};var t1={};Object.assign(t1,EO);class e1 extends eu{constructor(t,s){s===void 0&&(s={}),s.BobClass=SO,super(t,s)}setCreateGameObjectCallback(t,s){return!t||t==="sprite"?t=PO:t==="image"&&(t=bO),super.setCreateGameObjectCallback(t,s),this}}
6309var PO=function(i,t,s){return typeof s!="string"&&typeof s!="number"&&(s=void 0),i.add.sprite(0,0,t,s)},bO=function(i,t,s){return typeof s!="string"&&typeof s!="number"&&(s=void 0),i.add.image(0,0,t,s)};Object.assign(e1.prototype,t1);var Gm=function(i,t){return i.length===3&&i[0]===t&&i[2]==="play"},MO=function(i,t){return i.length===3&&i[0]===t&&i[2]==="stop"},wO=function(i,t,s){var c=s.name;t.on("+",function(C,...S){if(!t.skipEventFlag){var l=C.split("."),T;if(Gm(l,c))T=l[1];else return;It.call(i,`${c}.play`,AO,[c,T,S],i),t.skipEvent()}}).on("+",function(C){if(!t.skipEventFlag){var S=C.split("."),l;if(MO(S,c))l=S[1];else return;It.call(i,`${c}.stop`,Nm,[c,l],i),t.skipEvent()}}).on("-",function(C){if(!t.skipEventFlag){var S=C.split("."),l;if(Gm(S,c))l=S[1];else return;It.call(i,`${c}.stop`,Nm,[c,l],i),t.skipEvent()}})},AO=function(i){var t,s,c;[t,s,c]=i;var C=c.shift(),S=this.getGameObjectManager(t);S.playAnimation(s,C),c.length>0&&S.chainAnimation(s,c)},Nm=function(i){var t,s;[t,...s]=i;var c=this.getGameObjectManager(t);c.stopAnimation(...s)},RO=function(i,t){return i.length===3&&i[0]===t&&i[2]==="pause"},OO=function(i,t,s){var c=s.name;t.on("+",function(C){if(!t.skipEventFlag){var S=C.split("."),l;if(RO(S,c))l=S[1];else return;It.call(i,`${c}.pause`,LO,[c,l],i),t.skipEvent()}})},LO=function(i){var t,s;[t,...s]=i;var c=this.getGameObjectManager(t);c.pauseAnimation(...s)},FO=function(i,t){return i.length===3&&i[0]===t&&i[2]==="chain"},IO=function(i,t,s){var c=s.name;t.on("+",function(C){if(!t.skipEventFlag){var S=C.split("."),l;if(FO(S,c))l=S[1];else return;var T=Array.prototype.slice.call(arguments,1);It.call(i,`${c}.chain`,DO,[c,l,T],i),t.skipEvent()}})},DO=function(i){var t,s;[t,...s]=i;var c=this.getGameObjectManager(t);c.chainAnimation(...s)};const BO=[wO,OO,IO];var kO=function(i){i===void 0&&(i={}),i.name="sprite",i.parseCallbacks=BO,this.addGameObjectManager(i,e1)},Vm=function(i,t){return i.length===2&&i[0]===t},GO=function(i,t,s){var c=s.name;t.on("+",function(C,...S){if(!t.skipEventFlag){var l=C.split("."),T;if(Vm(l,c))T=l[1];else return;It.call(i,`${c}.add`,NO,[c,T,...S],i),t.skipEvent()}}).on("-",function(C){if(!t.skipEventFlag){var S=C.split("."),l;if(Vm(S,c))l=S[1];else return;It.call(i,`${c}.remove`,VO,[c,l],i),t.skipEvent()}})},NO=function(i){var t,s;[t,...s]=i;var c=this.getGameObjectManager(t);c.add(...s)},VO=function(i){var t,s;[t,...s]=i;var c=this.getGameObjectManager(t);c.remove(...s)},zO=function(i,t,s){var c=s.name;t.on("-",function(C){t.skipEventFlag||C===c&&(It.call(i,`${c}.removeall`,YO,c,i),t.skipEvent())})},YO=function(i){var t=this.getGameObjectManager(i);t.removeAll()},XO=function(i,t){return i.length===3&&i[0]===t},UO=function(i,t,s){var c=s.name;t.on("+",function(C,...S){if(!t.skipEventFlag){var l=C.split("."),T,e;if(XO(l,c))T=l[1],e=l[2];else return;It.call(i,`${c}.call`,WO,[c,T,e,...S],i),t.skipEvent()}})},WO=function(i){var t,s,c,C;[t,s,c,...C]=i;var S=`${t}.${c}`;if(this.emit(S,s,...C),!(this.listenerCount(S)>0)){var l=this.getGameObjectManager(t);l.hasMethod(s,c)?l.call(s,c,...C):l.setProperty(s,c,C[0])}},HO={to:!0,yoyo:!0,from:!0,toLeft:!0,toRight:!0,toUp:!0,toDown:!0,yoyoLeft:!0,yoyoRight:!0,yoyoUp:!0,yoyoDown:!0,fromLeft:!0,fromRight:!0,fromUp:!0,fromDown:!0},$O=function(i,t){return i.length===4&&i[0]===t&&HO[i[3]]},jO=function(i,t,s){var c=s.name;i.getGameObjectManager(c),t.on("+",function(C,S,l,T,e){if(!t.skipEventFlag){var d=C.split("."),g,r,a;if($O(d,c))g=d[1],r=d[2],a=d[3];else return;typeof T=="number"&&(e=T,T=void 0),It.call(i,`${c}.ease`,KO,[c,g,r,S,l,T,e,a],i),t.skipEvent()}})},KO=function(i){var t,s,c,C,S,l,T,e;[t,s,c,C,S,l,T,e]=i;var d=this.getGameObjectManager(t),g=d.getProperty(s,c);if(typeof g=="number"){e.endsWith("Left")||e.endsWith("Up")?e.startsWith("to")||e.startsWith("yoyo")?C=g-C:e.startsWith("from")&&(d.setProperty(s,c,g-C),C=g):e.endsWith("Right")||e.endsWith("Down")?e.startsWith("to")||e.startsWith("yoyo")?C=g+C:e.startsWith("from")&&(d.setProperty(s,c,g+C),C=g):e==="from"&&(d.setProperty(s,c,C),C=g);var r=e.startsWith("yoyo");d.easeProperty(s,c,C,S,l,T,r)}};const zm=[GO,zO,UO,jO],ZO=jy.addGameObjectManager,JO={addGameObjectManager(i,t){i===void 0&&(i={});var s=i.name;s||console.warn("Parameter 'name' is required in TextPlayer.addGameObjectManager(config) method"),ZO.call(this,i,t);var c=i.parseCallbacks;c?c=[...c,...zm]:c=zm;for(var C=0,S=c.length;C<S;C++)c[C](this,this.parser,i);return this}};var QO=function(i){return this.waitEventManager.setClickTarget(i),this},qO=function(i){return this.waitEventManager.setCameraTarget(i),this},_O=function(i){var t=this;i?typeof i=="function"?this.nextPageInput=function(s,c){var C=t.waitEventManager;C.clearWaitCompleteCallbacks().addWaitCompleteCallback(s,c);var S=C.getWaitCompleteTriggerCallback();i.call(t,S)}:this.nextPageInput=function(s,c){Qy(t,i,s,c)}:this.nextPageInput=null},tL=function(i,t){return this.imageManager.add(i,t),this};const eL={play(i){return this.isPlaying?this:(this.removeChildren(),this.parser.start(i),this.isPlaying=!0,this.once("complete",function(){this.isPlaying=!1}
6309,this),this.lastWrapResult=void 0,this.typingNextPage(),this)},playPromise(i){var t=ri(this);return this.play(i),t}};var af=function(){return!this.isPlaying||this.isPageTyping?this:(this.typeWriter.once(Rr,iL,this).fadeOutPage(),this)},iL=function(){var i=this.runWrap(this.lastWrapResult);this.lastWrapResult=i,this.emit("page.start");var t=function(){this.emit(rf),i.isLastPage?this.emit("complete"):(this.emit("page.complete"),this.ignoreNextPageInput?af.call(this):this.nextPageInput&&this.nextPageInput(af,this))};this.once(rf,function(){this.typeWriter.off("complete",t,this)},this),this.typeWriter.once("complete",t,this).start(i.children)};const sL={pause(){return this.timeline.pause(),this},pauseTyping(){return this.typeWriter.pauseTyping(),this}},nL={resume(){return this.timeline.resume(),this},resumeTyping(i){return this.typeWriter.resumeTyping(i),this}};var rL=function(i){return this.typeWriter.wait(i),this};const aL={setDefaultTypingSpeed(i){return this.defaultTypingSpeed=i,this},setTypingSpeed(i){return this.typingSpeed=i,this}};var oL=function(i){return this.typeWriter.setIgnoreWait(i),this},lL=function(i){return i===void 0&&(i=!0),this.ignoreNextPageInput=i,this},hL=function(){if(!this.isPlaying||!this.isPageTyping)return this;var i=this.typeWriter.speed,t=this.typeWriter.ignoreWait,s=this.typeWriter.skipTypingAnimation,c=this.typeWriter.skipSoundEffect;return this.typeWriter.once("complete",function(){this.typeWriter.setTypingSpeed(i).setIgnoreWait(t).setSkipTypingAnimation(s).setSkipSoundEffect(c)},this).setTypingSpeed(0).skipCurrentTypingDelay().setIgnoreWait(!0).setSkipTypingAnimation(!0).setSkipSoundEffect(!0),this};const uL={getSprite(i){return this.getGameObject("sprite",i)},addSprite(i,t){return this.addGameObject("sprite",i,t),this}},dL={setContentOutputEnable(i){return this.parser.setContentOutputEnable(i),this},setContentCallback(i,t){return this.contentCallback=i,this.contentCallbackScope=t,this}};var i1={setClickTarget:QO,setCameraTarget:qO,setNextPageInput:_O,addImage:tL,typingNextPage:af,wait:rL,setIgnoreWait:oL,setIgnoreNextPageInput:lL,showPage:hL};Object.assign(i1,JO,eL,sL,nL,aL,uL,dL);var cL=function(i){for(var t=0,s=km.length;t<s;t++)i.emit(km[t])};const Ym=Phaser.Utils.Objects.IsPlainObject,ia=Phaser.Utils.Objects.GetValue;class Hf extends pA(Ua){constructor(t,s,c,C,S,l){Ym(s)?l=s:Ym(C)&&(l=C),l===void 0&&(l={});var T=l.text;delete l.text,super(t,s,c,C,S,l),this.type="rexTextPlayer",this.initManagers(t,l),this.parser=new eO(this,ia(l,"parser",void 0)),this.typeWriter=new _y(this,ia(l,"typing",void 0)),this._imageManager=void 0;var e=ia(l,"images",void 0);e&&this.addImage(e);var d=ia(l,"sprites");d!==!1&&d!==null&&kO.call(this,d),this.setIgnoreNextPageInput(ia(l,"ignoreNextPageInput",!1)),this.setNextPageInput(ia(l,"nextPageInput",null)),this.isPlaying=!1,T&&this.play(T)}get imageManager(){return this._imageManager===void 0&&(this._imageManager=new Df(this.scene)),this._imageManager}get spriteManager(){return this.getGameObjectManager("sprite")}destroy(t){!this.scene||this.ignoreDestroy||(cL(this),this.parser.destroy(),this.parser=void 0,this.typeWriter.destroy(t),this.typeWriter=void 0,this._imageManager&&this._imageManager.destroy(t),this._imageManager=void 0,this.destroyManagers(t),super.destroy(t))}get isPageTyping(){return this.typeWriter.isPageTyping}set defaultTypingSpeed(t){this.typeWriter.setDefaultTypingSpeed(t)}get defaultTypingSpeed(){return this.typeWriter.defaultTypingSpeed}set typingSpeed(t){this.typeWriter.setTypingSpeed(t)}get typingSpeed(){return this.typeWriter.speed}set timeScale(t){this.setTimeScale(t)}get timeScale(){return this.getTimeScale()}}Object.assign(Hf.prototype,i1);xt.register("textPlayer",function(i,t,s,c,C){var S=new Hf(this.scene,i,t,s,c,C);return this.scene.add.existing(S),S});mt(window,"RexPlugins.UI.TextPlayer",Hf);const s1={maxLength:["maxLength",void 0],minLength:["minLength",void 0],readOnly:["readOnly",!1]},n1={direction:["direction",void 0]};var kn=function(i,t,s){if(typeof s=="string")i.hasOwnProperty(s)&&(t[s]=i[s]);else{var c=s;if(Array.isArray(c))for(var C=0,S=c.length;C<S;C++)kn(i,t,c[C]);else for(var s in c)kn(i,t,s)}},fL=function(i){i===void 0&&(i={});var t={};return kn(i,t,"inputType"),kn(i,t,"type"),kn(i,t,"style"),kn(i,t,n1),kn(i,t,s1),t},$f=function(i,t,s,c){if(t)return!(s&&!s(i,t)||!Xm(i,t)||c&&!c(i,t));for(var C=i.scene.input.manager,S=C.pointersTotal,l=C.pointers,t,T=0;T<S;T++)if(t=l[T],!(s&&!s(i,t))&&Xm(i,t)&&!(c&&!c(i,t)))return!0;return!1},Xm=function(i,t){for(var s=i.scene,c=s.input.cameras.getCamerasBelowPointer(t),C=s.input.manager,S=[i],l=0,T=c.length;l<T;l++)if(C.hitTest(t,S,c[l],Vl),Vl.length>0)return Vl.length=0,!0;return Vl.length=0,!1},Vl=[],Ma=void 0,vL=function(i){i!==Ma&&(Ma!==void 0&&Ma.close(),Ma=i)},pL=function(i){i===Ma&&(Ma=void 0)};
6309const mL=Phaser.Utils.Objects.GetValue;var Dh=function(i,t,s){s===void 0&&(s={});var c,C;for(var S in i)c=i[S],C=mL(t,S,c[1]),C!==void 0&&(s[c[0]]=C);return s},r1=function(i){i.addEventListener("touchstart",sa,!1),i.addEventListener("touchmove",sa,!1),i.addEventListener("touchend",sa,!1),i.addEventListener("mousedown",sa,!1),i.addEventListener("mouseup",sa,!1),i.addEventListener("mousemove",sa,!1)},sa=function(i){i.stopPropagation()},gL=function(){return this.close(),this.emit("keydown-ENTER",this.parent,this),this},xL=function(){this.isOpened=!0,this.initText(),this.enterCloseEnable&&this.scene.input.keyboard.once("keydown-ENTER",gL,this),this.scene.sys.events.on("postupdate",this.updateText,this),this.scene.input.on("pointerdown",this.onClickOutside,this),this.onOpenCallback&&this.onOpenCallback(this.parent,this),this.emit("open",this)},yL=function(i){if(i){var t=i.parentElement;t&&t.removeChild(i)}},CL=function(){this.isOpened=!1,this.updateText(),this.scene.sys.events.off("postupdate",this.updateText,this),this.scene.input.off("pointerdown",this.onClickOutside,this),this.onCloseCallback&&this.onCloseCallback(this.parent,this),yL(this.node),this.node=void 0,this.emit("close",this)};const Td=Phaser.Utils.Objects.GetValue;var TL=function(i,t){var s,c=Td(t,"inputType",void 0);c===void 0&&(c=Td(t,"type","text")),c==="textarea"?(s=document.createElement("textarea"),s.style.resize="none"):(s=document.createElement("input"),s.type=c);var C=Td(t,"style",void 0),S=s.style;Dh(n1,C,S),S.position="absolute",S.opacity=0,S.pointerEvents="none",S.zIndex=0,S.transform="scale(0)",Dh(s1,t,s),r1(s);var l=i.scene.sys.scale,T=l.isFullscreen?l.fullscreenTarget:document.body;return T.appendChild(s),s.addEventListener("focus",function(e){xL.call(i)}),s.addEventListener("blur",function(e){CL.call(i)}),s},SL=function(){return this.isOpened?this:this.readOnly?this:(vL(this),this.node||(this.node=TL(this,this.nodeConfig)),this.setFocus(),this)},EL=function(){return this.isOpened?(pL(this),this.setBlur(),this):this},PL={open:SL,close:EL};const Pn=Phaser.Utils.Objects.GetValue;class jf extends ke{constructor(t,s){super(t);var c=Pn(s,"inputType",void 0);c===void 0&&(c=Pn(s,"type","text")),this.setEnterCloseEnable(Pn(s,"enterClose",c!=="textarea"));var C=Pn(s,"onOpen",void 0);C||(C=Pn(s,"onFocus",void 0)),this.onOpenCallback=C;var S=Pn(s,"onClose",void 0);S||(S=Pn(s,"onBlur",void 0)),this.onCloseCallback=S,this.onUpdateCallback=Pn(s,"onUpdate",void 0),this.isOpened=!1,t.on("pointerdown",function(){this.open()},this).setInteractive(),this.nodeConfig=fL(s),this.node=void 0}destroy(){this.close(),super.destroy()}onClickOutside(t){$f(this.parent,t)||this.close()}setEnterCloseEnable(t){return t===void 0&&(t=!0),this.enterCloseEnable=t,this}initText(){}updateText(){}get text(){return this.node?this.node.value:""}set text(t){this.node&&(this.node.value=t)}setText(t){return this.text=t,this}get maxLength(){return this.nodeConfig.maxLength}set maxLength(t){this.nodeConfig.maxLength=t,this.node&&(this.node.maxLength=t)}setMaxLength(t){return this.maxLength=t,this}get minLength(){return this.nodeConfig.minLength}set minLength(t){this.nodeConfig.minLength=t,this.node&&(this.node.minLength=t)}setMinLength(t){return this.minLength=t,this}get placeholder(){return this.node.placeholder}set placeholder(t){this.node&&(this.node.placeholder=t)}setPlaceholder(t){return this.placeholder=t,this}selectText(t,s){return this.node?(t===void 0?this.node.select():this.node.setSelectionRange(t,s),this):this}selectAll(){return this.selectText(),this}get selectionStart(){return this.node?this.node.selectionStart:0}get selectionEnd(){return this.node?this.node.selectionEnd:0}get selectedText(){if(!this.node)return"";var t=this.node;return t.value.substring(t.selectionStart,t.selectionEnd)}get cursorPosition(){return this.node?this.node.selectionStart:0}set cursorPosition(t){this.node&&this.node.setSelectionRange(t,t)}setCursorPosition(t){return t===void 0?t=this.text.length:t<0&&(t=this.text.length+t),this.cursorPosition=t,this}get tooltip(){return this.node?this.node.title:""}set tooltip(t){if(!this.node)return this;this.node.title=t}setTooltip(t){return this.tooltip=t,this}setTextChangedCallback(t){return this.onTextChanged=t,this}get readOnly(){return this.nodeConfig.readOnly}set readOnly(t){this.nodeConfig.readOnly=t,this.node&&(this.node.readOnly=t)}setReadOnly(t){return t===void 0&&(t=!0),this.readOnly=t,this}get spellCheck(){return this.node?this.node.spellcheck:""}set spellCheck(t){this.node&&(this.node.spellcheck=t)}setSpellCheck(t){return this.spellCheck=t,this}get fontColor(){if(this.node)return this.node.style.color}set fontColor(t){this.node&&(this.node.style.color=t)}setFontColor(t){return this.fontColor=t,this}setStyle(t,s){return this.node?(this.node.style[t]=s,this):this}getStyle(t){if(this.node)return this.node.style[t]}scrollToBottom(){return this.node?(this.node.scrollTop=this.node.scrollHeight,this):this}setEnabled(t){return this.node?(t===void 0&&(t=!0),this.node.disabled=!t,this):this}setBlur(){return this.node?(this.node.blur(),this):this}setFocus(){return this.node?(this.node.focus(),this):this}get isFocused(){return this.isOpened}}Object.assign(jf.prototype,PL);var a1=function(i,t,s){i=i.replace(" ","");var c=s.previousText;if(i===c)return i;if(isNaN(i)){s.emit("nan",i,s),i=c;
6309var C=s.cursorPosition-1;s.setText(i),s.setCursorPosition(C)}else s.previousText=i;return i},bL=function(i){var t=i.parent,s=i.isOpened?i.selectionStart:null,c=i.isOpened?i.selectionEnd:null,C=i.prevSelectionStart,S=i.prevSelectionEnd;if(!(C===s&&S===c)){var l,T;C===null?(l=s,T=c):s===null?(l=C,T=S):(l=Math.min(C,s),T=Math.max(S,c));for(var e=l;e<T;e++){var d;C===null?d=!1:d=e>=C&&e<S;var g;if(s===null?g=!1:g=e>=s&&e<c,d!==g){var r=t.getCharChild(e);if(r){var a=d?"cursorout":"cursorin";t.emit(a,r,e,t)}}}i.prevSelectionStart=s,i.prevSelectionEnd=c}},ML=function(i){var t=i.parent,s=0,c=t.width,C=0,S=t.height,l=i.drawX,T=i.drawY,e=l+i.drawTLX,d=l+i.drawTRX,g=T+i.drawTLY,r=T+i.drawBLY,a;e<s?a=s-e:d>c?a=c-d:a=0;var h;g<C?h=C-g:r>S?h=S-r:h=0,t._textOX+=a,t._textOY+=h},wL=function(i){var t=i.parent,s=t.text,c=i.cursorPosition;if(i.prevCursorPosition!==c){if(i.prevCursorPosition!==null&&i.prevCursorPosition>s.length&&(i.prevCursorPosition=null),i.prevCursorPosition!==null){var C=t.getCharChild(i.prevCursorPosition);C&&(C.text===` 6310`&&C.clearTextSize(),t.emit("cursorout",C,i.prevCursorPosition,t))}if(c!=null){var C=t.getCharChild(c);C&&(C.text===` 6311`&&C.copyTextSize(t.lastInsertCursor),ML(C),t.emit("cursorin",C,c,t))}t.emit("movecursor",c,i.prevCursorPosition,t),i.prevCursorPosition=c}},Um=function(i){var t=i.prevSelectionStart;if(t!==null){for(var s=i.prevSelectionEnd,c=i.parent,C=t;C<s;C++){var S=c.getCharChild(C);S&&c.emit("cursorout",S,C,c)}i.prevSelectionStart=null,i.prevSelectionEnd=null}},Wm=function(i){var t=i.prevCursorPosition;if(t!==null){var s=i.parent,c=s.getCharChild(t);c&&s.emit("cursorout",c,t,s),i.prevCursorPosition=null}};const AL=Phaser.Utils.Objects.GetValue;let RL=class extends jf{constructor(t,s){super(t,s),this.setSelectAllWhenFocusEnable(AL(s,"selectAll",!1)),this.cursorMoveStartIndex=null,this.prevCursorPosition=null,this.prevSelectionStart=null,this.prevSelectionEnd=null,this.firstClickAfterOpen=!1,t.on("pointerdown",function(c,C,S,l){var T=t.getNearestChild(C,S),e=t.getCharIndex(T);(!this.selectAllWhenFocus||!this.firstClickAfterOpen)&&this.setCursorPosition(e),this.cursorMoveStartIndex=e,this.firstClickAfterOpen=!1},this).on("pointermove",function(c,C,S,l){if(c.isDown){var T=t.getNearestChild(C,S),e=t.getCharIndex(T);this.cursorMoveStartIndex<e?this.selectText(this.cursorMoveStartIndex,e+1):this.selectText(e,this.cursorMoveStartIndex+1)}},this),this.on("open",function(){this.selectAllWhenFocus&&this.selectAll(),this.firstClickAfterOpen=!0,t.emit("open")},this).on("close",function(){t.emit("close")}).on("keydown-ENTER",function(){t.emit("keydown-ENTER")})}initText(){var t=this.parent;return this.prevCursorPosition=null,this.setText(t.text),this}updateText(){var t=this.parent,s=this.text;if(this.onUpdateCallback){var c=this.onUpdateCallback(s,t,this);c!=null&&(s=c)}return t.text!==s&&t.setText(s),this.isOpened?this.selectionStart!==this.selectionEnd?(Wm(this),bL(this)):(Um(this),wL(this)):(Um(this),Wm(this)),this}setNumberInput(){return this.onUpdateCallback=a1,this}setSelectAllWhenFocusEnable(t){return t===void 0&&(t=!0),this.selectAllWhenFocus=t,this}};const OL=Phaser.Utils.Objects.GetValue,LL=["inputType","onOpen","onFocus","onClose","onBlur","onUpdate","enterClose","readOnly","maxLength","minLength","selectAll"];var FL=function(i,t){var s=OL(t,"edit");return s===void 0&&(s={}),kn(t,s,LL),new RL(i,s)},Gs=function(i,t){if(!i||typeof i=="number")return!1;if(i.hasOwnProperty(t))return!0;if(t.indexOf(".")!==-1){for(var s=t.split("."),c=i,C=0;C<s.length;C++)if(c.hasOwnProperty(s[C]))c=c[s[C]];else return!1;return!0}else return!1},IL=function(i){var t=!i.textArea;if(!Gs(i,"wrap.vAlign")){var s=t?"center":"top";mt(i,"wrap.vAlign",s)}if(Gs(i,"wrap.charWrap")||mt(i,"wrap.charWrap",!0),!Gs(i,"wrap.maxLines")){var s=t?1:void 0;mt(i,"wrap.maxLines",s)}if(t&&mt(i,"wrap.wrapWidth",1/0),Gs(i,"wrap.useDefaultTextHeight")||mt(i,"wrap.useDefaultTextHeight",!0),i.edit||(i.edit={}),!Gs(i.edit,"inputType")){var s=t?"text":"textarea";mt(i.edit,"inputType",s)}return i},of=function(i,t,s,c){if(s===void 0&&(s="."),c===void 0&&(c={}),!i)return c;if(t in i)return Object.assign(c,i[t]);t+=s;for(var C in i)C.startsWith(t)&&(c[C.replace(t,"")]=i[C]);return c},Kf=function(i,t,s){if(s===void 0&&(s={}),Array.isArray(t))for(var c,C=0,S=t.length;C<S;C++)c=t[C],s[c]=i[c];else for(var c in t)s[c]=i[c];return s},ru=function(i,t){for(var s in i)if(!(s in t)||i[s]!==t[s])return!1;for(var s in t)if(!(s in i))return!1;return!0},DL=function(i){Yf(i)||this.setCursorStyle(i).on("cursorin",function(t){var s=this.cursorStyle,c=Kf(t.style,s);ru(s,c)||(t.styleSave=c,t.modifyStyle(s))},this).on("cursorout",function(t){t.styleSave&&(t.modifyStyle(t.styleSave),t.styleSave=void 0)},this)},BL=function(i){Yf(i)||this.setFocusStyle(i).on("open",function(){var t=this.background,s=this.focusStyle,c=Kf(t,s);ru(s,c)||(t.styleSave=c,t.modifyStyle(s))},this).on("close",function(){var t=this.background;t.styleSave&&(t.modifyStyle(t.styleSave),t.styleSave=void 0)},this)},kL=function(i){var t=i.createCharChild("|");return t.text="",t};function vn(){}vn.prototype={diff(i,t,s={}
6311){let c=s.callback;typeof s=="function"&&(c=s,s={}),this.options=s;let C=this;function S(h){return c?(setTimeout(function(){c(void 0,h)},0),!0):h}i=this.castInput(i),t=this.castInput(t),i=this.removeEmpty(this.tokenize(i)),t=this.removeEmpty(this.tokenize(t));let l=t.length,T=i.length,e=1,d=l+T;s.maxEditLength&&(d=Math.min(d,s.maxEditLength));let g=[{newPos:-1,components:[]}],r=this.extractCommon(g[0],t,i,0);if(g[0].newPos+1>=l&&r+1>=T)return S([{value:this.join(t),count:t.length}]);function a(){for(let h=-1*e;h<=e;h+=2){let n,o=g[h-1],f=g[h+1],u=(f?f.newPos:0)-h;o&&(g[h-1]=void 0);let v=o&&o.newPos+1<l,m=f&&0<=u&&u<T;if(!v&&!m){g[h]=void 0;continue}if(!v||m&&o.newPos<f.newPos?(n=NL(f),C.pushComponent(n.components,void 0,!0)):(n=o,n.newPos++,C.pushComponent(n.components,!0,void 0)),u=C.extractCommon(n,t,i,h),n.newPos+1>=l&&u+1>=T)return S(GL(C,n.components,t,i,C.useLongestToken));g[h]=n}e++}if(c)(function h(){setTimeout(function(){if(e>d)return c();a()||h()},0)})();else for(;e<=d;){let h=a();if(h)return h}},pushComponent(i,t,s){let c=i[i.length-1];c&&c.added===t&&c.removed===s?i[i.length-1]={count:c.count+1,added:t,removed:s}:i.push({count:1,added:t,removed:s})},extractCommon(i,t,s,c){let C=t.length,S=s.length,l=i.newPos,T=l-c,e=0;for(;l+1<C&&T+1<S&&this.equals(t[l+1],s[T+1]);)l++,T++,e++;return e&&i.components.push({count:e}),i.newPos=l,T},equals(i,t){return this.options.comparator?this.options.comparator(i,t):i===t||this.options.ignoreCase&&i.toLowerCase()===t.toLowerCase()},removeEmpty(i){let t=[];for(let s=0;s<i.length;s++)i[s]&&t.push(i[s]);return t},castInput(i){return i},tokenize(i){return i.split("")},join(i){return i.join("")}};function GL(i,t,s,c,C){let S=0,l=t.length,T=0,e=0;for(;S<l;S++){let g=t[S];if(g.removed){if(g.value=i.join(c.slice(e,e+g.count)),e+=g.count,S&&t[S-1].added){let r=t[S-1];t[S-1]=t[S],t[S]=r}}else{if(!g.added&&C){let r=s.slice(T,T+g.count);r=r.map(function(a,h){let n=c[e+h];return n.length>a.length?n:a}),g.value=i.join(r)}else g.value=i.join(s.slice(T,T+g.count));T+=g.count,g.added||(e+=g.count)}}let d=t[l-1];return l>1&&typeof d.value=="string"&&(d.added||d.removed)&&i.equals("",d.value)&&(t[l-2].value+=d.value,t.pop()),t}function NL(i){return{newPos:i.newPos,components:i.components.slice(0)}}const VL=new vn;function zL(i,t,s){return VL.diff(i,t,s)}const Hm=/^[a-zA-Z\u{C0}-\u{FF}\u{D8}-\u{F6}\u{F8}-\u{2C6}\u{2C8}-\u{2D7}\u{2DE}-\u{2FF}\u{1E00}-\u{1EFF}]+$/u,$m=/\S/,o1=new vn;o1.equals=function(i,t){return this.options.ignoreCase&&(i=i.toLowerCase(),t=t.toLowerCase()),i===t||this.options.ignoreWhitespace&&!$m.test(i)&&!$m.test(t)};o1.tokenize=function(i){let t=i.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/);for(let s=0;s<t.length-1;s++)!t[s+1]&&t[s+2]&&Hm.test(t[s])&&Hm.test(t[s+2])&&(t[s]+=t[s+2],t.splice(s+1,2),s--);return t};const l1=new vn;l1.tokenize=function(i){let t=[],s=i.split(/(\n|\r\n)/);s[s.length-1]||s.pop();for(let c=0;c<s.length;c++){let C=s[c];c%2&&!this.options.newlineIsToken?t[t.length-1]+=C:(this.options.ignoreWhitespace&&(C=C.trim()),t.push(C))}return t};const YL=new vn;YL.tokenize=function(i){return i.split(/(\S.+?[.!?])(?=\s+|$)/)};const XL=new vn;XL.tokenize=function(i){return i.split(/([{}:;,]|\s+)/)};const UL=Object.prototype.toString,No=new vn;No.useLongestToken=!0;No.tokenize=l1.tokenize;No.castInput=function(i){const{undefinedReplacement:t,stringifyReplacer:s=(c,C)=>typeof C>"u"?t:C}=this.options;return typeof i=="string"?i:JSON.stringify(lf(i,null,null,s),s," ")};No.equals=function(i,t){return vn.prototype.equals.call(No,i.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function lf(i,t,s,c,C){t=t||[],s=s||[],c&&(i=c(C,i));let S;for(S=0;S<t.length;S+=1)if(t[S]===i)return s[S];let l;if(UL.call(i)==="[object Array]"){for(t.push(i),l=new Array(i.length),s.push(l),S=0;S<i.length;S+=1)l[S]=lf(i[S],t,s,c,C);return t.pop(),s.pop(),l}if(i&&i.toJSON&&(i=i.toJSON()),typeof i=="object"&&i!==null){t.push(i),l={},s.push(l);let T=[],e;for(e in i)i.hasOwnProperty(e)&&T.push(e);for(T.sort(),S=0;S<T.length;S+=1)e=T[S],l[e]=lf(i[e],t,s,c,e);t.pop(),s.pop()}else l=i;return l}const hf=new vn;hf.tokenize=function(i){return i.slice()};hf.join=hf.removeEmpty=function(i){return i};const WL=Phaser.Utils.Array.Remove;var HL=function(i,t){var s=i.text;if(t!==s){if(s==null&&(s=""),WL(i.children,i.lastInsertCursor),t==="")i.removeChildren();else for(var c=zL(s,t),C=0,S=0,l=c.length;S<l;S++){var T=c[S];T.removed?i.removeText(C,T.count):(T.added&&i.insertText(C,T.value),C+=T.count)}i.children.push(i.lastInsertCursor),i.runWrap(),i.emit("textchange",t,i)}};const $L={setTextOYByPercentage(i){return this.setTextOY(-this.textVisibleHeight*i),this},getTextOYPercentage(){var i=this.textVisibleHeight;return i===0?0:this._textOY/-i},setTextOXByPercentage(i){return this.setTextOX(-this.textVisibleWidth*i),this},getTextOXPercentage(){var i=this.textVisibleWidth;return i===0?0:this._textOX/-i}}
6311,jm=Phaser.Utils.Objects.IsPlainObject;class $o extends Ua{constructor(t,s,c,C,S,l){jm(s)?l=s:jm(C)&&(l=C),l===void 0&&(l={}),IL(l);var T=l.text;T&&delete l.text;var e=of(l.background,"focus"),d=of(l.style,"cursor");super(t,s,c,C,S,l),this.type="rexCanvasInput",this.contentWidth=void 0,this.contentHeight=void 0,this.lineHeight=void 0,this.linesCount=void 0,this._text,this.textEdit=FL(this,l),l.focusStyle&&Object.assign(e,l.focusStyle),BL.call(this,e),l.cursorStyle&&Object.assign(d,l.cursorStyle),DL.call(this,d);var g=l.onAddChar;g&&this.on("addchar",g);var r=l.onCursorOut;r&&this.on("cursorout",r);var a=l.onCursorIn;a&&this.on("cursorin",a);var h=l.onMoveCursor;h&&this.on("movecursor",h),this.setParseTextCallback(l.parseTextCallback),this.lastInsertCursor=kL(this),T||(T=""),this.setText(T)}addChild(t,s){if(super.addChild(t,s),Array.isArray(t))for(var c=t,C=0,S=c.length;C<S;C++){var t=c[C];Ga(t)&&this.emit("addchar",t,s+C,this)}else Ga(t)&&this.emit("addchar",t,s,this);return this}get text(){return this._text}set text(t){t==null?t="":t=t.toString(),this._text!==t&&(HL(this,t),this._text=t)}setText(t){return this.text=t,this}appendText(t){return this.setText(this.text+t),this}runWrap(t){var s=super.runWrap(t);return this.contentWidth=s.maxLineWidth,this.contentHeight=s.linesHeight,this.lineHeight=s.lineHeight,this.linesCount=s.lines.length,s}setSize(t,s){return this.width===t&&this.height===s?this:(super.setSize(t,s),this.runWrap(),this)}get displayText(){return this.text}set displayText(t){this.text=t}setDisplayText(t){return this.displayText=t,this}get inputText(){return this.textEdit.text}set inputText(t){this.textEdit.text=t}setInputText(t){return this.inputText=t,this}setParseTextCallback(t){return t||(t=jL),this.parseTextCallback=t,this}get value(){return this.parseTextCallback(this.text)}set value(t){this.setText(t)}getValue(){return this.value}setValue(t){return this.value=t,this}get readOnly(){return this.textEdit.readOnly}set readOnly(t){this.textEdit.readOnly=t}setReadOnly(t){return this.textEdit.setReadOnly(t),this}open(t){return t&&this.textEdit.once("close",t),this.textEdit.open(),this}close(){return this.textEdit.close(),this}get isOpened(){return this.textEdit.isOpened}setFocusStyle(t){return this.focusStyle=t,this}setCursorStyle(t){return this.cursorStyle=t,this}setNumberInput(){return this.textEdit.setNumberInput().setSelectAllWhenFocusEnable(),this.parseTextCallback=Number,this}get maxLength(){return this.textEdit.maxLength}set maxLength(t){this.textEdit.maxLength=t}setMaxLength(t){return this.maxLength=t,this}get minLength(){return this.textEdit.minLength}set minLength(t){this.textEdit.minLength=t}setMinLength(t){return this.minLength=t,this}get topTextOY(){return 0}get bottomTextOY(){return-this.tableVisibleHeight}get leftTextOX(){return 0}get rightTextOX(){return-this.textVisibleWidth}get textVisibleHeight(){var t=this.contentHeight-this.height;return t<0&&(t=0),t}get textVisibleWidth(){var t=this.contentWidth-this.width;return t<0&&(t=0),t}set t(t){this.setTextOYByPercentage(t).updateTexture()}get t(){return this.getTextOYPercentage()}set s(t){this.setTextOXByPercentage(t).updateTexture()}get s(){return this.getTextOXPercentage()}}var jL=function(i){return i};Object.assign($o.prototype,$L);xt.register("canvasInput",function(i,t,s,c,C){var S=new $o(this.scene,i,t,s,c,C);return this.scene.add.existing(S),S});mt(window,"RexPlugins.UI.CanvasInput",$o);var Zf=function(i){return Ir(i).loop.delta};const Km=Phaser.Utils.Objects.GetValue,KL=Phaser.Math.Wrap;class h1 extends jf{constructor(t,s){s===void 0&&(s={}),s.onUpdate==="number"&&(s.onUpdate=a1),super(t,s),this.setCursor(Km(s,"cursor","|")),this.setCursorFlashDuration(Km(s,"cursorFlashDuration",1e3)),this.cursorFlashTimer=0}initText(){return this.cursorFlashTimer=0,this.prevCursorPosition=void 0,this.setText(this.parent.text),this.setCursorPosition(),this}updateText(){var t=this.parent,s=this.text;if(this.onUpdateCallback){var c=this.onUpdateCallback(s,t,this);c!=null&&(s=c)}if(this.isOpened&&this.hasCursor){var C=this.cursorPosition;s=s.substring(0,C)+this.cursor+s.substring(C),this.prevCursorPosition!==C&&(this.prevCursorPosition=C)}
6311return t.text!==s&&(t.setText(s),this.emit("textchange",s,t,this)),this}setCursor(t){return this._cursor=t,this.hasCursor=t&&t!=="",t}setCursorFlashDuration(t){return this.cursorFlashDuration=t,this}get cursor(){if(!this._isFocused)return this._cursor;var t;this.cursorFlashTimer<this.cursorFlashDuration/2?t=this._cursor:t=" ";var s=this.cursorFlashTimer+Zf(this.scene);return this.cursorFlashTimer=KL(s,0,this.cursorFlashDuration),t}}xt.register("hiddenEdit",function(i,t){var s=new h1(i,t);return s});mt(window,"RexPlugins.UI.HiddenEdit",h1);const ZL=Phaser.GameObjects.GetCalcMatrix;var JL=function(i,t,s,c){t.updateData(),s.addToRenderList(t);var C=i.pipelines.set(t.pipeline),S=ZL(t,s,c),l=C.calcMatrix.copyFrom(S.calc),T=t._displayOriginX,e=t._displayOriginY,d=s.alpha*t.alpha;i.pipelines.preBatch(t);for(var g=t.geom,r=0,a=g.length;r<a;r++)g[r].webglRender(C,l,d,T,e);i.pipelines.postBatch(t)};const QL=Phaser.Renderer.Canvas.SetTransform;var qL=function(i,t,s,c){t.updateData(),s.addToRenderList(t);var C=i.currentContext;if(QL(i,C,t,s,c)){for(var S=t._displayOriginX,l=t._displayOriginY,T=t.geom,e=0,d=T.length;e<d;e++)T[e].canvasRender(C,S,l);C.restore()}};const _L={renderWebGL:JL,renderCanvas:qL},t5=Phaser.GameObjects.Shape,e5=Phaser.Utils.Array.Remove;class zr extends t5{constructor(t,s,c,C,S){s===void 0&&(s=0),c===void 0&&(c=0),C===void 0&&(C=2),S===void 0&&(S=C),super(t,"rexShapes",[]),this._width=-1,this._height=-1,this.dirty=!0,this.isSizeChanged=!0,this.shapes={},this.setPosition(s,c),this.setSize(C,S),this.updateDisplayOrigin()}get width(){return this._width}set width(t){this.setSize(t,this._height)}get height(){return this._height}set height(t){this.setSize(this._width,t)}setDirty(t){return t===void 0&&(t=!0),this.dirty=t,this}setSize(t,s){this.isSizeChanged=this.isSizeChanged||this._width!==t||this._height!==s,this.dirty=this.dirty||this.isSizeChanged,this._width=t,this._height=s,this.updateDisplayOrigin();var c=this.input;return c&&!c.customHitArea&&(c.hitArea.width=t,c.hitArea.height=s),this}resize(t,s){return this.setSize(t,s),this}get fillColor(){return this._fillColor}set fillColor(t){this.setFillStyle(t,this._fillAlpha)}get fillAlpha(){return this._fillAlpha}set fillAlpha(t){this.setFillStyle(this._fillColor,t)}setFillStyle(t,s){return s===void 0&&(s=1),this.dirty=this.dirty||this.fillColor!==t||this.fillAlpha!==s,this._fillColor=t,this._fillAlpha=s,this}get lineWidth(){return this._lineWidth}set lineWidth(t){this.setStrokeStyle(t,this._strokeColor,this._strokeAlpha)}get strokeColor(){return this._strokeColor}set strokeColor(t){this.setStrokeStyle(this._lineWidth,t,this._strokeAlpha)}get strokeAlpha(){return this._strokeAlpha}set strokeAlpha(t){this.setStrokeStyle(this._lineWidth,this._strokeColor,t)}setStrokeStyle(t,s,c){return c===void 0&&(c=1),this.dirty=this.dirty||this.lineWidth!==t||this.strokeColor!==s||this.strokeAlpha!==c,this._lineWidth=t,this._strokeColor=s,this._strokeAlpha=c,this}updateShapes(){}updateData(){if(!this.dirty)return this;this.updateShapes();for(var t=this.geom,s=0,c=t.length;s<c;s++){var C=t[s];C.dirty&&C.updateData()}return this.isSizeChanged=!1,this.dirty=!1,this}clear(){return this.geom.length=0,un(this.shapes),this}getShape(t){return this.shapes[t]}getShapes(){return this.geom}addShape(t){this.geom.push(t);var s=t.name;return s&&(this.shapes[s]=t),this.dirty=!0,this}deleteShape(t){var s=this.getShape(t);return s&&(delete this.shapes[t],e5(this.geom,s)),this}}Object.assign(zr.prototype,_L);const i5={setBoxFillStyle(i,t){return t===void 0&&(t=1),this.dirty=this.dirty||this.boxFillColor!==i||this.boxFillAlpha!==t,this.boxFillColor=i,this.boxFillAlpha=t,this},setUncheckedBoxFillStyle(i,t){return t===void 0&&(t=1),this.dirty=this.dirty||this.uncheckedBoxFillColor!==i||this.uncheckedBoxFillAlpha!==t,this.uncheckedBoxFillColor=i,this.uncheckedBoxFillAlpha=t,this},setBoxStrokeStyle(i,t,s){return s===void 0&&(s=1),this.dirty=this.dirty||this.boxLineWidth!==i||this.boxStrokeColor!==t||this.boxStrokeAlpha!==s,this.boxLineWidth=i,this.boxStrokeColor=t,this.boxStrokeAlpha=s,this},setUncheckedBoxStrokeStyle(i,t,s){return s===void 0&&(s=1),this.dirty=this.dirty||this.uncheckedBoxLineWidth!==i||this.uncheckedBoxStrokeColor!==t||this.uncheckedBoxStrokeAlpha!==s,this.uncheckedBoxLineWidth=i,this.uncheckedBoxStrokeColor=t,this.uncheckedBoxStrokeAlpha=s,this},setCheckerStyle(i,t){return t===void 0&&(t=1),this.dirty=this.dirty||this.checkerColor!==i||this.checkAlpha!==t,this.checkerColor=i,this.checkAlpha=t,this},setBoxShape(i){return i===void 0&&(i=!1),this.isCircleShape===i?this:(this.isCircleShape=i,this.isSizeChanged=!0,this.dirty=!0,this)}},s5={setBoxSize(i){return this.dirty=this.dirty||this.boxSize!==i,this.boxSize=i,this},setCheckerSize(i){return this.dirty=this.dirty||this.checkerSize!==i,this.checkerSize=i,this}};var n5=function(i,t){return i==null?this.isFilled=!1:(t===void 0&&(t=1),this.isFilled=!0,this.fillColor=i,this.fillAlpha=t),this},r5=function(i,t,s){return i==null||t==null?this.isStroked=!1:(s===void 0&&(s=1),this.isStroked=!0,this.lineWidth=i,this.strokeColor=t,this.strokeAlpha=s),this};const a5={fillStyle:n5,lineStyle:r5};class au{constructor(){this.name=void 0,this.dirty=!0,this.data=void 0,this.isFilled=!1,this.fillColor=void 0,this.fillAlpha=1,this.isStroked=!1,this.lineWidth=1,this.strokeColor=void 0,this.strokeAlpha=1}setName(t){return this.name=t,this}reset(){return this.fillStyle().lineStyle(),this}
6311webglRender(t,s,c,C,S){}canvasRender(t,s,c){}updateData(){this.dirty=!1}}Object.assign(au.prototype,a5,Jh);const o5=Phaser.Geom.Polygon.Earcut;class jo extends au{constructor(){super(),this.pathData=[],this.pathIndexes=[],this.closePath=!1}updateData(){return this.pathIndexes=o5(this.pathData),super.updateData(),this}webglRender(t,s,c,C,S){this.isFilled&&oy(t,s,this,c,C,S),this.isStroked&&Qh(t,this,c,C,S)}canvasRender(t,s,c){var C=this.pathData,S=C.length-1,l=C[0]-s,T=C[1]-c;t.beginPath(),t.moveTo(l,T),this.closePath||(S-=2);for(var e=2;e<S;e+=2){var d=C[e]-s,g=C[e+1]-c;t.lineTo(d,g)}this.closePath&&t.closePath(),this.isFilled&&(Xo(t,this),t.fill()),this.isStroked&&(Uo(t,this),t.stroke())}}const Zm=Phaser.Math.DegToRad;class Jf extends jo{constructor(t,s,c,C,S,l,T,e){t===void 0&&(t=0),s===void 0&&(s=0),c===void 0&&(c=0),C===void 0&&(C=0),S===void 0&&(S=0),l===void 0&&(l=360),T===void 0&&(T=!1),e===void 0&&(e=!1),super(),this.setCenterPosition(t,s),this.setRadius(c,C),this.setAngle(S,l,T),this.setPie(e),this.setIterations(32)}get x(){return this._x}set x(t){this.dirty=this.dirty||this._x!==t,this._x=t}get y(){return this._y}set y(t){this.dirty=this.dirty||this._y!==t,this._y=t}setCenterPosition(t,s){return s===void 0&&(s=t),this.x=t,this.y=s,this}get radiusX(){return this._radiusX}set radiusX(t){this.dirty=this.dirty||this._radiusX!==t,this._radiusX=t}get radiusY(){return this._radiusY}set radiusY(t){this.dirty=this.dirty||this._radiusY!==t,this._radiusY=t}setRadius(t,s){return s===void 0&&(s=t),this.radiusX=t,this.radiusY=s,this}get startAngle(){return this._startAngle}set startAngle(t){this.dirty=this.dirty||this._startAngle!==t,this._startAngle=t}get endAngle(){return this._endAngle}set endAngle(t){this.dirty=this.dirty||this._endAngle!==t,this._endAngle=t}get anticlockwise(){return this._anticlockwise}set anticlockwise(t){this.dirty=this.dirty||this._anticlockwise!==t,this._anticlockwise=t}setAngle(t,s,c){return c===void 0&&(c=!1),this.startAngle=t,this.endAngle=s,this.anticlockwise=c,this}get pie(){return this._pie}set pie(t){this.dirty=this.dirty||this._pie!==t,this._pie=t}setPie(t){return t===void 0&&(t=!0),this.pie=t,this}get iterations(){return this._iterations}set iterations(t){this.dirty=this.dirty||this._iterations!==t,this._iterations=t}setIterations(t){return this.iterations=t,this}updateData(){return this.pathData.length=0,this.pie&&this.pathData.push(this.x,this.y),qe(this.x,this.y,this.radiusX,this.radiusY,this.startAngle,this.endAngle,this.anticlockwise,this.iterations,this.pathData),this.pie&&this.pathData.push(this.x,this.y),this.pathData.push(this.pathData[0],this.pathData[1]),super.updateData(),this}canvasRender(t,s,c){t.beginPath();var C=this.x-s,S=this.y-c,l=Zm(this.startAngle),T=Zm(this.endAngle);this.pie&&(t.moveTo(C,S),t.lineTo(C+Math.cos(l)*this.radiusX,S+Math.sin(l)*this.radiusY)),t.ellipse(C,S,this.radiusX,this.radiusY,0,l,T,this.anticlockwise),this.pie&&t.lineTo(C,S),this.isFilled&&(Xo(t,this),t.fill()),this.isStroked&&(Uo(t,this),t.stroke())}}class u1 extends Jf{constructor(t,s,c){super(t,s,c,c,0,360)}}class l5 extends jo{constructor(t){super(),this.setCurve(t),this.setIterations(32)}get curve(){return this._curve}set curve(t){this.dirty=this.dirty||this._curve!==t,this._curve=t}setCurve(t){return this.curve=t,this}get iterations(){return this._iterations}set iterations(t){this.dirty=this.dirty||this._iterations!==t,this._iterations=t}setIterations(t){return this.iterations=t,this}updateData(){this.pathData.length=0;for(var t=this.curve.getPoints(this.iterations),s=0,c=t.length;s<c;s++)this.pathData.push(t[s].x,t[s].y);return this.pathData.push(t[0].x,t[0].y),super.updateData(),this}}class h5 extends Jf{constructor(t,s,c,C){super(t,s,c,C,0,360)}}class u5 extends jo{constructor(t,s,c,C){t===void 0&&(t=0),s===void 0&&(s=0),c===void 0&&(c=0),C===void 0&&(C=0),super(),this.setP0(t,s),this.setP1(c,C)}get x0(){return this._x0}set x0(t){this.dirty=this.dirty||this._x0!==t,this._x0=t}get y0(){return this._y0}set y0(t){this.dirty=this.dirty||this._y0!==t,this._y0=t}setP0(t,s){return this.x0=t,this.y0=s,this}get x1(){return this._x1}set x1(t){this.dirty=this.dirty||this._x1!==t,this._x1=t}get y1(){return this._y1}set y1(t){this.dirty=this.dirty||this._y1!==t,this._y1=t}setP1(t,s){return this.x1=t,this.y1=s,this}updateData(){return this.pathData.length=0,this.pathData.push(this.x0,this.y0),this.pathData.push(this.x1,this.y1),this.pathData.push(this.x0,this.y0),super.updateData(),this}}var d5=function(i,t,s){return s.length=0,i!=null&&s.push(i,t),s};const Jm=Phaser.Math.Interpolation.QuadraticBezier;var c5=function(i,t,s,c,C,S){for(var l=S.length,T=S[l-2],e=S[l-1],d=1,g=C-1;d<=g;d++){var r=d/g;S.push(Jm(r,T,i,s),Jm(r,e,t,c))}return S};const Qm=Phaser.Math.Interpolation.CubicBezier;var f5=function(i,t,s,c,C,S,l,T){for(var e=T.length,d=T[e-2],g=T[e-1],r=1,a=l-1;r<=a;r++){var h=r/a;T.push(Qm(h,d,i,s,C),Qm(h,g,t,c,S))}return T},d1=function(i){var t=i.length;if(t<2)return i;var s=i[t-2],c=i[t-1];return i.push(s),i.push(c),i};const v5={clear(){return this.start(),this},start(){return this.startAt(),this},startAt(i,t){return this.restorePathData(),this.accumulationLengths=void 0,d5(i,t,this.pathData),this.firstPointX=i,this.firstPointY=t,this.lastPointX=i,this.lastPointY=t,this},lineTo(i,t,s){return s===void 0&&(s=!1),s&&(i+=this.lastPointX,t+=this.lastPointY),Ys(i,t,this.pathData),this.lastPointX=i,this.lastPointY=t,this},verticalLineTo(i,t){return this.lineTo(i,this.lastPointY,t),this},horizontalLineTo(i,t){return this.lineTo(this.lastPointX,i,t),this},ellipticalArc(i,t,s,c,C,S,l){return l===void 0&&(l=!1),qe(i,t,s,c,C,S,l,this.iterations,this.pathData),this.lastPointX=this.pathData[this.pathData.length-2],this.lastPointY=this.pathData[this.pathData.length-1],this}
6311,arc(i,t,s,c,C,S){return this.ellipticalArc(i,t,s,s,c,C,S),this},quadraticBezierTo(i,t,s,c){return c5(i,t,s,c,this.iterations,this.pathData),this.lastPointX=s,this.lastPointY=c,this.lastCX=i,this.lastCY=t,this},smoothQuadraticBezierTo(i,t){var s=this.lastPointX*2-this.lastCX,c=this.lastPointY*2-this.lastCY;return this.quadraticBezierTo(s,c,i,t),this},cubicBezierCurveTo(i,t,s,c,C,S){return f5(i,t,s,c,C,S,this.iterations,this.pathData),this.lastPointX=C,this.lastPointY=S,this.lastCX=s,this.lastCY=c,this},smoothCubicBezierCurveTo(i,t,s,c){var C=this.lastPointX*2-this.lastCX,S=this.lastPointY*2-this.lastCY;return this.cubicBezierCurveTo(C,S,i,t,s,c),this},close(){var i=this.pathData[0],t=this.pathData[1];return(i!==this.lastPointX||t!==this.lastPointY)&&this.lineTo(i,t),this.closePath=!0,this},end(){return d1(this.pathData),this}},p5=Phaser.Math.RotateAround;var m5=function(i,t,s,c){for(var C={x:0,y:0},S=0,l=c.length-1;S<l;S+=2)C.x=c[S],C.y=c[S+1],p5(C,i,t,s),c[S]=C.x,c[S+1]=C.y;return c},g5=function(i,t,s,c,C){for(var S=0,l=C.length-1;S<l;S+=2){var T=C[S]-i,e=C[S+1]-t;T*=s,e*=c,C[S]=T+i,C[S+1]=e+t}return C},c1=function(i,t,s){for(var c=0,C=s.length-1;c<C;c+=2)s[c]+=i,s[c+1]+=t;return s};const x5=Phaser.Math.DegToRad,y5=Phaser.Math.RotateAround,C5={rotateAround(i,t,s){if(this.pathData.length===0)return this;s=x5(s),m5(i,t,s,this.pathData);var c=this.pathData.length;if(this.lastPointX=this.pathData[c-2],this.lastPointY=this.pathData[c-1],this.lastCX!==void 0){var C={x:this.lastCX,y:this.lastCY};y5(C,i,t,s),this.lastCX=C.x,this.lastCY=C.y}return this},scale(i,t,s,c){if(this.pathData.length===0)return this;if(g5(i,t,s,c,this.pathData),this.lastPointX=this.pathData[pathDataCnt-2],this.lastPointY=this.pathData[pathDataCnt-1],this.lastCX!==void 0){var C=this.lastCX-i,S=this.lastCY-t;C*=s,S*=c,this.lastCX=C+i,this.lastCY=S+t}return this},offset(i,t){return c1(i,t,this.pathData),this}};var Qf=function(i,t,s,c){s===void 0&&(s=0),c===void 0&&(c=t.length),i.length=c-s;for(var C=0,S=i.length;C<S;C++)i[C]=t[C+s];return i};const T5={savePathData(){return this.pathDataSaved?this:(this.pathDataSave=[...this.pathData],this.pathData.length=0,this.pathDataSaved=!0,this)},restorePathData(){return this.pathDataSaved?(Qf(this.pathData,this.pathDataSave),this.pathDataSave=void 0,this.pathDataSaved=!1,this):this}},S5=Phaser.Math.Distance.Between,E5=Phaser.Math.Wrap,P5=Phaser.Math.Linear;var qm=function(i,t,s,c,C){if(c===void 0&&(c=s,s=0),s=_m(s),c=_m(c),s!==c){var S=t[t.length-1],l=S*s,T=S*c;s<c?Sd(i,t,l,T,C):(Sd(i,t,l,S,C),Sd(i,t,0,T,C)),d1(C)}},Sd=function(i,t,s,c,C){for(var S=s>0,l=0,T=t.length;l<T;l++){var e=l*2,d=t[l];if(S){if(d<s)continue;if(d==s)S=!1;else{var g=d-t[l-1],r=1-(d-s)/g;C.push(zl(i,e-2,e,r)),C.push(zl(i,e-1,e+1,r)),S=!1}}if(d<=c){if(C.push(i[e]),C.push(i[e+1]),d===c)break}else{var g=d-t[l-1],r=1-(d-c)/g;C.push(zl(i,e-2,e,r)),C.push(zl(i,e-1,e+1,r));break}}},zl=function(i,t,s,c){var C=i[t],S=i[s];return P5(C,S,c)},_m=function(i){return i===0?0:i%1===0?1:E5(i,0,1)};const b5={updateAccumulationLengths(){if(this.accumulationLengths==null)this.accumulationLengths=[];else if(this.accumulationLengths.length===this.pathData.length/2)return this;for(var i=this.accumulationLengths,t=this.pathData,s,c,C,S,l,T=0,e=0,d=t.length;e<d;e+=2)C=t[e],S=t[e+1],l=s===void 0?0:S5(s,c,C,S),T+=l,i.push(T),s=C,c=S;return this.totalPathLength=T,this},setDisplayPathSegment(i,t){return this.pathDataSaved||(this.updateAccumulationLengths(),this.savePathData()),this.pathData.length=0,qm(this.pathDataSave,this.accumulationLengths,i,t,this.pathData),this},appendFromPathSegment(i,t,s){return t===void 0?this.pathData.push(...i.pathData):(i.updateAccumulationLengths(),qm(i.pathData,i.accumulationLengths,t,s,this.pathData)),this.firstPointX=this.pathData[0],this.firstPointY=this.pathData[1],this.lastPointX=this.pathData[this.pathData.length-2],this.lastPointY=this.pathData[this.pathData.length-1],this}},M5={draw(i,t,s){var c=this.toPoints();return t&&i.fillPoints(c,this.closePath,this.closePath),s&&i.strokePoints(c,this.closePath,this.closePath),this}};var w5=function(i,t){t===void 0&&(t=[]);for(var s=0,c=i.length-1;s<c;s+=2)t.push({x:i[s],y:i[s+1]});return t};const A5=Phaser.Geom.Polygon;var R5=function(i,t){return t===void 0&&(t=new A5),t.setTo(i),t};class f1{constructor(t){t===void 0&&(t=[]),this.pathData=t,this.closePath=!1,this.setIterations(32),this.firstPointX=void 0,this.firstPointY=void 0,this.lastPointX=void 0,this.lastPointY=void 0,this.accumulationLengths=void 0}setIterations(t){return this.iterations=t,this}toPoints(){return w5(this.pathData)}toPolygon(t){return R5(this.pathData,t)}}Object.assign(f1.prototype,v5,C5,T5,b5,M5);class Hn extends jo{constructor(){super(),this.builder=new f1(this.pathData)}get iterations(){return this.builder.iterations}set iterations(t){this.dirty=this.dirty||this.builder.iterations!==t,this.builder.setIterations(t)}setIterations(t){return this.iterations=t,this}get lastPointX(){return this.builder.lastPointX}get lastPointY(){return this.builder.lastPointY}start(){return this.builder.start(),this.dirty=!0,this}startAt(t,s){return this.builder.startAt(t,s),this.dirty=!0,this}lineTo(t,s,c){return this.builder.lineTo(t,s,c),this.dirty=!0,this}verticalLineTo(t,s){return this.builder.verticalLineTo(t,s),this.dirty=!0,this}horizontalLineTo(t,s){return this.builder.horizontalLineTo(t,s),this.dirty=!0,this}ellipticalArc(t,s,c,C,S,l,T){return this.builder.ellipticalArc(t,s,c,C,S,l,T),this.dirty=!0,this}arc(t,s,c,C,S,l){return this.builder.arc(t,s,c,C,S,l),this.dirty=!0,this}quadraticBezierTo(t,s,c,C){return this.builder.quadraticBezierTo(t,s,c,C),this.dirty=!0,this}smoothQuadraticBezierTo(t,s){return this.builder.smoothQuadraticBezierTo(t,s),this.dirty=!0,this}cubicBezierCurveTo(t,s,c,C,S,l){return this.builder.cubicBezierCurveTo(t,s,c,C,S,l),this.dirty=!0,this}smoothCubicBezierCurveTo(t,s,c,C){return this.builder.smoothCubicBezierCurveTo(t,s,c,C),this.dirty=!0,this}close(){return this.builder.close(),this.closePath=this.builder.closePath,this.dirty=!0,this}end(){return this.builder.end(),this.dirty=!0,this}
6311rotateAround(t,s,c){return this.builder.rotateAround(t,s,c),this.dirty=!0,this}scale(t,s,c,C){return this.builder.scale(t,s,c,C),this.dirty=!0,this}offset(t,s){return this.builder.offset(t,s),this.dirty=!0,this}toPolygon(t){return this.builder.toPolygon(t)}appendPathFrom(t,s,c){return this.builder.appendFromPathSegment(t.builder,s,c),this}copyPathFrom(t,s,c){return this.builder.clear().appendFromPathSegment(t.builder,s,c),this}setDisplayPathSegment(t,s){return this.builder.setDisplayPathSegment(t,s),this}}const O5=Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlpha;let L5=class extends au{constructor(t,s,c,C){t===void 0&&(t=0),s===void 0&&(s=0),c===void 0&&(c=0),C===void 0&&(C=c),super(),this.pathData=[],this.closePath=!0,this.setTopLeftPosition(t,s),this.setSize(c,C)}get x(){return this._x}set x(t){this.dirty=this.dirty||this._x!==t,this._x=t}get y(){return this._y}set y(t){this.dirty=this.dirty||this._y!==t,this._y=t}setTopLeftPosition(t,s){return this.x=t,this.y=s,this}get width(){return this._width}set width(t){this.dirty=this.dirty||this._width!==t,this._width=t}get height(){return this._height}set height(t){this.dirty=this.dirty||this._height!==t,this._height=t}setSize(t,s){return this.width=t,this.height=s,this}get centerX(){return this.x+this.width/2}set centerX(t){this.x=t-this.width/2}get centerY(){return this.y+this.height/2}set centerY(t){this.y=t-this.height/2}setCenterPosition(t,s){return this.centerX=t,this.centerY=s,this}updateData(){this.pathData.length=0;var t=this.x,s=t+this.width,c=this.y,C=c+this.height;return this.pathData.push(t,c),this.pathData.push(s,c),this.pathData.push(s,C),this.pathData.push(t,C),this.pathData.push(t,c),super.updateData(),this}webglRender(t,s,c,C,S){if(this.isFilled){var l=t.fillTint,T=O5(this.fillColor,this.fillAlpha*c);l.TL=T,l.TR=T,l.BL=T,l.BR=T,t.batchFillRect(-C+this.x,-S+this.y,this.width,this.height)}this.isStroked&&Qh(t,this,c,C,S)}canvasRender(t,s,c){this.isFilled&&(Xo(t,this),t.fillRect(-s,-c,this.width,this.height)),this.isStroked&&(Uo(t,this),t.beginPath(),t.rect(-s,-c,this.width,this.height),t.stroke())}};const Yl=Phaser.Utils.Objects.GetValue;class Bh extends jo{constructor(t,s,c,C,S,l){t===void 0&&(t=0),s===void 0&&(s=0),c===void 0&&(c=0),C===void 0&&(C=c),S===void 0&&(S=0),l===void 0&&(l=6),super(),this.setTopLeftPosition(t,s),this.setSize(c,C),this.setRadius(S),this.setIterations(l),this.closePath=!0}get x(){return this._x}set x(t){this.dirty=this.dirty||this._x!==t,this._x=t}get y(){return this._y}set y(t){this.dirty=this.dirty||this._y!==t,this._y=t}setTopLeftPosition(t,s){return this.x=t,this.y=s,this}get width(){return this._width}set width(t){this.dirty=this.dirty||this._width!==t,this._width=t}get height(){return this._height}set height(t){this.dirty=this.dirty||this._height!==t,this._height=t}setSize(t,s){return this.width=t,this.height=s,this}get centerX(){return this.x+this.width/2}set centerX(t){this.x=t-this.width/2}get centerY(){return this.y+this.height/2}set centerY(t){this.y=t-this.height/2}setCenterPosition(t,s){return this.centerX=t,this.centerY=s,this}get radiusTL(){return this._radiusTL}set radiusTL(t){var s=t>0;this.dirty=this.dirty||this._radiusTL!==t||this._convexTL!==s,this._convexTL=s,this._radiusTL=Math.abs(t)}get radiusTR(){return this._radiusTR}set radiusTR(t){var s=t>0;this.dirty=this.dirty||this._radiusTR!==t||this._convexTR!==s,this._convexTR=s,this._radiusTR=Math.abs(t)}get radiusBL(){return this._radiusBL}set radiusBL(t){var s=t>0;this.dirty=this.dirty||this._radiusBL!==t||this._convexBL!==s,this._convexBL=s,this._radiusBL=Math.abs(t)}get radiusBR(){return this._radiusBR}set radiusBR(t){var s=t>0;this.dirty=this.dirty||this._radiusBR!==t||this._convexBR!==s,this._convexBR=s,this._radiusBR=Math.abs(t)}get radius(){return Math.max(this.radiusTL,this.radiusTR,this.radiusBL,this.radiusBR)}set radius(t){typeof t=="number"?(this.radiusTL=t,this.radiusTR=t,this.radiusBL=t,this.radiusBR=t):(this.radiusTL=Yl(t,"tl",0),this.radiusTR=Yl(t,"tr",0),this.radiusBL=Yl(t,"bl",0),this.radiusBR=Yl(t,"br",0))}setRadius(t){return t===void 0&&(t=0),this.radius=t,this}get iterations(){return this._iterations}set iterations(t){this.dirty=this.dirty||this._iterations!==t,this._iterations=t}setIterations(t){return this.iterations=t,this}updateData(){var t=this.pathData;t.length=0;var s=this.width,c=this.height,C,S=this.iterations+1;if(C=this.radiusTL,C>0)if(this._convexTL){var l=C,T=C;qe(l,T,C,C,180,270,!1,S,t)}else{var l=0,T=0;qe(l,T,C,C,90,0,!0,S,t)}else Ys(0,0,t);if(C=this.radiusTR,C>0)if(this._convexTR){var l=s-C,T=C;qe(l,T,C,C,270,360,!1,S,t)}else{var l=s,T=0;qe(l,T,C,C,180,90,!0,S,t)}else Ys(s,0,t);if(C=this.radiusBR,C>0)if(this._convexBR){var l=s-C,T=c-C;qe(l,T,C,C,0,90,!1,S,t)}else{var l=s,T=c;qe(l,T,C,C,270,180,!0,S,t)}else Ys(s,c,t);if(C=this.radiusBL,C>0)if(this._convexBL){var l=C,T=c-C;qe(l,T,C,C,90,180,!1,S,t)}else{var l=0,T=c;qe(l,T,C,C,360,270,!0,S,t)}
6311else Ys(0,c,t);return t.push(t[0],t[1]),c1(this.x,this.y,t),super.updateData(),this}}const F5=Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlpha;let I5=class extends au{constructor(t,s,c,C,S,l){t===void 0&&(t=0),s===void 0&&(s=0),c===void 0&&(c=0),C===void 0&&(C=0),S===void 0&&(S=0),l===void 0&&(l=0),super(),this.pathData=[],this.closePath=!0,this.setP0(t,s),this.setP1(c,C),this.setP2(S,l)}get x0(){return this._x0}set x0(t){this.dirty=this.dirty||this._x0!==t,this._x0=t}get y0(){return this._y0}set y0(t){this.dirty=this.dirty||this._y0!==t,this._y0=t}setP0(t,s){return this.x0=t,this.y0=s,this}get x1(){return this._x1}set x1(t){this.dirty=this.dirty||this._x1!==t,this._x1=t}get y1(){return this._y1}set y1(t){this.dirty=this.dirty||this._y1!==t,this._y1=t}setP1(t,s){return this.x1=t,this.y1=s,this}get x2(){return this._x2}set x2(t){this.dirty=this.dirty||this._x2!==t,this._x2=t}get y2(){return this._y2}set y2(t){this.dirty=this.dirty||this._y2!==t,this._y2=t}setP2(t,s){return this.dirty=this.dirty||this.x2!==t||this.y2!==s,this.x2=t,this.y2=s,this}updateData(){return this.pathData.length=0,this.pathData.push(this.x0,this.y0),this.pathData.push(this.x1,this.y1),this.pathData.push(this.x2,this.y2),this.pathData.push(this.x0,this.y0),super.updateData(),this}webglRender(t,s,c,C,S){if(this.isFilled){var l=F5(this.fillColor,this.fillAlpha*c),T=this.x0-C,e=this.y0-S,d=this.x1-C,g=this.y1-S,r=this.x2-C,a=this.y2-S,h=s.getX(T,e),n=s.getY(T,e),o=s.getX(d,g),f=s.getY(d,g),u=s.getX(r,a),v=s.getY(r,a);t.batchTri(h,n,o,f,u,v,l,l,l)}this.isStroked&&Qh(t,this,c,C,S)}canvasRender(t,s,c){var C=this.x1-s,S=this.y1-c,l=this.x2-s,T=this.y2-c,e=this.x3-s,d=this.y3-c;t.beginPath(),t.moveTo(C,S),t.lineTo(l,T),t.lineTo(e,d),t.closePath(),this.isFilled&&(Xo(t,this),t.fill()),this.isStroked&&(Uo(t,this),t.stroke())}};const D5={buildShapes(){this.addShape(new Bh().setName("box")).addShape(new Hn().setName("checker"))},updateShapes(){var i=this.width/2,t=this.height/2,s=Math.min(i,t),c=s*2,C=i-s,S=t-s,l=this.boxLineWidth,T=Math.max(c/10,2),e=this.getShape("box"),d=this.getShape("checker");if(this.isSizeChanged){var a=c*(1-this.boxSize)/2,g=l/2,r=c*this.boxSize-l;e.setTopLeftPosition(C+g+a,S+g+a).setSize(r,r),this.isCircleShape?e.setRadius(r/2):e.setRadius(0);var a=c*(1-this.checkerSize)/2,h=c*this.checkerSize/4,n=h*1,o=h*2,f=h*3;d.startAt(n,o).lineTo(o,f).lineTo(f,n).offset(C+a,S+a).end()}this.checked?(e.fillStyle(this.boxFillColor,this.boxFillAlpha).lineStyle(l,this.boxStrokeColor,this.boxStrokeAlpha),d.lineStyle(T,this.checkerColor)):(e.fillStyle(this.uncheckedBoxFillColor,this.uncheckedBoxFillAlpha).lineStyle(l,this.uncheckedBoxStrokeColor,this.uncheckedBoxStrokeAlpha),d.lineStyle()),this.checked&&d.setDisplayPathSegment(this.checkerAnimProgress)}},bn=Phaser.Utils.Objects.GetValue,B5=Phaser.Math.Linear;class Yr extends Vr{constructor(t,s){super(t,s),this.resetFromJSON(),this.boot()}start(t){if(this.timer.isRunning)return this;var s=this.target;this.propertyKey=bn(t,"key","value");var c=s[this.propertyKey];return this.fromValue=bn(t,"from",c),this.toValue=bn(t,"to",c),this.setEase(bn(t,"ease",this.ease)),this.setDuration(bn(t,"duration",this.duration)),this.setRepeat(bn(t,"repeat",0)),this.setDelay(bn(t,"delay",0)),this.setRepeatDelay(bn(t,"repeatDelay",0)),this.timer.setDuration(this.duration).setRepeat(this.repeat).setDelay(this.delay).setRepeatDelay(this.repeatDelay),s[this.propertyKey]=this.fromValue,super.start(),this}updateGameObject(t,s){var c=s.t;c=this.easeFn(c),t[this.propertyKey]=B5(this.fromValue,this.toValue,c)}}const k5={setCheckerAnimationDuration(i){return i===void 0&&(i=0),this.checkerAnimDuration=i,this},playCheckerAnimation(){return this.checkerAnimProgressTask===void 0&&(this.checkerAnimProgressTask=new Yr(this,{eventEmitter:null})),this.checkerAnimProgressTask.restart({key:"checkerAnimProgress",from:0,to:1,duration:this.checkerAnimDuration}),this},stopCheckerAnimation(){return this.checkerAnimProgressTask===void 0?this:(this.checkerAnimProgressTask.stop(),this)}};var v1={};Object.assign(v1,i5,s5,D5,k5);
6311const we=Phaser.Utils.Objects.GetValue,tg=Phaser.Utils.Objects.IsPlainObject,Ed=23730,G5=16777215;class p1 extends zr{constructor(t,s,c,C,S,l,T){tg(s)?(T=s,s=we(T,"x",0),c=we(T,"y",0),C=we(T,"width",2),S=we(T,"height",2),l=we(T,"color",Ed)):tg(l)&&(T=l,l=we(T,"color",Ed)),super(t,s,c,C,S),this.type="rexCheckbox",l===void 0&&(l=Ed),this.setBoxShape(we(T,"circleBox",!1)),this.setBoxFillStyle(l,we(T,"boxFillAlpha",1)),this.setUncheckedBoxFillStyle(we(T,"uncheckedColor",null),we(T,"uncheckedBoxFillAlpha",1)),this.setBoxStrokeStyle(we(T,"boxLineWidth",4),we(T,"boxStrokeColor",l),we(T,"boxStrokeAlpha",1)),this.setUncheckedBoxStrokeStyle(this.boxLineWidth,we(T,"uncheckedBoxStrokeColor",this.boxStrokeColor),we(T,"uncheckedBoxStrokeAlpha",this.boxStrokeAlpha)),this.setCheckerStyle(we(T,"checkerColor",G5),we(T,"checkerAlpha",1)),this.setBoxSize(we(T,"boxSize",1)),this.setCheckerSize(we(T,"checkerSize",1)),this.setCheckerAnimationDuration(we(T,"animationDuration",150)),this.buildShapes();var e=we(T,"checked");e===void 0&&(e=we(T,"value",!1)),this.setValue(e)}get value(){return this._value}set value(t){t=!!t,this._value!==t&&(this.dirty=!0,this._value=t,t?this.playCheckerAnimation():this.stopCheckerAnimation(),this.emit("valuechange",t))}setValue(t){return this.value=t,this}toggleValue(){return this.setValue(!this.value),this}get checked(){return this.value}set checked(t){this.value=t}setChecked(t){return t===void 0&&(t=!0),this.setValue(t),this}toggleChecked(){return this.toggleValue(),this}get checkerAnimProgress(){return this._checkerAnimProgress}set checkerAnimProgress(t){this._checkerAnimProgress!==t&&(this._checkerAnimProgress=t,this.dirty=!0)}}Object.assign(p1.prototype,v1);const co=Phaser.Utils.Objects.GetValue;class pn extends ke{constructor(t,s){super(t,s),this._enable=void 0,t.setInteractive(co(s,"inputConfig",void 0)),this.resetFromJSON(s),this.boot()}resetFromJSON(t){return this.pointer=void 0,this.lastClickTime=void 0,this.setEnable(co(t,"enable",!0)),this.setMode(co(t,"mode",1)),this.setClickInterval(co(t,"clickInterval",100)),this.setDragThreshold(co(t,"threshold",void 0)),this}boot(){var t=this.parent;t.on("pointerdown",this.onPress,this),t.on("pointerup",this.onRelease,this),t.on("pointerout",this.onPointOut,this),t.on("pointermove",this.onMove,this),t.on("pointerover",this.onOver,this),t.on("pointerout",this.onOut,this)}shutdown(t){this.isShutdown||(this.pointer=null,super.shutdown(t))}get enable(){return this._enable}set enable(t){if(this._enable!==t){t||this.cancel(),this._enable=t;var s=t?"enable":"disable";this.emit(s,this,this.parent)}}setEnable(t){return t===void 0&&(t=!0),this.enable=t,this}toggleEnable(){return this.setEnable(!this.enable),this}setMode(t){return typeof t=="string"&&(t=N5[t]),this.mode=t,this}setClickInterval(t){return this.clickInterval=t,this}setDragThreshold(t){return this.dragThreshold=t,this}onPress(t,s,c,C){this.pointer===void 0&&(this.pointer=t,this.emit("down",this,this.parent,t,C),this.mode===0&&this.click(t.downTime,t,C))}
6311onRelease(t,s,c,C){this.pointer===t&&(this.emit("up",this,this.parent,t,C),this.mode===1&&this.click(t.upTime,t,C),this.pointer=void 0)}onPointOut(t,s){this.pointer===t&&this.cancel()}onMove(t,s,c,C){this.pointer===t&&this.dragThreshold!==void 0&&this.mode===1&&t.getDistance()>=this.dragThreshold&&this.cancel()}click(t,s,c){if(!this.enable)return this;if(t===void 0)return this.emit("click",this,this.parent,s,c),this;this.pointer=void 0;var C=this.lastClickTime;return C!==void 0&&t-C<=this.clickInterval?this:(this.lastClickTime=t,this.emit("click",this,this.parent,s,c),this)}cancel(){return this.pointer=void 0,this}onOver(t,s,c,C){return this.enable?(this.emit("over",this,this.parent,t,C),this):this}onOut(t,s){return this.enable?(this.emit("out",this,this.parent,t,s),this):this}}const N5={press:0,pointerdown:0,release:1,pointerup:1},eg=Phaser.Utils.Objects.GetValue;class qf extends p1{constructor(t,s,c,C,S,l,T){super(t,s,c,C,S,l,T),this._click=new pn(this,eg(T,"click")),this._click.on("click",function(){this.toggleValue()},this),this.setReadOnly(eg(T,"readOnly",!1))}get readOnly(){return!this._click.enable}set readOnly(t){this._click.enable=!t}setReadOnly(t){return t===void 0&&(t=!0),this.readOnly=t,this}}xt.register("checkbox",function(i,t,s,c,C,S){var l=new qf(this.scene,i,t,s,c,C,S);return this.scene.add.existing(l),l});mt(window,"RexPlugins.UI.Checkbox",qf);const V5={setTrackFillStyle(i,t){return t===void 0&&(t=1),this.dirty=this.dirty||this.trackFillColor!==i||this.trackFillAlpha!==t,this.trackFillColor=i,this.trackFillAlpha=t,this},setFalseValueTrackFillStyle(i,t){return t===void 0&&(t=1),this.dirty=this.dirty||this.falseValueTrackColor!==i||this.uncheckedTrackFillAlpha!==t,this.falseValueTrackColor=i,this.falseValueTrackFillAlpha=t,this},setThumbStyle(i,t){return t===void 0&&(t=1),this.dirty=this.dirty||this.thumbColor!==i||this.checkAlpha!==t,this.thumbColor=i,this.thumbAlpha=t,this}},z5={setTrackSize(i,t){return this.dirty=this.dirty||this.trackWidth!==i||this.trackHeight!==t,this.trackWidth=i,this.trackHeight=t,this},setTrackRadius(i){return this.dirty=this.dirty||this.trackRadius!==i,this.trackRadius=i,this},setThumbSize(i,t){return t===void 0&&(t=i),this.dirty=this.dirty||this.thumbWidth!==i||this.thumbHeight!==t,this.thumbWidth=i,this.thumbHeight=t,this},setThumbRadius(i){return this.dirty=this.dirty||this.thumbRadius!==i,this.thumbRadius=i,this}},Y5={setThumbPosition(i,t){return t===void 0&&(t=1-i),this.thumbLeftX=i,this.thumbRightX=t,this},setRTL(i){return i===void 0&&(i=!0),this.rtl=i,this}};/** 6312 * @author Richard Davey <[email protected]> 6313 * @copyright 2019 Photon Storm Ltd. 6314 * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} 6315 */var Pd=function(i,t,s){return(t-i)*s+i},X5=function(i,t,s){var c=Pd(Bo(i),Bo(t),s),C=Pd(ko(i),ko(t),s),S=Pd(Go(i),Go(t),s);return(c&255)<<16|(C&255)<<8|S&255};const ig=Phaser.Math.Linear,U5={buildShapes(){this.addShape(new Bh().setName("track")).addShape(new Bh().setName("thumb"))},updateShapes(){var i=this.width,t=this.height,s=this.value?this.toggleAnimProgress:1-this.toggleAnimProgress,c=this.getShape("track");if(this.isSizeChanged){var C=i*this.trackWidth,S=t*this.trackHeight,l=(i-C)/2,T=(t-S)/2,e=t*this.trackRadius;c.setTopLeftPosition(l,T).setSize(C,S).setRadius(e)}var d=X5(this.falseValueTrackColor,this.trackFillColor,s),g=ig(this.falseValueTrackFillAlpha,this.trackFillAlpha,s);c.fillStyle(d,g);var r=this.getShape("thumb");
6315if(this.isSizeChanged){var a=i*this.thumbWidth,h=t*this.thumbHeight,n=t*this.thumbRadius;r.setSize(a,h).setRadius(n)}var o=ig(this.thumbLeftX,this.thumbRightX,s)*i;this.rtl&&(o=i-o);var f=t/2;r.setCenterPosition(o,f),r.fillStyle(this.thumbColor,this.thumbAlpha)}},W5={setToggleAnimationDuration(i){return i===void 0&&(i=0),this.toggleAnimDuration=i,this},playToggleAnimation(){return this.toggleAnimProgressTask===void 0&&(this.toggleAnimProgressTask=new Yr(this,{eventEmitter:null})),this.toggleAnimProgressTask.restart({key:"toggleAnimProgress",from:0,to:1,duration:this.toggleAnimDuration}),this},stopToggleAnimation(){return this.toggleAnimProgressTask===void 0?this:(this.toggleAnimProgressTask.stop(),this)}};var m1={};Object.assign(m1,V5,z5,Y5,U5,W5);var H5=function(i){var t=.3*Bo(i)+.59*ko(i)+.11*Go(i);return(t&255)<<16|(t&255)<<8|t&255};const Ae=Phaser.Utils.Objects.GetValue,sg=Phaser.Utils.Objects.IsPlainObject,bd=23730,$5=16777215;class g1 extends zr{constructor(t,s,c,C,S,l,T){sg(s)?(T=s,s=Ae(T,"x",0),c=Ae(T,"y",0),C=Ae(T,"width",2),S=Ae(T,"height",2),l=Ae(T,"color",bd)):sg(l)&&(T=l,l=Ae(T,"color",bd)),super(t,s,c,C,S),this.type="rexToggleSwitch",l===void 0&&(l=bd),this.setTrackFillStyle(l,Ae(T,"trackFillAlpha",1)),this.setFalseValueTrackFillStyle(Ae(T,"falseValueTrackColor",H5(l)),Ae(T,"falseValueTrackFillAlpha",1)),this.setThumbStyle(Ae(T,"thumbColor",$5),Ae(T,"thumbAlpha",1)),this.setTrackSize(Ae(T,"trackWidth",.9),Ae(T,"trackHeight",.5)),this.setTrackRadius(Ae(T,"trackRadius",this.trackHeight*.5));var e=Ae(T,"thumbHeight",void 0),d=Ae(T,"thumbWidth",e);d===void 0&&(d=this.trackHeight*.9),this.setThumbSize(d,e),this.setThumbRadius(Ae(T,"thumbRadius",this.thumbHeight*.5)),this.setThumbPosition(Ae(T,"thumbLeft",.3),Ae(T,"thumbRight",void 0)),this.setRTL(Ae(T,"rtl",!1)),this.setToggleAnimationDuration(Ae(T,"animationDuration",150)),this.buildShapes(),this.setValue(Ae(T,"value",!1),0)}get value(){return this._value}set value(t){t=!!t,this._value!==t&&(this.dirty=!0,this._value=t,this.playToggleAnimation(),this.emit("valuechange",t))}setValue(t,s){s===void 0&&(s=this.toggleAnimDuration);var c=this.toggleAnimDuration;return this.toggleAnimDuration=s,this.value=t,this.toggleAnimDuration=c,this}toggleValue(t){return this.setValue(!this.value,t),this}get toggleAnimProgress(){return this._toggleAnimProgress}set toggleAnimProgress(t){this._toggleAnimProgress!==t&&(this._toggleAnimProgress=t,this.dirty=!0)}}Object.assign(g1.prototype,m1);const ng=Phaser.Utils.Objects.GetValue;class _f extends g1{constructor(t,s,c,C,S,l,T){super(t,s,c,C,S,l,T),this._click=new pn(this,ng(T,"click")),this._click.on("click",function(){this.toggleValue()},this),this.setReadOnly(ng(T,"readOnly",!1))}get readOnly(){return!this._click.enable}set readOnly(t){this._click.enable=!t}setReadOnly(t){return t===void 0&&(t=!0),this.readOnly=t,this}}xt.register("toggleSwitch",function(i,t,s,c,C,S){var l=new _f(this.scene,i,t,s,c,C,S);return this.scene.add.existing(l),l});mt(window,"RexPlugins.UI.ToggleSwitch",_f);const j5={loadFromURL(i,t){var s=this,c=new Image;return c.onload=function(){s.width!==c.width||s.height!==c.height?s.resize(c.width,c.height):s.clear(),s.context.drawImage(c,0,0),s.updateTexture(),t&&t(),c.onload=null,c.src="",c.remove()},c.src=i,this},loadFromURLPromise(i){var t=this;return new Promise(function(s,c){t.loadFromURL(i,s)})},loadFromFile(i,t){var s=URL.createObjectURL(i);return this.loadFromURL(s,function(){URL.revokeObjectURL(s),t&&t()}),this},loadFromFilePromise(i){var t=this;return new Promise(function(s,c){t.loadFromFile(i,s)})}};class Xr extends qn{}Object.assign(Xr.prototype,j5);xt.register("canvas",function(i,t,s,c){var C=new Xr(this.scene,i,t,s,c);return this.scene.add.existing(C),C});mt(window,"RexPlugins.UI.Canvas",Xr);const na=Phaser.Utils.Objects.GetValue;class x1 extends qn{constructor(t,s,c,C,S,l){super(t,s,c),this.type="rexCircleMaskImage",this.setTexture(C,S,l)}setTexture(t,s,c){typeof s=="object"&&(c=s,s=void 0),typeof c=="string"&&(c={maskType:c});var C=na(c,"maskType",0),S=na(c,"backgroundColor",void 0),l=na(c,"strokeColor",void 0),T=l!=null?10:0,e=na(c,"strokeWidth",T);if(C===void 0?C=0:typeof C=="string"&&(C=K5[C]),this._textureKey=t,this._frameName=s,C===null)return this.loadTexture(t,s),this.dirty=!0,this;var d=this.scene.sys.textures.getFrame(t,s);if(!d)return this;d.cutWidth!==this.width||d.cutHeight!==this.height?this.setCanvasSize(d.cutWidth,d.cutHeight):this.clear();var g=this.canvas,r=this.context,a=g.width,h=g.height;S!=null&&(r.fillStyle=S,r.fillRect(0,0,a,h)),r.save(),r.beginPath();var n=e/2;
6315switch(C){case 1:var m=Math.floor(a/2),p=Math.floor(h/2),o=m-n,f=p-n;r.ellipse(m,p,o,f,0,0,2*Math.PI);break;case 2:var u=na(c,"radius",0),v=na(c,"iteration",void 0);hy(r,n,n,a-e,h-e,u,v);break;default:var m=Math.floor(a/2),p=Math.floor(h/2),x=Math.min(m,p)-n;r.arc(m,p,x,0,2*Math.PI);break}return l!=null&&(r.strokeStyle=l,r.lineWidth=e,r.stroke()),r.clip(),this.loadTexture(t,s),r.restore(),this.dirty=!0,this}resize(t,s){return this.setDisplaySize(t,s),this}}const K5={circle:0,ellipse:1,roundRectangle:2};xt.register("circleMaskImage",function(i,t,s,c,C){var S=new x1(this.scene,i,t,s,c,C);return this.scene.add.existing(S),S});mt(window,"RexPlugins.UI.CircleMaskImage",x1);const fo=Phaser.Utils.Objects.GetValue;class y1 extends qn{constructor(t,s,c,C,S,l){super(t,s,c),this.type="rexAlphaMaskImage",this.maskFrame=null,this.setTexture(C,S,l)}setTexture(t,s,c){typeof s=="object"&&(c=s,s=void 0),typeof c=="string"&&(c={mask:{key:c}});var C=fo(c,"mask.key"),S=fo(c,"mask.frame"),l=fo(c,"mask.invertAlpha",!1),T=fo(c,"mask.scale"),e=fo(c,"backgroundColor");if(C){this._maskKey=C,this._maskFrame=S,this._maskScale=T;var d=C?this.scene.sys.textures.get(C):null;this.maskFrame=d?d.get(S):null}this._textureKey=t,this._frameName=s;var g=this.maskFrame;if(g===null)return this.loadTexture(t,s),this.dirty=!0,this;var r=e!=null;this.loadTexture(t,s);var a=this.canvas,h=this.context,n=a.width,o=a.height;h.save(),h.globalCompositeOperation=l?"destination-out":"destination-in";var f,u;this._maskScale!=null?(f=g.cutWidth*this._maskScale,u=g.cutHeight*this._maskScale):(f=n,u=o);var v=(n-f)/2,m=(o-u)/2;return this.drawFrame(this._maskKey,this._maskFrame,v,m,f,u),h.restore(
6315),r&&(h.save(),h.globalCompositeOperation="destination-over",h.fillStyle=e,h.fillRect(0,0,n,o),h.restore()),this.dirty=!0,this}resize(t,s){return this.setDisplaySize(t,s),this}}xt.register("alphaMaskImage",function(i,t,s,c,C){var S=new y1(this.scene,i,t,s,c,C);return this.scene.add.existing(S),S});mt(window,"RexPlugins.UI.AlphaMaskImage",y1);const Z5=Phaser.Math.Linear,rg=Phaser.Math.Percent,J5={setValue(i,t,s){return i==null?this:(t!==void 0&&(i=rg(i,t,s)),this.value=i,this)},addValue(i,t,s){return t!==void 0&&(i=rg(i,t,s)),this.value+=i,this},getValue(i,t){var s=this.value;return i!==void 0&&(s=Z5(i,t,s)),s}},Q5=Phaser.Math.Percent;var q5=function(i){return this.easeValuePropName=i,this},_5=function(i){return this.easeValueDuration=i,this},t6=function(i){return this.easeFunction=i,this},e6=function(){return this.easeValueTask&&this.easeValueTask.stop(),this},i6=function(i,t,s){return i==null?this:(t!==void 0&&(i=Q5(i,t,s)),this.easeValueTask===void 0&&(this.easeValueTask=new Yr(this,{eventEmitter:null})),this.easeValueTask.restart({key:this.easeValuePropName,to:i,duration:this.easeValueDuration,ease:this.easeFunction}),this)},s6=function(i,t,s,c){return s===void 0&&(s=-1),c===void 0&&(c=0),this.easeValueTask===void 0&&(this.easeValueTask=new Yr(this,{eventEmitter:null})),this.easeValueTask.restart({key:this.easeValuePropName,from:i,to:t,duration:this.easeValueDuration,ease:this.easeFunction,repeat:s,repeatDelay:c}),this};const n6={setEaseValuePropName:q5,setEaseValueDuration:_5,setEaseValueFunction:t6,stopEaseValue:e6,easeValueTo:i6,easeValueRepeat:s6},vo=Phaser.Utils.Objects.GetValue,r6=Phaser.Math.Clamp;function Ur(i){class t extends i{bootProgressBase(c){this.eventEmitter=vo(c,"eventEmitter",this);var C=vo(c,"valuechangeCallback",null);if(C!==null){var S=vo(c,"valuechangeCallbackScope",void 0);this.eventEmitter.on("valuechange",C,S)}return this.setEaseValuePropName("value").setEaseValueDuration(vo(c,"easeValue.duration",0)).setEaseValueFunction(vo(c,"easeValue.ease","Linear")),this}get value(){return this._value}set value(c){c=r6(c,0,1);var C=this._value,S=C!=c;this.dirty=this.dirty||S,this._value=c,S&&this.eventEmitter.emit("valuechange",this._value,C,this.eventEmitter)}}return Object.assign(t.prototype,J5,n6),t}const a6=Phaser.Math.RadToDeg,ag=Phaser.Math.DegToRad;var og=function(i,t,s,c,C,S,l,T){var e=Math.abs(l-S)===360,d=ag(S),g=ag(l),r=Math.cos(d),a=Math.sin(d),h=Math.cos(g),n=Math.sin(g);return i.startAt(t+r*c,s+a*c),i.arc(t,s,c,S,l,T),e&&C===0||(i.lineTo(t+h*C,s+n*C),C>0&&i.arc(t,s,C,l,S,!T)),i.close(),i};const o6={buildShapes(){this.addShape(new Hn().setName("track")).addShape(new Hn().setName("bar")).addShape(new u1().setName("center"))},updateShapes(){var i=this.radius,t=this.thickness*this.radius,s=this.radius,c=s-t,C=this.getShape("track");this.trackColor!=null&&this.thickness>0?(C.fillStyle(this.trackColor),og(C,i,i,s,c,0,360,!1)):C.reset();var S=this.getShape("bar");if(this.barColor!=null&&this.thickness>0){var l,T,e;if(this.value===1)l=!1,T=0,e=360;else{l=this.anticlockwise,T=a6(this.startAngle);var d=360*(l?1-this.value:this.value);e=d+T}S.fillStyle(this.barColor),og(S,i,i,s,c,T,e,!1)}else S.reset();var g=this.getShape("center");this.centerColor&&c>0?g.setCenterPosition(i,i).setRadius(c).fillStyle(this.centerColor):g.reset()}},bs=Phaser.Utils.Objects.GetValue,l6=Phaser.Utils.Objects.IsPlainObject,h6=Phaser.Math.Clamp,u6=Phaser.Math.DegToRad(270);let ou=class extends Ur(zr){constructor(t,s,c,C,S,l,T){l6(s)&&(T=s,s=bs(T,"x",0),c=bs(T,"y",0),C=bs(T,"radius",1),S=bs(T,"barColor",void 0),l=bs(T,"value",0)),C===void 0&&(C=1);var e=C*2;super(t,s,c,e,e),this.type="rexCircularProgress",this.bootProgressBase(T),this.setRadius(C),this.setTrackColor(bs(T,"trackColor",void 0)),this.setBarColor(S),this.setCenterColor(bs(T,"centerColor",void 0)),this.setThickness(bs(T,"thickness",.2)),this.setStartAngle(bs(T,"startAngle",u6)),this.setAnticlockwise(bs(T,"anticlockwise",!1)),this.buildShapes(),this.setValue(l)}resize(t,s){return t=Math.floor(Math.min(t,s)),t===this.width?this:(super.resize(t,t),this.setRadius(t/2),this)}get radius(){return this._radius}set radius(t){this.dirty=this.dirty||this._radius!=t,this._radius=t;var s=t*2;this.resize(s,s)}setRadius(t){return this.radius=t,this}get trackColor(){return this._trackColor}set trackColor(t){this.dirty=this.dirty||this._trackColor!=t,this._trackColor=t}setTrackColor(t){return this.trackColor=t,this}get barColor(){return this._barColor}set barColor(t){this.dirty=this.dirty||this._barColor!=t,this._barColor=t}setBarColor(t){return this.barColor=t,this}get startAngle(){return this._startAngle}set startAngle(t){this.dirty=this.dirty||this._startAngle!=t,this._startAngle=t}setStartAngle(t){return this.startAngle=t,this}get anticlockwise(){return this._anticlockwise}set anticlockwise(t){this.dirty=this.dirty||this._anticlockwise!=t,this._anticlockwise=t}setAnticlockwise(t){return t===void 0&&(t=!0),this.anticlockwise=t,this}get thickness(){return this._thickness}set thickness(t){t=h6(t,0,1),this.dirty=this.dirty||this._thickness!=t,this._thickness=t}setThickness(t){return this.thickness=t,this}get centerColor(){return this._centerColor}set centerColor(t){this.dirty=this.dirty||this._centerColor!=t,this._centerColor=t}setCenterColor(t){return this.centerColor=t,this}};Object.assign(ou.prototype,o6);xt.register("circularProgress",function(i,t,s,c,C,S){var l=new ou(this.scene,i,t,s,c,C,S);return this.scene.add.existing(l),l});mt(window,"RexPlugins.UI.CircularProgress",ou);var Md=function(i,t,s,c,C,S,l,T,e,d,g,r){d===void 0&&(d=0),g===void 0&&(g=2*Math.PI),r===void 0&&(r=!1),t.beginPath(),t.ellipse(s,c,C,S,0,d,g,r),l!=null&&(t.fillStyle=l,t.fill()),T!=null&&(t.strokeStyle=T,t.lineWidth=e,t.stroke())},d6=function(i,t,s,c,C,S,l,T,e,d,g){e===void 0&&T!=null&&(e=2),d===void 0&&(d="start"),g===void 0&&(g="alphabetic"),t.font=S,t.textAlign=d,t.textBaseline=g,t.fillStyle=l,t.strokeStyle=T,t.lineWidth=e,t.lineCap="round",t.lineJoin="round",T!=null&&T!=="none"&&e>0&&t.strokeText(C,s,c),l!=null&&l!=="none"&&t.fillText(C,s,c)},c6=function(){var i=this.radius,t=this.thickness*this.radius,s=this.radius-t/2,c=this.radius-t,C=this.canvas,S=this.context;if(this.trackColor&&t>0&&(S.save(),Md(C,S,i,i,s,s,void 0,this.trackColor,t),S.restore(
6315)),this.barColor&&s>0){var l,T,e;if(this.value===1)l=!1,T=0,e=2*Math.PI;else{l=this.anticlockwise,T=this.startAngle;var d=2*Math.PI*(l?1-this.value:this.value);e=d+T}S.save(),Md(C,S,i,i,s,s,void 0,this.barColor,t,T,e,l),S.restore()}if(this.centerColor&&c>0){var g;this.centerColor2?(g=this.context.createRadialGradient(i,i,0,i,i,c),g.addColorStop(0,this.centerColor),g.addColorStop(1,this.centerColor2)):g=this.centerColor,S.save(),Md(C,S,i,i,c,c,g),S.restore()}this.textFormatCallback&&(this.textColor||this.textStrokeColor)&&(S.save(),d6(C,S,i,i,this.getFormatText(),this.textFont,this.textColor,this.textStrokeColor,this.textStrokeThickness,"center","middle"),S.restore())};const We=Phaser.Utils.Objects.GetValue,f6=Phaser.Utils.Objects.IsPlainObject,v6=Phaser.Math.Clamp,p6=Phaser.Math.DegToRad(270);class C1 extends Ur(qn){constructor(t,s,c,C,S,l,T){f6(s)&&(T=s,s=We(T,"x",0),c=We(T,"y",0),C=We(T,"radius",1),S=We(T,"barColor",void 0),l=We(T,"value",0));var e=C*2;super(t,s,c,e,e),this.type="rexCircularProgressCanvas",this.bootProgressBase(T),this.setRadius(C),this.setTrackColor(We(T,"trackColor",void 0)),this.setBarColor(S),this.setCenterColor(We(T,"centerColor",void 0)),this.setThickness(We(T,"thickness",.2)),this.setStartAngle(We(T,"startAngle",p6)),this.setAnticlockwise(We(T,"anticlockwise",!1)),this.setTextColor(We(T,"textColor",void 0)),this.setTextStrokeColor(We(T,"textStrokeColor",void 0),We(T,"textStrokeThickness",void 0));var d=We(T,"textFont",void 0);d?this.setTextFont(d):this.setTextFont(We(T,"textSize","16px"),We(T,"textFamily","Courier"),We(T,"textStyle","")),this.setTextFormatCallback(We(T,"textFormatCallback",void 0),We(T,"textFormatCallbackScope",void 0)),this.setValue(l)}resize(t,s){return t=Math.floor(Math.min(t,s)),t===this.width?this:(super.resize(t,t),this.setRadius(t/2),this)}get radius(){return this._radius}set radius(t){this.dirty=this.dirty||this._radius!=t,this._radius=t;var s=t*2;this.resize(s,s)}setRadius(t){return this.radius=t,this}get trackColor(){return this._trackColor}set trackColor(t){t=Yt(t,this.canvas,this.context),this.dirty=this.dirty||this._trackColor!=t,this._trackColor=t}setTrackColor(t){return this.trackColor=t,this}get barColor(){return this._barColor}set barColor(t){t=Yt(t,this.canvas,this.context),this.dirty=this.dirty||this._barColor!=t,this._barColor=t}setBarColor(t){return this.barColor=t,this}get startAngle(){return this._startAngle}set startAngle(t){this.dirty=this.dirty||this._startAngle!=t,this._startAngle=t}setStartAngle(t){return this.startAngle=t,this}get anticlockwise(){return this._anticlockwise}set anticlockwise(t){this.dirty=this.dirty||this._anticlockwise!=t,this._anticlockwise=t}setAnticlockwise(t){return t===void 0&&(t=!0),this.anticlockwise=t,this}get thickness(){return this._thickness}set thickness(t){t=v6(t,0,1),this.dirty=this.dirty||this._thickness!=t,this._thickness=t}setThickness(t){return this.thickness=t,this}get centerColor(){return this._centerColor}set centerColor(t){t=Yt(t,this.canvas,this.context),this.dirty=this.dirty||this._centerColor!=t,this._centerColor=t}get centerColor2(){return this._centerColor2}set centerColor2(t){t=Yt(t,this.canvas,this.context),this.dirty=this.dirty||this._centerColor2!=t,this._centerColor2=t}setCenterColor(t,s){return this.centerColor=t,this.centerColor2=s,this}get textColor(){return this._textColor}set textColor(t){t=Yt(t,this.canvas,this.context),this.dirty=this.dirty||this._textColor!=t,this._textColor=t}setTextColor(t){return this.textColor=t,this}get textStrokeColor(){return this._textStrokeColor}set textStrokeColor(t){t=Yt(t,this.canvas,this.context),this.dirty=this.dirty||this._textStrokeColor!=t,this._textStrokeColor=t}get textStrokeThickness(){return this._textStrokeThickness}set textStrokeThickness(t){this.dirty=this.dirty||this._textStrokeThickness!=t,this._textStrokeThickness=t}setTextStrokeColor(t,s){return s===void 0&&(s=2),this.textStrokeColor=t,this.textStrokeThickness=s,this}get textFont(){return this._textFont}set textFont(t){this.dirty=this.dirty||this._textFont!=t,this._textFont=t}setTextFont(t,s,c){var C;return s===void 0?C=t:C=c+" "+t+" "+s,this.textFont=C,this}setTextFormatCallback(t,s){return this.textFormatCallback=t,this.textFormatCallbackScope=s,this}updateTexture(){return this.clear(),c6.call(this),super.updateTexture(),this}getFormatText(t){t===void 0&&(t=this.value);var s;return this.textFormatCallbackScope?s=this.textFormatCallback(t):s=this.textFormatCallback.call(this.textFormatCallbackScope,t),s}}xt.register("circularProgressCanvas",function(i,t,s,c,C,S){var l=new C1(this.scene,i,t,s,c,C,S);return this.scene.add.existing(l),l});mt(window,"RexPlugins.UI.CircularProgressCanvas",C1);var m6=function(){var i=this.skewX,t=this.width-Math.abs(i),s=this.height,c=this.getShape("trackFill");c.fillStyle(this.trackColor),c.isFilled&&wd(c,0,0,t,s,i).close();var C=this.getShape("bar");
6315if(C.fillStyle(this.barColor),C.isFilled){var S,l;this.rtl?(S=t*(1-this.value),l=t):(S=0,l=t*this.value),wd(C,S,0,l,s,i).close()}var T=this.getShape("trackStroke");T.lineStyle(this.trackStrokeThickness,this.trackStrokeColor),T.isStroked&&wd(T,0,0,t,s,i).end()},wd=function(i,t,s,c,C,S){var l=(t+c)/2;return S>=0?i.startAt(l+S,s).lineTo(c+S,s).lineTo(c,C).lineTo(t,C).lineTo(t+S,s).lineTo(l+S,s):i.startAt(l,s).lineTo(c,s).lineTo(c-S,C).lineTo(t-S,C).lineTo(t,s).lineTo(l,s),i};const ii=Phaser.Utils.Objects.GetValue,Ad=Phaser.Utils.Objects.IsPlainObject;let tv=class extends Ur(zr){constructor(t,s,c,C,S,l,T,e){Ad(s)?(e=s,s=ii(e,"x",0),c=ii(e,"y",0),C=ii(e,"width",2),S=ii(e,"height",2),l=ii(e,"barColor",void 0),T=ii(e,"value",0)):Ad(C)?(e=C,C=ii(e,"width",2),S=ii(e,"height",2),l=ii(e,"barColor",void 0),T=ii(e,"value",0)):Ad(l)&&(e=l,l=ii(e,"barColor",void 0),T=ii(e,"value",0)),super(t,s,c,C,S,e),this.type="rexLineProgress",this.bootProgressBase(e),this.addShape(new Hn().setName("trackFill")).addShape(new Hn().setName("bar")).addShape(new Hn().setName("trackStroke")),this.setTrackColor(ii(e,"trackColor",void 0)),this.setBarColor(l),this.setTrackStroke(ii(e,"trackStrokeThickness",2),ii(e,"trackStrokeColor",void 0)),this.setSkewX(ii(e,"skewX",0)),this.setRTL(ii(e,"rtl",!1)),this.setValue(T)}get trackColor(){return this._trackColor}set trackColor(t){this.dirty=this.dirty||this._trackColor!=t,this._trackColor=t}setTrackColor(t){return this.trackColor=t,this}get trackStrokeColor(){return this._trackStrokeColor}set trackStrokeColor(t){this.dirty=this.dirty||this._trackStrokeColor!=t,this._trackStrokeColor=t}get trackStrokeThickness(){return this._trackStrokeThickness}set trackStrokeThickness(t){this.dirty=this.dirty||this._trackStrokeThickness!=t,this._trackStrokeThickness=t}setTrackStroke(t,s){return this.trackStrokeThickness=t,this.trackStrokeColor=s,this}get barColor(){return this._barColor}set barColor(t){this.dirty=this.dirty||this._barColor!=t,this._barColor=t}setBarColor(t){return this.barColor=t,this}get skewX(){return this._skewX}set skewX(t){this.dirty=this.dirty||this._skewX!=t,this._skewX=t}setSkewX(t){return this.skewX=t,this}get rtl(){return this._rtl}set rtl(t){t=!!t,this.dirty=this.dirty||this._rtl!=t,this._rtl=t}setRTL(t){return t===void 0&&(t=!0),this.rtl=t,this}};var g6={updateShapes:m6};Object.assign(tv.prototype,g6);xt.register("lineProgress",function(i,t,s,c,C,S,l){var T=new tv(this.scene,i,t,s,c,C,S,l);return this.scene.add.existing(T),T});mt(window,"RexPlugins.UI.LineProgress",tv);var x6=function(i,t){i.save(),i.beginPath();var s=t[0];i.moveTo(s.x,s.y);for(var c=1,C=t.length;c<C;c++)s=t[c],i.lineTo(s.x,s.y);i.closePath(),i.restore()},Rd=function(i,t,s,c,C,S,l){l===void 0&&(l="round"),x6(t,s),t.lineJoin=l,c!=null&&(t.fillStyle=c,t.fill()),C!=null&&(t.strokeStyle=C,t.lineWidth=S,t.stroke())},y6=function(){var i=this.skewX,t=this.width-Math.abs(i),s=this.height,c=this.canvas,C=this.context;(this.trackColor||this.trackStrokeColor)&&lg(0,0,t,s,i,this.trackPoints);var S,l;if(this.barColor&&(this.rtl?(S=t*(1-this.value),l=t):(S=0,l=t*this.value),lg(S,0,l,s,i,this.barPoints)),this.trackColor&&(C.save(),Rd(c,C,this.trackPoints,this.trackColor),C.restore()),this.barColor){C.save();var T;if(this.barColor2){var e;if(this.isHorizontalGradient){var d=s/2;e=C.createLinearGradient(S,d,l,d)}else{var g=t/2;e=C.createLinearGradient(g,0,g,s)}e.addColorStop(0,this.rtl?this.barColor:this.barColor2),e.addColorStop(1,this.rtl?this.barColor2:this.barColor),T=e}else T=this.barColor;Rd(c,C,this.barPoints,T),C.restore()}this.trackStrokeColor&&this.trackStrokeThickness>0&&(C.save(),Rd(c,C,this.trackPoints,void 0,this.trackStrokeColor,this.trackStrokeThickness),C.restore())},lg=function(i,t,s,c,C,S){S===void 0&&(S=[]),S.length=4;for(var l=0;l<4;l++)S[l]||(S[l]={});var T;return C>=0?(T=S[0],T.x=i+C,T.y=t,T=S[1],T.x=s+C,T.y=t,T=S[2],T.x=s,T.y=c,T=S[3],T.x=i,T.y=c):(T=S[0],T.x=i,T.y=t,T=S[1],T.x=s,T.y=t,T=S[2],T.x=s-C,T.y=c,T=S[3],T.x=i-C,T.y=c),S};const He=Phaser.Utils.Objects.GetValue,Od=Phaser.Utils.Objects.IsPlainObject;class ev extends Ur(qn){constructor(t,s,c,C,S,l,T,e){Od(s)?(e=s,s=He(e,"x",0),c=He(e,"y",0),C=He(e,"
6315width",2),S=He(e,"height",2),l=He(e,"barColor",void 0),T=He(e,"value",0)):Od(C)?(e=C,C=He(e,"width",2),S=He(e,"height",2),l=He(e,"barColor",void 0),T=He(e,"value",0)):Od(l)&&(e=l,l=He(e,"barColor",void 0),T=He(e,"value",0)),super(t,s,c,C,S),this.type="rexLineProgressCanvas",this.trackPoints=[],this.barPoints=[],this.bootProgressBase(e),this.setTrackColor(He(e,"trackColor",void 0)),this.setBarColor(l,He(e,"barColor2",void 0),He(e,"isHorizontalGradient",void 0)),this.setTrackStroke(He(e,"trackStrokeThickness",2),He(e,"trackStrokeColor",void 0)),this.setSkewX(He(e,"skewX",0)),this.setRTL(He(e,"rtl",!1)),this.setValue(T)}get trackColor(){return this._trackColor}set trackColor(t){t=Yt(t,this.canvas,this.context),this.dirty=this.dirty||this._trackColor!=t,this._trackColor=t}setTrackColor(t){return this.trackColor=t,this}get trackStrokeColor(){return this._trackStrokeColor}set trackStrokeColor(t){t=Yt(t,this.canvas,this.context),this.dirty=this.dirty||this._trackStrokeColor!=t,this._trackStrokeColor=t}get trackStrokeThickness(){return this._trackStrokeThickness}set trackStrokeThickness(t){this.dirty=this.dirty||this._trackStrokeThickness!=t,this._trackStrokeThickness=t}setTrackStroke(t,s){return this.trackStrokeThickness=t,this.trackStrokeColor=s,this}get barColor(){return this._barColor}set barColor(t){t=Yt(t,this.canvas,this.context),this.dirty=this.dirty||this._barColor!=t,this._barColor=t}get barColor2(){return this._barColor2}set barColor2(t){t=Yt(t,this.canvas,this.context),this.dirty=this.dirty||this._barColor2!=t,this._barColor2=t}get isHorizontalGradient(){return this._isHorizontalGradient}set isHorizontalGradient(t){this.dirty|=this._isHorizontalGradient!=t,this._isHorizontalGradient=t}setBarColor(t,s,c){return c===void 0&&(c=!0),this.barColor=t,this.barColor2=s,this.isHorizontalGradient=c,this}get skewX(){return this._skewX}set skewX(t){this.dirty=this.dirty||this._skewX!=t,this._skewX=t}setSkewX(t){return this.skewX=t,this}get rtl(){return this._rtl}set rtl(t){t=!!t,this.dirty=this.dirty||this._rtl!=t,this._rtl=t}setRTL(t){return t===void 0&&(t=!0),this.rtl=t,this}updateTexture(){return this.clear(),y6.call(this),super.updateTexture(),this}}xt.register("circularProgressCanvas",function(i,t,s,c,C,S,l){var T=new ev(this.scene,i,t,s,c,C,S,l);return this.scene.add.existing(T),T});mt(window,"RexPlugins.UI.LineProgressCanvas",ev);Phaser.Math.Wrap;const ra=Phaser.Math.Linear;var C6=function(){var i=this.getShape("triangle"),t=this.padding,s=this.width-t.right,c=0+t.left,C=this.height-t.bottom,S=0+t.top,l=(c+s)/2,T=(S+C)/2,e={0:{a:{x:c,y:S},b:{x:s,y:T},c:{x:c,y:C}},1:{a:{x:c,y:S},b:{x:l,y:C},c:{x:s,y:S}},2:{a:{x:s,y:S},b:{x:c,y:T},c:{x:s,y:C}},3:{a:{x:c,y:C},b:{x:l,y:S},c:{x:s,y:C}}},d,g,r,a,h,n;if(this.previousDirection===void 0){var o=e[this.direction],f=o.a,u=o.b,v=o.c;d=f.x,g=f.y,r=u.x,a=u.y,h=v.x,n=v.y}else{var m=e[this.previousDirection],p=e[this.direction],x=this.easeDirectionProgress;d=ra(m.a.x,p.a.x,x),g=ra(m.a.y,p.a.y,x),r=ra(m.b.x,p.b.x,x),a=ra(m.b.y,p.b.y,x),h=ra(m.c.x,p.c.x,x),n=ra(m.c.y,p.c.y,x)}i.startAt(d,g).lineTo(r,a).lineTo(h,n),this.arrowOnly?i.end():i.close()};const T6=Phaser.Math.DegToRad,Xl=T6(120);var S6=function(t){var t=this.getShape("triangle"),s=this.width/2,c=this.height/2,C=Math.min(s,c)*this.radius,S=this.verticeRotation;t.startAt(s+C*Math.cos(S+Xl),c+C*Math.sin(S+Xl)).lineTo(s+C*Math.cos(S),c+C*Math.sin(S)).lineTo(s+C*Math.cos(S-Xl),c+C*Math.sin(S-Xl)),this.arrowOnly?t.end():t.close()};const E6={buildShapes(){this.addShape(new Hn().setName("triangle"))},updateShapes(){var i=this.getShape("triangle");this.arrowOnly?i.fillStyle().lineStyle(this.lineWidth,this.strokeColor,this.strokeAlpha):i.fillStyle(this.fillColor,this.fillAlpha).lineStyle(this.lineWidth,this.strokeColor,this.strokeAlpha),this.shapeMode===0?C6.call(this):S6.call(this)}},P6={setEaseDuration(i){return i===void 0&&(i=0),this.easeDuration=i,this},playEaseDirectionation(){return this.easeDirectionProgressTask===void 0&&(this.easeDirectionProgressTask=new Yr(this,{eventEmitter:null})),this.easeDirectionProgressTask.restart({key:"easeDirectionProgress",from:0,to:1,duration:this.easeDuration}),this},stopEaseDirection(){return this.easeDirectionProgressTask===void 0?this:(this.easeDirectionProgressTask.stop(),this)}}
6315,aa=Phaser.Utils.Objects.GetValue,b6=Phaser.Utils.Objects.IsPlainObject,M6=Phaser.Math.DegToRad,w6=Phaser.Math.RadToDeg;class lu extends zr{constructor(t,s,c,C,S,l,T){var e,d,g,r,a,h,n,o;if(b6(s)){var f=s;s=f.x,c=f.y,C=f.width,S=f.height,l=f.color,T=f.alpha,e=f.strokeColor,d=f.strokeAlpha,g=f.strokeWidth,r=f.arrowOnly,a=f.direction,h=f.easeDuration,n=f.padding,o=f.radius}s===void 0&&(s=0),c===void 0&&(c=0),C===void 0&&(C=1),S===void 0&&(S=C),r===void 0&&(r=!1),a===void 0&&(a=0),h===void 0&&(h=0),n===void 0&&(n=0),o===void 0&&(o=void 0),super(t,s,c,C,S),this.type="rexTriangle",this.setFillStyle(l,T),e!==void 0&&g===void 0&&(g=2),this.setStrokeStyle(g,e,d),this.setArrowOnly(r),this.setDirection(a,h),this.setPadding(n),this.setRadius(o),this.buildShapes()}get arrowOnly(){return this._arrowOnly}set arrowOnly(t){this.dirty=this.dirty||this._arrowOnly!=t,this._arrowOnly=t}setArrowOnly(t){return t===void 0&&(t=!0),this.arrowOnly=t,this}get direction(){return this._direction}set direction(t){t=R6(t),this._direction!==t&&(this.easeDuration>0&&this._direction!==void 0?this.previousDirection=this._direction:this.previousDirection=void 0,this._direction=t,this.verticeAngle=t*90,this.dirty=!0,this.previousDirection!==void 0?this.playEaseDirectionation():this.stopEaseDirection())}setDirection(t,s){return s!==void 0&&this.setEaseDuration(s),this.direction=t,this}toggleDirection(t){return this.setDirection(this.direction+2,t),this}get easeDirectionProgress(){return this._easeDirectionProgress}set easeDirectionProgress(t){this._easeDirectionProgress!==t&&(this._easeDirectionProgress=t,this.dirty=!0)}setPadding(t,s,c,C){if(typeof t=="object"){var S=t,l=aa(S,"x",null);l!==null?(t=l,c=l):(t=aa(S,"left",0),c=aa(S,"right",t));var T=aa(S,"y",null);T!==null?(s=T,C=T):(s=aa(S,"top",0),C=aa(S,"bottom",s))}else t===void 0&&(t=0),s===void 0&&(s=t),c===void 0&&(c=t),C===void 0&&(C=s);return this.padding===void 0&&(this.padding={}),this.dirty=this.dirty||this.padding.left!=t||this.padding.top!=s||this.padding.right!=c||this.padding.bottom!=C,this.padding.left=t,this.padding.top=s,this.padding.right=c,this.padding.bottom=C,this.setRadius(),this}get radius(){return this._radius}set radius(t){this.dirty=this.dirty||this._radius!=t,this._radius=t}setRadius(t){return this.radius=t,this.shapeMode=t==null?0:1,this}get verticeRotation(){return this._verticeRotation}set verticeRotation(t){this.dirty=this.dirty||this._verticeRotation!=t,this._verticeRotation=t}setVerticeRotation(t){return this.verticeRotation=t,this}get verticeAngle(){return w6(this.verticeRotation)}set verticeAngle(t){this.verticeRotation=M6(t)}setVerticeAngle(t){return this.verticeAngle=t,this}}const A6={right:0,down:1,left:2,up:3};var R6=function(i){return typeof i=="string"&&(i=A6[i]),i=i%4,i};Object.assign(lu.prototype,E6,P6);xt.register("triangle",function(i,t,s,c,C,S){var l=new lu(this.scene,i,t,s,c,C,S);return this.scene.add.existing(l),l});mt(window,"RexPlugins.UI.Triangle",lu);Zh();const O6=Phaser.GameObjects.Zone,L6=Phaser.Utils.Array.Add,F6=Phaser.Utils.Array.Remove;let Ko=class extends O6{constructor(t,s,c,C,S){s===void 0&&(s=0),c===void 0&&(c=0),C===void 0&&(C=1),S===void 0&&(S=1),super(t,s,c,C,S),this.children=[]}destroy(t){if(!(!this.scene||this.ignoreDestroy)){if(t)for(var s,c=this.children.length-1;c>=0;c--)s=this.children[c],!s.parentContainer&&!s.displayList&&s.destroy(t);this.clear(!t),super.destroy(t)}}contains(t){return this.children.indexOf(t)!==-1}add(t){var s=this;return L6(this.children,t,0,function(c){c.once("destroy",s.onChildDestroy,s)},this),this}remove(t,s){var c=this;return F6(this.children,t,function(C){C.off("destroy",c.onChildDestroy,c),s&&C.destroy()}),this}onChildDestroy(t,s){this.remove(t,!1)}
6315clear(t){for(var s=this,c,C=0,S=this.children.length;C<S;C++)c=this.children[C],c.off("destroy",s.onChildDestroy,s),t&&c.destroy();return this.children.length=0,this}};const hg=Phaser.GameObjects.Components;Phaser.Class.mixin(Ko,[hg.Alpha,hg.Flip]);var as=function(i,t){var s;if(t===void 0)i.hasOwnProperty("rexContainer")&&(s=i.rexContainer.parent);else for(s=as(i);s&&s.name!==t;)s=as(s);return s},T1=function(i){for(var t=as(i);t;)i=t,t=as(t);return i};const I6=Phaser.Math.DegToRad,D6=Phaser.Math.RadToDeg;var qt=function(i){if(!i.hasOwnProperty("rexContainer")){var t={parent:null,self:null,layer:null,x:0,y:0,syncPosition:!0,rotation:0,syncRotation:!0,scaleX:0,scaleY:0,syncScale:!0,alpha:0,syncAlpha:!0,visible:!0,active:!0};Object.defineProperty(t,"angle",{get:function(){return D6(this.rotation)},set:function(s){this.rotation=I6(s)}}),Object.defineProperty(t,"displayWidth",{get:function(){return i.width*this.scaleX},set:function(s){this.scaleX=s/i.width}}),Object.defineProperty(t,"displayHeight",{get:function(){return i.height*this.scaleY},set:function(s){this.scaleY=s/i.height}}),i.rexContainer=t}return i.rexContainer};const B6={setParent(i,t){t===void 0&&(t=this);var s=qt(i);return t?(s.parent=t,s.self=i):(s.parent=null,s.self=null),this},getParent(i,t){return typeof i=="string"&&(t=i,i=void 0),i===void 0&&(i=this),as(i,t)},getTopmostParent(i){return i===void 0&&(i=this),T1(i)}},po=Phaser.Utils.Objects.GetValue,S1=Ko.prototype.add;var Ld=function(i,t){this.setParent(i);var s=qt(i);return E1(s,t),this.resetChildState(i).updateChildVisible(i).updateChildActive(i).updateChildScrollFactor(i).updateChildMask(i),S1.call(this,i),this.addToParentContainer(i),this.addToRenderLayer(i),this},Fd=function(i,t){this.setParent(i);var s=qt(i);return E1(s,t),s.x=i.x,s.y=i.y,s.rotation=i.rotation,s.scaleX=i.scaleX,s.scaleY=i.scaleY,s.alpha=i.alpha,s.visible=i.visible,s.active=i.active,this.updateChildPosition(i).updateChildAlpha(i).updateChildVisible(i).updateChildActive(i).updateChildScrollFactor(i).updateChildMask(i),S1.call(this,i),this.addToRenderLayer(i),this},E1=function(i,t){t===void 0&&(t=!0),typeof t=="boolean"?(i.syncPosition=t,i.syncRotation=t,i.syncScale=t,i.syncAlpha=t,i.syncScrollFactor=t):(i.syncPosition=po(t,"syncPosition",!0),i.syncRotation=po(t,"syncRotation",!0),i.syncScale=po(t,"syncScale",!0),i.syncAlpha=po(t,"syncAlpha",!0),i.syncScrollFactor=po(t,"syncScrollFactor",!0))};const k6={add(i){return Array.isArray(i)?this.addMultiple(i):Ld.call(this,i),this},pin(i,t){return Array.isArray(i)?this.addMultiple(i,t):Ld.call(this,i,t),this},addMultiple(i){for(var t=0,s=i.length;t<s;t++)Ld.call(this,i[t]);return this},addLocal(i){return Array.isArray(i)?this.addMultiple(i):Fd.call(this,i),this},pinLocal(i,t){return Array.isArray(i)?this.addMultiple(i,t):Fd.call(this,i,t),this},addLocalMultiple(i){for(var t=0,s=i.length;t<s;t++)Fd.call(this,i[t]);return this}},ug=Ko.prototype.remove,G6=Ko.prototype.clear,N6={remove(i,t){return as(i)!==this?this:(this.setParent(i,null),t||this.removeFromRenderLayer(i),ug.call(this,i,t),this)},unpin(i,t){return as(i)!==this?this:(this.setParent(i,null),t||this.removeFromRenderLayer(i),ug.call(this,i,t),this)},clear(i){for(var t=this.children,s=0,c=t.length;s<c;s++){var C=t[s];this.setParent(C,null),i||this.removeFromRenderLayer(C)}return G6.call(this,i),this}},V6={getLocalState(i){return qt(i)},resetChildState(i){return this.resetChildPositionState(i).resetChildVisibleState(i).resetChildAlphaState(i).resetChildActiveState(i),this},resetChildrenState(i){for(var t=0,s=i.length;t<s;t++)this.resetChildState(i[t]);return this},syncProperties(){return this.syncPosition().syncVisible().syncAlpha().syncActive().syncScrollFactor().syncMask(),this}},dg=Phaser.Math.RotateAround,z6={worldToLocal(i){return i.x-=this.x,i.y-=this.y,dg(i,0,0,-this.rotation),i.x/=this.scaleX,i.y/=this.scaleY,i},localToWorld(i){return i.x*=this.scaleX,i.y*=this.scaleY,dg(i,0,0,this.rotation),i.x+=this.x,i.y+=this.y,i}};var Vo=function(i,t){return i===t?1:i/t};const Y6={updateChildPosition(i){i.isRexContainerLite&&(i.syncChildrenEnable=!1);var t=qt(i),s=t.parent;return t.syncPosition&&(i.x=t.x,i.y=t.y,s.localToWorld(i)),t.syncRotation&&(i.rotation=t.rotation+s.rotation),t.syncScale&&(i.scaleX=t.scaleX*s.scaleX,i.scaleY=t.
6315scaleY*s.scaleY),i.isRexContainerLite&&(i.syncChildrenEnable=!0,i.syncPosition()),this},syncPosition(){return this.syncChildrenEnable&&this.children.forEach(this.updateChildPosition,this),this},resetChildPositionState(i){var t=qt(i),s=t.parent;return t.x=i.x,t.y=i.y,s.worldToLocal(t),t.scaleX=Vo(i.scaleX,s.scaleX),t.scaleY=Vo(i.scaleY,s.scaleY),t.rotation=i.rotation-s.rotation,this},setChildPosition(i,t,s){return i.x=t,i.y=s,this.resetChildPositionState(i),this},setChildLocalPosition(i,t,s){var c=qt(i);return c.x=t,c.y=s,this.updateChildPosition(i),this},resetLocalPositionState(){var i=qt(this).parent;return i&&i.resetChildPositionState(this),this}},X6=Phaser.Math.DegToRad,U6={updateChildRotation(i){var t=qt(i),s=t.parent;return t.syncRotation&&(i.rotation=s.rotation+t.rotation),this},syncRotation(){return this.syncChildrenEnable&&this.children.forEach(this.updateChildRotation,this),this},resetChildRotationState(i){var t=qt(i),s=t.parent;return t.rotation=i.rotation-s.rotation,this},setChildRotation(i,t){return i.rotation=t,this.resetChildRotationState(i),this},setChildAngle(i,t){return i.angle=t,this.resetChildRotationState(i),this},setChildLocalRotation(i,t){var s=qt(i);return s.rotation=t,this.updateChildRotation(i),this},setChildLocalAngle(i,t){var s=qt(i);return s.rotation=X6(t),this.updateChildRotation(i),this},resetLocalRotationState(){var i=qt(this).parent;return i&&i.resetChildRotationState(this),this}},W6={updateChildScale(i){var t=qt(i),s=t.parent;return t.syncScale&&(i.scaleX=s.scaleX*t.scaleX,i.scaleY=s.scaleY*t.scaleY),this},syncScale(){return this.syncChildrenEnable&&this.children.forEach(this.updateChildScale,this),this},resetChildScaleState(i){var t=qt(i),s=t.parent;return t.scaleX=Vo(i.scaleX,s.scaleX),t.scaleY=Vo(i.scaleY,s.scaleY),this},setChildScale(i,t,s){return s===void 0&&(s=t),i.scaleX=t,i.scaleY=s,this.resetChildScaleState(i),this},setChildLocalScale(i,t,s){s===void 0&&(s=t);var c=qt(i);return c.scaleX=t,c.scaleY=s,this.updateChildScale(i),this},setChildDisplaySize(i,t,s){return i.setDisplaySize(t,s),this.resetChildScaleState(i),this},resetLocalScaleState(){var i=qt(this).parent;return i&&i.resetChildScaleState(this),this}},H6={updateChildVisible(i){var t=qt(i),s=t.parent,c=t.hasOwnProperty("maskVisible")?t.maskVisible:!0;return i.visible=s.visible&&t.visible&&c,this},syncVisible(){return this.syncChildrenEnable&&this.children.forEach(this.updateChildVisible,this),this},resetChildVisibleState(i){var t=qt(i);return t.hasOwnProperty("maskVisible")&&delete t.maskVisible,t.visible=i.visible,this},setChildVisible(i,t){return this.setChildLocalVisible(i,t),this},setChildLocalVisible(i,t){t===void 0&&(t=!0);var s=qt(i);return s.visible=t,this.updateChildVisible(i),this},setChildMaskVisible(i,t){t===void 0&&(t=!0);var s=qt(i);return s.maskVisible=t,this.updateChildVisible(i),this},resetLocalVisibleState(){var i=qt(this).parent;return i&&i.resetChildVisibleState(this),this}},$6={updateChildAlpha(i){var t=qt(i),s=t.parent;return t.syncAlpha&&(i.alpha=s.alpha*t.alpha),this},syncAlpha(){return this.syncChildrenEnable&&this.children.forEach(this.updateChildAlpha,this),this},resetChildAlphaState(i){var t=qt(i),s=t.parent;return t.alpha=Vo(i.alpha,s.alpha),this},setChildAlpha(i,t){return i.alpha=t,this.resetChildAlphaState(i),this},setChildLocalAlpha(i,t){var s=qt(i);return s.alpha=t,this.updateChildAlpha(i),this},resetLocalAlphaState(){var i=qt(this).parent;return i&&i.resetChildAlphaState(this),this}},j6={updateChildActive(i){var t=qt(i),s=t.parent;return i.active=s.active&&t.active,this},syncActive(){return this.syncChildrenEnable&&this.children.forEach(this.updateChildActive,this),this},resetChildActiveState(i){var t=qt(i);return t.active=i.active,this},setChildActive(i,t){return i.active=t,this.resetChildActiveState(i),this},setChildLocalActive(i,t){t===void 0&&(t=!0);var s=qt(i);return s.active=t,this.updateChildActive(i),this},resetLocalActiveState(){var i=qt(this).parent;return i&&i.resetChildActiveState(this),this}},K6={updateChildScrollFactor(i){var t=qt(i),s=t.parent;return t.syncScrollFactor&&(i.scrollFactorX=s.scrollFactorX,i.scrollFactorY=s.scrollFactorY),this},syncScrollFactor(){return this.syncChildrenEnable&&this.children.forEac
6315h(this.updateChildScrollFactor,this),this}},Z6={updateChildMask(i){if(this.mask==null)return this;var t=this.mask.hasOwnProperty("geometryMask")?this.mask.geometryMask:this.mask.bitmapMask;return t!==i&&(i.mask=this.mask),this},syncMask(){return this.syncChildrenEnable&&this.children.forEach(this.updateChildMask,this),this},setMask(i){return this.mask=i,this},clearMask(i){i===void 0&&(i=!1);var t=this;return this._mask=null,this.setChildMaskVisible(this),this.children.forEach(function(s){s.clearMask&&s.clearMask(!1),s.hasOwnProperty("isRexContainerLite")||t.setChildMaskVisible(s)}),i&&this.mask&&this.mask.destroy(),this}},J6={setDepth(i,t){if(this.depth=i,!t&&this.children)for(var s=this.getAllChildren(),c=0,C=s.length;c<C;c++)s[c].depth=i;return this},swapDepth(i){var t=this.depth,s=i.depth;return this.setDepth(s),i.setDepth(t),this},incDepth(i){if(this.depth+=i,this.children)for(var t=this.getAllChildren(),s=0,c=t.length;s<c;s++)t[s].depth+=i;return this},bringToTop(){var i=this.displayList,t=this.getAllChildren([this]);hn(t,!1);for(var s=0,c=t.length;s<c;s++){var C=t[s];i.exists(C)&&i.bringToTop(C)}return this},moveDepthBelow(i){var t=this.displayList;if(i.displayList!==t)return this;var s=this.getAllChildren([this]);hn(s,!1);for(var c=0,C=s.length;c<C;c++){var S=s[c];if(t.exists(S)){t.moveBelow(i,S);break}}return this},moveDepthAbove(i){var t=this.displayList;if(i.displayList!==t)return this;var s=this.getAllChildren([this]);hn(s,!0);for(var c=0,C=s.length;c<C;c++){var S=s[c];if(t.exists(S)){t.moveAbove(i,S);break}}return this},bringChildToTop(i){var t=this.getAllChildren([this]);hn(t,!0);var s=t[0];return s===i?this:s.displayList!==i.displayList?this:(s.displayList.moveAbove(i,s),this)},sendChildToBack(i){var t=this.getAllChildren([this]);hn(t,!1);var s=t[0];return s===i?this:s.displayList!==i.displayList?this:(s.displayList.moveBelow(i,s),this)}};var P1=function(i,t){var s=t(i);if(!s&&i.isRexContainerLite)for(var c=i.children,C=0,S=c.length;C<S;C++)P1(c[C],t)},Id=function(i,t){for(var s=[i];s.length>0;){var c=s.shift(),C=t(c);!C&&c.isRexContainerLite&&s.push(...c.children)}};const xr=Phaser.Utils.Array,Q6={getChildren(i){if(!i)i=this.children;else for(var t=0,s=this.children.length;t<s;t++)i.push(this.children[t]);return i},getAllChildren(i){i===void 0&&(i=[]);var t=this;return Id(t,function(s){s!==t&&i.push(s)}),i},getAllVisibleChildren(i){i===void 0&&(i=[]);var t=this;return Id(t,function(s){if(s!==t){if(!s.visible)return!0;i.push(s)}}),i},bfs(i,t){return t===void 0&&(t=this),Id(t,i),this},dfs(i,t){return t===void 0&&(t=this),P1(t,i),this},contains(i){var t=as(i);return t?t===this?!0:this.contains(t):!1},getByName(i,t){if(t){for(var s=[this],c,C;s.length;){c=s.shift();for(var S=0,l=c.children.length;S<l;S++){if(C=c.children[S],C.name===i)return C;C.isRexContainerLite&&s.push(C)}}return null}else return xr.GetFirst(this.children,"name",i)},getRandom(i,t){return xr.GetRandom(this.children,i,t)},getFirst(i,t,s,c){return xr.GetFirstElement(this.children,i,t,s,c)},getAll(i,t,s,c){return xr.GetAll(this.children,i,t,s,c)},count(i,t,s,c){return xr.CountAllMatching(this.children,i,t,s,c)},swap(i,t){return xr.Swap(this.children,i,t),this},setAll(i,t,s,c){return xr.SetAll(this.children,i,t,s,c),this}};var cg=function(i){for(var t=[],s=0,c=i.length;s<c;s++){var C=i[s];C.hasOwnProperty("rexContainer")&&t.push(C.rexContainer)}return t},q6=function(i){for(var t=0,s=i.length;t<s;t++){var c=i[t].scene;if(c)return c}return null},fg=function(i,t,s){if(!s.parent){i.remove();return}var c=s.parent,C=s.self;switch(t){case"x":case"y":c.updateChildPosition(C);break;case"angle":case"rotation":c.updateChildRotation(C);break;case"scaleX":case"scaleY":case"displayWidth":case"displayHeight":c.updateChildScale(C);break;case"alpha":c.updateChildAlpha(C);break;default:c.updateChildPosition(C),c.updateChildRotation(C),c.updateChildScale(C),c.updateChildAlpha(C);break}};const _6={tweenChild(i){var t=i.targets;Array.isArray(t)||(t=[t]);var s=this.scene||q6(t);if(s){i.targets=cg(t);var c=s.tweens.add(i);return c.on("update",fg),c}},tweenSelf(i){return i.targets=[this],this.tweenChild(i)},createTweenChildConfig(i){var t=i.targets;t&&(Array.isArray(t)||(t=[t]),i.targets=cg(t));var s=i.onUpdate;return i.onUpdate=function(c,C){s&&s(c,C),fg(c,void 0,C)},i},tween(i){var t=this.scene;return i.targets||(i.targets=this),t.tweens.add(i)}},t4=Phaser.GameObjects.Container;var e4=function(i){return i instanceof t4};const i4=Phaser.GameObjects.Layer;var vg=function(i){return i instanceof i4},b1=function(i){var t=i.getAllChildren([i]);return t=t.filter(function(s){return!!s.displayList||!!s.parentContainer}),t},pg=function(i){var t=b1(this);return hn(t),i.add(t),this},mg=function(i,t,s){var c=b1(this);
6315return hn(c,t),i.remove(c),s&&c.forEach(function(C){C.addToDisplayList()}),this};const s4={addToContainer(i){return e4(i)?(this._setParentContainerFlag=!0,pg.call(this,i),this._setParentContainerFlag=!1,this):this},addToLayer(i){return vg(i)?(pg.call(this,i),this):this},removeFromContainer(){return this.parentContainer?(this._setParentContainerFlag=!0,mg.call(this,this.parentContainer,!0,!1),this._setParentContainerFlag=!1,this):this},removeFromLayer(i){return i===void 0&&(i=!0),vg(this.displayList)?(mg.call(this,this.displayList,!1,i),this):this},getParentContainer(){if(this.parentContainer)return this.parentContainer;for(var i=this.getParent();i;){var t=i.parentContainer;if(t)return t;i=i.getParent()}return null},addToParentContainer(i){if(!i.displayList)return this;var t=this.getParentContainer();return t?(i.isRexContainerLite?i.addToContainer(t):t.add(i),this):this}},n4={hasLayer(){return!!this.privateRenderLayer},enableLayer(){if(this.hasLayer())return this;var i=this.scene.add.layer();return this.moveDepthBelow(i),this.addToLayer(i),this.privateRenderLayer=i,this},getLayer(){return this.hasLayer()||this.enableLayer(),this.privateRenderLayer},getRenderLayer(){if(this.hasLayer())return this.privateRenderLayer;for(var i=this.getParent();i;){var t=i.privateRenderLayer;if(t)return t;i=i.getParent()}return null},addToRenderLayer(i){if(!i.displayList)return this;var t=this.getRenderLayer();if(!t)return this;i.isRexContainerLite?i.addToLayer(t):t.add(i);var s=qt(i);return s.layer=t,this},removeFromRenderLayer(i){var t=qt(i),s=t.layer;return s?(i.isRexContainerLite?i.removeFromLayer(!0):s.remove(i),t.layer=null,this):this}},gg=Phaser.Geom.Rectangle,r4=Phaser.Geom.Rectangle.Union;var a4=function(i,t){t===void 0?t=new gg:t===!0&&(Dd===void 0&&(Dd=new gg),t=Dd),t.setTo(0,0,0,0);for(var s,c=!0,C=0,S=i.length;C<S;C++)if(s=i[C],!!s.getBounds){var l=Xf(s,!0);c?(t.setTo(l.x,l.y,l.width,l.height),c=!1):r4(l,t,t)}return t},Dd;const o4=Phaser.GameObjects.GameObject;var mn=function(i){return i instanceof o4},yr=Phaser.Utils.Objects.GetValue,l4=Phaser.Textures.DynamicTexture,h4=Phaser.Utils.String.UUID,iv=function(i){if(i){var t=i.gameObjects,s=i.renderTexture,c=yr(i,"x",void 0),C=yr(i,"y",void 0),S=yr(i,"width",void 0),l=yr(i,"height",void 0),T=yr(i,"originX",0),e=yr(i,"originY",0),d=yr(i,"padding",0),g,r;if(S===void 0||l===void 0||c===void 0||C===void 0){var a=a4(t,!0),h=c!==void 0&&C!==void 0;h?(S=Math.max(c-a.left,a.right-c)*2,l=Math.max(C-a.top,a.bottom-C)*2,T=.5,e=.5):(c=a.x,C=a.y,S=a.width,l=a.height,T=0,e=0),g=a.x,r=a.y}else g=c+(0-T)*S,r=C+(0-e)*l;g-=d,r-=d,S+=d*2,l+=d*2;var n=t[0].scene;o&&!s&&(s=new l4(n.sys.textures,h4(),S,l)),s||(s=n.add.renderTexture(0,0,S,l)),s.setPosition&&s.setPosition(c,C),(s.width!==S||s.height!==l)&&s.setSize(S,l),s.setOrigin&&s.setOrigin(T,e),s.camera.setScroll(g,r),t=hn(Kn(t)),s.draw(t);var o=i.saveTexture;if(o)if(mn(s))s.saveTexture(o);else{var f=s,u=f.manager;u.exists(f.key)?u.renameTexture(f.key,key):(f.key=key,u.list[key]=f,u.emit("addtexture",key,f),u.emit(`addtexture-${key}`,f))}return s}};const u4={snapshot(i){var t=this.scaleX,s=this.scaleY,c=t===1&&s===1;c||this.setScale(1),i===void 0&&(i={}),i.gameObjects=this.getAllVisibleChildren(),i.x=this.x,i.y=this.y,i.originX=this.originX,i.originY=this.originY;var C=iv(i),S=!!C.scene;return c||(this.setScale(t,s),S&&C.setScale(t,s)),S?C:this}},xg=Phaser.Utils.Objects.GetValue;var d4=function(i,t){var s=xg(t,"drawContainer",!0),c=xg(t,"children");return c===void 0&&(c=this.getAllVisibleChildren([this])),s||(c=c.filter(function(C){return!C.isRexContainerLite})),Gy(c,i,t),this};const c4=Phaser.Math.RotateAround;var f4=function(i,t,s){s===void 0&&(s=t);var c={x:(t-i.originX)*i.displayWidth,y:(s-i.originY)*i.displayHeight};return c4(c,0,0,i.rotation),i.originX=t,i.originY=s,i.x=i.x+c.x,i.y=i.y+c.y,i},v4=function(i,t){this.syncChildrenEnable=!1,f4(this,i,t),this.syncChildrenEnable=!0;for(var s=this.getAllChildren(),c=0,C=s.length;c<C;c++)this.resetChildPositionState(s[c]);return this},M1={changeOrigin:v4,drawBounds:d4};Object.assign(M1,B6,k6,N6,V6,z6,Y6,U6,W6,H6,$6,j6,K6,Z6,J6,Q6,_6,s4,n4,u4);class Ui extends Ko{constructor(t,s,c,C,S,l){Array.isArray(C)&&(l=C,C=void 0,S=void 0),super(t,s,c,C,S),this.type="rexContainerLite",this.isRexContainerLite=!0,this.syncChildrenEnable=!0,this._active=!0,this._mask=null,this._scrollFactorX=1,this._scrollFactorY=1,this.privateRenderLayer=void 0,l&&this.add(l)}destroy(t){!this.scene||this.ignoreDestroy||(this.syncChildrenEnable=!1,super.destroy(t),this.privateRenderLayer&&(this.privateRenderLayer.list.length=0,this.privateRenderLayer.destroy()))}resize(t,s){return this.setSize(t,s),this}get x(){return this._x}set x(t){this._x!==t&&(this._x=t,this.syncPosition())}get y(){return this._y}set y(t){this._y!==t&&(this._y=t,this.syncPosition())}get rotation(){return super.rotation}set rotation(t){this.rotation!==t&&(super.rotation=t,this.syncPosition())}get scaleX(){return super.scaleX}set scaleX(t){this.scaleX!==t&&(super.scaleX=t,this.syncPosition())}get scaleY(){return super.scaleY}set scaleY(t){this.scaleY!==t&&(super.scaleY=t,this.syncPosition())}get scale(){return super.scale}set scale(t){this.scale!==t&&(super.scale=t,this.syncPosition())}get visible(){return super.visible}set visible(t){super.visible!==t&&(super.visible=t,this.syncVisible())}get alpha(){return super.alpha}set alpha(t){super.alpha!==t&&(super.alpha=t,this.syncAlpha())}get active(){return this._active}set active(t){this._active!==t&&(this._active=t,this.syncActive())}get mask(){return this._mask}set mask(t){this._mask!==t&&(this._mask=t,this.syncMask())}get scrollFactorX(){return this._scrollFactorX}set scrollFactorX(t){this._scrollFactorX!==t&&(this._scrollFactorX=t,this.syncScrollFactor())}get scrollFactorY(){return this._scrollFactorY}set scrollFactorY(t){this._scrollFactorY!==t&&(this._scrollFactorY=t,this.syncScrollFactor())}get list(){return this.children}static GetParent(t){return as(t)}get parentContainer(){return this._parentContainer}set parentContainer(t){if(!this._parentContainer&&!t){this._parentContainer=t;return}if(this.setParentContainerFlag){this._parentContainer=t;return}this._parentContainer&&!t?(this.removeFromContainer(),this._parentContainer=t):t?(this._parentContainer=t,this.addToContainer(t)):this._parentContainer=t}get setParentContainerFlag(){if(this._setParentContainerFlag)return!0;var t=as(this);return t?t.setParentContainerFlag:!1}}Object.assign(Ui.prototype,M1);var hu=function(i){return i.hasOwnProperty("rexSizer")||(i.rexSizer={}),i.rexSizer};function p4(i){return i===void 0&&(i=this),hu(i)}var m4=function(i){var t=hu(i);return t.hasOwnProperty("prevState")||(t.prevState={}),t.prevState},g4=function(i){return i===void 0&&(i=Ha(this.scene)),this.left=Math.max(this.left,i.left),this.right=Math.min(this.right,i.right),this.top=Math.max(this.top,i.top),this.bottom=Math.min(this.bottom,i.bottom),this};
6315const Re=Phaser.Display.Align,$a={center:Re.CENTER,left:Re.LEFT_CENTER,right:Re.RIGHT_CENTER,top:Re.TOP_CENTER,bottom:Re.BOTTOM_CENTER,"left-top":Re.TOP_LEFT,"top-left":Re.TOP_LEFT,"left-center":Re.LEFT_CENTER,"center-left":Re.LEFT_CENTER,"left-bottom":Re.BOTTOM_LEFT,"bottom-left":Re.BOTTOM_LEFT,"center-top":Re.TOP_CENTER,"top-center":Re.TOP_CENTER,"center-center":Re.CENTER,"center-bottom":Re.BOTTOM_CENTER,"bottom-center":Re.BOTTOM_CENTER,"right-top":Re.TOP_RIGHT,"top-right":Re.TOP_RIGHT,"right-center":Re.RIGHT_CENTER,"center-right":Re.RIGHT_CENTER,"right-bottom":Re.BOTTOM_RIGHT,"bottom-right":Re.BOTTOM_RIGHT};var uf=new Phaser.GameObjects.Zone({sys:{queueDepthSort:ci,events:{once:ci}}},0,0,1,1);uf.setOrigin(0);var gn={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},sv=function(i){var t=ie(i);return i.y+t-t*i.originY},nv=function(i){var t=de(i);return i.x-t*i.originX+t*.5},rv=function(i,t){var s=ie(i);return i.y=t-s+s*i.originY,i},av=function(i,t){var s=de(i),c=s*i.originX;return i.x=t+c-s*.5,i},x4=function(i,t,s,c){return s===void 0&&(s=0),c===void 0&&(c=0),av(i,nv(t)+s),rv(i,sv(t)+c),i},ov=function(i){var t=de(i);return i.x-t*i.originX},lv=function(i,t){var s=de(i);return i.x=t+s*i.originX,i},y4=function(i,t,s,c){return s===void 0&&(s=0),c===void 0&&(c=0),lv(i,ov(t)-s),rv(i,sv(t)+c),i},hv=function(i){var t=de(i);return i.x+t-t*i.originX},uv=function(i,t){var s=de(i);return i.x=t-s+s*i.originX,i},C4=function(i,t,s,c){return s===void 0&&(s=0),c===void 0&&(c=0),uv(i,hv(t)+s),rv(i,sv(t)+c),i},dv=function(i,t){var s=ie(i),c=s*i.originY;return i.y=t+c-s*.5,i},T4=function(i,t,s){return av(i,t),dv(i,s)},cv=function(i){var t=ie(i);return i.y-t*i.originY+t*.5},S4=function(i,t,s,c){return s===void 0&&(s=0),c===void 0&&(c=0),T4(i,nv(t)+s,cv(t)+c),i},E4=function(i,t,s,c){return s===void 0&&(s=0),c===void 0&&(c=0),lv(i,ov(t)-s),dv(i,cv(t)+c),i},P4=function(i,t,s,c){return s===void 0&&(s=0),c===void 0&&(c=0),uv(i,hv(t)+s),dv(i,cv(t)+c),i},fv=function(i){var t=ie(i);return i.y-t*i.originY},vv=function(i,t){var s=ie(i);return i.y=t+s*i.originY,i},b4=function(i,t,s,c){return s===void 0&&(s=0),c===void 0&&(c=0),av(i,nv(t)+s),vv(i,fv(t)-c),i},M4=function(i,t,s,c){return s===void 0&&(s=0),c===void 0&&(c=0),lv(i,ov(t)-s),vv(i,fv(t)-c),i},w4=function(i,t,s,c){return s===void 0&&(s=0),c===void 0&&(c=0),uv(i,hv(t)+s),vv(i,fv(t)-c),i},qs=[];qs[gn.BOTTOM_CENTER]=x4;qs[gn.BOTTOM_LEFT]=y4;qs[gn.BOTTOM_RIGHT]=C4;qs[gn.CENTER]=S4;qs[gn.LEFT_CENTER]=E4;qs[gn.RIGHT_CENTER]=P4;qs[gn.TOP_CENTER]=b4;qs[gn.TOP_LEFT]=M4;qs[gn.TOP_RIGHT]=w4;var w1=function(i,t,s,c,C){return qs[s](i,t,c,C)},Zo=function(i,t,s,c,C,S){uf.setPosition(t,s).setSize(c,C),w1(i,uf,S)};const oa=Phaser.Utils.Objects.GetValue,A4=Phaser.GameObjects.Group;var R4=function(i,t){var s=i.scene,c,C,S,l,T;if(typeof t=="number")c=t;else{c=oa(t,"color"),C=oa(t,"lineWidth");var e=oa(t,"name",!1);e&&(S=oa(e,"createTextCallback",O4),l=oa(e,"createTextCallbackScope",void 0),T=oa(e,"align","left-top"),typeof T=="string"&&(T=$a[T]))}if(c===void 0&&(c=16777215),C===void 0&&(C=1),S&&!i.children){i.children=new A4(s),i.once("destroy",function(o,f){o.children.destroy(!f),o.children=void 0});var d=i.clear.bind(i);i.clear=function(){d(),i.children.clear(!1,!0)}}for(var g=this.getAllShownChildren([this]),r,a,h=0,n=g.length;h<n;
6315h++){if(r=g[h],r.getBounds||r.width!==void 0&&r.height!==void 0)Cr=Xf(r,Cr);else continue;c!=null&&i.lineStyle(C,c).strokeRectShape(Cr),r.name&&S&&(l?a=S.call(l,s):a=S(s),a&&(a.setText(r.name),i.children.add(a),Zo(a,Cr.x,Cr.y,Cr.width,Cr.height,T)))}return this},O4=function(i,t,s){return i.add.text(0,0,"")},Cr=void 0;const Ul=Phaser.Utils.Objects.GetValue;var Jn=function(i,t){return i===void 0&&(i=0),t===void 0&&(t={}),typeof i=="number"?(t.left=i,t.right=i,t.top=i,t.bottom=i):(t.left=Ul(i,"left",0),t.right=Ul(i,"right",0),t.top=Ul(i,"top",0),t.bottom=Ul(i,"bottom",0)),t};const L4=Ui.prototype.add;var Jo=function(i){return L4.call(this,i),this.sizerEventsEnable&&(i.emit("sizer.add",i,this),this.emit("add",i,this)),this};const F4={addBackground(i,t,s){this.backgroundChildren===void 0&&(this.backgroundChildren=[]),typeof t=="string"&&(s=t,t=void 0),t===void 0&&(t=0),Jo.call(this,i),this.backgroundChildren.push(i);var c=this.getSizerConfig(i);return c.padding=Jn(t),s!==void 0&&this.addChildrenMap(s,i),this},isBackground(i){return this.backgroundChildren===void 0?!1:this.backgroundChildren.indexOf(i)!==-1}};var $n=function(i,t){var s=null;if(t===void 0)i.hasOwnProperty("rexContainer")&&(s=i.rexContainer.parent,s?s.isRexSizer||(s=$n(s)):s=null);else for(s=$n(i);s&&s.name!==t;)s=$n(s);return s},I4=function(i){for(var t=$n(i);t;)i=t,t=$n(t);return i};const ja={getParentSizer(i,t){return typeof i=="string"&&(t=i,i=void 0),i===void 0&&(i=this),$n(i,t)},getTopmostSizer(i){return i===void 0&&(i=this),I4(i)},hasParentSizer(i,t){t===void 0&&(t=this);for(var s=$n(t);s;){if(s===i)return!0;s=$n(s)}return!1},hasChild(i,t){return t===void 0&&(t=this),this.hasParentSizer(t,i)}},D4=Phaser.Utils.Array.Remove,B4=Ui.prototype.remove,yg=ja.getParentSizer;var Qo=function(i,t){for(var s=yg(i);s;)s.removeChildCallback&&s.removeChildCallback(i,t),s=yg(s);return this.isBackground(i)&&D4(this.backgroundChildren,i),B4.call(this,i,t),!t&&this.sizerEventsEnable&&(i.emit("sizer.remove",i,this),this.emit("remove",i,this)),this};const k4=Phaser.Utils.Array.Remove,G4=ja.getParentSizer,N4={removeFromParentSizer(){var i=G4(gameObject);return i&&i.remove(this),this},removeBackground(i,t){return this.backgroundChildren===void 0?this:this.getParentSizer(i)!==this?this:(k4(this.backgroundChildren,i),Qo.call(this,i,t),this)},removeAllBackgrounds(i){if(this.backgroundChildren===void 0)return this;for(var t=this.backgroundChildren.length-1;t>=0;t--)this.remove(this.backgroundChildren[t],i);return this}};var Cg=function(i,t){if(typeof i=="string")this.childrenMap[i]=t;else{var s=i;for(i in s)this.childrenMap[i]=s[i]}return this},V4=function(i){if(typeof i=="object"){var t=i;for(var i in this.childrenMap)if(this.childrenMap[i]===t)return delete this.childrenMap[i],this}return delete this.childrenMap[i],this},z4=function(i,t){if(typeof i=="string"&&(i=i.split(".")),i.length!==0){var s=i.shift(),c=null;if(s.charAt(0)==="#")s=s.substring(1),c=this.getByName(s,t);else if(s.indexOf("[")===-1)this.childrenMap&&(c=this.childrenMap[s]);else{var C=s.match(Y4);if(C!=null&&this.childrenMap){var S=this.childrenMap[C[1]];S&&(c=S[C[2]])}}return i.length===0?c:c&&c.childrenMap?c.getElement(i):null}};const Y4=/(\S+)\[(\d+)\]/i;var X4=function(i){if(Array.isArray(this.sizerChildren)){var t=this.sizerChildren.indexOf(i);return t===-1&&(t=null),t}else{if(this.getParentSizer(i)!==this)return null;for(var s in this.sizerChildren)if(this.sizerChildre[s]===i)return s;return null}};const U4={getInnerPadding(i){return wh(this.space,i)},setInnerPadding(i,t){return Wn(this.space,i,t),this},getOuterPadding(i){return wh(this.getSizerConfig(this).padding,i)},setOuterPadding(i,t){return Wn(this.getSizerConfig(this).padding,i,t),this},getChildOuterPadding(i,t){return typeof i=="string"&&(i=this.getElement(i)),wh(this.getSizerConfig(i).padding,t)},setChildOuterPadding(i,t,s){return typeof i=="string"&&(i=this.getElement(i)),Wn(this.getSizerConfig(i).padding,t,s),this}};var pv=function(i){var t=this.childrenWidth,s=this.minWidth!==void 0?this.minWidth:0;return i===void 0?(i=Math.max(s,t),this.layoutWarnEnable&&s>0&&t>s&&console.warn(`Layout width warn: ${this.constructor.name}'s minWidth (${s}) < childrenWidth (${t})`)):this.layoutWarnEnable&&(s>i||t>i)&&console.warn(`Layout width warn: ${this.constructor.name}'s minWidth (${s}) or childrenWidth (${t} > targetWidth ${i})`),i},W4=function(i){var t,s;for(var c in this.sizerChildren)t=this.sizerChildren[c],t&&t.isRexSizer&&!t.ignoreLayout&&(s=this.getExpandedChildWidth(t,i),s=t.resolveWidth(s),t.resolve
6315ChildrenWidth(s))},mv=function(i){var t=this.childrenHeight,s=this.minHeight!==void 0?this.minHeight:0;return i===void 0?(i=Math.max(s,t),this.layoutWarnEnable&&s>0&&t>s&&console.warn(`Layout height warn: ${this.constructor.name}'s minHeight (${s}) < childrenHeight (${t})`)):this.layoutWarnEnable&&(s>i||t>i)&&console.warn(`Layout height warn: ${this.constructor.name}'s minHeight (${s}) or childrenHeight (${t}) > targetHeight (${i})`),i},H4=function(i,t){},$4=function(i){var t;return i.isRexSizer?t=Math.max(i.minWidth,i.childrenWidth):i.minWidth!==void 0?t=i.minWidth:t=de(i),t},j4=function(i){var t;return i.isRexSizer?t=Math.max(i.minHeight,i.childrenHeight):i.minHeight!==void 0?t=i.minHeight:t=ie(i),t},K4=function(i,t){return t},Z4=function(i,t){return t},J4=function(){return 0},Q4=function(){return 0},q4=function(i){i===void 0&&(i=[]);for(var t=i.length,s=this.getChildrenSizers(i),c=i.length,C=t;C<c;C++)s[C].getAllChildrenSizers(i);return i},_4=function(i){return i===void 0&&(i=[]),i};const tF={getShownChildren(i){i===void 0&&(i=[]);for(var t=this.children,s,c=0,C=t.length;c<C;c++)s=t[c],!(s.rexSizer&&s.rexSizer.hidden)&&i.push(s);return i},getAllShownChildren(i){i===void 0&&(i=[]);for(var t=[this];t.length>0;){var s=t.shift();s.rexSizer&&s.rexSizer.hidden||(s!==this&&i.push(s),s.isRexContainerLite&&t.push(...s.children))}return i}};var qo=function(){this._childrenWidth=void 0,this._childrenHeight=void 0;for(var i=this.getChildrenSizers(),t,s=0,c=i.length;s<c;s++)t=i[s],!t.ignoreLayout&&t.preLayout()},eF=function(){var i=this.scaleX,t=this.scaleY,s=i===1&&t===1;return s||this.setScale(1),this.runLayout(),this.postLayout(),this._postLayout(),s||this.setScale(i,t),this},iF=function(i,t,s){if(this.ignoreLayout)return this;var c=!i;return c&&this.preLayout(),t=this.resolveWidth(t),c&&(this.resolveChildrenWidth(t),this.runWidthWrap(t)),s=this.resolveHeight(s),this.postResolveSize(t,s),this.resize(t,s),this.sizerEventsEnable&&this.layoutedChildren===void 0&&(this.layoutedChildren=[]),this.layoutChildren(),this.layoutBackgrounds(),this.sizerEventsEnable&&(this.emit
6315("postlayout",this.layoutedChildren,this),this.layoutedChildren.length=0),this},sF=function(){},nF=function(i,t,s){return this._anchor&&this._anchor.updatePosition(),this},rF=function(i,t,s){return this},A1=function(i){var t,s;for(var c in this.sizerChildren)t=this.sizerChildren[c],!(!t||t.isRexSizer&&t.ignoreLayout||!t.runWidthWrap)&&(s=this.getExpandedChildWidth(t,i),t.isRexSizer&&(s=t.resolveWidth(s)),t.runWidthWrap(s));return this};class gv extends ke{constructor(t,s){super(t,{eventEmitter:!1}),this.viewport=void 0,this.resetFromJSON(s)}shutdown(t){this.isShutdown||(this.autoAnchor(!1),this.viewport=void 0,this.onUpdateViewportCallback=void 0,this.onUpdateViewportCallbackScope=void 0,this.onResizeCallback=void 0,this.onResizeCallbackScope=void 0,super.shutdown(t))}resetFromJSON(t){t===void 0&&(t={});var s,c;t.x!==void 0?(s=null,c=t.x):t.left!==void 0?(s=0,c=t.left):t.right!==void 0?(s=1,c=t.right):t.centerX!==void 0&&(s=.5,c=t.centerX);var C,S;t.y!==void 0?(C=null,S=t.y):t.top!==void 0?(C=0,S=t.top):t.bottom!==void 0?(C=1,S=t.bottom):t.centerY!==void 0&&(C=.5,S=t.centerY);var l,T;c!==void 0&&(c=c.replace("left","0%").replace("right","100%").replace("center","50%").split("%"),l=parseFloat(c[0])/100,T=c[1]===""?0:parseFloat(c[1]));var e,d;S!==void 0&&(S=S.replace("top","0%").replace("bottom","100%").replace("center","50%").split("%"),e=parseFloat(S[0])/100,d=S[1]===""?0:parseFloat(S[1]));var g=t.width,r,a;g!==void 0&&(g=g.split("%"),r=parseFloat(g[0])/100,a=g[1]===""?0:parseFloat(g[1]));var h=t.height,n,o;h!==void 0&&(h=h.split("%"),n=parseFloat(h[0])/100,o=h[1]===""?0:parseFloat(h[1])),this.setAlign(s,C),this.setPercentage(l,e),this.setOffset(T,d),this.setSizePercentage(r,n),this.setSizePadding(a,o);var f=t.onResizeCallback,u=t.onResizeCallbackScope;f!==void 0&&this.setResizeCallback(f,u);var v=t.onUpdateViewportCallback,m=t.onUpdateViewportCallbackScope;return v!==void 0&&this.setUpdateViewportCallback(v,m),this.autoAnchor(t.enable),this}autoAnchor(t){return t===void 0&&(t=!0),t=!!t,this.autoAnchorEnable===t?this:(t?(this.scene.sys.scale.on("resize",this.anchor,this),this.anchor()):this.scene.sys.scale.off("resize",this.anchor,this),this.autoAnchorEnable=t,this)}setAlign(t,s){return this.alignX=t,this.alignY=s,this}setPercentage(t,s){return this.percentageX=t,this.percentageY=s,this}setOffset(t,s){return this.offsetX=t,this.offsetY=s,this}setSizePercentage(t,s){return this.percentageWidth=t,this.percentageHeight=s,this}setSizePadding(t,s){return this.paddingWidth=t,this.paddingHeight=s,this}setResizeCallback(t,s){return this.onResizeCallback=t,this.onResizeCallbackScope=s,this}setUpdateViewportCallback(t,s){return this.onUpdateViewportCallback=t,this.onUpdateViewportCallbackScope=s,this}anchor(){return this.updateViewport(),this.updateSize(),this.updatePosition(),this}updateSize(){var t=this.onResizeCallback,s=this.onResizeCallbackScope,c=this.anchorWidth,C=this.anchorHeight;if(!(c===void 0&&C===void 0||!t)){var S=this.parent;c===void 0&&(c=S.width),C===void 0&&(C=S.height),s?t.call(s,c,C,S,this):t(c,C,S,this)}}updatePosition(){var t=this.parent;return this.alignX===null?t.x=this.anchorX:this.alignX!==void 0&&(t.x=this.anchorX+t.displayWidth*(t.originX-this.alignX)),this.alignY===null?t.y=this.anchorY:this.alignY!==void 0&&(t.y=this.anchorY+t.displayHeight*(t.originY-this.alignY)),this}get anchorX(){return this.viewport.x+this.viewport.width*this.percentageX+this.offsetX}get anchorY(){return this.viewport.y+this.viewport.height*this.percentageY+this.offsetY}get anchorWidth(){if(this.percentageWidth!==void 0)return this.viewport.width*this.percentageWidth+this.paddingWidth}get anchorHeight(){if(this.percentageHeight!==void 0)return this.viewport.height*this.percentageHeight+this.paddingHeight}updateViewport(){var t=this.parent.scene.cameras.main;this.viewport=Ha(this.scene,t,this.viewport);var s=this.viewport,c=this.onUpdateViewportCallback,C=this.onUpdateViewportCallbackScope;c&&(C?c.call(C,s,this.parent,this):c(s,this.parent,this))}}var aF=function(i){i===void 0&&(i={});var t=i.hasOwnProperty("width"),s=i.hasOwnProperty("height"),c=i.hasOwnProperty("onResizeCallback");return(t||s)&&!c&&(i.onResizeCallback=function(C,S,l){t&&l.setMinWidth(C),s&&l.setMinHeight(S),l.layout()}),this._anchor===void 0?this._anchor=new gv(this,i):this._anchor.resetFromJSON(i),this};
6315const oF=Phaser.Utils.Objects.GetValue,la=Phaser.Utils.Objects.GetAdvancedValue,Tg=Phaser.Math.Linear;class zo extends Vr{constructor(t,s){super(t,s),this.scaleStart={},this.scaleEnd={},this.resetFromJSON(s),this.boot()}resetFromJSON(t){return super.resetFromJSON(t),this.setMode(oF(t,"mode",0)),this.setScaleRange(la(t,"start",void 0),la(t,"end",0)),this}setMode(t){return typeof t=="string"&&(t=lF[t]),this.mode=t,this}setScaleRange(t,s){return typeof t=="number"?(this.startX=t,this.startY=t):(this.startX=la(t,"x",this.parent.scaleX),this.startY=la(t,"y",this.parent.scaleY)),typeof s=="number"?(this.endX=s,this.endY=s):(this.endX=la(s,"x",void 0),this.endY=la(s,"y",void 0)),this.hasScaleX=this.startX!==void 0&&this.endX!==void 0,this.hasScaleY=this.startY!==void 0&&this.endY!==void 0,this}start(){if(this.timer.isRunning)return this;var t=this.parent;this.hasScaleX&&(t.scaleX=this.startX),this.hasScaleY&&(t.scaleY=this.startY);var s=this.repeat;return this.mode===2&&s!==-1&&(s=(s+1)*2-1),this.timer.setDelay(this.delay).setDuration(this.duration).setRepeat(s),super.start(),this}updateGameObject(t,s){var c=s.t;s.isOddIteration&&(c=1-c),c=this.easeFn(c),this.hasScaleX&&(t.scaleX=Tg(this.startX,this.endX,c)),this.hasScaleY&&(t.scaleY=Tg(this.startY,this.endY,c))}complete(){return super.complete(),this.mode===1&&this.parent.destroy(),this}}const lF={stop:0,destroy:1,yoyo:2};var xv=function(i,t,s,c,C){c===void 0&&(c="Cubic");var S,l;switch(s){case 0:case"x":S={x:0},l={x:i.scaleX};break;case 1:case"y":S={y:0},l={y:i.scaleY};break;default:S=0,l=i.scale;break}var T={mode:0,start:S,end:l,duration:t,ease:c};return C===void 0?C=new zo(i,T):C.resetFromJSON(T),C.restart(),C},R1=function(i,t,s,c,C,S){c===void 0&&(c="Linear"),C instanceof zo&&(S=C,C=void 0),C===void 0&&(C=!0);var l={};switch(l.mode=C?1:0,s){case 0:case"x":l.end={x:0};break;case 1:case"y":l.end={y:0};break;default:l.end=0;break}return l.duration=t,l.ease=c,S===void 0?S=new zo(i,l):S.resetFromJSON(l),S.restart(),S},hF=function(i,t,s,c,C,S,l){s===void 0&&(s=1.2),c===void 0&&(c=0),S===void 0&&(S="Cubic");var T,e;switch(C){case 0:case"x":T={x:i.scaleX},e={x:s};break;case 1:case"y":T={y:i.scaleX},e={y:s};break;default:T=i.scaleX,e=s;break}var d={mode:2,start:T,end:e,duration:t/2,ease:S,repeat:c};return l===void 0?l=new zo(i,d):l.resetFromJSON(d),l.restart(),l};const Bd=Phaser.Utils.Objects.IsPlainObject;var kd=function(i,t){t.completeEventName=void 0,t.on("complete",function(){t.completeEventName&&(i.emit(t.completeEventName,i),t.completeEventName=void 0)}),t.on("update",function(){var s=ja.getParentSizer(i);s&&s.resetChildPositionState(i)})};const yv={popUp(i,t,s){if(Bd(i)){var c=i;i=c.duration,t=c.orientation,s=c.ease}var C=this._scaleBehavior===void 0;return this._scaleBehavior=xv(this,i,t,s,this._scaleBehavior),C&&kd(this,this._scaleBehavior),this._scaleBehavior.completeEventName="popup.complete",this},popUpPromise(i,t,s){return this.popUp(i,t,s),ri(this._scaleBehavior)},scaleDownDestroy(i,t,s,c){if(Bd(i)){var C=i;i=C.duration,t=C.orientation,s=C.ease,c=C.destroy}var S=this._scaleBehavior===void 0;return this._scaleBehavior=R1(this,i,t,s,c,this._scaleBehavior),S&&kd(this,this._scaleBehavior),this._scaleBehavior.completeEventName="scaledown.complete",this},scaleDownDestroyPromise(i,t,s,c){return this.scaleDownDestroy(i,t,s,c),ri(this._scaleBehavior)},scaleDown(i,t,s){return this.scaleDownDestroy(i,t,s,!1),this},scaleDownPromise(i,t,s){return this.scaleDown(i,t,s),ri(this._scaleBehavior)},scaleYoyo(i,t,s,c,C){if(Bd(i)){var S=i;i=S.duration,t=S.peakValue,s=S.repeat,c=S.orientation,C=S.ease}var l=this._scaleBehavior===void 0;return this._scaleBehavior=hF(this,i,t,s,c,C,this._scaleBehavior),l&&kd(this,this._scaleBehavior),this._scaleBehavior.completeEventName="scaleyoyo.complete",this},scaleYoyoPromise(i,t,s,c,C){return this.scaleYoyo(i,t,s,c,C),ri(this._scaleBehavior)}},uF=Phaser.Utils.Objects.GetValue,Sg=Phaser.Utils.Objects.GetAdvancedValue,dF=Phaser.Math.Linear;let df=class extends Vr{constructor(t,s){super(t,s),this.resetFromJSON(s),this.boot()}resetFromJSON(t){return super.resetFromJSON(t),this.setMode(uF(t,"mode",0)),this.setAlphaRange(Sg(t,"start",this.parent.alpha),Sg(t,"end",0)),this}setMode(t){return typeof t=="string"&&(t=cF[t]),this.mode=t,this}setAlphaRange(t,s){return this.alphaStart=t,this.alphaEnd=s,this}
6315start(){if(this.timer.isRunning)return this;var t=this.parent;return t.setAlpha(this.alphaStart),this.timer.setDelay(this.delay).setDuration(this.duration).setRepeat(this.mode===2?-1:0),super.start(),this}updateGameObject(t,s){var c=s.t;s.isOddIteration&&(c=1-c),t.alpha=dF(this.alphaStart,this.alphaEnd,c)}complete(){return super.complete(),this.mode===1&&this.parent.destroy(),this}};const cF={stop:0,destroy:1,yoyo:2},fF=Phaser.Utils.Objects.IsPlainObject;var uu=function(i,t,s,c){var C,S;fF(s)?(C=s.start,S=s.end):S=s,C===void 0&&(C=0),S===void 0&&(S=1);var l={mode:0,start:C,end:S,duration:t};return c===void 0?c=new df(i,l):c.resetFromJSON(l),c.restart(),c},du=function(i,t,s,c){s instanceof df&&(c=s,s=void 0),s===void 0&&(s=!0);var C={mode:s?1:0,end:0,duration:t};return c===void 0?c=new df(i,C):c.resetFromJSON(C),c.restart(),c};const Eg=Phaser.Utils.Objects.IsPlainObject;var Pg=function(i,t){t.completeEventName=void 0,t.on("complete",function(){t.completeEventName&&(i.emit(t.completeEventName,i),t.completeEventName=void 0)}),t.on("update",function(){var s=ja.getParentSizer(i);s&&s.resetChildAlphaState(i)})};const vF={fadeIn(i,t){if(Eg(i)){var s=i;i=s.duration,t=s.alpha}var c=this._fade===void 0;return this._fade=uu(this,i,t,this._fade),c&&Pg(this,this._fade),this._fade.completeEventName="fadein.complete",this},fadeInPromise(i,t){return this.fadeIn(i,t),ri(this._fade)},fadeOutDestroy(i,t){if(Eg(i)){var s=i;i=s.duration,t=s.destroy}var c=this._fade===void 0;return this._fade=du(this,i,t,this._fade),c&&Pg(this,this._fade),this._fade.completeEventName="fadeout.complete",this},fadeOutDestroyPromise(i,t){return this.fadeOutDestroy(i,t),ri(this._fade)},fadeOut(i){return this.fadeOutDestroy(i,!1),this},fadeOutPromise(i){return this.fadeOut(i),ri(this._fade)}},pF=Phaser.Utils.Objects.GetValue,ha=Phaser.Utils.Objects.GetAdvancedValue,bg=Phaser.Math.Linear;class kh extends Vr{constructor(t,s){super(t,s),this.resetFromJSON(s),this.boot()}resetFromJSON(t){if(super.resetFromJSON(t),this.setMode(pF(t,"mode",0)),t&&(t.hasOwnProperty("x")||t.hasOwnProperty("y"))){var s=ha(t,"x",void 0),c=ha(t,"y",void 0);this.setTargetPosition(s,c)}else this.setTargetPosition(t);return this}setMode(t){return typeof t=="string"&&(t=mF[t]),this.mode=t,this}setTargetPosition(t,s){if(typeof t=="number"||typeof s=="number")this.startX=this.parent.x,this.startY=this.parent.y,this.endX=t,this.endY=s;else{var c=t;this.startX=ha(c,"startX",void 0),this.startY=ha(c,"startY",void 0),this.endX=ha(c,"endX",void 0),this.endY=ha(c,"endY",void 0)}return this.hasMoveX=this.startX!==void 0&&this.endX!==void 0,this.hasMoveY=this.startY!==void 0&&this.endY!==void 0,this}start(){if(this.timer.isRunning)return this;var t=this.parent;return this.hasMoveX&&(t.x=this.startX),this.hasMoveY&&(t.y=this.startY),this.timer.setDelay(this.delay).setDuration(this.duration).setRepeat(this.mode===2?-1:0),super.start(),this}updateGameObject(t,s){var c=s.t;s.isOddIteration&&(c=1-c),c=this.easeFn(c),this.hasMoveX&&(t.x=bg(this.startX,this.endX,c)),this.hasMoveY&&(t.y=bg(this.startY,this.endY,c))}complete(){return super.complete(),this.mode===1&&this.parent.destroy(),this}}const mF={stop:0,destroy:1,yoyo:2};var Gh=function(i,t){if(typeof i=="number")return i;var s=i[0],c=parseFloat(i.substr(2));switch(s){case"+":return t+c;case"-":return t-c;case"*":return t*c;case"/":return t/c}},O1=function(i,t,s,c,C,S,l){S instanceof kh&&(l=S,S=void 0),S===void 0&&(S=!1);var T={};return T.mode=S?1:0,s!==void 0&&(T.startX=i.x,T.endX=Gh(s,i.x)),c!==void 0&&(T.startY=i.y,T.endY=Gh(c,i.y)),T.duration=t,T.ease=C===void 0?"Linear":C,l===void 0?l=new kh(i,T):l.resetFromJSON(T),l.restart(),l},L1=function(i,t,s,c,C,S,l){S instanceof kh&&(l=S,S=void 0),S===void 0&&(S=!1);var T={};return T.mode=S?1:0,s!==void 0&&(T.startX=Gh(s,i.x),T.endX=i.x),c!==void 0&&(T.startY=Gh(c,i.y),T.endY=i.y),T.duration=t,T.ease=C===void 0?"Linear":C,l===void 0?l=new kh(i,T):l.resetFromJSON(T),l.restart(),l};const Mg=Phaser.Utils.Objects.IsPlainObject,wg=Phaser.Math.Distance.Between;var Ag=function(i,t){t.completeEventName=void 0,t.on("complete",function(){t.completeEventName&&(i.emit(t.completeEventName,i),t.completeEventName=void 0)}),t.on("update",function(){var s=ja.getParentSizer(i);s&&s.resetChildPositionState(i)})};const gF={moveFrom(i,t,s,c,C){if(Mg(i)){var S=i;t=S.x,s=S.y,S.hasOwnProperty("speed")?i=wg(t,s,this.x,this.y)*1e3/S.speed:i=S.duration,c=S.ease}var l=this._easeMove===void 0;return this._easeMove=L1(this,i,t,s,c,C,this._easeMove),l&&Ag(this,this._easeMove),this._easeMove.completeEventName="movefrom.complete",this},moveFromPromise(i,t,s,c,C){return this.moveFrom(i,t,s,c,C),ri(this._easeMove)},moveFromDestroy(i,t,s,c){return this.moveFrom(i,t,s,c,!0),this}
6315,moveFromDestroyPromise(i,t,s,c){return this.moveFromDestroy(i,t,s,c),ri(this._easeMove)},moveTo(i,t,s,c,C){if(Mg(i)){var S=i;t=S.x,s=S.y,S.hasOwnProperty("speed")?i=wg(t,s,this.x,this.y)*1e3/S.speed:i=S.duration,c=S.ease}var l=this._easeMove===void 0;return this._easeMove=O1(this,i,t,s,c,C,this._easeMove),l&&Ag(this,this._easeMove),this._easeMove.completeEventName="moveto.complete",this},moveToPromise(i,t,s,c,C){return this.moveTo(i,t,s,c,C),ri(this._easeMove)},moveToDestroy(i,t,s,c){return this.moveTo(i,t,s,c,!0),this},moveToDestroyPromise(i,t,s,c){return this.moveToDestroy(i,t,s,c,!0),ri(this._easeMove)},moveStop(i){return this._easeMove?(this._easeMove.stop(i),this):this}},ji=Phaser.Utils.Objects.GetValue;class Cv extends iu{constructor(t,s){super(t,s),this.timer=new zy,this.resetFromJSON(s),this.boot()}resetFromJSON(t){return this.timer.resetFromJSON(ji(t,"timer")),this.setEnable(ji(t,"enable",!0)),this.setMode(ji(t,"mode",1)),this.isRunning=ji(t,"isRunning",!1),this.setMagnitudeMode(ji(t,"magnitudeMode",1)),this.setAxisMode(ji(t,"axis",0)),this.setDuration(ji(t,"duration",500)),this.setMagnitude(ji(t,"magnitude",10)),this.ox=ji(t,"ox",void 0),this.oy=ji(t,"oy",void 0),this}toJSON(){return{timer:this.timer.toJSON(),enable:this.enable,mode:this.mode,isRunning:this.isRunning,magnitudeMode,duration:this.duration,magnitude:this.magnitude,ox:this.ox,oy:this.oy}}shutdown(t){this.isShutdown||(super.shutdown(t),this.timer.destroy(),this.timer=void 0)}startTicking(){super.startTicking(),this.mode===0?(this.scene.game.events.on("poststep",this.update,this),this.scene.game.events.on("prestep",this.backToOrigin,this)):this.scene.sys.events.on("preupdate",this.update,this)}stopTicking(){super.stopTicking(),this.scene&&(this.mode===0?(this.scene.game.events.off("poststep",this.update,this),this.scene.game.events.off("prestep",this.backToOrigin,this)):this.scene.sys.events.off("preupdate",this.update,this))}setEnable(t){return t==null&&(t=!0),this.enable=t,this}setMode(t){return typeof t=="string"&&(t=xF[t]),this.mode=t,this}setMagnitudeMode(t){return typeof t=="string"&&(t=CF[t]),this.magnitudeMode=t,this}setAxisMode(t){return typeof t=="string"&&(t=yF[t]),this.axisMode=t,this}setDuration(t){return this.duration=t,this}setMagnitude(t){return this.magnitude=t,this}start(t,s){if(typeof t!="number"){var c=t;s=ji(c,"magnitude",void 0),t=ji(c,"duration",void 0)}return s!==void 0&&this.setMagnitude(s),t!==void 0&&this.setDuration(t),this.timer.setDuration(this.duration).start(),super.start(),this}shake(t,s){return this.start(t,s),this}update(t,s){if(!this.isRunning||!this.enable)return this;var c=this.parent;if(!c.active)return this;if(this.timer.update(t,s),this.timer.isDone)this.backToOrigin(),this.complete();else{this.ox===void 0&&(this.ox=c.x,this.oy=c.y);var C=this.magnitude;this.magnitudeMode===1&&(C*=1-this.timer.t);var S=Math.random()*Math.PI*2,l=this.ox+Math.cos(S)*C,T=this.oy+Math.sin(S)*C;switch(this.axisMode){case 1:c.x=l;break;case 2:c.y=T;break;default:c.x=l,c.y=T;break}}return this}backToOrigin(){if(!this.isRunning||!this.enable)return this;if(this.ox===void 0)return this;var t=this.parent;switch(this.axisMode){case 1:t.x=this.ox;break;case 2:t.y=this.oy;break;default:t.x=this.ox,t.y=this.oy;break}return this.ox=void 0,this.oy=void 0,this}}const xF={effect:0,behavior:1},yF={both:0,"h&v":0,"x&y":0,horizontal:1,h:1,x:1,vertical:2,v:2,y:2},CF={constant:0,decay:1},TF=Phaser.Utils.Objects.IsPlainObject;var SF=function(i,t){t.on("complete",function(){i.emit("shake.complete",i)})};const EF={shake(i,t,s){if(TF(i)){var c=i;i=c.duration,t=c.magnitude,s=c.magnitudeMode}return this._shake===void 0&&(this._shake=new Cv(this,{mode:0,magnitudeMode:1}),SF(this,this._shake)),i!==void 0&&this._shake.setDuration(i),t!==void 0&&this._shake.setMagnitude(t),s!==void 0&&this._shake.setMagnitudeMode(s),this._shake.shake(),this},shakePromise(i,t){return this.shake(i,t),ri(this._shake)}},Rg=Phaser.Utils.Objects.IsPlainObject;class PF extends ke{constructor(t,s){super(t,s),this.parent.setDataEnabled(),this.easeTasks={}}complete(t){this.emit(`complete-${t}
6315`,this.parent,this),this.emit("complete",t,this.parent,this)}getEaseTask(t){var s=this.easeTasks[t];return s===void 0&&(s=new Yr(this.parent),this.easeTasks[t]=s,s.setTarget(this.parent.data.values).on("complete",function(){this.complete(t)},this)),s}easeTo(t,s,c,C){if(Rg(t)){var S=t;t=S.key,s=S.value,c=S.duration,C=S.ease;var l=S.speed;c===void 0&&l!==void 0&&(c=Math.abs(s-this.parent.data.values[t])/l*1e3)}c===void 0&&(c=1e3),C===void 0&&(C="Linear");var T=this.getEaseTask(t);return T.restart({key:t,to:s,duration:c,ease:C}),this}easeFrom(t,s,c,C){if(Rg(t)){var S=t;t=S.key,s=S.value,c=S.duration,C=S.ease;var l=S.speed;c===void 0&&l!==void 0&&(c=Math.abs(s-this.parent.data.values[t])/l*1e3)}c===void 0&&(c=1e3),C===void 0&&(C="Linear");var T=this.getEaseTask(t);return T.restart({key:t,from:s,duration:c,ease:C}),this}stopEase(t,s){s===void 0&&(s=!0);var c=this.easeTasks[t];return c&&c.stop(s),this}stopAll(t){t===void 0&&(t=!0);for(var s in this.easeTasks)this.stopEase(s,t);return this}}var bF=function(i,t){t.on("complete",function(s){i.emit(`easedata.${s}.complete`,i),i.emit("easedata.complete",s,i)})};const MF={easeDataTo(i,t,s,c){return this._easeData||(this._easeData=new PF(this),bF(this,this._easeData)),this._easeData.easeTo(i,t,s,c),this},easeDataToPromise(i,t,s,c){return this.easeDataTo(i,t,s,c),nu(this._easeData,`complete-${i}`)},stopEaseData(i,t){return this._easeData?(this._easeData.stopEase(i,t),this):this},stopAllEaseData(i){return this._easeData?(this._easeData.stopAll(i),this):this}};var Gn=function(i){F1(i,!1)},Nn=function(i){F1(i,!0)},Tv=function(i){if(!i)return!1;var t=hu(i);return!t.hidden},F1=function(i,t){if(i){var s=hu(i);s.hidden=t;var c=as(i);c?c.setChildVisible(i,!t):i.setVisible(!t)}};const wF={show(i){return i===void 0&&(i=this),Gn(i),this},hide(i){return i===void 0&&(i=this),Nn(i),this},isShow(i){return i===void 0&&(i=this),Tv(i)}};var I1={exports:{}};(function(i){var t=Object.prototype.hasOwnProperty,s="~";function c(){}Object.create&&(c.prototype=Object.create(null),new c().__proto__||(s=!1));function C(e,d,g){this.fn=e,this.context=d,this.once=g||!1}function S(e,d,g,r,a){if(typeof g!="function")throw new TypeError("The listener must be a function");var h=new C(g,r||e,a),n=s?s+d:d;return e._events[n]?e._events[n].fn?e._events[n]=[e._events[n],h]:e._events[n].push(h):(e._events[n]=h,e._eventsCount++),e}function l(e,d){--e._eventsCount===0?e._events=new c:delete e._events[d]}function T(){this._events=new c,this._eventsCount=0}T.prototype.eventNames=function(){var d=[],g,r;if(this._eventsCount===0)return d;for(r in g=this._events)t.call(g,r)&&d.push(s?r.slice(1):r);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(g)):d},T.prototype.listeners=function(d){var g=s?s+d:d,r=this._events[g];if(!r)return[];if(r.fn)return[r.fn];for(var a=0,h=r.length,n=new Array(h);a<h;a++)n[a]=r[a].fn;return n},T.prototype.listenerCount=function(d){var g=s?s+d:d,r=this._events[g];return r?r.fn?1:r.length:0},T.prototype.emit=function(d,g,r,a,h,n){var o=s?s+d:d;if(!this._events[o])return!1;var f=this._events[o],u=arguments.length,v,m;if(f.fn){switch(f.once&&this.removeListener(d,f.fn,void 0,!0),u){case 1:return f.fn.call(f.context),!0;case 2:return f.fn.call(f.context,g),!0;case 3:return f.fn.call(f.context,g,r),!0;case 4:return f.fn.call(f.context,g,r,a),!0;case 5:return f.fn.call(f.context,g,r,a,h),!0;case 6:return f.fn.call(f.context,g,r,a,h,n),!0}for(m=1,v=new Array(u-1);m<u;m++)v[m-1]=arguments[m];f.fn.apply(f.context,v)}else{var p=f.length,x;for(m=0;m<p;m++)switch(f[m].once&&this.removeListener(d,f[m].fn,void 0,!0),u){case 1:f[m].fn.call(f[m].context);break;case 2:f[m].fn.call(f[m].context,g);break;case 3:f[m].fn.call(f[m].context,g,r);break;case 4:f[m].fn.call(f[m].context,g,r,a);break;default:if(!v)for(x=1,v=new Array(u-1);x<u;x++)v[x-1]=arguments[x];f[m].fn.apply(f[m].context,v)}}return!0},T.prototype.on=function(d,g,r){return S(this,d,g,r,!1)},T.prototype.once=function(d,g,r){return S(this,d,g,r,!0)},T.prototype.removeListener=function(d,g,r,a){var h=s?s+d:d;if(!this._events[h])return this;if(!g)return l(this,h),this;var n=this._events[h];if(n.fn)n.fn===g&&(!a||n.once)&&(!r||n.context===r)&&l(this,h);else{for(var o=0,f=[],u=n.length;o<u;o++)(n[o].fn!==g||a&&!n[o].once||r&&n[o].context!==r)&&f.push(n[o]);f.length?this._events[h]=f.length===1?f[0]:f:l(this,h)}return this},T.prototype.removeAllListeners=function(d){var g;return d?(g=s?s+d:d,this._events[g]&&l(this,g)):(this._events=new c,this._eventsCount=0),this},T.prototype.off=T.prototype.removeListener,T.prototype.addListener=T.prototype.on,T.prefixed=s,T.EventEmitter=T,i.exports=T})(I1);var AF=I1.exports;const RF=GT(AF);class OF extends RF{shutdown(){this.removeAllListeners()}destroy(){this.removeAllListeners()}}const LF={setEventEmitter(i,t){return t===void 0&&(t=OF),this._privateEE=i===!0||i===void 0,this._eventEmitter=this._privateEE?new t:i,this},destroyEventEmitter(){return this._eventEmitter&&this._privateEE&&this._eventEmitter.shutdown(),this},getEventEmitter(){return this._eventEmitter},on:function(){return this._eventEmitter&&this._eventEmitter.on.apply(this._eventEmitter,arguments),this},once:function(){return this._eventEmitter&&this._eventEmitter.once.apply(this._eventEmitter,arguments),this},off:function(){return this._eventEmitter&&this._eventEmitter.off.apply(this._eventEmitter,arguments),this},emit:function(i){return this._eventEmitter&&i&&this._eventEmitter.emit.apply(this._eventEmitter,arguments),this},addListener:function(){return this._eventEmitter&&this._eventEmitter.addListener.apply(this._eventEmitter,arguments),this},removeListener:function(){return this._eventEmitter&&this._eventEmitter.removeListener.apply(this._eventEmitter,arguments),this},removeAllListeners:function(){return this._eventEmitter&&this._eventEmitter.removeAllListeners.apply(this._eventEmitter,arguments),this},listenerCount:function(){return this._eventEmitter?this._eventEmitter.listenerCount.apply(this._eventEmitter,arguments):0},listeners:function(){return this._eventEmitter?this._eventEmitter.listeners.apply(this._eventEmitter,arguments):[]},eventNames:function(){return this._eventEmitter?this._eventEmitter.eventNames.apply(this._eventEmitter,arguments):[]}},FF=["next","exit","enter"];let D1=class{constructor(t){var s=le(t,"states",void 0);s&&this.addStates(s);var c=le(t,"extend",void 0);if(c)for(var C in c)(!this.hasOwnProperty(C)||this[C]===void 0)&&(this[C]=c[C]);var S=le(t,"eventEmitter",void 0),l=le(t,"EventEmitterClass",void 0);this.setEventEmitter(S,l),this._stateLock=!1,this.resetFromJSON(t)}shutdown(){this.destroyEventEmitter()}destroy(){this.shutdown()}resetFromJSON(t){this.setEnable(le(t,"enable",!0)),this.start(le(t,"start",void 0));var s=le(t,"init",void 0);return s&&s.call(this),this}toJSON(){return{curState:this.state,prevState:this.prevState,enable:this.enable,start:this._start}}setEnable(t){return t===void 0&&(t=!0),this.enable=t,this}toggleEnable(){return this.setEnable(!this.enable),this}set state(t){if(!(!this.enable||this._stateLock)&&this._state!==t){if(this._prevState=this._state,this._state=t,this._stateLock=!0,this.emit
6315("statechange",this),this._prevState!=null){var s="exit_"+this._prevState,c=this[s];c&&c.call(this),this.emit(s,this)}if(this._stateLock=!1,this._state!=null){var C="enter_"+this._state,S=this[C];S&&S.call(this),this.emit(C,this)}}}get state(){return this._state}get prevState(){return this._prevState}start(t){return this._start=t,this._prevState=void 0,this._state=t,this}goto(t){return t!=null&&(this.state=t),this}next(){var t,s=this["next_"+this.state];return s&&(typeof s=="string"?t=s:t=s.call(this)),this.goto(t),this}get stateProperties(){return FF}addState(t,s){typeof t!="string"&&(s=t,t=s.name);for(var c=this.stateProperties,C=0,S=c.length;C<S;C++){var l=c[C],T=s[l];T&&(this[`${l}_${t}`]=T)}return this}addStates(t){if(Array.isArray(t))for(var s=0,c=t.length;s<c;s++)this.addState(t[s]);else for(var C in t)this.addState(C,t[C]);return this}runMethod(t,s,c,C,S,l){var T=this[t+"_"+this.state];if(T){var e=arguments.length;switch(e){case 1:return T.call(this);case 2:return T.call(this,s);case 3:return T.call(this,s,c);case 4:return T.call(this,s,c,C);case 5:return T.call(this,s,c,C,S);case 6:return T.call(this,s,c,C,S,l)}for(var d=new Array(e-1),g=1;g<e;g++)d[g-1]=arguments[g];return T.apply(this,d)}}};Object.assign(D1.prototype,LF);var Gd=function(i,t,s,c,C){C===void 0&&(C=!1);var S=i._events[t];if(!S)return!1;for(var l=0,T=S.length;l<T;l++){var e=S[l];if(e.fn===s&&e.context===c&&e.once===C)return!0}return!1};const IF=["next","exit","enter","update","preupdate","postupdate"];class xn extends D1{shutdown(){this.stopUpdate(),this.stopPreUpdate(),this.stopPostUpdate(),this._scene=void 0,super.shutdown()}resetFromJSON(t){return super.resetFromJSON(t),this._scene=le(t,"scene",void 0),this}get stateProperties(){return IF}update(t,s){this.runMethod("update",t,s)}preupdate(t,s){this.runMethod("preupdate",t,s)}postupdate(t,s){this.runMethod("postupdate",t,s)}startUpdate(t){t||(t=this._scene);var s=t.sys.events;return Gd(s,"update",this.update,this)?this:(this._scene=t,s.on("update",this.update,this),this)}stopUpdate(){return this._scene?(this._scene.sys.events.off("update",this.update,this),this):this}startPreUpdate(t){t||(t=this._scene);var s=t.sys.events;return Gd(s,"preupdate",this.preupdate,this)?this:(this._scene=t,s.on("preupdate",this.preupdate,this),this)}stopPreUpdate(){return this._scene?(this._scene.sys.events.off("preupdate",this.preupdate,this),this):this}startPostUpdate(t){t||(t=this._scene);var s=t.sys.events;return Gd(s,"postupdate",this.postupdate,this)?this:(this._scene=t,s.on("postupdate",this.postupdate,this),this)}stopPostUpdate(){return this._scene?(this._scene.sys.events.off("postupdate",this.postupdate,this),this):this}}let DF=class extends xn{constructor(t,s){super(s),this.parent=t;var c=s.initState||"IDLE";this.start(c)}init(){this.start("IDLE")}next_IDLE(){return"TRANS_OPNE"}next_TRANS_OPNE(){return"OPEN"}enter_TRANS_OPNE(){var t=this.parent;if(t.transitInTime>0){var s=t.runTransitionInCallback();t.delayCall(s,this.next,this)}else this.next()}exit_TRANS_OPNE(){var t=this.parent;t.removeDelayCall()}next_OPEN(){return"TRANS_CLOSE"}enter_OPEN(){var t=this.parent;t.onOpen()}exit_OPEN(){var t=this.parent;t.removeDelayCall()}next_TRANS_CLOSE(){return"CLOSE"}enter_TRANS_CLOSE(){var t=this.parent;if(t.transitOutTime>0){var s=t.runTransitionOutCallback();t.delayCall(s,this.next,this)}else this.next()}exit_TRANS_CLOSE(){var t=this.parent;t.removeDelayCall()}next_CLOSE(){return"TRANS_OPNE"}enter_CLOSE(){var t=this.parent;t.onClose()}exit_CLOSE(){}canOpen(){return this.state==="IDLE"||this.state==="CLOSE"}canClose(){return this.state==="IDLE"||this.state==="OPEN"}};var BF=function(i,t,s,c,C){var S=Ho(i),l=S.time.delayedCall(t,function(){S.game.events.once("poststep",function(){s.call(c,C)})});return l};const kF={delayCall(i,t,s){return this.delayCallTimer=BF(this,i,t,s),this},removeDelayCall(){return this.delayCallTimer&&(this.delayCallTimer.remove(!1),this.delayCallTimer=void 0),this}},GF={setTransitInTime(i){return this.transitInTime=i,this},setTransitOutTime(i){return this.transitOutTime=i,this}
6315,setTransitInCallback(i){return i||(i=ci),this.transitInCallback=i,this},setTransitOutCallback(i){return i||(i=ci),this.transitOutCallback=i,this}},NF={runTransitionInCallback(){return this.transitInCallback(this.parent,this.transitInTime),this.transitInTime},onOpen(){},requestOpen(i,t){if(!this._state.canOpen())return this;this.openEventData=arguments.length>0?i:this.parent;var s=this.transitInTime;return t!==void 0&&(this.transitInTime=t),this._state.goto("TRANS_OPNE"),this.transitInTime=s,this}},VF={runTransitionOutCallback(){return this.transitOutCallback(this.parent,this.transitOutTime),this.transitOutTime},onClose(){this.oneShotMode&&this.parent.destroy()},requestClose(i,t){if(!this._state.canClose)return this;this.closeEventData=arguments.length>0?i:this.parent;var s=this.transitOutTime;return t!==void 0&&(this.transitOutTime=t),this._state.goto("TRANS_CLOSE"),this.transitOutTime=s,this}};var B1={};Object.assign(B1,kF,GF,NF,VF);const ua=Phaser.Utils.Objects.GetValue;class cu extends ke{constructor(t,s){super(t,s),this.setTransitInTime(ua(s,"duration.in",200)),this.setTransitOutTime(ua(s,"duration.out",200)),this.setTransitInCallback(ua(s,"transitIn")),this.setTransitOutCallback(ua(s,"transitOut")),this.oneShotMode=ua(s,"destroy",!1),this.delayCallTimer=void 0,this._state=new DF(this,{eventEmitter:!1,initState:ua(s,"initState","IDLE")}),this.openEventData=void 0,this.closeEventData=void 0}get state(){return this._state.state}shutdown(t){this.isShutdown||(this.transitInCallback=void 0,this.transitOutCallback=void 0,this.openEventData=void 0,this.closeEventData=void 0,this.removeDelayCall(),super.shutdown(t))}}Object.assign(cu.prototype,B1);const zF=Phaser.GameObjects.Rectangle;class Sv extends zF{constructor(t,s,c){super(t,0,0,2,2,s,1),this.setAlpha(c),this.setScrollFactor(0),this.boot()}boot(){var t=this.scene;t.sys.events.on("prerender",this.resize,this)}destroy(t){!this.scene||this.ignoreDestroy||(this.scene.sys.events.off("prerender",this.resize,this),super.destroy(t))}get tint(){return this.fillColor}set tint(t){this.setFillStyle(t,this.fillAlpha)}resize(){var t=this.scene,s=t.sys.scale.gameSize,c=t.sys.cameras.main,C=s.width,S=s.height,l=1/c.zoom,T=C/2,e=S/2,d=C*l,g=S*l;(this.x!==T||this.y!==e)&&this.setPosition(T,e),(this.width!==d||this.height!==g)&&this.setSize(d,g).setOrigin(.5)}}const Nd=Phaser.Utils.Objects.GetValue;class fu extends ke{constructor(t,s){super(t,{eventEmitter:!1}),this.resetFromJSON(s),this.boot()}resetFromJSON(t){return this.setHitAreaMode(Nd(t,"hitAreaMode",0)),this.setEnable(Nd(t,"enable",!0)),this.setStopMode(Nd(t,"stopAllLevels",!0)),this}boot(){this.parent.on("pointerdown",function(t,s,c,C){this.stopAllLevels&&C.stopPropagation()},this).on("pointerup",function(t,s,c,C){this.stopAllLevels&&C.stopPropagation()},this).on("pointermove",function(t,s,c,C){this.stopAllLevels&&C.stopPropagation()},this).on("pointerover",function(t,s,c,C){this.stopAllLevels&&C.stopPropagation()},this).on("pointerout",function(t,s){this.stopAllLevels&&s.stopPropagation()},this)}setHitAreaMode(t){typeof t=="string"&&(t=YF[t]);var s=this.parent;return s.input&&s.removeInteractive(),t===0?s.setInteractive():s.setInteractive({hitArea:{},hitAreaCallback:function(){return!0}}),this}setEnable(t){return t===void 0&&(t=!0),t?this.parent.setInteractive():this.parent.disableInteractive(),this.enable=t,this}setStopMode(t){return t===void 0&&(t=!0),this.stopAllLevels=t,this}toggleEnable(){return this.setEnable(!this.enable),this}}var YF={default:0,fullWindow:1};const Og=Phaser.Utils.Objects.GetValue;class Ev extends Sv{constructor(t,s){var c=Og(s,"color",0),C=Og(s,"alpha",.8);super(t,c,C),this.touchEventStop=new fu(this,{hitAreaMode:1})}}var XF=function(i,t){var s=i.scene,c=new Ev(s,t);return s.add.existing(c),i.isRexContainerLite?(i.pin(c,{syncPosition:!1,syncRotation:!1,syncScale:!1,syncAlpha:!1,syncScrollFactor:!1}),i.moveDepthBelow(c)):s.children.moveBelow(c,i),c};const Wl={popUp(i,t){i._modalScaleSave!==void 0?(i.scaleX=i._modalScaleSave,i.scaleY=i._modalScaleSave):i._modalScaleSave=i.scaleX,xv(i,t)},scaleDown(i,t){R1(i,t,void 0,void 0,!1)}
6315,fadeIn(i,t){i._modalAlphaSave!==void 0?i.alpha=i._modalAlphaSave:i._modalAlphaSave=i.alpha,uu(i,t)},fadeOut(i,t){du(i,t,!1)}};var UF=function(i,t){i._modalAlphaSave!==void 0?i.alpha=i._modalAlphaSave:i._modalAlphaSave=i.alpha,uu(i,t,i.alpha)},WF=function(i,t){du(i,t,!1)},Yo=function(i,t,s,c,C){if(!i||c&&!c(i,t,s))return!1;var S=Xf(i,!0);return!(!S.contains(t,s)||C&&!C(i,t,s))};const Ms=Phaser.Utils.Objects.GetValue;let HF=class extends cu{constructor(t,s){s===void 0&&(s={}),s.transitIn==null&&(s.transitIn=Mn.popUp),s.transitOut==null&&(s.transitOut=Mn.scaleDown),s.destroy=Ms(s,"destroy",!0),super(t,s);var c=Ms(s,"cover");this.cover=c!==!1?XF(t,c):void 0,this.cover&&(this.setCoverTransitInCallback(Ms(c,"transitIn",UF)),this.setCoverTransitOutCallback(Ms(c,"transitOut",WF)));var C=Ms(s,"touchOutsideClose",!1),S=Ms(s,"duration.hold",-1),l=Ms(s,"timeOutClose",S>=0),T=Ms(s,"anyTouchClose",!1),e=Ms(s,"manualClose",!1);e&&(C=!1,T=!1,l=!1),T&&(C=!1),l?this.setDisplayTime(S):this.setDisplayTime(-1),T?this.once("open",this.anyTouchClose,this):C&&this.once("open",this.touchOutsideClose,this),Ms(s,"openOnStart",!0)&&this.delayCall(0,this.requestOpen,this)}shutdown(t){this.isShutdown||(this.cover||this.scene.input.off("pointerup",this.touchCloseCallback,this),this.cover&&!t&&(this.cover.destroy(),this.cover=void 0),super.shutdown(t))}touchOutsideClose(){return this.cover?this.cover.on("pointerup",this.touchCloseCallback,this):this.scene.input.on("pointerup",this.touchCloseCallback,this),this.clickOutsideTest=!0,this}anyTouchClose(){return this.cover?this.cover.once("pointerup",this.touchCloseCallback,this):this.scene.input.once("pointerup",this.touchCloseCallback,this),this}touchCloseCallback(t){this.clickOutsideTest&&Yo(this.parent,t.worldX,t.worldY)||this.requestClose()}runTransitionInCallback(){var t=super.runTransitionInCallback(),s=this.cover;return s&&this.coverTransitInCallback&&this.coverTransitInCallback(s,t),t}runTransitionOutCallback(){var t=super.runTransitionOutCallback(),s=this.cover;return s&&this.coverTransitOutCallback&&this.coverTransitOutCallback(s,t),t}onOpen(){var t=this.displayTime;t>=0&&this.delayCall(t,this.requestClose,this),this.emit("open",this.parent,this),super.onOpen()}onClose(){this.emit("close",this.closeEventData),super.onClose()}setDisplayTime(t){return this.displayTime=t,this}setTransitInCallback(t){switch(typeof t=="string"&&(t=Mn[t]),t){case Mn.popUp:t=Wl.popUp;break;case Mn.fadeIn:t=Wl.fadeIn;break}return super.setTransitInCallback(t),this}setTransitOutCallback(t){switch(typeof t=="string"&&(t=Mn[t]),t){case Mn.scaleDown:t=Wl.scaleDown;break;case Mn.fadeOut:t=Wl.fadeOut;break}return super.setTransitOutCallback(t),this}setCoverTransitInCallback(t){return this.coverTransitInCallback=t,this}setCoverTransitOutCallback(t){return this.coverTransitOutCallback=t,this}};const Mn={popUp:0,fadeIn:1,scaleDown:0,fadeOut:1};var Pv=function(i,t){var s=new HF(i,t);return s.on("open",function(){i.emit("modal.open",s)}),s.on("close",function(c){i.emit("modal.close",c,s)}),i.on("modal.requestClose",s.requestClose,s),s},$F=function(i,t){var s=Pv(i,t);return new Promise(function(c,C){s.once("close",function(S){c(S)})})},k1=function(i,t){i.emit("modal.requestClose",t)},Dr=function(i){return i&&typeof i=="function"};const bv={modal(i,t){return Dr(i)&&(t=i,i=void 0),this._modalBehavior===void 0&&(this.onCreateModalBehavior&&this.onCreateModalBehavior(this,i),this._modalBehavior=Pv(this,i)),t&&this._modalBehavior.once("close",t),this._modalBehavior.requestOpen(),this},modalPromise(i){var t=this;return new Promise(function(s,c){t.modal(i,s)})},modalClose(i){return k1(this,i),this}};var vu=function(i,t,s,c){if(t)return Yo(i,t.worldX,t.worldY,s,c);for(var C=i.scene.input.manager,S=C.pointersTotal,l=C.pointers,T=0;T<S;T++)if(t=l[T],Yo(i,t.worldX,t.worldY,s,c))return!0;return!1},jF=function(i,t){return(mn(i)||typeof i=="string")&&(t=i,i=void 0),t===void 0?t=this:typeof t=="string"&&(t=this.getElement(t)),vu(t,i)},Ts=function(i){return Object.prototype.toString.call(i)==="[object Array]"},cf=function(i,t,s,c,C){return Yo(i,t,s,KF(c),ZF(C))},Lg=function(i){var t=i.rexSizer&&i.rexSizer.hidden;return!t},KF=function(i){return i?function(t,s,c){return Lg(t)?(i(t,s,c),!0):!1}:Lg},ZF=function(i){return i},JF=function(i,t,s,c,C){if(Dr(s)||(C=s,s=void 0,c=void 0),C===void 0&&(this.sizerChildren?C=this.sizerChildren:C=this.children),Ts(C)){for(var S,l=0,T=C.length;l<T;l++)if(S=C[l],cf(S,i,t,s,c))return S}else{var S;for(var e in C)if(S=C[e],cf(S,i,t,s,c))return S}return null},wi=function(i,t,s){!i||t===void 0&&s===void 0||(QF(i)?(t===void 0&&(t=i.width),s===void 0&&(s=i.height),i.resize?i.resize(t,s):i.setSize(t,s)):(t!==void 0&&(i.displayWidth=t),s!==void 0&&(i.displayHeight=s)))},Fg=[Phaser.GameObjects.Image,Phaser.GameObjects.Sprite,Phaser.GameObjects.Mesh,Phaser.GameObjects.Shader,Phaser.GameObjects.Video],QF=function(i){if(i.resize)return!0;
6315if(!i.setSize)return!1;for(var t=0,s=Fg.length;t<s;t++){var c=Fg[t];if(c&&i instanceof c)return!1}return!0},qF=function(i,t){return t===void 0?t={}:t===!0&&(t=_F),t.x=i.x,t.y=i.y,t.scaleX=i.scaleX,t.scaleY=i.scaleY,t.width=i.width,t.height=i.height,t.displayWidth=i.displayWidth,t.displayHeight=i.displayHeight,t},_F={},_o=function(i){this.sizerEventsEnable&&(qF(i,this.getChildPrevState(i)),this.layoutedChildren.push(i))},tl=function(i,t,s,c,C,S,l,T){Zo(i,t,s,c,C,S),l!==void 0&&(i.x+=l),T!==void 0&&(i.y+=T),this.resetChildPositionState(i),this.sizerEventsEnable&&i.emit("sizer.postlayout",i,this)};const tI=Phaser.Display.Align.CENTER;var eI=function(){if(this.backgroundChildren!==void 0)for(var i=this.backgroundChildren,t=this.left,s=this.top,c=this.width,C=this.height,S,l,T,e,d,g,r,a=0,h=i.length;a<h;a++)S=i[a],l=S.rexSizer,!l.hidden&&(T=l.padding,_o.call(this,S),e=t+T.left,d=s+T.top,g=c-T.left-T.right,r=C-T.top-T.bottom,wi(S,g,r),tl.call(this,S,e,d,g,r,tI))};const iI=Phaser.Utils.Objects.IsPlainObject;var sI=function(i,t,s){if(iI(i)){var c=i;i=c.sensor,s=c.target,t=c.draggable}else typeof t!="boolean"&&(s=t,t=void 0);var C=typeof i;if(C==="string"){var S=i;if(i=this.getElement(S),!i)return console.error(`Can get element '${S}'`),this}else(i===void 0||C!="object")&&(t=i,i=this);return t===void 0&&(t=!0),i.input&&i.input._rexUIDragSizer?i.input.draggable=t:t&&(i.setInteractive(),i.scene.input.setDraggable(i),i.on("drag",function(l,T,e){var d=s===void 0?this.getTopmostSizer():s;d.x+=T-i.x,d.y+=e-i.y,d.emit("sizer.drag",l,T,e)},this).on("dragstart",function(l,T,e){var d=s===void 0?this.getTopmostSizer():s;d.emit("sizer.dragstart",l,T,e)},this).on("dragend",function(l,T,e,d){var g=s===void 0?this.getTopmostSizer():s;g.emit("sizer.dragend",l,T,e,d)},this).on("drop",function(l,T){var e=s===void 0?this.getTopmostSizer():s;e.emit("sizer.drop",l,T)}),i.input._rexUIDragSizer=!0),this};const G1={onClick(i,t,s,c){return i?(typeof i=="function"&&(c=s,s=t,t=i,i=this),i._click===void 0&&(i._click=new pn(i,c)),i._click.on("click",t,s),this):this},offClick(i,t,s){return typeof i=="function"&&(s=t,t=i,i=this),i._click===void 0?this:(i._click.off("click",t,s),this)},enableClick(i,t){return i&&typeof i!="object"&&(t=i,i=this),i._click===void 0?this:(i._click.setEnable(t),this)},disableClick(i){return i&&typeof i!="object"&&(i=this),i._click===void 0?this:(i._click.setEnable(!1),this)}},mo=Phaser.Utils.Objects.GetValue;class Mv extends ke{constructor(t,s){super(t,s),this._enable=void 0;var c=mo(s,"inputConfig",void 0);c&&t.setInteractive(c),this.resetFromJSON(s),this.boot()}resetFromJSON(t){return this.pointer=void 0,this.lastClickTime=void 0,this.setEnable(mo(t,"enable",!0)),this.setMode(mo(t,"mode",1)),this.setClickInterval(mo(t,"clickInterval",100)),this.setDragThreshold(mo(t,"threshold",void 0)),this}boot(){var t=this.parent.scene;t.input.on("pointerdown",this.onPress,this),t.input.on("pointerup",this.onRelease,this),t.input.on("pointermove",this.onMove,this)}shutdown(t){if(!this.isShutdown){var s=this.parent.scene;s.input.off("pointerdown",this.onPress,this),s.input.off("pointerup",this.onRelease,this),s.input.off("pointermove",this.onMove,this),this.pointer=null,super.shutdown(t)}}get enable(){return this._enable}set enable(t){if(this._enable!==t){t||this.cancel(),this._enable=t;var s=t?"enable":"disable";this.emit(s,this,this.parent)}}setEnable(t){return t===void 0&&(t=!0),this.enable=t,this}toggleEnable(){return this.setEnable(!this.enable),this}setMode(t){return typeof t=="string"&&(t=nI[t]),this.mode=t,this}setClickInterval(t){return this.clickInterval=t,this}setDragThreshold(t){return this.dragThreshold=t,this}isPointerInside(t){var s=this.parent,c=s.input?$f:vu;return c(s,t)}onPress(t){this.parent.willRender(t.camera)&&this.pointer===void 0&&(this.pointer=t,this.mode===0&&(this.isPointerInside(t)||this.click(t.downTime,t)))}onRelease(t){this.parent.willRender(t.camera)&&this.pointer===t&&(this.mode===1&&(this.isPointerInside(t)||this.click(t.upTime,t)),this.pointer=void 0)}onMove(t,s,c,C){this.pointer===t&&this.dragThreshold!==void 0&&this.mode===1&&(t.getDistance()>=this.dragThreshold||this.isPointerInside(t))&&this.cancel()}click(t,s){if(!this.enable)return this;
6315if(t===void 0)return this.emit("clickoutside",this,this.parent,s),this;this.pointer=void 0;var c=this.lastClickTime;return c!==void 0&&t-c<=this.clickInterval?this:(this.lastClickTime=t,this.emit("clickoutside",this,this.parent,s),this)}cancel(){return this.pointer=void 0,this}}const nI={press:0,pointerdown:0,release:1,pointerup:1},rI={onClickOutside(i,t,s,c){return i?(typeof i=="function"&&(c=s,s=t,t=i,i=this),i._clickOutside===void 0&&(i._clickOutside=new Mv(i,c)),i._clickOutside.on("clickoutside",t,s),this):this},offClickOutside(i,t,s){return typeof i=="function"&&(s=t,t=i,i=this),i._clickOutside===void 0?this:(i._clickOutside.off("clickoutside",t,s),this)},enableClickOutside(i,t){return i&&typeof i!="object"&&(t=i,i=this),i._clickOutside===void 0?this:(i._clickOutside.setEnable(t),this)},disableClickOutside(i){return i&&typeof i!="object"&&(i=this),i._clickOutside===void 0?this:(i._clickOutside.setEnable(!1),this)}};class aI extends xn{constructor(){super({eventEmitter:!1}),this.goto("IDLE")}setCooldownTime(t){return this.cooldownTime=t,this.cooldownMode=t!==void 0,this}request(){return this.runMethod("request")}update_IDLE(){this.compensationTime=0}request_IDLE(){return this.next(),!0}next_IDLE(){if(this.cooldownMode)return"COOLDOWN"}enter_COOLDOWN(){this.remainderTime=this.cooldownTime+this.compensationTime}update_COOLDOWN(t,s){this.remainderTime-=s,this.remainderTime<0&&(this.compensationTime=this.cooldownTime>s?-this.remainderTime:0,this.goto("IDLE"))}request_COOLDOWN(){return!1}}const Vd=Phaser.Utils.Objects.GetValue;class Va extends ke{constructor(t,s){super(t,s),this._enable=void 0,this.cooldown=new aI,this.parent.setInteractive(Vd(s,"inputConfig",void 0)),this.resetFromJSON(s),this.boot()}resetFromJSON(t){return this.pointer=void 0,this.prevIsInTouch=!1,this.isInTouching=!1,this.setEnable(Vd(t,"enable",!0)),this.setCooldown(Vd(t,"cooldown",void 0)),this}boot(){var t=this.parent;t.on("pointerdown",this.onPointIn,this),t.on("pointerover",this.onPointIn,this),t.on("pointerup",this.onPointOut,this),t.on("pointerout",this.onPointOut,this),this.scene.sys.events.on("preupdate",this.preupdate,this)}shutdown(t){this.isShutdown||(this.scene.sys.events.off("preupdate",this.preupdate,this),this.pointer=void 0,super.shutdown(t))}get enable(){return this._enable}set enable(t){if(this._enable!==t)return t||(this.prevIsInTouch=!1,this.isInTouching=!1,this.pointer=void 0),this._enable=t,this}setEnable(t){return t===void 0&&(t=!0),this.enable=t,this}get cooldownTime(){return this.cooldown.cooldownTime}set cooldownTime(t){this.cooldown.setCooldownTime(t)}setCooldown(t){return this.cooldownTime=t,this}toggleEnable(){return this.setEnable(!this.enable),this}onPointIn(t,s,c){!this.enable||!t.isDown||this.pointer!==void 0||(this.pointer=t,this.isInTouching=!0)}onPointOut(t){!this.enable||this.pointer!==t||(this.pointer=void 0,this.isInTouching=!1)}preupdate(t,s){this.cooldown.update(t,s),!this.prevIsInTouch&&this.isInTouching&&this.emit("touchstart",this,this.parent),this.isInTouching&&this.cooldown.request()&&this.emit("intouch",this,this.parent,this.pointer),this.prevIsInTouch&&!this.isInTouching&&this.emit("touchend",this,this.parent),this.prevIsInTouch=this.isInTouching}}const oI={isPointerInBounds(i){return i===void 0?i=this:typeof i=="string"&&(i=this.getElement(i)),i?vu(i):!1},onTouching(i,t,s,c){return i?(typeof i=="function"&&(c=s,s=t,t=i,i=this),i._inTouching===void 0&&(i._inTouching=new Va(i,c)),i._inTouching.on("intouch",t,s),this):this},offTouching(i,t,s){return typeof i=="function"&&(s=t,t=i,i=this),i._inTouching===void 0?this:(i._inTouching.off("intouch",t,s),this)},onTouchingEnd(i,t,s,c){return i?(typeof i=="function"&&(c=s,s=t,t=i,i=this),i._inTouching===void 0&&(i._inTouching=new Va(i,c)),i._inTouching.on("touchend",t,s),this):this},offTouchingEnd(i,t,s){return typeof i=="function"&&(s=t,t=i,i=this),i._inTouching===void 0?this:(i._inTouching.off("touchend",t,s),this)},enableTouching(i,t){return i&&typeof i!="object"&&(t=i,i=this),i._inTouching===void 0?this:(i._inTouching.setEnable(t),this)},disableTouching(i){return i&&typeof i!="object"&&(i=this),i._inTouching===void 0?this:(i._inTouching.setEnable(!1),this)}};var N1=function(i,t,s){for(var c,C=0,S=i.length;C<S;C++)if(c=i[C],!!cf(c,t,s))return c.pointToChild(t,s);return null},Xs=function(i,t,s,c,C,S,l){var T;C===void 0?T=c:T=N1(s,c,C),T&&i.emit(t,T,S,l)};
6315const lI=Phaser.Utils.Objects.GetValue;var hI=function(i){var t=lI(i,"down",void 0);t!==!1&&(t===!0&&(t=void 0),this.on("pointerdown",uI,this))},uI=function(i,t,s,c){var C=this._childrenInteractive;Xs(C.eventEmitter,`${C.eventNamePrefix}down`,C.targetSizers,i.worldX,i.worldY,i,c)};const dI=Phaser.Utils.Objects.GetValue;var cI=function(i){var t=dI(i,"up",void 0);t!==!1&&(t===!0&&(t=void 0),this.on("pointerup",fI,this))},fI=function(i,t,s,c){var C=this._childrenInteractive;Xs(C.eventEmitter,`${C.eventNamePrefix}up`,C.targetSizers,i.worldX,i.worldY,i,c)};const vI=Phaser.Utils.Objects.GetValue;var pI=function(i){var t=vI(i,"over",void 0);t!==!1&&(t===!0&&(t=void 0),this.on("pointermove",Ig,this).on("pointerover",Ig,this).on("pointerout",mI,this))},Ig=function(i,t,s,c){var C=this._childrenInteractive,S=N1(C.targetSizers,i.worldX,i.worldY),l=C.lastOverChild;S&&l&&S===l||(C.lastOverChild=S,Xs(C.eventEmitter,`${C.eventNamePrefix}out`,C.targetSizers,l,void 0,i,c),Xs(C.eventEmitter,`${C.eventNamePrefix}over`,C.targetSizers,S,void 0,i,c))},mI=function(i,t){var s=this._childrenInteractive,c=s.lastOverChild;s.lastOverChild=null,Xs(s.eventEmitter,`${s.eventNamePrefix}out`,s.targetSizers,c,void 0,i,t)};const gI=Phaser.Utils.Objects.GetValue;var xI=function(i){var t=gI(i,"click",void 0);if(t!==!1){t===!0&&(t=void 0),t===void 0&&(t={}),t.hasOwnProperty("threshold")||(t.threshold=10);var s=this._childrenInteractive;this._click=new pn(this,t),this._click.on("click",function(c,C,S,l){Xs(s.eventEmitter,`${s.eventNamePrefix}click`,s.targetSizers,S.worldX,S.worldY,S,l)},this)}};const zd=Phaser.Utils.Objects.GetValue;class pu extends iu{constructor(t,s){var c=Ho(t);c===t&&(t=void 0),super(c,s),this.gameObject=t,t&&t.setInteractive(zd(s,"inputConfig",void 0)),this._enable=void 0,this.resetFromJSON(s),this.boot()}resetFromJSON(t){return this.setEnable(zd(t,"enable",!0)),this.setDetectBounds(),this.gameObject===void 0?this.setDetectBounds(zd(t,"bounds",void 0)):this.setDetectBounds(),this.tracerState=Yd,this.pointer=void 0,this.lastPointer=void 0,this.movedState=!1,this.isTouchingAnyObject=!1,this}boot(){super.boot(),this.gameObject?this.gameObject.on("pointerdown",this.onPointerDown,this):this.scene.input.on("pointerdown",this.onPointerDown,this),this.scene.input.on("pointerup",this.onPointerUp,this),this.scene.input.on("gameout",this.dragCancel,this),this.scene.input.on("pointermove",this.onPointerMove,this),this.scene.sys.events.once("shutdown",this.destroy,this)}shutdown(t){this.scene&&(this.gameObject||this.scene.input.off("pointerdown",this.onPointerDown,this),this.scene.input.off("pointerup",this.onPointerUp,this),this.scene.input.off("gameout",this.dragCancel,this),this.scene.input.off("pointermove",this.onPointerMove,this),this.scene.sys.events.off("shutdown",this.destroy,this),this.gameObject=void 0,this.bounds=void 0,this.pointer=void 0,this.lastPointer=void 0,this.movedState=!1,super.shutdown(t))}get enable(){return this._enable}set enable(t){if(this._enable!==t)return t||this.dragCancel(),this._enable=t,this}setEnable(t){return t===void 0&&(t=!0),this.enable=t,this}setDetectBounds(t){return this.bounds=t,this}toggleEnable(){return this.setEnable(!this.enable),this}onPointerDown(t,s){if(this.enable&&this.pointer===void 0){var c=this.bounds?this.bounds.contains(t.x,t.y):!0;c&&this.pointer!==t&&(this.pointer=t,this.lastPointer=t,this.movedState=!1,this.tracerState=Dg,this.gameObject===void 0&&(this.isTouchingAnyObject=s.length>0),this.onDragStart())}}onPointerUp(t){if(this.enable){var s=this.bounds?this.bounds.contains(t.x,t.y):!0;s&&this.pointer===t&&(this.pointer=void 0,this.movedState=!1,this.tracerState=Yd,this.onDragEnd())}}onPointerMove(t){if(this.enable&&t.isDown){var s=this.bounds?this.bounds.contains(t.x,t.y):!0,c=this.pointer===t;!c&&s||(c&&!s?this.onPointerUp(t):(this.movedState||(this.movedState=t.x!==t.downX||t.y!==t.downY),this.movedState&&this.onDrag()))}}dragCancel(){return this.tracerState===Dg&&this.onDragEnd(),this.pointer=void 0,this.tracerState=Yd,this}onDragStart(){this.emit("dragstart",this)}onDragEnd(){this.emit("dragend",this)}
6315onDrag(){this.emit("drag",this)}preUpdate(t,s){}postUpdate(t,s){}startTicking(){super.startTicking(),this.scene.sys.events.on("preupdate",this.preUpdate,this),this.scene.sys.events.on("postupdate",this.postUpdate,this)}stopTicking(){super.stopTicking(),this.scene&&(this.scene.sys.events.off("preupdate",this.preUpdate,this),this.scene.sys.events.off("postupdate",this.postUpdate,this))}setRecongizedStateObject(t){return this.recongizedState=t,this}get state(){return this.recongizedState.state}set state(t){this.recongizedState.state=t}cancel(){return this.state=yI,this}}const Yd=0,Dg=1,yI="IDLE",Tr=Phaser.Utils.Objects.GetValue,CI=Phaser.Math.Distance.Between;class mu extends pu{constructor(t,s){super(t,s);var c=this,C={states:{IDLE:{enter:function(){c.stop(),c.tapsCount=0,c.x=0,c.y=0,c.worldX=0,c.worldY=0},exit:function(){var S=c.lastPointer;c.x=S.x,c.y=S.y,c.worldX=S.worldX,c.worldY=S.worldY}},BEGIN:{enter:function(){c.start(),c.tapsCount=0,c.emit("tappingstart",c,c.gameObject,c.lastPointer)}},RECOGNIZED:{enter:function(){c.start(),c.emit("tap",c,c.gameObject,c.lastPointer),c.emit(`${c.tapsCount}tap`,c,c.gameObject,c.lastPointer)}}},init:function(){this.state=Sr},eventEmitter:!1};this.setRecongizedStateObject(new xn(C))}resetFromJSON(t){super.resetFromJSON(t),this.setHoldTime(Tr(t,"time",250)),this.setTapInterval(Tr(t,"tapInterval",200)),this.setDragThreshold(Tr(t,"threshold",9)),this.setTapOffset(Tr(t,"tapOffset",10));var s=Tr(t,"taps",void 0);return s!==void 0?this.setTaps(s):(this.setMaxTaps(Tr(t,"maxTaps",void 0)),this.setMinTaps(Tr(t,"minTaps",void 0))),this}onDragStart(){switch(this.state){case Sr:this.state=da;break;case da:var t=this.lastPointer,s=CI(t.upX,t.upY,t.x,t.y);s>this.tapOffset&&(this.state=ca,this.state=da);break;case ca:this.state=da;break}}onDragEnd(){this.state===da&&(this.tapsCount++,this.emit("tapping",this,this.gameObject,this.lastPointer),this.maxTaps!==void 0&&this.tapsCount===this.maxTaps&&(this.state=ca))}onDrag(){this.state!==Sr&&this.pointer.getDistance()>this.dragThreshold&&(this.state=Sr)}preUpdate(t,s){if(!(!this.isRunning||!this.enable)&&this.state===da){var c=this.lastPointer;if(c.isDown){var C=t-c.downTime;C>this.holdTime&&(this.state=Sr)}else{var S=t-c.upTime;S>this.tapInterval&&(this.minTaps===void 0||this.tapsCount>=this.minTaps?this.state=ca:this.state=Sr)}}}postUpdate(t,s){!this.isRunning||!this.enable||this.state===ca&&(this.state=Sr)}get isTapped(){return this.state===ca}setHoldTime(t){return this.holdTime=t,this}setTapInterval(t){return this.tapInterval=t,this}setDragThreshold(t){return this.dragThreshold=t,this}setTapOffset(t){return this.tapOffset=t,this}setMaxTaps(t){return this.maxTaps=t,this}setMinTaps(t){return this.minTaps=t,this}setTaps(t,s){return s===void 0&&(s=t),this.setMinTaps(t).setMaxTaps(s),this}}const Sr="IDLE",da="BEGIN",ca="RECOGNIZED",Bg=Phaser.Utils.Objects.GetValue;class gu extends pu{constructor(t,s){super(t,s);var c=this,C={states:{IDLE:{enter:function(){c.x=0,c.y=0,c.worldX=0,c.worldY=0},exit:function(){var S=c.lastPointer;c.x=S.x,c.y=S.y,c.worldX=S.worldX,c.worldY=S.worldY}},BEGIN:{enter:function(){c.start()},exit:function(){c.stop()}},RECOGNIZED:{enter:function(){c.emit("pressstart",c,c.gameObject,c.lastPointer)},exit:function(){c.emit("pressend",c,c.gameObject,c.lastPointer)}}},init:function(){this.state=Hl},eventEmitter:!1};this.setRecongizedStateObject(new xn(C))}resetFromJSON(t){return super.resetFromJSON(t),this.setDragThreshold(Bg(t,"threshold",9)),this.setHoldTime(Bg(t,"time",251)),this}onDragStart(){this.state=kg,this.holdTime===0&&(this.state=Xd)}onDragEnd(){this.state=Hl}onDrag(){this.state!==Hl&&this.pointer.getDistance()>this.dragThreshold&&(this.state=Hl)}preUpdate(t,s){if(!(!this.isRunning||!this.enable)&&this.state===kg){var c=t-this.pointer.downTime;c>=this.holdTime&&(this.state=Xd)}}get isPressed(){return this.state===Xd}setHoldTime(t){return this.holdTime=t,this}setDragThreshold(t){return this.dragThreshold=t,this}}const Hl="IDLE",kg="BEGIN",Xd="RECOGNIZED",TI=Phaser.Utils.Objects.GetValue;class V1 extends pu{constructor(t,s){super(t,s);var c=this,C={states:{IDLE:{},BEGIN:{enter:function(){var S=c.pointer;c.startX=S.x,c.startY=S.y,c.startWorldX=S.worldX,c.startWorldY=S.worldY}},RECOGNIZED:{enter:function(){c.emit("panstart",c,c.gameObject,c.lastPointer)},exit:function(){var S=c.lastPointer;c.endX=S.x,c.endY=S.y,c.endWorldX=S.worldX,c.endWorldY=S.worldY,c.emit("panend",c,c.gameObject,c.lastPointer)}}},init:function(){this.state=Gg},eventEmitter:!1};this.setRecongizedStateObject(new xn(C))}resetFromJSON(t){return super.resetFromJSON(t),this.setDragThreshold(TI(t,"threshold",10)),this}onDragStart(){this.state=Ng,this.dragThreshold===0&&(this.state=$l)}onDragEnd(){this.state=Gg}onDrag(){switch(this.state){case Ng:this.pointer.getDistance()>=this.dragThreshold&&(this.state=$l);break;case $l:var t=this.pointer.position,s=this.pointer.prevPosition;this.dx=t.x-s.x,this.dy=t.y-s.y;var c=this.pointer;this.x=c.x,this.y=c.y,this.worldX=c.worldX,this.worldY=c.worldY,this.emit
6315("pan",this,this.gameObject,this.lastPointer);break}}get isPanned(){return this.state===$l}setDragThreshold(t){return this.dragThreshold=t,this}}const Gg="IDLE",Ng="BEGIN",$l="RECOGNIZED",SI=Phaser.Math.Distance.Between,EI=Phaser.Math.Angle.Between,PI={getDt:function(){var i=Zf(this.scene);return i},getVelocity:function(){var i=this.pointer.position,t=this.pointer.prevPosition,s=SI(t.x,t.y,i.x,i.y),c=s/(this.getDt()*.001);return c},getVelocityX:function(){var i=this.pointer.position,t=this.pointer.prevPosition,s=Math.abs(i.x-t.x),c=s/(this.getDt()*.001);return c},getVelocityY:function(){var i=this.pointer.position,t=this.pointer.prevPosition,s=Math.abs(i.y-t.y),c=s/(this.getDt()*.001);return c},getVelocityAngle:function(){var i=this.pointer.position,t=this.pointer.prevPosition,s=EI(t.x,t.y,i.x,i.y);return s}},bI={"up&down":0,"left&right":1,"4dir":2,"8dir":3};var MI=function(i,t,s){switch(s===void 0?s={}:s===!0&&(s=wI),s.left=!1,s.right=!1,s.up=!1,s.down=!1,i=(i+360)%360,t){case 0:i<180?s.down=!0:s.up=!0;break;case 1:i>90&&i<=270?s.left=!0:s.right=!0;break;case 2:i>45&&i<=135?s.down=!0:i>135&&i<=225?s.left=!0:i>225&&i<=315?s.up=!0:s.right=!0;break;case 3:i>22.5&&i<=67.5?(s.down=!0,s.right=!0):i>67.5&&i<=112.5?s.down=!0:i>112.5&&i<=157.5?(s.down=!0,s.left=!0):i>157.5&&i<=202.5?s.left=!0:i>202.5&&i<=247.5?(s.left=!0,s.up=!0):i>247.5&&i<=292.5?s.up=!0:(i>292.5&&i<=337.5&&(s.up=!0),s.right=!0);break}return s},wI={};const Ud=Phaser.Utils.Objects.GetValue,AI=Phaser.Math.RadToDeg;class el extends pu{constructor(t,s){super(t,s);var c=this,C={states:{IDLE:{enter:function(){c.x=0,c.y=0,c.worldX=0,c.worldY=0},exit:function(){var S=c.lastPointer;c.x=S.x,c.y=S.y,c.worldX=S.worldX,c.worldY=S.worldY}},BEGIN:{enter:function(){c.validDrag=!1}},RECOGNIZED:{enter:function(){c.start(),c.updateDirectionStates(),c.emit("swipe",c,c.gameObject,c.lastPointer)},exit:function(){c.stop(),c.clearDirectionStates()}}},init:function(){this.state=Wd},eventEmitter:!1};this.setRecongizedStateObject(new xn(C)),this.clearDirectionStates()}resetFromJSON(t){return super.resetFromJSON(t),this.setDragThreshold(Ud(t,"threshold",10)),this.setVelocityThreshold(Ud(t,"velocityThreshold",1e3)),this.setDirectionMode(Ud(t,"dir","8dir")),this}onDragStart(){this.state=Vg}onDragEnd(){this.state=Wd}onDrag(){this.state===Vg&&(this.validDrag||(this.validDrag=this.dragThreshold===0||this.pointer.getDistance()>=this.dragThreshold),this.validDrag&&this.dragVelocity>this.velocityThreshold&&(this.state=Hd))}postUpdate(t,s){!this.isRunning||!this.enable||this.state===Hd&&(this.state=Wd)}get isSwiped(){return this.state===Hd}get dragVelocity(){var t;switch(this.dirMode){case 0:t=this.getVelocityY();break;case 1:t=this.getVelocityX();break;default:t=this.getVelocity();break}return t}setDragThreshold(t){return this.dragThreshold=t,this}setVelocityThreshold(t){return this.velocityThreshold=t,this}setDirectionMode(t){return typeof t=="string"&&(t=bI[t]),this.dirMode=t,this}updateDirectionStates(){var t=AI(this.getVelocityAngle());return MI(t,this.dirMode,this),this}clearDirectionStates(){return this.left=!1,this.right=!1,this.up=!1,this.down=!1,this}}Object.assign(el.prototype,PI);const Wd="IDLE",Vg="BEGIN",Hd="RECOGNIZED",$d=Phaser.Utils.Objects.GetValue,RI=Phaser.Utils.Array.SpliceOne,OI=Phaser.Math.Distance.Between,LI=Phaser.Math.Angle.Between;class wv{constructor(t,s){var c=t.input.manager.pointersTotal-1;c<2&&t.input.addPointer(2-c),this.scene=t,this.setEventEmitter($d(s,"eventEmitter",void 0)),this._enable=void 0,this.pointers=[],this.movedState={},this.resetFromJSON(s),this.boot()}resetFromJSON(t){return this.setEnable($d(t,"enable",!0)),this.bounds=$d(t,"bounds",void 0),this.tracerState=jl,this.pointers.length=0,un(this.movedState),this}boot(){this.scene.input.on("pointerdown",this.onPointerDown,this),this.scene.input.on("pointerup",this.onPointerUp,this),this.scene.input.on("gameout",this.dragCancel,this),this.scene.input.on("pointermove",this.onPointerMove,this),this.scene.sys.events.once("shutdown",this.destroy,this)}shutdown(){this.scene&&(this.destroyEventEmitter(),this.pointers.length=0,un(this.movedState),this.scene.input.off("pointerdown",this.onPointerDown,this),this.scene.input.off("pointerup",this.onPointerUp,this),this.scene.input.off("gameout",this.dragCancel,this),this.scene.input.off("pointermove",this.onPointerMove,this),this.scene.sys.events.off("shutdown",this.destroy,this),this.scene=void 0)}destroy(){this.shutdown()}get enable(){return this._enable}set enable(t){if(this._enable!==t)return t||this.dragCancel(),this._enable=t,this}setEnable(t){return t===void 0&&(t=!0),this.enable=t,this}toggleEnable(){return this.setEnable(!this.enable),this}onPointerDown(t){if(this.enable&&this.pointers.length!==2){var s=this.bounds?this.bounds.contains(t.x,t.y):!0;if(s){var c=this.pointers.indexOf(t);if(c===-1)switch(this.movedState[t.id]=!1,this.pointers.push(t),this.tracerState){case jl:this.tracerState=xo,this.onDrag1Start();break;case xo:this.tracerState=ws,this.onDrag2Start();break}}}}onPointerUp(t){if(this.enable){var s=this.bounds?this.bounds.contains(t.x,t.y):!0;if(s){var c=this.pointers.indexOf(t);if(c!==-1)switch(delete this.movedState[t.id],RI(this.pointers,c),this.tracerState){case xo:this.tracerState=jl,this.onDrag1End();break;case ws:this.tracerState=xo,this.onDrag2End(),this.onDrag1Start();break}}}}onPointerMove(t){if(this.enable&&t.isDown){var s=this.bounds?this.bounds.contains(t.x,t.y):!0,c=this.pointers.indexOf(t)!==-1;if(!(!c&&s)){if(c&&!s)this.onPointerUp(t);else if(this.movedState[t.id]||(this.movedState[t.id]=t.x!==t.downX||t.y!==t.downY),this.movedState[t.id])switch(this.tracerState){case xo:this.onDrag1();break;case ws:this.onDrag2();break}}}}dragCancel(){return this.tracerState===ws&&this.onDrag2End(),this.pointers.length=0,un(this.movedState),this.tracerState=jl,this}
6315onDrag1Start(){this.emit("drag1start",this)}onDrag1End(){this.emit("drag1end",this)}onDrag1(){this.emit("drag1",this)}onDrag2Start(){this.emit("drag2start",this)}onDrag2End(){this.emit("drag2end",this)}onDrag2(){this.emit("drag2",this)}get distanceBetween(){if(this.tracerState!==ws)return 0;var t=this.pointers[0],s=this.pointers[1];return OI(t.x,t.y,s.x,s.y)}get angleBetween(){if(this.tracerState!==ws)return 0;var t=this.pointers[0],s=this.pointers[1];return LI(t.x,t.y,s.x,s.y)}get drag1Vector(){var t=this.pointers[0];if(t&&this.movedState[t.id]){var s=t.position,c=t.prevPosition;go.x=s.x-c.x,go.y=s.y-c.y}else go.x=0,go.y=0;return go}get centerX(){if(this.tracerState!==ws)return 0;var t=this.pointers[0].position,s=this.pointers[1].position;return(t.x+s.x)/2}get centerY(){if(this.tracerState!==ws)return 0;var t=this.pointers[0].position,s=this.pointers[1].position;return(t.y+s.y)/2}get prevCenterX(){if(this.tracerState!==ws)return 0;var t=this.movedState[this.pointers[0].id]?this.pointers[0].prevPosition:this.pointers[0].position,s=this.movedState[this.pointers[1].id]?this.pointers[1].prevPosition:this.pointers[1].position;return(t.x+s.x)/2}get prevCenterY(){if(this.tracerState!==ws)return 0;var t=this.movedState[this.pointers[0].id]?this.pointers[0].prevPosition:this.pointers[0].position,s=this.movedState[this.pointers[1].id]?this.pointers[1].prevPosition:this.pointers[1].position;return(t.y+s.y)/2}get movementCenterX(){return this.centerX-this.prevCenterX}get movementCenterY(){return this.centerY-this.prevCenterY}setRecongizedStateObject(t){return this.recongizedState=t,this}get state(){return this.recongizedState.state}set state(t){this.recongizedState.state=t}cancel(){return this.state=FI,this}}Object.assign(wv.prototype,Wa);var go={};const jl=0,xo=1,ws=2,FI="IDLE",II=Phaser.Utils.Objects.GetValue;class z1 extends wv{constructor(t,s){super(t,s);var c=this,C={states:{IDLE:{enter:function(){c.prevDistance=void 0,c.scaleFactor=1}},BEGIN:{},RECOGNIZED:{enter:function(){c.emit("pinchstart",c)},exit:function(){c.emit("pinchend",c)}}},init:function(){this.state=zg},eventEmitter:!1};this.setRecongizedStateObject(new xn(C))}resetFromJSON(t){return super.resetFromJSON(t),this.setDragThreshold(II(t,"threshold",0)),this}onDrag2Start(){this.scaleFactor=1,this.prevDistance=this.distanceBetween,this.state=Yg,this.dragThreshold===0&&(this.state=Kl)}onDrag2End(){this.state=zg}onDrag2(){switch(this.state){case Yg:if(this.pointers[0].getDistance()>=this.dragThreshold&&this.pointers[1].getDistance()>=this.dragThreshold){var t=this.distanceBetween;this.scaleFactor=t/this.prevDistance,this.prevDistance=t,this.state=Kl}break;case Kl:var t=this.distanceBetween;this.scaleFactor=t/this.prevDistance,this.emit("pinch",this),this.prevDistance=t;break}}get isPinched(){return this.state===Kl}setDragThreshold(t){return this.dragThreshold=t,this}}const zg="IDLE",Yg="BEGIN",Kl="RECOGNIZED",DI=Phaser.Math.RotateAround;var Xg=function(i,t,s,c){return DI(i,t,s,c),i.rotation+=c,i},BI=function(i,t,s,c){return c===void 0?c={}:c===!0&&(c=kI),s.getWorldPoint(i,t,c),c},kI={},GI=function(i,t){if(!this.isRotation)return this;t===void 0&&(t=this.pointers[0].camera);var s=this.movementCenterX,c=this.movementCenterY,C=BI(this.centerX,this.centerY,t,!0),S=C.x,l=C.y,T=this.rotation;if(Array.isArray(i))for(var e=i,d=0,g=e.length;d<g;d++)i=e[d],i.x+=s,i.y+=c,Xg(i,S,l,T);else i.x+=s,i.y+=c,Xg(i,S,l,T);return this};const NI=Phaser.Utils.Objects.GetValue,jd=Phaser.Math.Angle.WrapDegrees,Ug=Phaser.Math.Angle.ShortestBetween,Kd=Phaser.Math.RadToDeg,VI=Phaser.Math.DegToRad;class Av extends wv{constructor(t,s){super(t,s);var c=this,C={states:{IDLE:{enter:function(){c.prevAngle=void 0,c.angle=0}},BEGIN:{},RECOGNIZED:{enter:function(){c.emit("rotatestart",c)},exit:function(){c.emit("rotateend",c)}}},init:function(){this.state=Wg},eventEmitter:!1};this.setRecongizedStateObject(new xn(C))}resetFromJSON(t){return super.resetFromJSON(t),this.setDragThreshold(NI(t,"threshold",0)),this}onDrag2Start(){this.prevAngle=jd(Kd(this.angleBetween)),this.state=Hg,this.dragThreshold===0&&(this.state=Zl)}onDrag2End(){this.state=Wg}onDrag2(){switch(this.state){case Hg:if(this.pointers[0].getDistance()>=this.dragThreshold&&this.pointers[1].getDistance()>=this.dragThreshold){var t=jd(Kd(this.angleBetween));this.angle=Ug(this.prevAngle,t),this.prevAngle=t,this.state=Zl}break;case Zl:var t=jd(Kd(this.angleBetween));
6315this.angle=Ug(this.prevAngle,t),this.prevAngle=t,this.emit("rotate",this);break}}get isRotated(){return this.state===Zl}get rotation(){return VI(this.angle)}setDragThreshold(t){return this.dragThreshold=t,this}}var zI={spinObject:GI};Object.assign(Av.prototype,zI);const Wg="IDLE",Hg="BEGIN",Zl="RECOGNIZED",YI=Phaser.Utils.Objects.GetValue;var XI=function(i){var t=YI(i,"tap",void 0);if(t!==!1){t===!0&&(t=void 0);var s=this._childrenInteractive;this._tap=new mu(this,t),this._tap.on("tap",function(c,C,S){Xs(s.eventEmitter,`${s.eventNamePrefix}${c.tapsCount}tap`,s.targetSizers,c.worldX,c.worldY,S)},this)}};const UI=Phaser.Utils.Objects.GetValue;var WI=function(i){var t=UI(i,"press",void 0);if(t!==!1){t===!0&&(t=void 0);var s=this._childrenInteractive;this._press=new gu(this,t),this._press.on("pressstart",function(c,C,S){Xs(s.eventEmitter,`${s.eventNamePrefix}pressstart`,s.targetSizers,c.worldX,c.worldY,S)},this).on("pressend",function(c,C,S){Xs(s.eventEmitter,`${s.eventNamePrefix}pressend`,s.targetSizers,c.worldX,c.worldY,S)},this)}};const HI=Phaser.Utils.Objects.GetValue;var $I=function(i){var t=HI(i,"swipe",void 0);if(t!==!1){t===!0&&(t=void 0),t===void 0&&(t={}),t.hasOwnProperty("dir")||(t.dir="4dir");var s=this._childrenInteractive;this._swipe=new el(this,t),this._swipe.on("swipe",function(c,C,S){var l=c.left?"left":c.right?"right":c.up?"up":"down";Xs(s.eventEmitter,`${s.eventNamePrefix}swipe${l}`,s.targetSizers,c.worldX,c.worldY,S)},this)}};const Jl=Phaser.Utils.Objects.GetValue;var Rv=function(i,t){return i.setInteractive(),Jl(t,"dropZone",!1)&&(i.input.dropZone=!0),i._childrenInteractive={targetSizers:Jl(t,"targets",[i]),eventEmitter:Jl(t,"eventEmitter",i),eventNamePrefix:Jl(t,"inputEventPrefix","child.")},hI.call(i,t),cI.call(i,t),pI.call(i,t),xI.call(i,t),XI.call(i,t),WI.call(i,t),$I.call(i,t),i},jI=function(i){return Rv(this,i),this},KI=function(){for(var i=this.getAllChildren([this]),t=0,s=i.length;t<s;t++){var c=i[t];c.emit.apply(c,arguments)}return this},Y1={getSizerConfig:p4,getChildPrevState:m4,pushIntoBounds:g4,drawBounds:R4,resolveWidth:pv,resolveChildrenWidth:W4,resolveHeight:mv,postResolveSize:H4,getChildWidth:$4,getChildHeight:j4,getExpandedChildWidth:K4,getExpandedChildHeight:Z4,getChildrenWidth:J4,getChildrenHeight:Q4,addChildrenMap:Cg,addElement:Cg,removeChildrenMap:V4,getElement:z4,getChildIndex:X4,getAllChildrenSizers:q4,getChildrenSizers:_4,preLayout:qo,layout:eF,runLayout:iF,layoutChildren:sF,runWidthWrap:A1,layoutBackgrounds:eI,postLayout:rF,_postLayout:nF,setAnchor:aF,isInTouching:jF,pointToChild:JF,setDraggable:sI,setChildrenInteractive:jI,broadcastEvent:KI};Object.assign(Y1,U4,F4,N4,ja,yv,vF,gF,EF,MF,G1,rI,oI,wF,bv,tF);const fa=Phaser.Utils.Objects.GetValue;class Wr extends Ui{constructor(t,s,c,C,S,l){super(t,s,c,1,1),this.isRexSizer=!0,this.setMinSize(C,S),this.setName(fa(l,"name","")),this.rexSizer={},this.space={},this.backgroundChildren=void 0,this.sizerChildren=void 0,this.childrenMap={},this.layoutedChildren=void 0,this.enableLayoutWarn();var T=fa(l,"anchor",void 0);T&&this.setAnchor(T),this.setInnerPadding(fa(l,"space",0));var e=fa(l,"draggable",!1);e&&this.setDraggable(e),this.setSizerEventsEnable(fa(l,"sizerEvents",!1)),this.setDirty(!0),fa(l,"enableLayer",!1)&&this.enableLayer()}destroy(t){if(!(!this.scene||this.ignoreDestroy)){if(t)for(var s=this.getAllChildrenSizers([this]),c=0,C=s.length;c<C;c++)s[c].sizerEventsEnable=!1;super.destroy(t),un(this.backgroundChildren),un(this.sizerChildren),this.childrenMap=void 0,this.space=void 0,this.rexSizer=void 0,this.layoutedChildren=void 0}}setMinSize(t,s){return this.setMinWidth(t).setMinHeight(s),this}setMinWidth(t){return t==null&&(t=0),this.minWidth=t,this}setMinHeight(t){return t==null&&(t=0),this.minHeight=t,this}setDirty(t){return t===void 0&&(t=!0),this.dirty=t,this}setSizerEventsEnable(t){return t===void 0&&(t=!0),this.sizerEventsEnable=t,this}enableLayoutWarn(t){return t===void 0&&(t=!0),this.layoutWarnEnable=t,this}get ignoreLayout(){return this.rexSizer.hidden||!this.dirty}get childrenWidth(){return this._childrenWidth===void 0&&(this._childrenWidth=this.getChildrenWidth()),this._childrenWidth}get childrenHeight(){return this._childrenHeight===void 0&&(this._childrenHeight=this.getChildrenHeight()),this._childrenHeight}get left(){return this.x-de(this)*this.originX}set left(t){this.x+=t-this.left}alignLeft(t){return this.left=t,this}get right(){return this.left+de(this)}set right(t){this.x+=t-this.right}alignRight(t){return this.right=t,this}get centerX(){return this.left+de(this)/2}set centerX(t){this.x+=t-this.centerX}alignCenterX(t){return this.centerX=t,this}get top(){return this.y-ie(this)*this.originY}set top(t){this.y+=t-this.top}alignTop(t){return this.top=t,this}get bottom(){return this.top+ie(this)}set bottom(t){this.y+=t-this.bottom}alignBottom(t){return this.bottom=t,this}get centerY(){return this.top+ie(this)/2}set centerY(t){this.y+=t-this.centerY}alignCenterY(t){return this.centerY=t,this}get innerLeft(){return this.left+this.space.left*this.scaleX}get innerRight(){return this.right-this.space.right*this.scaleX}get innerTop(){return this.top+this.space.top*this.scaleY}get innerBottom(){return this.bottom-this.space.bottom*this.scaleY}get innerWidth(){return(this.width-this.space.left-this.space.right)*this.scaleX}get innerHeight(){return(this.height-this.space.top-this.space.bottom)*this.scaleY}get minInnerWidth(){var t=(this.minWidth-this.space.left-this.space.right)*this.scaleX;return Math.max(t,0)}get minInnerHeight(){var t=(this.minHeight-this.space.top-this.space.bottom)*this.scaleY;return Math.max(t,0)}}Object.assign(Wr.prototype,Y1);var ZI=function(){if(this.rexSizer.hidden)return 0;var i=0,t=this.sizerChildren,s,c,C;for(var S in t)s=t[S],c=s.rexSizer.padding,C=this.getChildWidth(s)+c.left+c.right,i=Math.max(C,i);return i+this.space.left+this.space.right},JI=function(){if(this.rexSizer.hidden)return 0;var i=0,t=this.sizerChildren,s,c,C;for(var S in t)s=t[S],C=s.isRexSizer?Math.max(s.minHeight,s.childrenHeight):s.minHeight!==void 0?s.minHeight:ie(s),c=s.rexSizer.padding,C+=c.top+c.bottom,i=Math.max(C,i);return i+this.space.top+this.space.bottom},QI=function(i,t){t===void 0&&(t=this.width);var s,c=i.rexSizer;if(c.expandWidth){var C=t-this.space.left-this.space.right,S=c.padding;s=C-S.left-S.right}return s},qI=function(i,t){t===void 0&&(t=this.height);var s,c=i.rexSizer;if(c.expandHeight){var C=t-this.space.top-this.space.bottom,S=c.padding;s=C-S.top-S.bottom}return s},_I=function(i){i===void 0&&(i=[]);var t=this.sizerChildren,s;for(var c in t)s=t[c],s.isRexSizer&&i.push(s);return i},Ov=function(i,t){i.width<i.childrenWidth&&console.warn(`Layout width error: Parent=${t.constructor.name}, Child=${i.constructor.name}`),i.height<i.childrenHeight&&console.warn(`Layout height error: Parent=${t.constructor.name}, Child=${i.constructor.name}`)},tD=function(){var i,t,s,c=this.innerLeft,C=this.innerTop,S=this.innerWidth,l=this.innerHeight,T,e,d,g,r,a,h=this.sizerChildren;for(var n in h)i=h[n],!i.rexSizer.hidden&&(t=i.rexSizer,s=t.padding,_o.call(this,i),i.isRexSizer?(i.runLayout(this,this.getExpandedChildWidth(i),this.getExpandedChildHeight(i)),Ov(i,this)):(r=void 0,a=void 0,t.expandWidth&&(r=S-s.left-s.right),t.expandHeight&&(a=l-s.top-s.bottom),wi(i,r,a)),T=c+s.left,d=S-s.left-s.right,e=C+s.top,g=l-s.top-s.bottom,tl.call(this,i,T,e,d,g,t.align,t.alignOffsetX,t.alignOffsetY))};
6315const $g=Phaser.Utils.Objects.IsPlainObject,As=Phaser.Utils.Objects.GetValue,jg=Phaser.Display.Align.CENTER,eD=Phaser.Utils.String.UUID;var iD=function(i,t,s,c,C,S,l,T,e){if(Jo.call(this,i),$g(t)){var g=t;t=As(g,"key",void 0),s=As(g,"align",jg),T=As(g,"offsetX",0),e=As(g,"offsetY",0),c=As(g,"padding",0),C=As(g,"expand",!0),i.isRexSizer||(S=As(g,"minWidth",i._minWidth),l=As(g,"minHeight",i._minHeighted))}var d=t!==void 0;d||(t=eD()),typeof s=="string"&&(s=$a[s]),s===void 0&&(s=jg),T===void 0&&(T=0),e===void 0&&(e=0),c===void 0&&(c=0),C===void 0&&(C=!0),i.isRexSizer||(S===void 0&&(S=i._minWidth),l===void 0&&(l=i._minHeight));var g=this.getSizerConfig(i);return g.align=s,g.alignOffsetX=T,g.alignOffsetY=e,g.padding=Jn(c),$g(C)?(g.expandWidth=As(C,"width",!1),g.expandHeight=As(C,"height",!1)):(g.expandWidth=C,g.expandHeight=C),i.isRexSizer||(g.expandWidth&&(i.minWidth=S===void 0?de(i):S),g.expandHeight&&(i.minHeight=l===void 0?ie(i):l)),this.sizerChildren.hasOwnProperty(t)&&this.sizerChildren[t].destroy(),this.sizerChildren[t]=i,d&&this.addChildrenMap(t,i),this};const sD={add:iD},nD=Ui.prototype.clear;var xu=function(i){this.backgroundChildren&&(this.backgroundChildren.length=0);var t=!i&&this.sizerEventsEnable,s;if(t&&(s=this.getChildren([])),nD.call(this,i),t)for(var c,C=0,S=s.length;C<S;C++)c=s[C],c.emit("sizer.remove",c,this),this.emit("remove",c,this);return this};const rD={remove(i,t){var s;if(typeof i=="string"){if(s=i,i=this.sizerChildren[s],!i)return this}else{if(this.getParentSizer(i)!==this)return this;s=this.childToKey(i)}return s&&(delete this.sizerChildren[s],this.childrenMap.hasOwnProperty(s)&&delete this.childrenMap[s]),Qo.call(this,i,t),this},removeAll(i){for(var t in this.sizerChildren)this.remove(t,i);return this},clear(i){for(var t in this.sizerChildren)delete this.sizerChildren[t],this.childrenMap.hasOwnProperty(t)&&delete this.childrenMap[t];return xu.call(this,i),this}};var X1={getChildrenWidth:ZI,getChildrenHeight:JI,getExpandedChildWidth:QI,getExpandedChildHeight:qI,getChildrenSizers:_I,layoutChildren:tD};Object.assign(X1,sD,rD);var yu=function(i,t){if(Array.isArray(i))return i.indexOf(t);for(var s in i)if(i[s]===t)return s;return null};const Kg=Phaser.Utils.Objects.IsPlainObject,va=Phaser.Utils.Objects.GetValue;class hs extends Wr{constructor(t,s,c,C,S,l){Kg(s)?(l=s,s=va(l,"x",0),c=va(l,"y",0),C=va(l,"width",void 0),S=va(l,"height",void 0)):Kg(C)&&(l=C,C=va(l,"width",void 0),S=va(l,"height",void 0)),super(t,s,c,C,S,l),this.type="rexOverlapSizer",this.sizerChildren={},this.addChildrenMap("items",this.sizerChildren)}childToKey(t){if(typeof t=="string"){var s=t;if(this.sizerChildren.hasOwnPropery(s))return s}else return yu(this.sizerChildren,t);return null}}Object.assign(hs.prototype,X1);var aD=Phaser.Math.Distance.Between,Nh=function(i,t,s){var c=i.width/2;return aD(c,c,t,s)<=c};const oD=Phaser.Math.Angle.Between,lD=Phaser.Math.Angle.Normalize;var Zg=function(i,t,s){if(this.enable&&i.isDown){var c=this.sizerChildren.knob;if(Nh(c,t,s)){var C=c.width/2,S=c.startAngle,l=oD(C,C,t,s),T=c.anticlockwise?S-l:l-S,e=lD(T)/(2*Math.PI);this.stopEaseValue(),this.easeValueDuration===0||Math.abs(this.value-e)<.1?this.value=e:this.easeValueTo(e)}}},hD=function(){var i=this.sizerChildren.knob;i.on("pointerdown",Zg,this).on("pointermove",Zg,this).setInteractive()};const Jg=Phaser.Math.Angle.Between,uD=Phaser.Math.Angle.Wrap;var dD=function(i,t,s){if(!(!this.enable||this.panPointer)){var c=this.sizerChildren.knob;Nh(c,t,s)&&U1.call(this,i)}},cD=function(i,t,s){if(this.enable&&i.isDown){var c=this.sizerChildren.knob;switch(this.panState){case Lv:Nh(c,t,s)&&U1.call(this,i);break;case H1:Nh(c,t,s)?vD.call(this):W1.call(this);break}}},fD=function(i,t,s){!this.enable||this.panPointer!==i||W1.call(this)},U1=function(i){this.panPointer=i,this.panState=H1},W1=function(){this.panPointer=void 0,this.panState=Lv},vD=function(){var i=this.panPointer.prevPosition,t=this.panPointer.position,s=this.sizerChildren.knob,c=Jg(s.x,s.y,i.x,i.y),C=Jg(s.x,s.y,t.x,t.y),S=s.anticlockwise?c-C:C-c,l=uD(S)/(Math.PI*2);this.stopEaseValue(),this.value+=l};const Lv=0,H1=1;var pD=function(){var i=this.sizerChildren.knob;i.on("pointerdown",dD,this).on("pointermove",cD,this).on("pointerup",fD,this).setInteractive(),this.panPointer=void 0,this.panState=Lv},mD=function(i,t){return this.textFormatCallback=i,this.textFormatCallbackScope=t,this},$1=function(i){i===void 0&&(i=this.value);var t;return this.textFormatCallbackScope?t=this.textFormatCallback(i):t=this.textFormatCallback.call(this.textFormatCallbackScope,i
6315),t},gD=function(i){var t=this.sizerChildren.text;return t&&this.textFormatCallback&&(t.setText($1.call(this,i)),t.layout&&t.layout()),this};const xD={setTextFormatCallback:mD,getFormatText:$1,updateText:gD},us=Phaser.Utils.Objects.GetValue,yD=Phaser.Math.Snap.To;class Fv extends Ur(hs){constructor(t,s){s===void 0&&(s={}),super(t,s),this.type="rexKnob",this.bootProgressBase(s);var c=us(s,"background",void 0),C=us(s,"text",void 0);c&&this.addBackground(c),C&&(s.textColor=void 0,s.textStrokeColor=void 0,this.setTextFormatCallback(us(s,"textFormatCallback",void 0),us(s,"textFormatCallbackScope",void 0)));var S=new ou(t,s);S.setDepth(us(s,"knobDepth",0)),S._value=-1,t.add.existing(S),this.add(S,"knob"),C&&(this.add(C,"text","center",0,!1),t.children.moveBelow(S,C)),this.addChildrenMap("background",c),this.addChildrenMap("knob",S),this.addChildrenMap("text",C),this.setEnable(us(s,"enable",void 0)),this.setGap(us(s,"gap",void 0)),this.setValue(us(s,"value",0),us(s,"min",void 0),us(s,"max",void 0));var l=us(s,"input",0);switch(typeof l=="string"&&(l=CD[l]),l){case 0:pD.call(this);break;case 1:hD.call(this);break}}setEnable(t){return t===void 0&&(t=!0),this.enable=t,this}setGap(t){return this.gap=t,this}get value(){return this.sizerChildren.knob.value}set value(t){this.gap!==void 0&&(t=yD(t,this.gap));var s=this.value;this.sizerChildren.knob.value=t;var c=this.value;s!==c&&(this.updateText(),this.eventEmitter.emit("valuechange",c,s,this.eventEmitter))}}const CD={pan:0,drag:0,click:1,none:-1};Object.assign(Fv.prototype,xD);xt.register("knob",function(i){var t=new Fv(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.Knob",Fv);const TD={arc:Jf,circle:u1,curve:l5,ellipse:h5,line:u5,lines:Hn,rectangle:L5,roundRectangle:Bh,triangle:I5},Qg=Phaser.Utils.Objects.GetValue,SD=Phaser.Utils.Objects.IsPlainObject,ED=function(){for(var i=this.getShapes(),t=0,s=i.length;t<s;t++)i[t].lineStyle().fillStyle()},PD={createShape(i,t){var s=TD[i],c=new s;return t&&c.setName(t),c},buildShapes(i){var t=Qg(i,"create",void 0);if(SD(t)){var s=t;for(var c in s){var C=s[c];switch(typeof C){case"number":for(var S=0;S<C;S++)this.addShape(this.createShape(c));break;case"string":this.addShape(this.createShape(c,C));break;default:for(var l=C,S=0,T=l.length;S<T;S++)this.addShape(this.createShape(c,l[S]));break}}}else if(Array.isArray(t))for(var s=t,S=0,T=s.length;S<T;S++){var e=s[S];this.addShape(this.createShape(e.type,e.name))}else typeof t=="function"&&t.call(this);this.setUpdateShapesCallback(Qg(i,"update"))},setUpdateShapesCallback(i){return i===void 0&&(i=ED),this.dirty=this.dirty||this.updateCallback!==i,this.updateCallback=i,this},updateShapes(){this.updateCallback.call(this)}},qg=Phaser.GameObjects.Components.TransformMatrix,bD=Phaser.Math.TransformXY;var MD=function(i,t,s,c,C){c===void 0&&(c=i.scene.cameras.main),C===void 0?C={}:C===!0&&(C=wD);var S=c.scrollX,l=c.scrollY,T=t+S*i.scrollFactorX-S,e=s+l*i.scrollFactorY-l;return i.parentContainer?(Ql===void 0&&(Ql=new qg,_g=new qg),i.getWorldTransformMatrix(Ql,_g),Ql.applyInverse(T,e,C)):bD(T,e,i.x,i.y,i.rotation,i.scaleX,i.scaleY,C),C.x+=i.displayOriginX,C.y+=i.displayOriginY,C},Ql,_g,wD={};const yo=Phaser.Utils.Objects.GetValue,AD=Phaser.Utils.Objects.IsPlainObject;class Cu extends zr{constructor(t,s,c,C,S,l){AD(s)&&(l=s,s=yo(l,"x",0),c=yo(l,"y",0),C=yo(l,"width",2),S=yo(l,"height",2)),super(t,s,c,C,S),this.type=yo(l,"type","rexCustomShapes"),this.buildShapes(l)}get centerX(){return this.width/2}get centerY(){return this.height/2}worldToLocalXY(t,s,c,C){return typeof c=="boolean"&&(C=c,c=void 0),MD(this,t,s,c,C)}}Object.assign(Cu.prototype,PD);xt.register("customShapes",function(i,t,s,c,C){var S=new Cu(this.scene,i,t,s,c,C);return this.scene.add.existing(S),S});mt(window,"RexPlugins.UI.CustomShapes",Cu);const Co=Phaser.Utils.Objects.GetValue,RD=Phaser.Utils.Objects.IsPlainObject;class _s extends Ur(Cu){constructor(t,s,c,C,S,l){RD(s)&&(l=s,s=Co(l,"x",0),c=Co(l,"y",0),C=Co(l,"width",2),S=Co(l,"height",2)),l===void 0&&(l={}),l.type||(l.type="rexCustomProgress"),super(t,s,c,C,S,l),this.bootProgressBase(l),this.setValue(Co(l,"value",0))}get centerX(){return this.width/2}
6315get centerY(){return this.height/2}get radius(){return Math.min(this.centerX,this.centerY)}}xt.register("customProgress",function(i,t,s,c,C){var S=new _s(this.scene,i,t,s,c,C);return this.scene.add.existing(S),S});mt(window,"RexPlugins.UI.CustomProgress",_s);const OD={setTransitionStartCallback(i,t){return this.onStartCallback=i,this.onStartCallbackScope=t,this},setTransitionProgressCallback(i,t){return this.onProgressCallback=i,this.onProgressCallbackScope=t,this},setTransitionCompleteCallback(i,t){return this.onCompleteCallback=i,this.onCompleteCallbackScope=t,this}},t0=Phaser.Utils.Objects.IsPlainObject,Zd=Phaser.Utils.Objects.GetValue,LD=Phaser.Utils.Array.GetRandom;var FD={out:0,in:1},Rs=function(i,t,...s){for(var c=0,C=s.length;c<C;c++){var S=s[c];if(S&&S.hasOwnProperty(i))return S[i]}return t};const ID={setTransitionDirection(i){return typeof i=="string"&&(i=FD[i]),this.dir=i,this},setDuration(i){return this.duration=i,this},setEaseFunction(i){return this.easeFunction=i,this},setNextTexture(i,t){return this.nextImage.setTexture(i,t),this},transit(i,t,s){if(this.isRunning&&(this.ignoreCompleteEvent=!0,this.stop(),this.ignoreCompleteEvent=!1),s!==void 0&&(i={key:i,frame:t,mode:s}),this.currentTransitionMode=void 0,t0(i)){var c=i;i=Zd(c,"key",void 0),t=Zd(c,"frame",void 0),s=Zd(c,"mode"),Array.isArray(s)&&(s=LD(s));var C;this.transitionModes&&this.transitionModes.hasOwnProperty(s)&&(C=this.transitionModes[s],this.currentTransitionMode=s),this.setDuration(Rs("duration",this.duration,c,C)).setEaseFunction(Rs("ease",this.easeFunction,c,C)).setTransitionDirection(Rs("dir",this.dir,c,C));var S=Rs("mask",void 0,c,C);S&&this.setMaskGameObject(S),this.setMaskEnable(S===!0);var l=Rs("onStart",void 0,c,C),T=Rs("onProgress",void 0,c,C),e=Rs("onComplete",void 0,c,C);(l!==void 0||T!==void 0||e!==void 0)&&this.setTransitionStartCallback(l,Rs("onStartScope",void 0,c,C)).setTransitionProgressCallback(T,Rs("onProgressScope",void 0,c,C)).setTransitionCompleteCallback(e,Rs("onCompleteScope",void 0,c,C))}return this.setNextTexture(i,t),this.start(),this},addTransitionMode(i,t){return this.transitionModes===void 0&&(this.transitionModes={}),t0(i)&&(t=i,i=t.name,delete t.name),this.transitionModes[i]=t,this},start(){return this.easeValueTask===void 0&&(this.easeValueTask=new Yr(this,{eventEmitter:null})),this.easeValueTask.restart({key:"t",from:0,to:1,duration:this.duration,ease:this.easeFunction}),this},pause(){return this.easeValueTask&&this.easeValueTask.pause(),this},resume(){return this.easeValueTask&&this.easeValueTask.resume(),this},stop(){return this.easeValueTask&&this.easeValueTask.stop(),this.setT(1),this}};var e0=function(i,t,s,c,C){switch(this.clear().fillStyle(16777215),this.shapeType){case 1:s=s.left;var S=Math.min(i,t)/2;this.fillCircle(-i*(c-.5),-t*(C-.5),S+s);break;default:this.fillRect(-(i*c)-s.left,-(t*C)-s.top,i+s.left+s.right,t+s.top+s.bottom);break}};const DD=Phaser.GameObjects.Graphics;class ff extends DD{constructor(t,s,c){s===void 0&&(s=0),typeof s=="string"&&(s=BD[s]),super(t.scene),this.parent=t,this.shapeType=s,this.padding=Jn(c),this.setPosition().resize().setVisible(!1)}destroy(){return this.parent=void 0,super.destroy(),this}setPosition(t,s){var c=this.parent;return t===void 0&&(t=c.x),s===void 0&&(s=c.y),super.setPosition(t,s),this}resize(t,s,c){var C=this.parent;t===void 0&&(t=C.width),s===void 0&&(s=C.height),c===void 0?c=this.padding:typeof c=="number"&&(c=Jn(c));var S=this.width!==t||this.height!==s,l=this.padding!==c&&!ru(this.padding,c);return!S&&!l?this:(this.width=t,this.height=s,l&&Kn(c,this.padding),this.originX=C.originX,this.originY=C.originY,e0.call(this,t,s,c,C.originX,C.originY),this)}setOrigin(t,s){s===void 0&&(s=t);var c=this.parent;return t===void 0&&(t=c.originX),s===void 0&&(s=c.originY),this.originX===t&&this.originY===s?this:(this.originX=t,this.originY=s,e0.call(this,this.width,this.height,this.padding,t,s),this)}}const BD={rectangle:0,circle:1},kD={setMaskGameObject(i){if(!i)return this.removeMaskGameObject(),this;if(this.maskGameObject){if(i===!0&&this.maskGameObject instanceof ff)return this;if(this.maskGameObject===i)return this;this.removeMaskGameObject()}return i===!0&&(i=new ff(this)),i.resize(this.width,this.height).setOrigin(this.originX,this.originY).setPosition(0,0).setScale(1).setVisible(!1),this.addLocal(i),this.maskGameObject=i,i._maskObject||(i._maskObject=i.createGeometryMask(),i.once("destroy",function(){i._maskObject.destroy(),i._maskObject=void 0})),this.childrenMask=i._maskObject,this},removeMaskGameObject(i){return i===void 0&&(i=!0),this.backImage.clearMask(),this.frontImage.clearMask(),this.childrenMask=void 0,this.remove(this.maskGameObject,i),this.maskGameObject=void 0,this},setImageMaskEnable(i,t,s){return t===void 0&&(t=!0),s===void 0&&(s=!1),t?(this.childrenMask||this.setMaskGameObject(!0),i.setMask(this.childrenMask),this.childrenMask.setInvertAlpha(s)):i.clearMask(),this},setCurrentImageMaskEnable(i,t){return this.setImageMaskEnable(this.currentImage,i,t),this},setNextImageMaskEnable(i,t){return this.setImageMaskEnable(this.nextImage,i,t),this},setCellImagesMaskEnable(i,t){for(var s=this.getCellImages(),c=0,C=s.length;c<C;c++)this.setImageMaskEnable(s[c],i,t);return this},setMaskEnable(i,t){return this.setImageMaskEnable(this.backImage,i,t),this.setImageMaskEnable(this.frontImage,i,t),this.setCellImagesMaskEnable(i,t),this}};var GD=function(i,t){typeof i=="object"&&(i=i.name),t===void 0&&(t=",");var s;return i==="__BASE"?s=function(c,C){return`${c}${t}${C}`}:s=function(c,C){return`${i}_${c}${t}${C}`},s},ND=function(i,t,s,c,C,S){s==null&&(s="__BASE"),S||(S=GD(s,S));for(var l=i.sys.textures.get(t),T=typeof s=="object"?s:l.get(s),e=T.width,d=T.height,g,r,a,h=e/c,n=d/C,o=T.cutX,f=T.cutY,u=0,v=0,m=0;m<C;m++){u=0;for(var p=0;p<c;p++)a=S(p,m),g=u+o,r=v+f,l.add(a,0,g,r,h,n),u+=h;v+=n}
6315return{getFrameNameCallback:S,cellWidth:h,cellHeight:n,columns:c,rows:C}};const sn=Phaser.Utils.Objects.GetValue,VD=Phaser.GameObjects.Image,zD=Phaser.Utils.Objects.IsPlainObject,YD=Phaser.Math.RotateAround;var XD=function(i,t,s,c){zD(t)&&(c=t,t=sn(c,"columns",1),s=sn(c,"rows",1));var C=sn(c,"createImageCallback");if(!C){var S=sn(c,"ImageClass",VD);C=function(D,B,z){return new S(D,0,0,B,z)}}for(var l=sn(c,"originX",.5),T=sn(c,"originY",.5),e=sn(c,"add",!0),d=sn(c,"align",e),g=sn(c,"objectPool",void 0),r=i.scene,a=i.texture,h=i.frame,n=ND(r,a,h,t,s),o=n.getFrameNameCallback,f=i.scaleX,u=i.scaleY,v=i.rotation,m=i.getTopLeft(),p=m.x,x=m.y,y=[],P=n.cellWidth*f,b=n.cellHeight*u,E=0;E<s;E++)for(var M=0;M<t;M++){var w,A=o(M,E);if(g&&g.length>0?w=g.pop().setTexture(a,A):w=C(r,a,A),e&&r.add.existing(w),d){var R=p+P*M,L=x+b*E,O=R+l*P,I=L+T*b;w.setOrigin(l,T).setPosition(O,I).setScale(f,u).setRotation(v),YD(w,p,x,v)}y.push(w)}return y};const UD={gridCutImage(i,t,s,c){c===void 0&&(c={}),c.objectPool=this.imagesPool;for(var C=XD(i,t,s,c),S,l=0,T=C.length;l<T;l++)S=C[l],S.setVisible(!0),this.add(S);return this.cellImages=C,this.setChildLocalVisible(i,!1),C},gridCutCurrentImage(i,t,s){return this.gridCutImage(this.currentImage,i,t,s)},gridCutNextImage(i,t,s){return this.gridCutImage(this.nextImage,i,t,s)},getCellImages(){return this.cellImages},freeCellImages(){if(this.cellImages.length===0)return this;for(var i=this.cellImages[0].texture,t=this.cellImages,s,c,C=0,S=t.length;C<S;C++)s=t[C],this.setChildLocalAlpha(s,1).setChildLocalScale(s,1).setChildLocalVisible(s,!1),s.clearMask(),c=s.frame.name,s.setTexture(),i.remove(c);return this.imagesPool.push(...t),t.length=0,this}},j1={setFlipX(i){return this.flipX=i,this},setFlipY(i){return this.flipY=i,this},toggleFlipX(){return this.flipX=!this.flipX,this},toggleFlipY(){return this.flipY=!this.flipY,this},setFlip(i,t){return this.flipX=i,this.flipY=t,this},resetFlip(){return this.flipX=!1,this.flipY=!1,this}};var K1={};Object.assign(K1,OD,ID,kD,UD,j1);var WD=function(i,t,s,c){},HD=function(i,t,s,c){i.setChildLocalAlpha(t,1-c).setChildLocalAlpha(s,c)},$D=function(i,t,s,c){i.setChildLocalAlpha(t,1)};const i0=Phaser.Utils.Objects.IsPlainObject,Ze=Phaser.Utils.Objects.GetValue,jD=Phaser.Math.Clamp;class Tu extends Ui{constructor(t,s,c,C,S,l){i0(s)?(l=s,s=Ze(l,"x",0),c=Ze(l,"y",0),C=Ze(l,"key",void 0),S=Ze(l,"frame",void 0)):i0(S)&&(l=S,S=void 0);var T=Ze(l,"back",void 0),e=Ze(l,"front",void 0);T||(T=t.add.image(s,c,C,S)),e||(e=t.add.image(s,c,C,S));var d=Ze(l,"width",e.width),g=Ze(l,"height",e.height);super(t,s,c,d,g),this.type="rexTransitionImage",T.setVisible(!1),this.addMultiple([T,e]),this.backImage=T,this.frontImage=e,this.maskGameObject=void 0,this.cellImages=[],this.imagesPool=[],this.transitionModes=void 0,this.currentTransitionMode=void 0;var r=Ze(l,"onStart",void 0),a=Ze(l,"onProgress",void 0),h=Ze(l,"onComplete",void 0),n=Ze(l,"dir",0);r===void 0&&a===void 0&&h===void 0&&(r=WD,a=HD,h=$D,n=0),this.setTransitionStartCallback(r,Ze(l,"onStartScope",void 0)).setTransitionProgressCallback(a,Ze(l,"onProgressScope",void 0)).setTransitionCompleteCallback(h,Ze(l,"onCompleteScope",void 0)).setTransitionDirection(n).setDuration(Ze(l,"duration",1e3)).setEaseFunction(Ze(l,"ease","Linear"));var o=Ze(l,"mask",void 0);o&&this.setMaskGameObject(o),this.setMaskEnable(!1),this.ignoreCompleteEvent=!1}destroy(t){!this.scene||this.ignoreDestroy||(this.childrenMask&&(this.childrenMask.destroy(),this.childrenMask=void 0),this.backImage=void 0,this.frontImage=void 0,this.maskGameObject=void 0,this.cellImages.length=0,this.imagesPool.length=0,this.transitionModes=void 0,super.destroy(t),this.onStartCallback=void 0,this.onStartCallbackScope=void 0,this.onProgressCallback=void 0,this.onProgressCallbackScope=void 0,this.onCompleteCallback=void 0,this.onCompleteCallbackScope=void 0,this.easeValueTask=void 0)}get currentImage(){return this.dir===0?this.frontImage:this.backImage}get nextImage(){return this.dir===0?this.backImage:this.frontImage}get texture(){return this.nextImage.texture}get frame(){return this.nextImage.frame}get flipX(){return this._flipX}set flipX(t){this._flipX!==t&&(this._flipX=t,this.backImage.setFlipX(t),this.frontImage.setFlipX(t))}get flipY(){return this._flipY}set flipY(t){this._flipY!==t&&(this._flipY=t,this.backImage.setFlipY(t),this.frontImage.setFlipY(t))}get t(){return this._t}set t(t){if(t=jD(t,0,1),this._t!==t){this._t=t;var s=this.currentImage,c=this.nextImage;if(t===0&&(this.setChildVisible(this.frontImage,!0).setChildVisible(this.backImage,!0),Jd(this.onStartCallback,this.onStartCallbackScope,this,s,c,t)),Jd(this.onProgressCallback,this.onProgressCallbackScope,this,s,c,t),t===1){Jd(this.onCompleteCallback,this.onCompleteCallbackScope,this,s,c,t);var C=c.texture.key,S=c.frame.name;this.frontImage.setTexture(C,S),this.backImage.setTexture(C,S),this.setChildVisible(this.frontImage,!0).setChildVisible(this.backImage,!1).setMaskEnable(!1).freeCellImages()}
6315t===1&&!this.ignoreCompleteEvent&&this.emit("complete")}}setT(t){return this.t=t,this}get isRunning(){return this.easeValueTask?this.easeValueTask.isRunning:!1}setOrigin(t,s){return super.setOrigin(t,s),this.backImage.setOrigin(t,s),this.frontImage.setOrigin(t,s),this.maskGameObject&&this.maskGameObject.setOrigin(t,s),this}setTexture(t,s){return this.frontImage.setTexture(t,s),this.backImage.setTexture(t,s).setVisible(!1),this}}var Jd=function(i,t,s,c,C,S){i&&(t?i.call(t,s,c,C,S):i(s,c,C,S))};Object.assign(Tu.prototype,K1);xt.register("transitionImage",function(i,t,s,c,C){var S=new Tu(this.scene,i,t,s,c,C);return this.scene.add.existing(S),S});mt(window,"RexPlugins.UI.TransitionImage",Tu);const KD="slideLeft",ZD="slideRight",JD="slideUp",QD="slideDown",qD="slideAwayLeft",_D="slideAwayRight",t9="slideAwayUp",e9="slideAwayDown",i9="pushLeft",s9="pushRight",n9="pushUp",r9="pushDown",a9="zoomOut",o9="zoomIn",l9="zoomInOut",h9="fade",u9="crossFade",d9="wipeLeft",c9="wipeRight",f9="wipeUp",v9="wipeDown",p9="irisOut",m9="irisIn",g9="irisInOut",x9="pieOut",y9="pieIn",C9="pieInOut",T9="blinds",S9="squares",E9="diamonds",P9="circles",b9="curtain",M9="pixellate",w9="dissolve",A9="revealLeft",R9="revealRight",O9="revealUp",L9="revealDown";var F9=function(i){i.addTransitionMode(_D,{ease:"Linear",dir:"out",mask:!0,onStart:function(t,s,c,C){},onProgress:function(t,s,c,C){var S=s.width*C;t.setChildLocalPosition(s,S,0)},onComplete:function(t,s,c,C){t.setChildLocalPosition(s,0,0)}}).addTransitionMode(qD,{ease:"Linear",dir:"out",mask:!0,onStart:function(t,s,c,C){},onProgress:function(t,s,c,C){var S=s.width*-C;t.setChildLocalPosition(s,S,0)},onComplete:function(t,s,c,C){t.setChildLocalPosition(s,0,0)}}).addTransitionMode(e9,{ease:"Linear",dir:"out",mask:!0,onStart:function(t,s,c,C){},onProgress:function(t,s,c,C){var S=s.height*C;t.setChildLocalPosition(s,0,S)},onComplete:function(t,s,c,C){t.setChildLocalPosition(s,0,0)}}).addTransitionMode(t9,{ease:"Linear",dir:"out",mask:!0,onStart:function(t,s,c,C){},onProgress:function(t,s,c,C){var S=s.height*-C;t.setChildLocalPosition(s,0,S)},onComplete:function(t,s,c,C){t.setChildLocalPosition(s,0,0)}})},I9=function(i){i.addTransitionMode(ZD,{ease:"Linear",dir:"in",mask:!0,onStart:function(t,s,c,C){},onProgress:function(t,s,c,C){var S=c.width*(C-1);t.setChildLocalPosition(c,S,0)},onComplete:function(t,s,c,C){t.setChildLocalPosition(c,0,0)}}).addTransitionMode(KD,{ease:"Linear",dir:"in",mask:!0,onStart:function(t,s,c,C){},onProgress:function(t,s,c,C){var S=c.width*(1-C);t.setChildLocalPosition(c,S,0)},onComplete:function(t,s,c,C){t.setChildLocalPosition(c,0,0)}}).addTransitionMode(QD,{ease:"Linear",dir:"in",mask:!0,onStart:function(t,s,c,C){},onProgress:function(t,s,c,C){var S=c.height*(C-1);t.setChildLocalPosition(c,0,S)},onComplete:function(t,s,c,C){t.setChildLocalPosition(c,0,0)}}).addTransitionMode(JD,{ease:"Linear",dir:"in",mask:!0,onStart:function(t,s,c,C){},onProgress:function(t,s,c,C){var S=c.height*(1-C);t.setChildLocalPosition(c,0,S)},onComplete:function(t,s,c,C){t.setChildLocalPosition(c,0,0)}})},D9=function(i){i.addTransitionMode(s9,{ease:"Linear",dir:"out",mask:!0,onStart:function(t,s,c,C){},onProgress:function(t,s,c,C){var S=s.width*C;t.setChildLocalPosition(s,S,0);var S=c.width*(C-1);t.setChildLocalPosition(c,S,0)},onComplete:function(t,s,c,C){t.setChildLocalPosition(s,0,0),t.setChildLocalPosition(c,0,0)}}).addTransitionMode(i9,{ease:"Linear",dir:"out",mask:!0,onStart:function(t,s,c,C){},onProgress:function(t,s,c,C){var S=s.width*-C;t.setChildLocalPosition(s,S,0);var S=c.width*(1-C);t.setChildLocalPosition(c,S,0)},onComplete:function(t,s,c,C){t.setChildLocalPosition(s,0,0),t.setChildLocalPosition(c,0,0)}}).addTransitionMode(r9,{ease:"Linear",dir:"out",mask:!0,onStart:function(t,s,c,C){},onProgress:function(t,s,c,C){var S=s.height*C;t.setChildLocalPosition(s,0,S);var S=c.height*(C-1);t.setChildLocalPosition(c,0,S)},onComplete:function(t,s,c,C){t.setChildLocalPosition(s,0,0),t.setChildLocalPosition(c,0,0)}}).addTransitionMode(n9,{ease:"Linear",dir:"out",mask:!0,onStart:function(t,s,c,C){},onProgress:function(t,s,c,C){var S=s.height*-C;t.setChildLocalPosition(s,0,S);var S=c.height*(1-C);t.setChildLocalPosition(c,0,S)},onComplete:function(t,s,c,C){t.setChildLocalPosition(s,0,0),t.setChildLocalPosition(c,0,0)}})},B9=function(i){i.addTransitionMode(a9,{ease:"Linear",dir:"out",mask:!1,onStart:function(t,s,c,C){},onProgress:function(t,s,c,C){var S=1-C;t.setChildLocalScale(s,S,S)},onComplete:function(t,s,c,C){t.setChildLocalScale(s,1,1)}}).addTransitionMode(o9,{ease:"Linear",dir:"in",mask:!1,onStart:function(t,s,c,C){},onProgress:function(t,s,c,C){var S=C;t.setChildLocalScale(c,S,S)},onComplete:function(t,s,c,C){t.setChildLocalScale(c,1,1)}}).addTransitionMode(l9,{ease:"Linear",dir:"out",mask:!1,onStart:function(t,s,c,C){c.tint=0},onProgress:function(t,s,c,C){var S;C<.5?(S=1-Yi(C),t.setChildLocalScale(s,S,S)):(s.visible&&t.setChildVisible(s,!1),S=1-Yi(C),t.setChildLocalScale(c,S,S))},onComplete:function(t,s,c,C){t.setChildLocalScale(s,1,1),t.setChildVisible(s,!0),s.tint=16777215,t.setChildLocalScale(c,1,1),t.setChildVisible(c,!0),c.tint=16777215}})}
6315,k9=function(i){i.addTransitionMode(h9,{ease:"Linear",dir:"out",mask:!1,onStart:function(t,s,c,C){c.tint=0},onProgress:function(t,s,c,C){var S;C<.5?(C=Yi(C),S=Math.floor(255*(1-C)),s.tint=(S<<16)+(S<<8)+S):(s.visible&&t.setChildVisible(s,!1),C=Yi(C),S=Math.floor(255*(1-C)),c.tint=(S<<16)+(S<<8)+S)},onComplete:function(t,s,c,C){t.setChildVisible(s,!0),s.tint=16777215,t.setChildVisible(c,!0),c.tint=16777215}}).addTransitionMode(u9,{ease:"Linear",dir:"out",mask:!1,onStart:function(t,s,c,C){},onProgress:function(t,s,c,C){t.setChildLocalAlpha(s,1-C),t.setChildLocalAlpha(c,C)},onComplete:function(t,s,c,C){t.setChildLocalAlpha(s,1)}})},G9=function(i){var t=new _s(i,{type:"Graphics",create:[{name:"rect",type:"rectangle"}],update:function(){var s=this.getShape("rect").fillStyle(16777215),c=1-this.value;switch(this.wipeMode){case"right":s.setSize(this.width*c,this.height).setTopLeftPosition(this.width-s.width,0);break;case"left":s.setSize(this.width*c,this.height).setTopLeftPosition(0,0);break;case"down":s.setSize(this.width,this.height*c).setTopLeftPosition(0,this.height-s.height);break;case"up":s.setSize(this.width,this.height*c).setTopLeftPosition(0,0);break}}});return t},N9=function(i){var t=G9(i.scene);i.once("destroy",function(){t.destroy()}).addTransitionMode(c9,{ease:"Linear",dir:"out",mask:t,onStart:function(s,c,C,S){s.setCurrentImageMaskEnable(!0),s.maskGameObject.wipeMode="right"},onProgress:function(s,c,C,S){s.maskGameObject.setValue(S)},onComplete:function(s,c,C,S){s.removeMaskGameObject(!1)}}).addTransitionMode(d9,{ease:"Linear",dir:"out",mask:t,onStart:function(s,c,C,S){s.setCurrentImageMaskEnable(!0),s.maskGameObject.wipeMode="left"},onProgress:function(s,c,C,S){s.maskGameObject.setValue(S)},onComplete:function(s,c,C,S){s.removeMaskGameObject(!1)}}).addTransitionMode(v9,{ease:"Linear",dir:"out",mask:t,onStart:function(s,c,C,S){s.setCurrentImageMaskEnable(!0),s.maskGameObject.wipeMode="down"},onProgress:function(s,c,C,S){s.maskGameObject.setValue(S)},onComplete:function(s,c,C,S){s.removeMaskGameObject(!1)}}).addTransitionMode(f9,{ease:"Linear",dir:"out",mask:t,onStart:function(s,c,C,S){s.setCurrentImageMaskEnable(!0),s.maskGameObject.wipeMode="up"},onProgress:function(s,c,C,S){s.maskGameObject.setValue(S)},onComplete:function(s,c,C,S){s.removeMaskGameObject(!1)}})},V9=function(i){var t=new _s(i,{type:"Graphics",create:[{name:"rect",type:"rectangle"}],update:function(){this.getShape("rect").fillStyle(16777215).setSize(this.width*this.value,this.height*this.value).setCenterPosition(this.centerX,this.centerY)}});return t},z9=function(i){var t=V9(i.scene);i.once("destroy",function(){t.destroy()}).addTransitionMode(p9,{ease:"Linear",dir:"out",mask:t,onStart:function(s,c,C,S){s.setCurrentImageMaskEnable(!0,!0)},onProgress:function(s,c,C,S){s.maskGameObject.setValue(S)},onComplete:function(s,c,C,S){s.removeMaskGameObject(!1)}}).addTransitionMode(m9,{ease:"Linear",dir:"in",mask:t,onStart:function(s,c,C,S){s.setNextImageMaskEnable(!0,!0)},onProgress:function(s,c,C,S){s.maskGameObject.setValue(1-S)},onComplete:function(s,c,C,S){s.removeMaskGameObject(!1)}}).addTransitionMode(g9,{ease:"Linear",dir:"out",mask:t,onStart:function(s,c,C,S){C.tint=0,s.setCurrentImageMaskEnable(!0),s.setNextImageMaskEnable(!0)},onProgress:function(s,c,C,S){var l;S<.5?(S=Yi(S),l=Math.floor(255*(1-S)),s.maskGameObject.setValue(1-S),c.tint=(l<<16)+(l<<8)+l):(c.visible&&s.setChildVisible(c,!1),S=Yi(S),l=Math.floor(255*(1-S)),s.maskGameObject.setValue(1-S),C.tint=(l<<16)+(l<<8)+l)},onComplete:function(s,c,C,S){s.removeMaskGameObject(!1),s.setChildVisible(c,!0),c.tint=16777215,s.setChildVisible(C,!0),C.tint=16777215}})},Y9=function(i){var t=new _s(i,{type:"Graphics",create:[{name:"pie",type:"arc"}],update:function(){var s=Math.max(this.width,this.height)*2,c=90*this.value;this.getShape("pie").fillStyle(16777215).setCenterPosition(this.centerX,0).setRadius(s).setAngle(90-c,90+c).setPie()}});return t},X9=function(i){var t=Y9(i.scene);i.once("destroy",function(){t.destroy()}).addTransitionMode(x9,{ease:"Linear",dir:"out",mask:t,onStart:function(s,c,C,S){s.setCurrentImageMaskEnable(!0,!0)},onProgress:function(s,c,C,S){s.maskGameObject.setValue(S)},onComplete:function(s,c,C,S){s.removeMaskGameObject(!1)}}).addTransitionMode(y9,{ease:"Linear",dir:"in",mask:t,onStart:function(s,c,C,S){s.setNextImageMaskEnable(!0,!0)},onProgress:function(s,c,C,S){s.maskGameObject.setValue(1-S)},onComplete:function(s,c,C,S){s.removeMaskGameObject(!1)}}).addTransitionMode(C9,{ease:"Linear",dir:"out",mask:t,onStart:function(s,c,C,S){C.tint=0,s.setCurrentImageMaskEnable(!0),s.setNextImageMaskEnable(!0)},onProgress:function(s,c,C,S){var l;S<.5?(S=Yi(S),l=Math.floor(255*(1-S)),s.maskGameObject.setValue(1-S),c.tint=(l<<16)+(l<<8)+l):(c.visible&&s.setChildVisible(c,!1),S=Yi(S),l=Math.floor(255*(1-S)),s.maskGameObject.setValue(1-S),C.tint=(l<<16)+(l<<8)+l)},onComplete:function(s,c,C,S){s.removeMaskGameObject(!1),s.setChildVisible(c,!0),c.tint=16777215,s.setChildVisible(C,!0),C.tint=16777215}})},U9=function(i,t){var s=new _s(i,{type:"Graphics",create:{rectangle:t},update:function(){for(var c=this.getShapes(),C=this.width/t,S=0;S<t;S++)c[S].fillStyle(16777215).setSize(C*this.value,this.height).setTopLeftPosition(C*S,0)}});return s},W9=function(i){var t=U9(i.scene,10);i.once("destroy",function(){t.destroy()}).addTransitionMode(T9,{ease:"Linear",dir:"out",mask:t,onStart:function(s,c,C,S){s.setCurrentImageMaskEnable(!0,!0)},onProgress:function(s,c,C,S){s.maskGameObject.setValue(S)},onComplete:function(s,c,C,S){s.removeMaskGameObject(!1)}})},H9=function(i,t,s){var c=new _s(i,{type:"Graphics",create:{rectangle:t*s},update:function(){for(var C=this.getShapes(),S=this.width/t,l=this.height/s,T=0;T<s;T++)for(var e=0;e<t;e++)C[e*s+T].fillStyle(16777215).setSize(S*this.value,l*this.value).setCenterPosition(S*(e+.5),l*(T+.5))}});return c}
6315,$9=function(i){var t=H9(i.scene,Math.ceil(i.width/40),Math.ceil(i.height/40));i.once("destroy",function(){t.destroy()}).addTransitionMode(S9,{ease:"Linear",dir:"out",mask:t,onStart:function(s,c,C,S){s.setCurrentImageMaskEnable(!0,!0)},onProgress:function(s,c,C,S){s.maskGameObject.setValue(S)},onComplete:function(s,c,C,S){s.removeMaskGameObject(!1)}})},j9=function(i,t,s){var c=new _s(i,{type:"Graphics",create:{lines:t*s},update:function(){for(var C=this.getShapes(),S=this.width/(t-1),l=this.height/s,T=l*2,e=S*this.value,d=l*this.value,g=0;g<s;g++)for(var r=0;r<t;r++){var a=r*S,h=g*T+r%2*l;C[r*s+g].fillStyle(16777215).start(a+e,h).lineTo(a,h+d).lineTo(a-e,h).lineTo(a,h-d).lineTo(a+e,h).close()}}});return c},K9=function(i){var t=j9(i.scene,Math.ceil(i.width/60),Math.ceil(i.height/60));i.once("destroy",function(){t.destroy()}).addTransitionMode(E9,{ease:"Linear",dir:"out",mask:t,onStart:function(s,c,C,S){s.setCurrentImageMaskEnable(!0,!0)},onProgress:function(s,c,C,S){s.maskGameObject.setValue(S)},onComplete:function(s,c,C,S){s.removeMaskGameObject(!1)}})},Z9=function(i,t,s){var c=new _s(i,{type:"Graphics",create:{circle:t*s},update:function(){for(var C=this.getShapes(),S=this.width/(t-1),l=this.height/s,T=l*2,e=Math.max(S,l)*this.value,d=0;d<s;d++)for(var g=0;g<t;g++){var r=g*S,a=d*T+g%2*l;C[g*s+d].fillStyle(16777215).setCenterPosition(r,a).setRadius(e)}}});return c},J9=function(i){var t=Z9(i.scene,Math.ceil(i.width/60),Math.ceil(i.height/60));i.once("destroy",function(){t.destroy()}).addTransitionMode(P9,{ease:"Linear",dir:"out",mask:t,onStart:function(s,c,C,S){s.setCurrentImageMaskEnable(!0,!0)},onProgress:function(s,c,C,S){s.maskGameObject.setValue(S)},onComplete:function(s,c,C,S){s.removeMaskGameObject(!1)}})},Q9=function(i,t){var s=new _s(i,{type:"Graphics",create:{lines:t},update:function(){for(var c=this.getShapes(),C=this.width/t,S=C/2,l=0;l<t;l++){var T=C*l,e=this.height*this.value,d=T+S;c[l].fillStyle(16777215).start(T,0).horizontalLineTo(e).arc(d,e,S,180,0,!0).horizontalLineTo(-e).lineTo(T,0).close()}}});return s},q9=function(i){var t=Q9(i.scene,10);i.once("destroy",function(){t.destroy()}).addTransitionMode(b9,{ease:"Linear",dir:"out",mask:t,onStart:function(s,c,C,S){C.tint=0,s.setCurrentImageMaskEnable(!0,!0),s.setNextImageMaskEnable(!0,!0)},onProgress:function(s,c,C,S){var l;S<.5?(S=Yi(S),l=Math.floor(255*(1-S)),s.maskGameObject.setValue(S),c.tint=(l<<16)+(l<<8)+l):(c.visible&&s.setChildVisible(c,!1),S=Yi(S),l=Math.floor(255*(1-S)),s.maskGameObject.setValue(S),C.tint=(l<<16)+(l<<8)+l)},onComplete:function(s,c,C,S){s.removeMaskGameObject(!1),s.setChildVisible(c,!0),c.tint=16777215,s.setChildVisible(C,!0),C.tint=16777215}})},_9=function(i){i.addTransitionMode(M9,{ease:"Linear",dir:"out",mask:!0,onStart:function(t,s,c,C){t.setChildVisible(c,!1),s.effect=s.preFX.addPixelate(0),c.effect=c.preFX.addPixelate(0)},onProgress:function(t,s,c,C){if(C<.5){C=Yi(C);var S=Math.min(s.width,s.height)/5;s.effect.amount=Math.ceil(S*C)}else{s.visible&&t.setChildVisible(s,!1),c.visible||t.setChildVisible(c,!0),C=Yi(C);var S=Math.min(c.width,c.height)/5;c.effect.amount=Math.ceil(S*C)}},onComplete:function(t,s,c,C){s.preFX.remove(s.effect),delete s.effect,t.setChildVisible(s,!0),c.preFX.remove(c.effect),delete c.effect}})};const tB=`vec3 mod289(vec3 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; } 6316vec4 mod289(vec4 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; } 6317vec4 permute(vec4 x) { return mod289(((x*34.0)+1.0)*x); } 6318vec4 taylorInvSqrt(vec4 r) { return 1.79284291400159 - 0.85373472095314 * r; } 6319vec3 fade(vec3 t) { return t*t*t*(t*(t*6.0-15.0)+10.0); } 6320float Perlin(vec3 P) { 6321 vec3 i0 = mod289(floor(P)), i1 = mod289(i0 + vec3(1.0)); 6322 vec3 f0 = fract(P), f1 = f0 - vec3(1.0), f = fade(f0); 6323 vec4 ix = vec4(i0.x, i1.x, i0.x, i1.x), iy = vec4(i0.yy, i1.yy); 6324 vec4 iz0 = i0.zzzz, iz1 = i1.zzzz; 6325 vec4 ixy = permute(permute(ix) + iy), ixy0 = permute(ixy + iz0), ixy1 = permute(ixy + iz1); 6326 vec4 gx0 = ixy0 * (1.0 / 7.0), gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5; 6327 vec4 gx1 = ixy1 * (1.0 / 7.0), gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5; 6328 gx0 = fract(gx0); gx1 = fract(gx1); 6329 vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0), sz0 = step(gz0, vec4(0.0)); 6330 vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1), sz1 = step(gz1, vec4(0.0)); 6331 gx0 -= sz0 * (step(0.0, gx0) - 0.5); gy0 -= sz0 * (step(0.0, gy0) - 0.5); 6332 gx1 -= sz1 * (step(0.0, gx1) - 0.5); gy1 -= sz1 * (step(0.0, gy1) - 0.5); 6333 vec3 g0 = vec3(gx0.x,gy0.x,gz0.x), g1 = vec3(gx0.y,gy0.y,gz0.y), 6334 g2 = vec3(gx0.z,gy0.z,gz0.z), g3 = vec3(gx0.w,gy0.w,gz0.w), 6335 g4 = vec3(gx1.x,gy1.x,gz1.x), g5 = vec3(gx1.y,gy1.y,gz1.y), 6336 g6 = vec3(gx1.z,gy1.z,gz1.z), g7 = vec3(gx1.w,gy1.w,gz1.w); 6337 vec4 norm0 = taylorInvSqrt(vec4(dot(g0,g0), dot(g2,g2), dot(g1,g1), dot(g3,g3))); 6338 vec4 norm1 = taylorInvSqrt(vec4(dot(g4,g4), dot(g6,g6), dot(g5,g5), dot(g7,g7))); 6339 g0 *= norm0.x; g2 *= norm0.y; g1 *= norm0.z; g3 *= norm0.w; 6340 g4 *= norm1.x; g6 *= norm1.y; g5 *= norm1.z; g7 *= norm1.w; 6341 vec4 nz = mix(vec4(dot(g0, vec3(f0.x, f0.y, f0.z)), dot(g1, vec3(f1.x, f0.y, f0.z)), 6342 dot(g2, vec3(f0.x, f1.y, f0.z)), dot(g3, vec3(f1.x, f1.y, f0.z))), 6343 vec4(dot(g4, vec3(f0.x, f0.y, f1.z)), dot(g5, vec3(f1.x, f0.y, f1.z)), 6344 dot(g6, vec3(f0.x, f1.y, f1.z)), dot(g7, vec3(f1.x, f1.y, f1.z))), f.z); 6345 return 2.2 * mix(mix(nz.x,nz.z,f.y), mix(nz.y,nz.w,f.y), f.x); 6346} 6347float Perlin(vec2 P) { return Perlin(vec3(P, 0.0)); } 6348`,eB=`#ifdef GL_FRAGMENT_PRECISION_HIGH 6349#define highmedp highp 6350#else 6351#define highmedp mediump 6352#endif 6353precision highmedp float; 6354// Scene buffer 6355uniform sampler2D uMainSampler; 6356uniform sampler2D uMainSampler2; 6357 6358uniform int resizeMode; 6359uniform float progress; 6360uniform float fromRatio; 6361uniform float toRatio; 6362varying vec2 outFragCoord; 6363// Effect parameters 6364uniform float noiseX; 6365uniform float noiseY; 6366uniform float noiseZ; 6367uniform float fromEdgeStart; 6368uniform float fromEdgeWidth; 6369uniform float toEdgeStart; 6370uniform float toEdgeWidth; 6371 6372${tB} 6373 6374vec4 getFromColor (vec2 uv) { 6375 return texture2D(uMainSampler, uv); 6376} 6377 6378vec4 getToColor (vec2 uv) { 6379 if (resizeMode == 2) { 6380 // cover 6381 return texture2D(uMainSampler2, 0.5 + (vec2(uv.x, 1.0 - uv.y) - 0.5) * vec2(min(fromRatio / toRatio, 1.0), min((toRatio / fromRatio), 1.0))); 6382 } else if (resizeMode == 1) { 6383 // contain 6384 return texture2D(uMainSampler2, 0.5 + (vec2(uv.x, 1.0 - uv.y) - 0.5) * vec2(max(fromRatio / toRatio, 1.0), max((toRatio / fromRatio), 1.0))); 6385 } else { 6386 // stretch 6387 return texture2D(uMainSampler2, vec2(uv.x, 1.0 - uv.y)); 6388 } 6389} 6390 6391vec4 transition (vec2 uv) { 6392 vec4 colorFront = getFromColor(uv); 6393 vec4 colorTo = getToColor(uv); 6394 6395 float noise = (Perlin(vec3(uv.x * noiseX, uv.y * noiseY, noiseZ)) + 1.0) / 2.0 6396 * (1.0 - (fromEdgeStart + fromEdgeWidth + toEdgeStart + toEdgeWidth)) 6397 + (fromEdgeStart + fromEdgeWidth + toEdgeStart + toEdgeWidth) * 0.5; 6398 vec4 colorResult = colorFront * smoothstep(progress - (fromEdgeStart + fromEdgeWidth), progress - fromEdgeStart, noise) 6399 + colorTo * smoothstep((1.0 - progress) - (toEdgeStart + toEdgeWidth), (1.0 - progress) - toEdgeStart, (1.0 - noise)); 6400 return colorResult; 6401} 6402 6403void main () { 6404 vec2 uv = outFragCoord; 6405 gl_FragColor = transition(uv); 6406} 6407`,iB=Phaser.Renderer.WebGL.Pipelines.PostFXPipeline,ds=Phaser.Utils.Ob
6407jects.GetValue,sB=Phaser.Math.Clamp;class Qd extends iB{constructor(t){super({name:"rexDissolvePostFx",game:t,renderTarget:!0,fragShader:eB}),this._progress=0,this.toFrame=null,this.targetTexture=null,this.resizeMode=1,this.toRatio=1,this.noiseX=0,this.noiseY=0,this.noiseZ=0,this.fromEdgeStart=.01,this.fromEdgeWidth=.05,this.toEdgeStart=.01,this.toEdgeWidth=.05}resetFromJSON(t){return this.setProgress(ds(t,"progress",0)),this.setTransitionTargetTexture(ds(t,"toTexture","__DEFAULT"),ds(t,"toFrame",void 0),ds(t,"resizeMode",1)),this.setNoise(ds(t,"noiseX",void 0),ds(t,"noiseY",void 0),ds(t,"noiseZ",void 0)),this.setFromEdge(ds(t,"fromEdgeStart",.01),ds(t,"fromEdgeWidth",.05)),this.setToEdge(ds(t,"toEdgeStart",.01),ds(t,"toEdgeWidth",.05)),this}onBoot(){this.setTransitionTargetTexture()}onPreRender(){this.set1f("progress",this.progress),this.set1i("resizeMode",this.resizeMode),this.set1f("noiseX",this.noiseX),this.set1f("noiseY",this.noiseY),this.set1f("noiseZ",this.noiseZ),this.set1f("fromEdgeStart",this.fromEdgeStart),this.set1f("fromEdgeWidth",this.fromEdgeWidth),this.set1f("toEdgeStart",this.toEdgeStart),this.set1f("toEdgeWidth",this.toEdgeWidth)}onDraw(t){this.set1f("fromRatio",t.width/t.height),this.bindTexture(this.targetTexture,1),this.bindAndDraw(t)}get progress(){return this._progress}set progress(t){this._progress=sB(t,0,1)}setProgress(t){return this.progress=t,this}setTransitionTargetTexture(t,s,c){t===void 0&&(t="__DEFAULT");var C=this.game.textures.getFrame(t,s);return C||(C=this.game.textures.getFrame("__DEFAULT")),this.toRatio=C.width/C.height,this.toFrame=C,this.targetTexture=C.glTexture,c!==void 0&&(this.resizeMode=c),this.set1i("uMainSampler2",1),this.set1f("toRatio",this.toRatio),this}setResizeMode(t){return typeof t=="string"&&(t=nB[t]),this.resizeMode=t,this}setNoise(t,s,c){return t===void 0&&(t=4+Math.random()*6),s===void 0&&(s=4+Math.random()*6),c===void 0&&(c=Math.random()*10),this.noiseX=t,this.noiseY=s,this.noiseZ=c,this}setFromEdge(t,s){return this.fromEdgeStart=t,this.fromEdgeWidth=s,this}setToEdge(t,s){return this.toEdgeStart=t,this.toEdgeWidth=s,this}}var nB={stretch:0,contain:1,cover:2},rB=function(i,t,s){Ir(i).renderer.pipelines.addPostPipeline(t,s)},aB=function(i,t,s){s===void 0&&(s={}),i.setPostPipeline(t);var c=i.postPipelines[i.postPipelines.length-1];return c.resetFromJSON(s),s.name&&(c.name=s.name),c};const s0=Phaser.Utils.Array.SpliceOne;var oB=function(i,t,s){if(s===void 0)for(var c=i.postPipelines,C=c.length-1;C>=0;C--){var S=c[C];S instanceof t&&(S.destroy(),s0(c,C))}else for(var c=i.postPipelines,C=0,l=c.length;C<l;C++){var S=c[C];S instanceof t&&S.name===s&&(S.destroy(),s0(c,C))}},lB=function(i){rB(i.scene.game,"rexDissolvePostFx",Qd),i.addTransitionMode(w9,{ease:"Linear",dir:"out",mask:!1,onStart:function(t,s,c,C){s.effect=aB(s,Qd)},onProgress:function(t,s,c,C){s.effect.setProgress(C)},onComplete:function(t,s,c,C){oB(s,Qd),delete s.effect}})};const ql=.1,hB=0,uB=0,dB=1,cB=1,n0=0,r0=1;var fB=function(i){i.addTransitionMode(R9,{ease:"Linear",dir:"in",mask:!1,onStart:function(t,s,c,C){c.effect=c.preFX.addReveal(ql,hB,n0)},onProgress:function(t,s,c,C){c.effect.progress=C},onComplete:function(t,s,c,C){c.preFX.remove(c.effect),delete c.effect}}).addTransitionMode(A9,{ease:"Linear",dir:"in",mask:!1,onStart:function(t,s,c,C){c.effect=c.preFX.addReveal(ql,dB,n0)},onProgress:function(t,s,c,C){c.effect.progress=C},onComplete:function(t,s,c,C){c.preFX.remove(c.effect),delete c.effect}}).addTransitionMode(L9,{ease:"Linear",dir:"in",mask:!1,onStart:function(t,s,c,C){c.effect=c.preFX.addReveal(ql,uB,r0)},onProgress:function(t,s,c,C){c.effect.progress=C},onComplete:function(t,s,c,C){c.preFX.remove(c.effect),delete c.effect}}).addTransitionMode(O9,{ease:"Linear",dir:"in",mask:!1,onStart:function(t,s,c,C){c.effect=c.preFX.addReveal(ql,cB,r0)},onProgress:function(t,s,c,C){c.effect.progress=C},onComplete:function(t,s,c,C){c.preFX.remove(c.effect),delete c.effect}})};const a0=[F9,I9,D9,B9,k9,z9,X9,N9,W9,$9,K9,J9,q9,_9,lB,fB];class Z1 extends Tu{constructor(t,s,c,C,S,l){super(t,s,c,C,S,l);for(var T=0,e=a0.length;T<e;T++)a0[T](this)}}xt.register("transitionImagePack",function(i,t,s,c,C){var S=new Z1(this.scene,i,t,s,c,C);return this.scene.add.existing(S),S});mt(window,"RexPlugins.UI.TransitionImagePack",Z1);var vB=function(i,t,s,c){s===void 0&&(s=!0),c===void 0?c={}:c===!0&&(c=pB);var C=i.width,S=i.height,l=t.width,T=t.height;if(C<=l&&S<=T)if(s){var e=C/S,d=l/T;d<e?(c.width=l,c.height=l/e):d>e?(c.width=T*e,c.height=T):(c.width=l,c.height=T)}else c.width=C,c.height=S;else{var e=C/S;c.width=Math.min(C,l),c.height=Math.min(S,T);var g=c.width/c.height;g<e?c.height=c.width/e:g>e&&(c.width=c.height*e)}return c},pB={},mB=function(){var i=this.image,t=vB(i,{width:this.width,height:this.height},this.scaleUp,!0);return i.setDisplaySize(t.width,t.height),this.resetChildScaleState(i),this},J1={scaleImage:mB};Object.assign(J1,j1);var gB=function(){var i=this.background;return i?(i.setOrigin(this.originX,this.originY),i.setPosition(this.x,this.y),wi(i,this.displayWidth,this.displayHeight),this.resetChildScaleState(i),this):this};
6407const o0=Phaser.Utils.Objects.IsPlainObject,nn=Phaser.Utils.Objects.GetValue;class Su extends Ui{constructor(t,s,c,C,S,l){o0(s)?(l=s,s=nn(l,"x",0),c=nn(l,"y",0),C=nn(l,"key",void 0),S=nn(l,"frame",void 0)):o0(S)&&(l=S,S=void 0);var T=nn(l,"image");T?T.setPosition(s,c).setOrigin(.5):(T=t.add.image(s,c,C,S),C===void 0&&T.setVisible(!1)),super(t,s,c,1,1),this.type="rexImageBox";var e=nn(l,"background",!0);e&&this.add(e),this.background=e,this.add(T),this.image=T,this.scaleUp=nn(l,"scaleUp",!1);var d=nn(l,"width",T.width),g=nn(l,"height",T.height);this.resize(d,g)}get texture(){return this.image.texture}get frame(){return this.image.frame}get flipX(){return this._flipX}set flipX(t){this._flipX!==t&&(this._flipX=t,this.image.setFlipX(t))}get flipY(){return this._flipY}set flipY(t){this._flipY!==t&&(this._flipY=t,this.image.setFlipY(t))}resize(t,s){return super.resize(t,s),gB.call(this),this.scaleImage(),this}setTexture(t,s){var c=this.image;return c.setTexture(t,s),t!==null?(this.setChildVisible(c,!0),this.scaleImage()):this.setChildVisible(c,!1),this}}Object.assign(Su.prototype,J1);xt.register("imageBox",function(i,t,s,c,C){var S=new Su(this.scene,i,t,s,c,C);return this.scene.add.existing(S),S});mt(window,"RexPlugins.UI.ImageBox",Su);xt.register("fullWindowRectangle",function(i,t){var s=new Sv(this.scene,i,t);return this.scene.add.existing(s),s});mt(window,"RexPlugins.UI.FullWindowRectangle",Sv);xt.register("cover",function(i){var t=new Ev(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.Cover",Ev);var Iv=function(i,t){if(this.scene.sys.scale.autoRound&&(i=Math.floor(i),t=Math.floor(t)),this.width===i&&this.height===t)return this;var s=this.node.style;return s.width=`${i}px`,s.height=`${t}px`,this.updateSize(),this};const l0={id:["id",void 0],text:["value",void 0],maxLength:["maxLength",void 0],minLength:["minLength",void 0],placeholder:["placeholder",void 0],tooltip:["title",void 0],readOnly:["readOnly",!1],spellCheck:["spellcheck",!1],autoComplete:["autocomplete","off"]},h0={align:["textAlign",void 0],paddingLeft:["padding-left",void 0],paddingRight:["padding-right",void 0],paddingTop:["padding-top",void 0],paddingBottom:["padding-bottom",void 0],fontFamily:["fontFamily",void 0],fontSize:["font-size",void 0],color:["color","#ffffff"],backgroundColor:["backgroundColor","transparent"],border:["border",0],borderColor:["borderColor","transparent"],outline:["outline","none"],direction:["direction",void 0]},xB={input:"textchange",click:"click",dblclick:"dblclick",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup",touchstart:"pointerdown",touchmove:"pointermove",touchend:"pointerup",keydown:"keydown",keyup:"keyup",keypress:"keypress",compositionstart:"compositionStart",compositionend:"compositionEnd",compositionupdate:"compositionUpdate",focus:"focus",blur:"blur",select:"select"},u0=Phaser.Utils.Objects.GetValue;var Q1=function(i,t,s,c){var C=u0(c,"preventDefault",!1),S=u0(c,"preTest");for(let l in s)t.addEventListener(l,function(T){(!S||S(i,l))&&i.emit(s[l],i,T),C&&T.preventDefault()})};const yB=Phaser.GameObjects.DOMElement,d0=Phaser.Utils.Objects.IsPlainObject,Os=Phaser.Utils.Objects.GetValue;class Eu extends yB{constructor(t,s,c,C,S,l){d0(s)?(l=s,s=Os(l,"x",0),c=Os(l,"y",0),C=Os(l,"width",0),S=Os(l,"height",0)):d0(C)&&(l=C,C=Os(l,"width",0),S=Os(l,"height",0)),l===void 0&&(l={});var T,e=Os(l,"inputType",void 0);e===void 0&&(e=Os(l,"type","text")),e==="textarea"?(T=document.createElement("textarea"),T.style.resize="none"):(T=document.createElement("input"),T.type=e),Dh(l0,l,T);var d=Os(l,"style",void 0);d=Dh(h0,l,d);var g=T.style;for(var r in l)r in l0||r in h0||r in g&&(d[r]=l[r]);d["box-sizing"]="border-box",super(t,s,c,T,d),this.type="rexInputText",this.resize(C,S),Q1(this,T,xB),r1(T),Os(l,"selectAll",!1)&&this.selectAll(),this._isFocused=!1,this.on("focus",function(){this._isFocused=!0},this).on("blur",function(){this._isFocused=!1},this)}get inputType(){return this.node.tagName.toLowerCase()==="textarea"?"textarea":this.node.type}get text(){return this.node.value}set text(t){this.node.value=t}setText(t){return this.text=t,this}get maxLength(){return this.node.maxLength}set maxLength(t){this.node.maxLength=t}setMaxLength(t){return this.maxLength=t,this}get minLength(){return this.node.minLength}set minLength(t){this.node.minLength=t}setMinLength(t){return this.minLength=t,this}get placeholder(){return this.node.placeholder}set placeholder(t){this.node.placeholder=t}setPlaceholder(t){return this.placeholder=t,this}selectText(t,s){return t===void 0?this.node.select():this.node.setSelectionRange(t,s),this}selectAll(){return this.selectText(),this}get selectionStart(){return this.node.selectionStart}get selectionEnd(){return this.node.selectionEnd}get selectedText(){var t=this.node;return t.value.substring(t.selectionStart,t.selectionEnd)}get cursorPosition(){return this.node.selectionStart}set cursorPosition(t){this.node.setSelectionRange(t,t)}setCursorPosition(t){return t===void 0?t=this.text.length:t<0&&(t=this.text.length+t),this.cursorPosition=t,this}get tooltip(){return this.node.title}set tooltip(t){this.node.title=t}setTooltip(t){return this.tooltip=t,this}setTextChangedCallback(t){return this.onTextChanged=t,this}get readOnly(){return this.node.readOnly}set readOnly(t){this.node.readOnly=t}setReadOnly(t){return t===void 0&&(t=!0),this.readOnly=t,this}get spellCheck(){return this.node.spellcheck}set spellCheck(t){this.node.spellcheck=t}setSpellCheck(t){return this.spellCheck=t,this}get fontColor(){return this.node.style.color}set fontColor(t){this.node.style.color=t}setFontColor(t){return this.fontColor=t,this}setStyle(t,s){return this.node.style[t]=s,this}getStyle(t){return this.node.style[t]}scrollToBottom(){return this.node.scrollTop=this.node.scrollHeight,this}setEnabled(t){return t===void 0&&(t=!0),this.node.disabled=!t,this}setBlur(){return this.node.blur(),this}setFocus(){return this.node.focus(),this}get isFocused(){return this._isFocused}}var CB={resize:Iv};Object.assign(Eu.prototype,CB);xt.register("inputText",function(i){var t=new Eu(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.InputText",Eu);
6407const c0=Phaser.Utils.Objects.GetValue;var TB=function(i,t){var s=document.createElement("input");s.type="file";var c=c0(t,"accept",""),C=c0(t,"multiple",!1);return s.setAttribute("accept",c),C?s.setAttribute("multiple",""):s.removeAttribute("multiple"),s},q1=function(i,t){return i===void 0&&(i=0),new Promise(function(s,c){setTimeout(function(){s(t)},i)})},_1=function({game:i,fileInput:t,closeDelay:s}){return nu(Ir(i).events,"focus").then(function(){return q1(s)}).then(function(){var c={files:t.files};return Promise.resolve(c)})};const SB=Phaser.Utils.Objects.GetValue,EB=Phaser.DOM.RemoveFromDOM;var tC=function(i,t){var s=SB(t,"closeDelay",200),c=TB(i,t);return c.click(),_1({game:i,fileInput:c,closeDelay:s}).then(function(C){return EB(c),c.remove(),Promise.resolve(C)})},eC=function(i){return this.setOrigin(i.originX,i.originY),this.setPosition(i.x,i.y),this.resize(i.displayWidth,i.displayHeight),this},PB=function(i,t,s){if(s===void 0)switch(t){case"image":case"svg":s="textures";break;case"animation":s="json";break;case"tilemapTiledJSON":case"tilemapCSV":s="tilemap";break;case"glsl":s="shader";break;default:s=t;break}i=Ir(i);var c;return s==="textures"?c=i.textures:c=i.cache[s],c},iC=function(i,t,s,c,C,S){if(!(C===null||C===!1))if(Dr(C))C();else{var l=PB(i,s,C);l.exists(c)&&l.remove(c)}var T=i.load;if(S&&T.once(`filecomplete-${s}-${c}`,function(d,g,r){S(r)}),Dr(t))t();else{var e=window.URL.createObjectURL(t);T[s](c,e)}T.start()},bB=function(i,t,s,c,C){var S=this.scene;return iC(S,i,t,s,c,C),this},MB=function(i,t,s,c){var C=this.scene;return new Promise(function(S,l){var T=function(e){S(e)};iC(C,i,t,s,c,T)})};const sC={loadFile:bB,loadFilePromise:MB},wB=Phaser.GameObjects.DOMElement,f0=Phaser.Utils.Objects.IsPlainObject,Ls=Phaser.Utils.Objects.GetValue;class il extends wB{constructor(t,s,c,C,S,l){f0(s)?(l=s,s=Ls(l,"x",0),c=Ls(l,"y",0),C=Ls(l,"width",0),S=Ls(l,"height",0)):f0(C)&&(l=C,C=Ls(l,"width",0),S=Ls(l,"height",0));var T=document.createElement("input");T.type="file";var e=T.style;e.display="none";var d=document.createElement("label");d.appendChild(T);var g=Ls(l,"style",void 0);super(t,s,c,d,g),this.type="rexFileChooser",this.resetFromJSON(l),this.resize(C,S);var r=this;T.onchange=function(){r.emit("change",r)},this.setCloseDelay(Ls(l,"closeDelay",200)),T.onclick=function(){_1({game:t,fileInput:T,closeDelay:r.closeDelay}).then(function(){r.emit("select",r)})}}resetFromJSON(t){return this.setAccept(Ls(t,"accept","")),this.setMultiple(Ls(t,"multiple",!1)),this}setAccept(t){return t===void 0&&(t=""),this.fileInput.setAttribute("accept",t),this}setMultiple(t){return t===void 0&&(t=!0),t?this.fileInput.setAttribute("multiple",""):this.fileInput.removeAttribute("multiple"),this}setCloseDelay(t){return t===void 0&&(t=200),this.closeDelay=t,this}get fileInput(){return this.node.children[0]}open(){return this.fileInput.click(),this}get files(){return this.fileInput.files}setOpenEnable(t){return t===void 0&&(t=!0),this.fileInput.disabled=!t,this}}var AB={resize:Iv,syncTo:eC};Object.assign(il.prototype,AB,sC);xt.register("fileChooser",function(i){var t=new il(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.FileChooser",il);const RB={setDropEnable(i){return i===void 0&&(i=!0),this.dropEnable=i,this},toggleDropEnable(){return this.dropEnable=!this.dropEnable,this}},OB={addFilter(i,t){return this.filters||(this.filters={}),this.filters[i]=t,this},addFilters(i){this.filters||(this.filters={});for(var t in i)this.filters[t]=i[t];return this}};var nC={resize:Iv,syncTo:eC};Object.assign(nC,RB,OB,sC);const LB={dragenter:"dragenter",dragleave:"dragleave",dragover:"dragover",drop:"drop"},FB=Phaser.GameObjects.DOMElement,v0=Phaser.Utils.Objects.IsPlainObject,rn=Phaser.Utils.Objects.GetValue;class Dv extends FB{constructor(t,s,c,C,S,l){v0(s)?(l=s,s=rn(l,"x",0),c=rn(l,"y",0),C=rn(l,"width",0),S=rn(l,"height",0)):v0(C)&&(l=C,C=rn(l,"width",0),S=rn(l,"height",0)),l===void 0&&(l={});var T=document.createElement("div"),e=rn(l,"style",void 0);super(t,s,c,T,e),this.type="rexFileDropZone",this.resize(C,S),this._files=[],this.setDropEnable(rn(l,"dropEnable",!0));var d=rn(l,"filters");d&&this.addFilters(d),Q1(this,T,LB,{preventDefault:!0,preTest(g){return g.dropEnable}}),this.on("drop",function(g,r){this._files=r.dataTransfer.files;var a=this._files;if(a&&this.filters)for(var h in this.filters){for(var n=this.filters[h],o=[],f=0,u=a.length;f<u;f++){var v=a[f];n(v,a)&&o.push(v)}o.length>
64070&&this.emit(`drop.${h}`,o)}},this)}get files(){return this._files}}Object.assign(Dv.prototype,nC);xt.register("fileDropZone",function(i){var t=new Dv(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.FileDropZone",Dv);var IB=function(i){if(this.rexSizer.hidden)return 0;i===void 0&&(i=!0);var t=0,s=this.sizerChildren,c,C,S;if(this.orientation===0)for(var l=this.space.item,T=!0,e=0,d=s.length;e<d;e++)c=s[e],!c.rexSizer.hidden&&(c.rexSizer.proportion===0||i?S=this.getChildWidth(c):S=0,C=c.rexSizer.padding,S+=C.left+C.right,T?T=!1:S+=l,t+=S);else for(var e=0,d=s.length;e<d;e++)c=s[e],c.hasOwnProperty("rexSizer")&&(c.rexSizer.hidden||(C=c.rexSizer.padding,S=this.getChildWidth(c)+C.left+C.right,t=Math.max(S,t)));return t+this.space.left+this.space.right},DB=function(i){if(this.rexSizer.hidden)return 0;i===void 0&&(i=!0);var t=0,s=this.sizerChildren,c,C,S;if(this.orientation===0)for(var l=0,T=s.length;l<T;l++)c=s[l],!c.rexSizer.hidden&&(C=c.rexSizer.padding,S=this.getChildHeight(c)+C.top+C.bottom,t=Math.max(S,t));else for(var e=this.space.item,d=!0,l=0,T=s.length;l<T;l++)c=s[l],c.hasOwnProperty("rexSizer")&&(c.rexSizer.hidden||(c.rexSizer.proportion===0||i?S=this.getChildHeight(c):S=0,C=c.rexSizer.padding,S+=C.top+C.bottom,d?d=!1:S+=e,t+=S));return t+this.space.top+this.space.bottom},BB=function(i,t){t===void 0&&(t=this.width);var s,c=i.rexSizer,C=c.padding;if(this.orientation===0)c.proportion>0&&this.proportionLength>0&&(s=c.proportion*this.proportionLength);else if(c.expand){var S=t-this.space.left-this.space.right;s=S-C.left-C.right}return s},kB=function(i,t){t===void 0&&(t=this.height);var s,c=i.rexSizer,C=c.padding;if(this.orientation===0){if(c.expand){var S=t-this.space.top-this.space.bottom;s=S-C.top-C.bottom}}else c.proportion>0&&this.proportionLength>0&&(s=c.proportion*this.proportionLength);return s},GB=function(i){i===void 0&&(i=[]);for(var t=this.sizerChildren,s,c=0,C=t.length;c<C;c++)s=t[c],s.isRexSizer&&i.push(s);return i},NB=function(){this.hasRatioFitChild=!1;for(var i=this.sizerChildren,t=0,s=i.length;t<s;t++){var c=i[t];c.rexSizer.hidden||c.rexSizer.fitRatio&&(wi(c,1,1),this.hasRatioFitChild=!0)}return this._childrenProportion=void 0,this.proportionLength=void 0,qo.call(this),this},VB=function(i,t){if(this.hasRatioFitChild){var s;this.orientation===0?s=t-this.getInnerPadding("top")-this.getInnerPadding("bottom"):i-this.getInnerPadding("left")-this.getInnerPadding("right");for(var c=this.sizerChildren,C,S,l=0,T=c.length;l<T;l++){var e=c[l];if(!e.rexSizer.hidden){var d=e.rexSizer.fitRatio;d&&(this.orientation===0?(S=s-this.getChildOuterPadding(e,"top")-this.getChildOuterPadding(e,"bottom"),C=S*d):(C=s-this.getChildOuterPadding(e,"top")-this.getChildOuterPadding(e,"bottom"),S=C/d),wi(e,C,S),e.isRexSizer&&e.setMinSize(C,S))}}this.proportionLength=void 0,this._childrenWidth=void 0,this.resolveWidth(i,!0)}};const zB=Phaser.Math.Wrap;var YB=function(){for(var i=this.sizerChildren,t,s,c,C=this.innerLeft,S=this.innerTop,l=this.innerWidth,T=this.innerHeight,e=C,d=S,g,r,a,h,n,o,f,u=this.startChildIndex,v=0,m=i.length;v<m;v++)u===0?f=v:f=zB(v+u,0,m),this.rtl&&(f=m-f-1),t=i[f],!t.rexSizer.hidden&&(s=t.rexSizer,c=s.padding,_o.call(this,t),t.isRexSpace?(n=0,o=0):(n=this.getExpandedChildWidth(t),o=this.getExpandedChildHeight(t)),t.isRexSizer?(t.runLayout(this,n,o),Ov(t,this)):wi(t,n,o),n===void 0&&(n=de(t)),o===void 0&&(o=ie(t)),this.orientation===0?(g=e+c.left,s.proportion===0||this.proportionLength===0?a=n:a=s.proportion*this.proportionLength,r=d+c.top,h=T-c.top-c.bottom):(g=e+c.left,a=l-c.left-c.right,r=d+c.top,s.proportion===0||this.proportionLength===0?h=o:h=s.proportion*this.proportionLength),tl.call(this,t,g,r,a,h,s.align),this.orientation===0?e+=a+c.left+c.right+this.space.item:d+=h+c.top+c.bottom+this.space.item)},XB=function(t){var t=pv.call(this,t);if(this.proportionLength===void 0&&this.orientation===0){var s=t-this.childrenWidth;s>0?(s=t-this.getChildrenWidth(!1),this.proportionLength=s/this.childrenProportion):this.proportionLength=0}return t},UB=function(t){var t=mv.call(this,t);if(this.proportionLength===void 0&&this.orientation===1){var s=t-this.childrenHeight;s>0?(s=t-this.getChildrenHeight(!1),this.proportionLength=s/this.childrenProportion):this.proportionLength=0}return t};const WB=Phaser.GameObjects.Zone;class Bv extends WB{constructor(t){super(t,0,0,1,1),this.isRexSpace=!0}}var HB=function(i,t){var s=this.sizerChildren;if(s.length===0)return-1;for(var c=-1,C=1/0,S=0,l=s.length;S<l;S++){var T=s[S],e;this.orientation===0?e=Math.abs(T.left-i):e=Math.abs(T.top-t),C>e&&(C=e,c=S)}var T=s[s.length-1],e;return this.orientation===0?e=Math.abs(T.right-i):e=Math.abs(T.bottom-t),C>e&&(C=e,c=S+1),c};
6407const rC=Phaser.Utils.Objects.IsPlainObject,an=Phaser.Utils.Objects.GetValue,p0=Phaser.Display.Align.CENTER,$B={min:0,full:-1};var qd=function(i,t,s,c,C,S,l,T,e,d){Jo.call(this,i);var g=i.isRexSpace,r=typeof t;if(t===null)return this;if(r!=="number"){if(r==="string")t=$B[t];else if(rC(t)){var a=t;t=an(a,"proportion",void 0),s=an(a,"align",p0),c=an(a,"padding",0),C=an(a,"expand",!1),S=an(a,"key",void 0),l=an(a,"index",void 0),i.isRexSizer||(T=an(a,"minWidth",void 0),e=an(a,"minHeight",void 0)),d=an(a,"fitRatio",0)}}typeof s=="string"&&(s=$a[s]),t===void 0&&(t=g?1:0),s===void 0&&(s=p0),c===void 0&&(c=0),C===void 0&&(C=!1),T===void 0&&(g?T=0:i.isRexSizer||(T=i._minWidth)),e===void 0&&(g?e=0:i.isRexSizer||(e=i._minHeight)),d===void 0&&(d=0);var a=this.getSizerConfig(i);return a.proportion=t,a.align=s,a.padding=Jn(c),a.expand=C,a.fitRatio=t===0?d:0,l===void 0||l>=this.sizerChildren.length?this.sizerChildren.push(i):this.sizerChildren.splice(l,0,i),i.isRexSizer||(t>0&&(this.orientation===0?i.minWidth=T===void 0?de(i):T:i.minHeight=e===void 0?ie(i):e),C&&(this.orientation===0?i.minHeight=e:i.minWidth=T)),S!==void 0&&this.addChildrenMap(S,i),this};const jB={add:qd,addSpace(i){return this.insertSpace(void 0,i),this},insertSpace(i,t){return t===void 0&&(t=1),qd.call(this,new Bv(this.scene),{proportion:t,minWidth:0,minHeight:0,index:i}),this},insert(i,t,s,c,C,S,l,T){return rC(s)&&(s.index=i),qd.call(this,t,s,c,C,S,l,i,T),this},insertAtPosition(i,t,s,c,C,S,l,T,e){var d=HB.call(this,i,t);return d===-1&&(d=void 0),this.insert(d,s,c,C,S,l,T,e),this}},KB=Phaser.Utils.Array.Remove,ZB={remove(i,t){return this.getParentSizer(i)!==this?this:(KB(this.sizerChildren,i),Qo.call(this,i,t),this)},removeAll(i){for(var t=this.sizerChildren.length-1;t>=0;t--)this.remove(this.sizerChildren[t],i);return this},clear(i){return this.sizerChildren.length=0,xu.call(this,i),this}},JB={getChildAlign(i){return this.getSizerConfig(i).align},setChildAlign(i,t){return typeof t=="string"&&(t=$a[t]),this.get
6407SizerConfig(i).align=t,this}},QB={getChildProportion(i){return this.getSizerConfig(i).proportion},setChildProportion(i,t){return this.getSizerConfig(i).proportion=t,this}},qB={getChildExpand(i){return this.getSizerConfig(i).expand},setChildExpand(i,t){return this.getSizerConfig(i).expand=t,this}};var aC={getChildrenWidth:IB,getChildrenHeight:DB,getExpandedChildWidth:BB,getExpandedChildHeight:kB,getChildrenSizers:GB,preLayout:NB,postResolveSize:VB,layoutChildren:YB,resolveWidth:XB,resolveHeight:UB};Object.assign(aC,jB,ZB,JB,QB,qB);var _B=function(){for(var i=0,t=this.sizerChildren,s,c,C=0,S=t.length;C<S;C++)s=t[C],!s.rexSizer.hidden&&(c=s.rexSizer.proportion,c>0&&(i+=c));return i},t8={x:0,h:0,horizontal:0,"left-to-right":0,y:1,v:1,vertical:1,"top-to-bottom":1},Pu=function(i){return typeof i=="string"&&(i=t8[i]),i};const _d=Phaser.Utils.Objects.IsPlainObject,Ki=Phaser.Utils.Objects.GetValue;class ee extends Wr{constructor(t,s,c,C,S,l,T){_d(s)?(T=s,s=Ki(T,"x",0),c=Ki(T,"y",0),C=Ki(T,"width",void 0),S=Ki(T,"height",void 0),l=Ki(T,"orientation",0)):_d(C)?(T=C,C=Ki(T,"width",void 0),S=Ki(T,"height",void 0),l=Ki(T,"orientation",0)):_d(l)&&(T=l,l=Ki(T,"orientation",0)),l===void 0&&(l=0),super(t,s,c,C,S,T),this.type="rexSizer",this.sizerChildren=[],this.setOrientation(l),this.setItemSpacing(Ki(T,"space.item",0)),this.setStartChildIndex(Ki(T,"startChildIndex",0)),this.setRTL(Ki(T,"rtl",!1)),this.addChildrenMap("items",this.sizerChildren)}setOrientation(t){return this.orientation=Pu(t),this}setItemSpacing(t){return this.space.item=t,this}setStartChildIndex(t){return this.startChildIndex=t,this}setRTL(t){return t===void 0&&(t=!0),this.rtl=t,this}get childrenProportion(){return this._childrenProportion===void 0&&(this._childrenProportion=_B.call(this)),this._childrenProportion}}Object.assign(ee.prototype,aC);var _l=function(i,t,s){if(i){var c=t==null,C=s==null;return c&&C||(c||(i.displayWidth=t),C||(i.displayHeight=s),c&&(i.scaleX=i.scaleY),C&&(i.scaleY=i.scaleX)),i}},e8=function(i){i===void 0?i={}:typeof i=="string"&&(i={text:i});var t=i.text||"";this.setText(t);var s=this.childrenMap.icon;if(s){i.icon?this.show(s):this.hide(s);var c=i.iconSize;c&&(this.setChildDisplaySize(s,c,c),this.iconWidth!==void 0&&this.setIconSize(c)),i.icon!==!0&&this.setIconTexture(i.icon,i.iconFrame)}var C=this.childrenMap.action;if(C){i.action?this.show(C):this.hide(C);var S=i.actionSize;S&&(this.setChildDisplaySize(C,S,S),this.actionWidth!==void 0&&this.setActionSize(S)),i.action!==!0&&this.setActionTexture(i.action,i.actionFrame)}return this},i8={appendText:vy,resetDisplayContent:e8};class kv extends ee{get text(){var t=this.childrenMap.text;return t?t.text:""}set text(t){var s=this.childrenMap.text;s&&s.setText(t)}setText(t){return this.text=t,this}setIconTexture(t,s){var c=this.childrenMap.icon;return c?(c.setTexture(t,s),this.iconWidth!==void 0&&this.iconHeight!==void 0&&(_l(c,this.iconWidth,this.iconHeight),this.resetChildScaleState(c)),this):this}setTexture(t,s){return this.setIconTexture(t,s),this}setIconSize(t,s){return s===void 0&&(s=t),this.iconWidth=t,this.iconHeight=s,this}get texture(){var t=this.childrenMap.icon;if(t)return t.texture}get frame(){var t=this.childrenMap.icon;if(t)return t.frame}setActionTexture(t,s){var c=this.childrenMap.action;return c===void 0?this:(c.setTexture(t,s),this.actionWidth!==void 0&&this.actionHeight!==void 0&&(_l(c,this.actionWidth,this.actionHeight),this.resetChildScaleState(c)),this)}get actionTexture(){var t=this.childrenMap.action;if(t)return t.texture}get actionFrame(){var t=this.childrenMap.action;if(t)return t.frame}setActionSize(t,s){return s===void 0&&(s=t),this.actionWidth=t,this.actionHeight=s,this}preLayout(){var t=this.childrenMap.icon;t&&this.iconWidth!==void 0&&this.iconHeight!==void 0&&_l(t,this.iconWidth,this.iconHeight);var s=this.childrenMap.action;s&&this.actionWidth!==void 0&&this.actionHeight!==void 0&&_l(s,this.actionWidth,this.actionHeight),super.preLayout()}postLayout(t,s,c){var C=this.childrenMap.iconMask;C&&(C.setPosition(),this.resetChildPositionState(C));var S=this.childrenMap.actionMask;return S&&(S.setPosition(),this.resetChildPositionState(S)),this}resize(t,s){super.resize(t,s);var c=this.childrenMap.iconMask;c&&c.resize();var C=this.childrenMap.actionMask;return C&&C.resize(),this}}Object.assign(kv.prototype,i8);var Ss=function(i,t,s,c){var C=new ff(t,s,c);if(i&&!i.isRexSizer){var S=C.createGeometryMask();i.setMask(S),this.once("destroy",function(){i.setMask(),S.destroy()})}return this.pin(C),C};
6407const _t=Phaser.Utils.Objects.GetValue;class tr extends kv{constructor(t,s){super(t,s),this.type="rexLabel";var c=_t(s,"background",void 0),C=_t(s,"icon",void 0),S=_t(s,"iconMask",void 0),l=_t(s,"text",void 0),T=_t(s,"action",void 0),e=_t(s,"actionMask",void 0),d=_t(s,"align",void 0);if(c&&this.addBackground(c),(d==="right"||d==="bottom"||d==="center")&&this.addSpace(),C){var g;this.orientation===0?(l||T)&&(g={right:_t(s,"space.icon",0),top:_t(s,"space.iconTop",0),bottom:_t(s,"space.iconBottom",0),left:_t(s,"space.iconLeft",0)}):(l||T)&&(g={bottom:_t(s,"space.icon",0),left:_t(s,"space.iconLeft",0),right:_t(s,"space.iconRight",0),top:_t(s,"space.iconTop",0)});var r=_t(s,"squareFitIcon",!1)?1:0;if(this.add(C,{proportion:0,padding:g,fitRatio:r}),S&&(S=Ss.call(this,C,C,1)),!r){var a=_t(s,"iconSize",void 0);this.setIconSize(_t(s,"iconWidth",a),_t(s,"iconHeight",a))}}if(l){var h=_t(s,"space.text",0),n=_t(s,"expandTextWidth",!1),o=_t(s,"expandTextHeight",!1),f,g,u;this.orientation===0?(f=n?1:0,T&&(g={right:h}),u=o):(f=o?1:0,T&&(g={bottom:h}),u=n),this.add(l,{proportion:f,expand:u,padding:g})}if(T){var g;this.orientation===0?g={top:_t(s,"space.actionTop",0),bottom:_t(s,"space.actionBottom",0),right:_t(s,"space.actionRight",0)}:g={left:_t(s,"space.actionLeft",0),right:_t(s,"space.actionRight",0),bottom:_t(s,"space.actionBottom",0)};var r=_t(s,"squareFitAction",!1)?1:0;if(this.add(T,{proportion:0,padding:g,fitRatio:r}),e&&(e=Ss.call(this,T,T,1)),!r){var v=_t(s,"actionSize");this.setActionSize(_t(s,"actionWidth",v),_t(s,"actionHeight",v))}}d==="center"&&this.addSpace(),this.addChildrenMap("background",c),this.addChildrenMap("icon",C),this.addChildrenMap("iconMask",S),this.addChildrenMap("text",l),this.addChildrenMap("action",T),this.addChildrenMap("actionMask",e)}}const Bn=Phaser.Utils.Objects.GetValue;var s8=function(i,t){var s=Bn(t,"canvas"),c=Bn(s,"width",128),C=Bn(s,"height",128),S=new Xr(i,0,0,c,C);i.add.existing(S);var l=Bn(s,"key"),T=Bn(s,"frame"),e=Bn(s,"fill");return e!==void 0?S.fill(e):l!==void 0&&S.loadTexture(l,T),S.setTexture=S.loadTexture.bind(S),S},n8=function(i,t){var s=new Su(i,{scaleUp:Bn(t,"scaleUpIcon",!1),background:Bn(t,"iconBackground"),image:s8(i,t)});return i.add.existing(s),s};const r8=Phaser.Utils.Objects.GetValue;var oC=function(i,t){var s=r8(t,"clickTarget",this);return typeof s=="string"&&(s=i.getElement(s)),s};const a8=Phaser.Utils.Objects.GetValue;var o8=function(i,t){var s=oC(i,t);if(s){var c=a8(t,"click"),C=new pn(s,c);return C.on("click",i.open,i),C}};const lC={accept:"image/*",multiple:!1};var hC=function(i,t){if(t.length!==0){var s=i.childrenMap.icon,c=s.image,C=t[0];return c.loadFromFilePromise(C).then(function(){return s.scaleImage(),i.emit("select",C,i),Promise.resolve(C)})}},l8=function(i,t){var s=i.scene,c=new il(s,lC);return s.add.existing(c),i.pin(c),c.on("change",function(){hC(i,c.files)}),c};const h8={async openPromise(){var i=this;return tC(this.scene.game,lC).then(function(t){return hC(i,t.files)})},open(){return this.openPromise(),this},setClickOpenEnable(i){return i===void 0&&(i=!0),this.clickBehavior&&this.clickBehavior.setEnable(i),this.fileChooser&&this.fileChooser.setOpenEnable(i),this}};var u8=function(i){if(!i)return null;var t=i.name;return t.substr(0,t.lastIndexOf("."))},d8=function(i){var t=this.childrenMap.canvas;return t.generateTexture(i),this},uC={getFileName:u8,saveTexture:d8};Object.assign(uC,h8);const c8=Phaser.Utils.Objects.GetValue;class Gv extends tr{constructor(t,s){var c=n8(t,s);s.icon=c,super(t,s),this.type="rexImageFileInputLabel";var C=this.iconWidth,S=this.iconWidth;C!==void 0&&S!==void 0&&c.resize(C,S),this.clickTarget=oC(this,s),this.clickTarget&&(c8(s,"domButton",!0)?this.fileChooser=l8(this):this.clickBehavior=o8(this,s)),this.addChildrenMap("canvas",c.image),this.addChildrenMap("iconBackground",c.background),this.addChildrenMap("fileChooser",this.fileChooser)}postLayout(){this.fileChooser&&(this.fileChooser.syncTo(this.clickTarget),this.resetChildState(this.fileChooser))}}Object.assign(Gv.prototype,uC);
6407xt.register("imageInputLabel",function(i){var t=new Gv(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.ImageInputLabel",Gv);let f8=class extends ke{constructor(t,s){return super(t),new Proxy(this,this)}get(t,s){if(Ee(t,s))return t[s];var c=t.parent;if(Ee(c,s))return c[s]}set(t,s,c){return Ee(t,s)?t[s]=c:Ee(t.parent,s)&&(t.parent[s]=c),!0}get key(){return this.parent.texture.key}set key(t){this.parent.setTexture(t,this.frame)}get frame(){return this.parent.frame.name}set frame(t){this.parent.setFrame(t)}get scale(){return this.parent.scaleX}set scale(t){this.parent.setScale(t)}};const tc=Phaser.Utils.Objects.GetValue;class v8 extends ke{constructor(t,s){super(t,s),this.style=tc(s,"style",this);var c=tc(s,"propertiesMap");this.activeStyle=ec(s,"active",c),this.hoverStyle=ec(s,"hover",c),this.disableStyle=ec(s,"disable",c),this.onModifyStyle=tc(s,"onModifyStyle")}getStyle(t){return Kf(this.style,t)}modifyStyle(t){for(var s in t)this.style[s]=t[s];return this.onModifyStyle&&this.onModifyStyle(this.parent,t),this}applyStyle(t){if(t){var s=this.getStyle(t);if(!ru(s,t))return this.modifyStyle(t),s}}setActiveState(t){return ic.call(this,"active",t),this}setHoverState(t){return ic.call(this,"hover",t),this}setDisableState(t){return ic.call(this,"disable",t),this}}var ec=function(i,t,s){var c=of(i,t);if(s)for(var C in c)s.hasOwnProperty(C)&&(c[s[C]]=c[C],delete c[C]);return c},ic=function(i,t){t===void 0&&(t=!0);var s=`${i}State`,c=`${i}Style`,C=`${i}StyleSave`;this[s]!==t&&(this[s]=t,t?this[C]=this.applyStyle(this[c]):(this.applyStyle(this[C]),this[C]=void 0))};const bu={addStyleManager(i){return this.styleManager=new v8(this,i),this},setActiveState(i){return this.styleManager.setActiveState(i),this},setHoverState(i){return this.styleManager.setHoverState(i),this},setDisableState(i){return this.styleManager.setDisableState(i),this}},p8=Phaser.GameObjects.Image,To=Phaser.Utils.Objects.GetValue;class sl extends p8{constructor(t,s){s===void 0&&(s={});var c=To(s,"x",0),C=To(s,"y",0),S=To(s,"key",""),l=To(s,"frame",void 0);super(t,c,C,S,l),this.type="rexStatesImage";var T=To(s,"effects",!0);T&&_h(this,T),this.style=new f8(this,s),s.style=this.style,this.addStyleManager(s),delete s.style}}Object.assign(sl.prototype,bu);xt.register("statesImage",function(i){var t=new sl(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.StatesImage",sl);class Mu extends Qn{constructor(t,s){s===void 0&&(s={}),super(t,s),this.type="rexStatesRoundRectangleShape",s.style=this,s.propertiesMap=m8,this.addStyleManager(s),delete s.style,delete s.propertiesMap}}const m8={color:"fillColor",alpha:"fillAlpha",strokeWidth:"lineWidth"};Object.assign(Mu.prototype,bu);xt.register("statesRoundRectangle",function(i){var t=new Mu(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.StatesRoundRectangle",Mu);class g8 extends ke{constructor(t,s){return super(t),new Proxy(this,this)}get(t,s){if(Ee(t,s))return t[s];var c=t.parent;if(Ee(c,s))return c[s]}set(t,s,c){return Ee(t,s)?t[s]=c:Ee(t.parent,s)&&(t.parent[s]=c),!0}get key(){return this.parent.texture.key}set key(t){this.parent.setTexture(t,this.frame)}get frame(){return this.parent.frame.name}set frame(t){this.parent.setFrame(t)}get leftWidth(){return this.parent.leftWidth}set leftWidth(t){var s=this.parent;parent.setSlices(s.width,s.height,t,s.rightWidth,s.topHeight,s.bottomHeight)}get rightWidth(){return this.parent.rightWidth}set rightWidth(t){var s=this.parent;parent.setSlices(s.width,s.height,s.leftWidth,t,s.topHeight,s.bottomHeight)}get topHeight(){return this.parent.topHeight}set topHeight(t){var s=this.parent;parent.setSlices(s.width,s.height,s.leftWidth,s.rightWidth,t,s.bottomHeight)}get bottomHeight(){return this.parent.bottomHeight}set bottomHeight(t){var s=this.parent;parent.setSlices(s.width,s.height,s.leftWidth,s.rightWidth,s.topHeight,t)}}const x8=Phaser.GameObjects.NineSlice,cs=Phaser.Utils.Objects.GetValue;class wu extends x8{constructor(t,s){s===void 0&&(s={});var c=cs(s,"x",0),C=cs(s,"y",0),S=cs(s,"key",null),l=cs(s,"frame",null),T=cs(s,"width",0),e=cs(s,"height",0),d=cs(s,"leftWidth",0),g=cs(s,"rightWidth",0),r=cs(s,"topHeight",0),a=cs(s,"bottomHeight",0);super(t,c,C,S,l,T,e,d,g,r,a),this.type="rexStatesNineSlice";var h=cs(s,"effects",!0);h&&_h(this,h),this.style=new g8(this,s),s.style=this.style,this.addStyleManager(s),delete s.style}}Object.assign(wu.prototype,bu);xt.register("statesNineSlice",function(i){var t=new wu(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.StatesNineSlice",wu);
6407const y8=Phaser.GameObjects.Text,sc=Phaser.Utils.Objects.GetValue;class Au extends y8{constructor(t,s){s===void 0&&(s={});var c=sc(s,"x",0),C=sc(s,"y",0),S=sc(s,"text","");super(t,c,C,S,s),this.type="rexStatesText",s.style=this.style,s.onModifyStyle=function(l,T){var e=T.hasOwnProperty("fontStyle")||T.hasOwnProperty("fontSize")||T.hasOwnProperty("fontFamily");l.style.update(e)},this.addStyleManager(s),delete s.style}}Object.assign(Au.prototype,bu);xt.register("statesText",function(i){var t=new Au(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.StatesText",Au);var C8=function(i){if(!window.Chart){var t=`Can not find chartjs! Load chartjs in preload stage. 6408scene.load.script('chartjs', 'https://cdnjs.cloudflare.com/ajax/libs/Chart.js/3.8.0/Chart.min.js');`;return console.error(t),this}return this.chart&&this.chart.destroy(),this.chart=new Chart(this.context,T8(this,i)),this},T8=function(i,t){t===void 0&&(t={}),t.options===void 0&&(t.options={});var s=t.options;s.responsive=!1,s.maintainAspectRatio=!1,s.hasOwnProperty("devicePixelRatio")||(s.devicePixelRatio=1);var c=!1;s.animation===void 0?s.animation={}:s.animation===!1&&(c=!0,s.animation={});var C=s.animation;c&&(C.duration=0);var S=C.onProgress;C.onProgress=function(T){S&&S(T),i.needRedraw()};var l=C.onComplete;return C.onComplete=function(T){l&&l(T),i.needRedraw()},t},S8=function(i){if(this.chart!==void 0)if(typeof i=="string"){for(var t=this.chart.data.datasets,s,c=0,C=t.length;c<C;c++)if(s=t[c],s.label===i)return s}else return this.chart.data.datasets[i]},E8=function(i,t){var s=this.getChartDataset(i);if(s!==void 0){if(typeof t=="string"){var c=this.chart.data.labels;if(t=c.indexOf(t),t===-1)return}return s.data[t]}},P8=function(i,t,s){if(this.chart===void 0)return this;var c=this.getChartDataset(i);if(typeof t=="string"){var C=this.chart.data.labels;if(t=C.indexOf(t),t===-1)return this}return c.data[t]=s,this},b8=function(){return this.chart===void 0?this:(this.chart.update(),this)};let Nv=class extends Xr{constructor(t,s,c,C,S,l){super(t,s,c,C,S),this.type="rexChart",this.chart=void 0,l!==void 0&&this.setChart(l)}destroy(t){this.scene&&(this.chart&&(this.chart.destroy(),this.chart=void 0),super.destroy(t))}resize(t,s){if(t===this.width&&s===this.height)return this;if(super.resize(t,s),this.chart){var c=this.chart;c.height=this.canvas.height,c.width=this.canvas.width,c.aspectRatio=c.height?c.width/c.height:null,c.update()}return this}};var M8={setChart:C8,getChartDataset:S8,getChartData:E8,setChartData:P8,updateChart:b8};Object.assign(Nv.prototype,M8);xt.register("chart",function(i,t,s,c,C){var S=new Nv(this.scene,i,t,s,c,C);return this.scene.add.existing(S),S});mt(window,"RexPlugins.UI.Chart",Nv);xt.register("container",function(i,t,s,c,C){var S=new Ui(this.scene,i,t,s,c,C);return this.scene.add.existing(S),S});mt(window,"RexPlugins.UI.Container",Ui);xt.register("sizer",function(i,t,s,c,C,S){var l=new ee(this.scene,i,t,s,c,C,S);return this.scene.add.existing(l),l});mt(window,"RexPlugins.UI.Sizer",ee);var dC=function(){return Array.prototype.reduce.call(arguments,w8,0)},w8=function(i,t){return i+t},A8=function(i){if(this.rexSizer.hidden)return 0;i===void 0&&(i=!0);for(var t=0,s,c=this.sizerChildren,C,S,l,T,e=0;e<this.columnCount;e++){if(T=this.columnProportions[e],s=0,T===0||i){for(var d=0;d<this.rowCount;d++)C=c[d*this.columnCount+e],C&&(C.rexSizer.hidden||(S=C.rexSizer.padding,l=this.getChildWidth(C)+S.left+S.right,s=Math.max(s,l)));t+=s}this.columnWidth[e]=s}var g=this.space,r=Math.max(g.indentLeftOdd,g.indentLeftEven);return t+dC(g.left,r,...g.column,g.right)},R8=function(i){if(this.rexSizer.hidden)return 0;i===void 0&&(i=!0);for(var t=0,s,c=this.sizerChildren,C,S,l,T,e=0;e<this.rowCount;e++){if(T=this.rowProportions[e],s=0,T===0||i){for(var d=0;d<this.columnCount;d++)C=c[e*this.columnCount+d],C&&(C.rexSizer.hidden||(l=C.isRexSizer?Math.max(C.minHeight,C.childrenHeight):C.hasOwnProperty("minHeight")?C.minHeight:ie(C),S=C.rexSizer.padding,l+=S.top+S.bottom,s=Math.max(s,l)));t+=s}this.rowHeight[e]=s}var g=this.space,r=Math.max(g.indentTopOdd,g.indentTopEven);
6408return t+dC(g.top,r,...g.row,g.bottom)},O8=function(i,t){var s,c=i.rexSizer;if(c.expandWidth){var C=c.padding;s=t-C.left-C.right}return s},L8=function(i,t){var s,c=i.rexSizer;if(c.expandHeight){var C=c.padding;s=t-C.top-C.bottom}return s},F8=function(i){i===void 0&&(i=[]);for(var t=this.sizerChildren,s,c=0,C=t.length;c<C;c++)s=t[c],s&&s.isRexSizer&&i.push(s);return i},I8=function(){return this._totalColumnProportions=void 0,this._totalRowProportions=void 0,this.proportionWidthLength=void 0,this.proportionHeightLength=void 0,qo.call(this),this},D8=function(){for(var i,t,s,c=this.innerLeft,C=this.innerTop,S,l=C,T,e,d,g,r,a,h=this.space.column,n=this.space.row,o=this.space.indentLeftOdd,f=this.space.indentLeftEven,u=this.space.indentTopOdd,v=this.space.indentTopEven,m,p,x,y,P=0;P<this.rowCount;P++){p=this.getRowHeight(P),x=P%2?f:o,S=c+x;for(var b=0;b<this.columnCount;b++){if(m=this.getColumnWidth(b),i=this.getChildAt(b,P),!i||i.rexSizer.hidden){S+=m+h[b];continue}_o.call(this,i),r=this.getExpandedChildWidth(i,m),a=this.getExpandedChildHeight(i,p),i.isRexSizer?(i.runLayout(this,r,a),Ov(i,this)):wi(i,r,a),t=i.rexSizer,s=t.padding,T=S+s.left,d=m-s.left-s.right,y=b%2?v:u,e=l+y+s.top,g=p-s.top-s.bottom,tl.call(this,i,T,e,d,g,t.align),S+=m+h[b]}l+=p+n[P]}},B8=function(t){var t=pv.call(this,t);
6408if(this.proportionWidthLength===void 0){var s=this.totalColumnProportions;if(s>0){var c=t-this.getChildrenWidth(!1);c>=0&&(this.proportionWidthLength=c/s)}else this.proportionWidthLength=0}return t},k8=function(t){var t=mv.call(this,t);if(this.proportionHeightLength===void 0){var s=this.totalRowProportions;if(s>0){var c=t-this.getChildrenHeight(!1);c>=0&&(this.proportionHeightLength=c/s)}else this.proportionHeightLength=0}return t},G8=function(i){var t,s,c;for(var C in this.sizerChildren)t=this.sizerChildren[C],t&&t.isRexSizer&&!t.ignoreLayout&&(c=this.getColumnWidth(parseInt(C)%this.columnCount),s=this.getExpandedChildWidth(t,c),s=t.resolveWidth(s),t.resolveChildrenWidth(s))},N8=function(i){var t,s,c;for(var C in this.sizerChildren)t=this.sizerChildren[C],!(!t||t.isRexSizer&&t.ignoreLayout||!t.runWidthWrap)&&(c=this.getColumnWidth(parseInt(C)%this.columnCount),s=this.getExpandedChildWidth(t,c),t.isRexSizer&&(s=t.resolveWidth(s)),t.runWidthWrap(s));return this};const m0=Phaser.Utils.Objects.IsPlainObject,wn=Phaser.Utils.Objects.GetValue,g0=Phaser.Display.Align.CENTER;var x0=function(i,t,s,c,C){if(typeof i=="number"||typeof t=="number")if(i===void 0){for(var S,l=0;l<c;l++)if(S=t*c+l,!s[S])return S}else if(t===void 0){for(var S,l=0;l<C;l++)if(S=l*c+i,!s[S])return S}else{var S=t*c+i;if(!s[S])return S}else if(t===!0){for(var S,l=0;l<c;l++)for(var T=0;T<C;T++)if(S=T*c+l,!s[S])return S}else for(var l=0,e=s.length;l<e;l++)if(!s[l])return l;return null},V8=function(i,t,s,c,C,S,l){if(Jo.call(this,i),m0(t)){var e=t;t=wn(e,"column",void 0),s=wn(e,"row",void 0),c=wn(e,"align",g0),C=wn(e,"padding",0),S=wn(e,"expand",!1),l=wn(e,"key",void 0)}var T=x0(t,s,this.sizerChildren,this.columnCount,this.rowCount);if(T===null){if(typeof t=="number"&&typeof s=="number")return this;s===!0||typeof s=="number"?this.addEmptyColumn():this.addEmptyRow(),T=x0(t,s,this.sizerChildren,this.columnCount,this.rowCount)}typeof c=="string"&&(c=$a[c]),c===void 0&&(c=g0),C===void 0&&(C=0),S===void 0&&(S=!0);var e=this.getSizerConfig(i);return e.align=c,e.padding=Jn(C),m0(S)?(e.expandWidth=wn(S,"width",!1),e.expandHeight=wn(S,"height",!1)):(e.expandWidth=S,e.expandHeight=S),this.sizerChildren[T]=i,l!==void 0&&this.addChildrenMap(l,i),this};const z8={add:V8};var Fa=function(i,t,s,c){s===void 0&&(s=0),c===void 0&&(c=i.length-1);for(var C=s;C<=c;C++)i[C]=t;return i};const Y8={remove(i,t){if(this.getParentSizer(i)!==this)return this;var s=this.sizerChildren.indexOf(i);return s!==-1&&(this.sizerChildren[s]=null),Qo.call(this,i,t),this},removeAt(i,t,s){var c=this.getChildAt(i,t);return c&&this.remove(c,s),this},removeAll(i){for(var t=this.sizerChildren.length-1;t>=0;t--){var s=this.sizerChildren[t];s&&this.remove(s,i)}return this},clear(i){return Fa(this.sizerChildren,null),xu.call(this,i),this}},X8={setColumnSpace(i){if(this.space.column||(this.space.column=[]),this.space.column.length=this.columnCount-1,typeof i=="number")Fa(this.space.column,i);else for(var t=0,s=this.columnCount-1;t<s;t++)this.space.column[t]=i[t]||0;return this},setRowSpace(i){if(this.space.row||(this.space.row=[]),this.space.row.length=this.rowCount-1,typeof i=="number")Fa(this.space.row,i);else for(var t=0,s=this.rowCount-1;t<s;t++)this.space.row[t]=i[t]||0;return this},setIndentLeft(i,t){return this.space.indentLeftOdd=i,this.space.indentLeftEven=t,this},setIndentTop(i,t){return this.space.indentTopOdd=i,this.space.indentTopEven=t,this}},y0=Phaser.Utils.Objects.GetValue;var U8=function(i,t,s,c,C){if(s===void 0&&(s=0),c===void 0&&(c=0),this.columnCount=i,this.rowCount=t,this.gridCount=i*t,this.removeAll(),this.sizerChildren.length=i*t,Fa(this.sizerChildren,null),this.columnProportions=[],this.columnProportions.length=i,typeof s=="number")Fa(this.columnProportions,s);else for(var S=0;S<i;S++)this.columnProportions[S]=s[S]||0;if(this.rowProportions=[],this.rowProportions.length=t,typeof c=="number")Fa(this.rowProportions,c);else for(var S=0;S<t;S++)this.rowProportions[S]=c[S]||0;this.columnWidth=[],this.columnWidth.length=i,this.rowHeight=[],this.rowHeight.length=t,this.setColumnSpace(y0(C,"column",0)),this.setRowSpace(y0(C,"row",0));var l=this.scene,T=this.createCellContainerCallback;if(T)for(var e=0,d=this.rowCount;e<d;e++)for(var g=0,r=this.columnCount;g<r;g++){var a={column:g,row:e},h=T(l,g,e,a);h&&this.add(h,a)}return this},cC=function(i,t,s){t===void 0&&(t=this.rowProportions[0]||0),s===void 0&&(s=this.space.row[0]||0),this.rowCount+=1,this.gridCount+=this.columnCount;for(var c=[i*this.columnCount,0],C=0;C<this.columnCount;C++)c.push(null);return this.sizerChildren.splice.apply(this.sizerChildren,c),this.rowProportions.push(t),this.rowHeight.length+=1,this.space.row.splice(i,0,s),this},W8=function(i,t){return cC.call(this,this.rowCount,i,t),this},fC=function(i,t,s){t===void 0&&(t=this.columnProportions[0]||0),s===void 0&&(s=this.space.column[0]||0),this.columnCount+=1,this.gridCount+=this.rowCount;for(var c=this.rowCount-1;c>=0;c--){var C=c*this.columnCount+i;this.sizerChildren.splice(C,0,null)}return this.columnProportions.push(t),this.columnWidth.length+=1,this.space.column.splice(i,0,s),this},H8=function(i,t){return fC.call(this,this.columnCount,i,t),this},vC={getChildrenWidth:A8,getChildrenHeight:R8,getExpandedChildWidth:O8,getExpandedChildHeight:L8,getChildrenSizers:F8,preLayout:I8,layoutChildren:D8,resolveWidth:B8,resolveHeight:k8,resolve
6408ChildrenWidth:G8,runWidthWrap:N8,resetGrid:U8,inseryEmptyRow:cC,addEmptyRow:W8,insertEmptyColumn:fC,addEmptyColumn:H8};Object.assign(vC,z8,Y8,X8);var $8=function(){for(var i=0,t,s=0;s<this.columnCount;s++)t=this.columnProportions[s],t>0&&(i+=t);return i},j8=function(){for(var i=0,t,s=0;s<this.rowCount;s++)t=this.rowProportions[s],t>0&&(i+=t);return i};const th=Phaser.Utils.Objects.IsPlainObject,ge=Phaser.Utils.Objects.GetValue;class yn extends Wr{constructor(t,s,c,C,S,l,T,e,d,g){th(s)?(g=s,s=ge(g,"x",0),c=ge(g,"y",0),C=ge(g,"width",void 0),S=ge(g,"height",void 0),l=ge(g,"column",g.col||0),T=ge(g,"row",0),e=ge(g,"columnProportions",0),d=ge(g,"rowProportions",0)):th(C)?(g=C,C=ge(g,"width",void 0),S=ge(g,"height",void 0),l=ge(g,"column",g.col||0),T=ge(g,"row",0),e=ge(g,"columnProportions",0),d=ge(g,"rowProportions",0)):th(l)?(g=l,l=ge(g,"column",g.col||0),T=ge(g,"row",0),e=ge(g,"columnProportions",0),d=ge(g,"rowProportions",0)):th(e)&&(g=e,e=ge(g,"columnProportions",0),d=ge(g,"rowProportions",0)),super(t,s,c,C,S,g),this.type="rexGridSizer",this.sizerChildren=[],this.addChildrenMap("items",this.sizerChildren),this.setCreateCellContainerCallback(ge(g,"createCellContainerCallback")),this.setIndentLeft(ge(g,"space.indentLeftOdd",0),ge(g,"space.indentLeftEven",0)),this.setIndentTop(ge(g,"space.indentTopOdd",0),ge(g,"space.indentTopEven",0)),this.resetGrid(l,T,e,d,ge(g,"space",void 0))}destroy(t){!this.scene||this.ignoreDestroy||(super.destroy(t),this.columnProportions=void 0,this.rowProportions=void 0,this.columnWidth=void 0,this.rowHeight=void 0,this.createCellContainerCallback=void 0)}setColumnProportion(t,s){return t>=this.columnProportions.length?this:(this.columnProportions[t]=s,this)}setRowProportion(t,s){return t>=this.rowProportions.length?this:(this.rowProportions[t]=s,this)}get totalColumnProportions(){return this._totalColumnProportions===void 0&&(this._totalColumnProportions=$8.call(this)),this._totalColumnProportions}get totalRowProportions(){return this._totalRowProportions===void 0&&(this._totalRowProportions=j8.call(this)),this._totalRowProportions}getChildAt(t,s){return this.sizerChildren[s*this.columnCount+t]}childToGridIndex(t,s){if(!t)return null;var c=this.sizerChildren.indexOf(t);return c===-1?null:(s===void 0&&(s={}),s.x=c%this.columnCount,s.y=Math.floor(c/this.columnCount),s)}getColumnWidth(t){var s=this.columnProportions[t],c=s===0?this.columnWidth[t]:s*this.proportionWidthLe
6408ngth;return c}getRowHeight(t){var s=this.rowProportions[t],c=s===0?this.rowHeight[t]:s*this.proportionHeightLength;return c}setCreateCellContainerCallback(t){return this.createCellContainerCallback=t,this}}Object.assign(yn.prototype,vC);xt.register("gridSizer",function(i,t,s,c,C,S,l,T,e){var d=new yn(this.scene,i,t,s,c,C,S,l,T,e);return this.scene.add.existing(d),d});mt(window,"RexPlugins.UI.GridSizer",yn);var K8=function(){return this.rexSizer.hidden?0:this.maxChildWidth+this.space.left+this.space.right},Z8=function(){return this.rexSizer.hidden?0:this.widthWrapResult.height+this.space.top+this.space.bottom},J8=function(i){i===void 0&&(i=[]);for(var t=this.sizerChildren,s,c=0,C=t.length;c<C;c++)s=t[c],s!==` 6409`&&s.isRexSizer&&i.push(s);return i},Q8=function(){return this._maxChildWidth=void 0,this._maxChildHeight=void 0,qo.call(this),this},q8=function(){for(var i=this.innerWidth,t=this.justifyPercentage,s=this.space.item,c=this.space.line,C=this.space.indentLeftOdd,S=this.space.indentLeftEven,l=this.space.indentTopOdd,T=this.space.indentTopEven,e,d,g,r=0,a,h,n=this.innerLeft,o=this.innerTop,f,u,v,m,p=this.widthWrapResult.lines,x,y,P,b,E=o,M=0,w=p.length;M<w;M++){switch(x=p[M],y=x.children,this.rtl&&y.reverse(),a=M%2?S:C,b=n+a,P=i-x.width,this.align){case 0:break;case 1:b+=P;break;case 2:b+=P/2;break;case 3:r=nc(i,P,t,y.length);break;case 4:r=nc(i,P,t,y.length),r===0&&(b+=P);break;case 5:r=nc(i,P,t,y.length),r===0&&(b+=P/2);break}for(var A=!0,R=0,L=y.length;R<L;R++)e=y[R],!e.rexSizer.hidden&&(d=e.rexSizer,g=d.padding,_o.call(this,e),f=b+g.left,A?A=!1:f+=s,h=R%2?T:l,u=E+h+g.top,v=de(e),m=ie(e),b=f+v+g.right+r,tl.call(this,e,f,u,v,m,d.align));E+=x.height+c}},nc=function(i,t,s,c){return t/i<=s?t/(c-1):0},_8=function(i,t){t===void 0?t={lines:[],width:0,height:0}:(t.lines.length=0,t.width=0,t.height=0);for(var s=this.sizerChildren,c=this.space.item,C=this.space.line,S=this.space.indentLeftOdd,l=this.space.indentLeftEven,T=this.space.indentTopOdd,e=this.space.indentTopEven,d,g,r,a=0,h,n=t.lines,o=void 0,f,u=0,v=s.length;u<v;u++){if(d=s[u],d===` 6410`)d=void 0,g=0,f=!0;else{if(d.rexSizer.hidden)continue;d.isRexSizer&&d.layout(),g=t7(d),f=a<g||o===void 0}if(f){o&&(o.width=i-(a+c),t.width=Math.max(t.width,o.width),t.height+=o.height+C),o={children:[],height:0},n.push(o);var h=n.length%2?S:l;a=i-h}a-=g+c,d&&(o.children.push(d),r=e7(d),o.height=Math.max(o.height,r))}return o&&(o.width=i-(a+c),t.width=Math.max(t.width,o.width),t.height+=o.height),t.height+=Math.max(T,e),t},t7=function(i){var t=i.rexSizer.padding;return de(i)+t.left+t.right},e7=function(i){var t=i.rexSizer.padding;return ie(i)+t.top+t.bottom},i7=function(i){var t=i-this.space.left-this.space.right;this.widthWrapResult=_8.call(this,t,this.widthWrapResult),A1.call(this,i)};const C0=Phaser.Math.Distance.Between;var s7=function(i,t){var s=this.sizerChildren;if(s.length===0)return-1;for(var c=-1,C=1/0,S=0,l=s.length;S<l;S++){var T=s[S];if(!(Math.abs(T.centerY-t)>T.height/2)){var d=C0(T.left,T.centerY,i,t);C>d&&(C=d,c=S);var e=s[S+1];if(!(e&&e.y===T.y)){var d=C0(T.right,T.centerY,i,t);C>d&&(C=d,c=S+1)}}}return c};const n7=Phaser.Utils.Objects.IsPlainObject,rc=Phaser.Utils.Objects.GetValue,r7=Phaser.Display.Align.CENTER;var ac=function(i,t,s,c){if(i===` 6411`)return this.addNewLine(),this;if(Jo.call(this,i),n7(t)){var C=t;t=rc(C,"padding",0),s=rc(C,"key",void 0),c=rc(C,"index",void 0)}t===void 0&&(t=0);var C=this.getSizerConfig(i);return C.align=r7,C.padding=Jn(t),c===void 0||c>=this.sizerChildren.length?this.sizerChildren.push(i):this.sizerChildren.splice(c,0,i),s!==void 0&&this.addChildrenMap(s,i),this};const a7={add(i,t,s){if(Ts(i))for(var c=i,C=0,S=c.length;C<S;C++)ac.call(this,c[C],t);else ac.call(this,i,t,s);return this},addNewLine(){return this.sizerChildren.push(` 6412`),this},insert(i,t,s,c){return ac.call(this,t,s,c,i),this},insertAtPosition(i,t,s,c,C){var S=s7.call(this,i,t);return S===-1&&(S=void 0),this.insert(S,s,c,C),this}},o7=Phaser.Utils.Array.Remove,l7={remove(i,t){return this.getParentSizer(i)!==this?this:(o7(this.sizerChildren,i),Qo.call(this,i,t),this)},removeAll(i){for(var t=this.sizerChildren.length-1;t>=0;t--)this.remove(this.sizerChildren[t],i);return this},clear(i){return this.sizerChildren.length=0,xu.call(this,i),this}};var pC={getChildrenWidth:K8,getChildrenHeight:Z8,getChildrenSizers:J8,preLayout:Q8,layoutChildren:q8,runWidthWrap:i7};Object.assign(pC,a7,l7);var h7=function(i){i===void 0&&(i=this.sizerChildren);for(var t=0,s,c,C=0,S=i.length;C<S;C++)s=i[C],s!==` 6413`&&(c=this.getChildWidth(s),t=Math.max(c,t));return t},u7=function(i){i===void 0&&(i=this.sizerChildren);for(var t=0,s,c,C=0,S=i.length;C<S;C++)s=i[C],s!==` 6414`&&(c=s.isRexSizer?Math.max(s.minHeight,s.childrenHeight):s.hasOwnProperty("minHeight")?s.minHeight:ie(s),t=Math.max(c,t));return t};
6414const T0=Phaser.Utils.Objects.IsPlainObject,hi=Phaser.Utils.Objects.GetValue;class Hr extends Wr{constructor(t,s,c,C,S,l){T0(s)?(l=s,s=hi(l,"x",0),c=hi(l,"y",0),C=hi(l,"width",void 0),S=hi(l,"height",void 0)):T0(C)&&(l=C,C=hi(l,"width",void 0),S=hi(l,"height",void 0)),super(t,s,c,C,S,l),this.type="rexFixWidthSizer",this.sizerChildren=[],this.setOrientation(hi(l,"orientation",0)),this.setItemSpacing(hi(l,"space.item",0)),this.setLineSpacing(hi(l,"space.line",0)),this.setIntentLeft(hi(l,"space.indentLeftOdd",0),hi(l,"space.indentLeftEven",0)),this.setIntentTop(hi(l,"space.indentTopOdd",0),hi(l,"space.indentTopEven",0)),this.setAlign(hi(l,"align",0)),this.setJustifyPercentage(hi(l,"justifyPercentage",.25)),this.setRTL(hi(l,"rtl",!1)),this.addChildrenMap("items",this.sizerChildren)}setOrientation(t){return this.orientation=Pu(t),this}setItemSpacing(t){return this.space.item=t,this}setLineSpacing(t){return this.space.line=t,this}setIntentLeft(t,s){return this.space.indentLeftOdd=t,this.space.indentLeftEven=s,this}setIntentTop(t,s){return this.space.indentTopOdd=t,this.space.indentTopEven=s,this}setAlign(t){return typeof t=="string"&&(t=d7[t]),this.align=t,this}setJustifyPercentage(t){return this.justifyPercentage=t,this}setRTL(t){return t===void 0&&(t=!0),this.rtl=t,this}get maxChildWidth(){return this._maxChildWidth===void 0&&(this._maxChildWidth=h7.call(this)),this._maxChildWidth}get maxChildHeight(){return this._maxChildHeight===void 0&&(this._maxChildHeight=u7.call(this)),this._maxChildHeight}}const d7={left:0,top:0,right:1,bottom:1,center:2,justify:3,"justify-left":3,"justify-top":3,"justify-right":4,"justify-bottom":4,"justify-center":5};Object.assign(Hr.prototype,pC);xt.register("fixWidthSizer",function(i,t,s,c,C){var S=new Hr(this.scene,i,t,s,c,C);return this.scene.add.existing(S),S});mt(window,"RexPlugins.UI.FixWidthSizer",Hr);xt.register("overlapSizer",function(i,t,s,c,C){var S=new hs(this.scene,i,t,s,c,C);return this.scene.add.existing(S),S});mt(window,"RexPlugins.UI.OverlapSizer",hs);xt.register("space",function(){var i=new Bv(this.scene);return i});mt(window,"RexPlugins.UI.Space",Bv);xt.register("label",function(i){var t=new tr(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.Label",tr);var ts=function(i,t){var s;t&&(t.hasOwnProperty("type")?s=t.type:t.hasOwnProperty("leftWidth")?s="nineSlice":t.hasOwnProperty("key")&&(s="image"));var c;switch(s){case"image":c=new sl(i,t);break;case"nineSlice":t.hasOwnProperty("stretchMode")?c=new Kh(i,t):c=new wu(i,t);break;default:c=new Mu(i,t);break}return i.add.existing(c),c};const pa=Phaser.Utils.Objects.GetValue,c7=Phaser.GameObjects.BitmapText;var mC=function(i,t){var s=pa(t,"$type");s===void 0&&pa(t,"key")&&(s="bitmaptext");var c;switch(s){case"bitmaptext":case"bitmap":var C=pa(t,"key"),S=pa(t,"size");S===void 0&&(S=pa(t,"fontSize")),c=new c7(i,0,0,C,"",S);var l=pa(t,"color");l!==void 0&&c.setTint(l);break;case"bbcodetext":case"bbcode":c=new kf(i,0,0,"",t);break;case"text":default:c=new Au(i,t);break}return i.add.existing(c),c};const f7=Phaser.GameObjects.BitmapText;var gC=function(i){return i instanceof f7};const v7=Phaser.GameObjects.Text;var Vv=function(i){return i instanceof v7},p7=function(i){var t=function(s){var c=i.padding,C=s-c.left-c.right,S=i.style;return Vv(i)?(S.wordWrapWidth=C,S.maxLines=0):(S.wrapMode===0&&(S.wrapMode=1),S.wrapWidth=C,S.maxLines=0),S.fixedWidth=s,S.fixedHeight=0,i.updateText(),i.minHeight=i.height,i};return t},m7=function(i){var t=function(s){return i.setFixedSize(s,0).runWordWrap(),i.minHeight=i.height,i};return t},g7=function(i){var t=function(s){return i.setMaxWidth(s),i.minHeight=i.height,i};return t},x7=function(i){return i instanceof Ua},xC=function(i,t){return t===void 0&&(t=0),i._minWidth=t,i.runWidthWrap=x7(i)?m7(i):gC(i)?g7(i):p7(i),i},S0=function(i,t){var s=new sl(i,t);return i.add.existing(s),s};const So=Phaser.Utils.Objects.GetValue;var zv=function(i,t,s){t=t?zi(t):{};var c=So(s,"background",ts),C=So(s,"text",mC),S=So(s,"icon",S0),l=So(s,"action",S0);if(c?t.background=c(i,t.background):delete t.background,C){var T=So(t,"wrapText",!1);T&&(T===!0&&(T="word"),mt(t,"text.wrap.mode",T),t.expandTextWidth=!0),t.text=C(i,t.text),T&&(t.text=xC(t.text))}else delete t.text;return S&&t.icon!==null?t.icon=S(i,t.icon):delete t.icon,l&&t.action!==null?t.action=l(i,t.action):delete t.action,t};class Yv extends tr{constructor(t,s,c){s=zv(t,s,c),super(t,s),this.type="rexSimpleLabel"}setActiveState(t){return oc(this.getChildren(),"setActiveState",t),this}setHoverState(t){return oc(this.getChildren(),"setHoverState",t),this}setDisableState(t){return oc(this.getChildren(),"setDisableState",t),this}}var oc=function(i,t,s){for(var c=0,C=i.length;c<C;c++){var S=i[c];S&&S[t]&&S[t](s)}};xt.register("simpleLabel",function(i,t){var s=new Yv(this.scene,i,t);return this.scene.add.existing(s),s});mt(window,"RexPlugins.UI.SimpleLabel",Yv);
6414const Ut=Phaser.Utils.Objects.GetValue;var y7=function(i){var t=this.scene,s=Ut(i,"orientation",0);this.setOrientation(s);var c=Ut(i,"icon",void 0),C=Ut(i,"iconMask",void 0),S=Ut(i,"innerBackground",void 0),l=Ut(i,"title",void 0),T=Ut(i,"separator",void 0),e=Ut(i,"text",void 0),d=Ut(i,"action",void 0),g=Ut(i,"actionMask",void 0);if(c){var f;this.orientation===0?f={right:Ut(i,"space.icon",0),top:Ut(i,"space.iconTop",0),bottom:Ut(i,"space.iconBottom",0),left:Ut(i,"space.iconLeft",0)}:f={bottom:Ut(i,"space.icon",0),left:Ut(i,"space.iconLeft",0),right:Ut(i,"space.iconRight",0),top:Ut(i,"space.iconTop",0)};var r=Ut(i,"squareFitIcon",!1)?1:0;if(this.add(c,{proportion:0,padding:f,fitRatio:r}),C&&(C=Ss.call(this,c,c,1)),!r){var a=Ut(i,"iconSize",void 0);this.setIconSize(Ut(i,"iconWidth",a),Ut(i,"iconHeight",a))}}var h=new ee(t,{orientation:1});S&&h.addBackground(S);var n=Ut(i,"space.separator",0);if(l){var o=Ut(i,"align.title","left"),f={bottom:!T&&e?n:0,left:Ut(i,"space.titleLeft",0),right:Ut(i,"space.titleRight",0)};h.add(l,{proportion:0,align:o,padding:f})}if(T){var f={top:l?n:0,bottom:e?n:0,left:Ut(i,"space.separatorLeft",0),right:Ut(i,"space.separatorRight",0)};h.add(T,{expand:!0,padding:f})}if(e){var o=Ut(i,"align.text","left"),f={left:Ut(i,"space.textLeft",0),right:Ut(i,"space.textRight",0)};h.add(e,{proportion:0,align:o,padding:f})}var f=void 0;if(d&&(f={right:Ut(i,"space.text",0)}),this.add(h,{proportion:1,padding:f}),d){var f;this.orientation===0?f={top:Ut(i,"space.actionTop",0),bottom:Ut(i,"space.actionBottom",0),right:Ut(i,"space.actionRight",0)}:f={left:Ut(i,"space.actionLeft",0),right:Ut(i,"space.actionRight",0),bottom:Ut(i,"space.actionBottom",0)};var r=Ut(i,"squareFitAction",!1)?1:0;if(this.add(d,{proportion:0,padding:f,fitRatio:r}),g&&(g=Ss.call(this,d,d,1)),!r){var u=Ut(i,"actionSize");this.setActionSize(Ut(i,"actionWidth",u),Ut(i,"actionHeight",u))}}this.addChildrenMap("icon",c),this.addChildrenMap("iconMask",C),this.addChildrenMap("innerSizer",h),this.addChildrenMap("innerBackground",S),this.addChildrenMap("title",l),this.addChildrenMap("separator",T),this.addChildrenMap("text",e),this.addChildrenMap("action",d),this.addChildrenMap("actionMask",g)};const Nt=Phaser.Utils.Objects.GetValue;var C7=function(i){this.setOrientation(1),this.setRTL(!1);var t=this.scene,s=Nt(i,"title",void 0),c=Nt(i,"separator",void 0),C=Nt(i,"innerBackground",void 0),S=Nt(i,"icon",void 0),l=Nt(i,"iconMask",void 0),T=Nt(i,"text",void 0),e=Nt(i,"action",void 0),d=Nt(i,"actionMask",void 0);if(s){var g=Nt(i,"align.title","left"),r={bottom:Nt(i,"space.title",0),left:Nt(i,"space.titleLeft",0),right:Nt(i,"space.titleRight",0)};this.add(s,{proportion:0,align:g,padding:r})}if(c){var a=Nt(i,"space.separator",0),r={top:s?a:0,bottom:T?a:0,left:Nt(i,"space.separatorLeft",0),right:Nt(i,"space.separatorRight",0)};this.add(c,{proportion:0,expand:!0,padding:r})}var h=Nt(i,"orientation",0),n=new ee(t,{orientation:h,rtl:Nt(i,"rtl",!1),space:{left:Nt(i,"space.innerLeft",0),right:Nt(i,"space.innerRight",0),top:Nt(i,"space.innerTop",0),bottom:Nt(i,"space.innerBottom",0)}});if(C&&n.addBackground(C),this.add(n,{proportion:1,expand:!0}),S){var r=void 0;n.orientation===0?r={right:Nt(i,"space.icon",0),top:Nt(i,"space.iconTop",0),bottom:Nt(i,"space.iconBottom",0),left:Nt(i,"space.iconLeft",0)}:r={bottom:Nt(i,"space.icon",0),left:Nt(i,"space.iconLeft",0),right:Nt(i,"space.iconRight",0),top:Nt(i,"space.iconTop",0)};var o=Nt(i,"squareFitIcon",!1)?1:0;if(n.add(S,{proportion:0,padding:r,fitRatio:o}),l&&(l=Ss.call(this,S,S,1)),!o){var f=Nt(i,"iconSize",void 0);this.setIconSize(Nt(i,"iconWidth",f),Nt(i,"iconHeight",f))}}if(T){var g=Nt(i,"align.text","left"),u=Nt(i,"space.text",0),v=Nt(i,"expandTextWidth",!1),m=Nt(i,"expandTextHeight",!1),p,r,x;n.orientation===0?(p=v?1:0,e&&(r={right:u}),x=m):(p=m?1:0,e&&(r={bottom:u}),x=v),n.add(T,{proportion:p,expand:x,align:g,padding:r})}if(e){var r;n.orientation===0?r={top:Nt(i,"space.actionTop",0),bottom:Nt(i,"space.actionBottom",0),right:Nt(i,"space.actionRight",0)}:r={left:Nt(i,"space.actionLeft",0),right:Nt(i,"space.actionRight",0),bottom:Nt(i,"space.actionBottom",0)};var o=Nt(i,"squareFitAction",!1)?1:0;if(n.add(e,{proportion:0,padding:r,fitRatio:o}
6414),d&&(d=Ss.call(this,e,e,1)),!o){var y=Nt(i,"actionSize");this.setActionSize(Nt(i,"actionWidth",y),Nt(i,"actionHeight",y))}}this.addChildrenMap("title",s),this.addChildrenMap("separator",c),this.addChildrenMap("innerSizer",n),this.addChildrenMap("innerBackground",C),this.addChildrenMap("icon",S),this.addChildrenMap("iconMask",l),this.addChildrenMap("text",T),this.addChildrenMap("action",e),this.addChildrenMap("actionMask",d)};const E0=Phaser.Utils.Objects.GetValue,P0=[y7,C7];class Xv extends kv{constructor(t,s){super(t,s),this.type="rexTitleLabel";var c=E0(s,"background",void 0);c&&this.addBackground(c);var C=E0(s,"layoutMode",0),S=P0[C]||P0[0];S.call(this,s),this.addChildrenMap("background",s.background)}get title(){var t=this.childrenMap.title;return t?t.title:""}set title(t){var s=this.childrenMap.title;s&&s.setText(t)}setTitle(t){return this.title=t,this}resetDisplayContent(t){t===void 0?t={}:typeof t=="string"&&(t={text:t}),super.resetDisplayContent(t);var s=this.childrenMap.title;return s&&(t.title===void 0||(t.title?(this.show(s),this.setTitle(t.title)):this.hide(s))),this}}xt.register("titleLabel",function(i){var t=new Xv(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.TitleLabel",Xv);const oe=Phaser.Utils.Objects.GetValue,T7=Phaser.Utils.Objects.IsPlainObject;var S7=function(i,t){var s=oe(t,"background",void 0),c=oe(t,"icon",void 0),C=oe(t,"iconMask",void 0),S=oe(t,"nameText",void 0),l=oe(t,"valueText",void 0),T=oe(t,"bar",void 0),e=oe(t,"action",void 0),d=oe(t,"actionMask",void 0);T7(T)&&(T=new ev(i,T),i.add.existing(T),S&&i.children.moveBelow(T,S),l&&i.children.moveBelow(T,l));var g=S||l||T;if(s&&this.addBackground(s),c){var r=void 0;this.orientation===0?(g||e)&&(r={right:oe(t,"space.icon",0),top:oe(t,"space.iconTop",0),bottom:oe(t,"space.iconBottom",0)}):(g||e)&&(r={bottom:oe(t,"space.icon",0),left:oe(t,"space.iconLeft",0),right:oe(t,"space.iconRight",0)}),this.add(c,{proportion:0,padding:r}),C&&(C=Ss.call(this,c,c,1))}if(g){var a=new ee(i,{orientation:1}),h;if(S||l){if(h=new ee(i,{orientation:0}),S){S.text===""&&S.setText(" "),S.setOrigin(0,S.originY);var r={left:oe(t,"space.name",0)};h.add(S,{padding:r})}if(l){l.text===""&&l.setText(" "),l.setOrigin(1,l.originY),h.addSpace();var r={right:oe(t,"space.value",0)};h.add(l,{padding:r}),this.setValueTextFormatCallback(oe(t,"valueTextFormatCallback",E7),oe(t,"valueTextFormatCallbackScope",void 0))}a.add(h,{expand:!0})}if(T){var r={top:h?oe(t,"space.bar",0):0,bottom:oe(t,"space.barBottom",0),left:oe(t,"space.barLeft",0),right:oe(t,"space.barRight",0)};a.add(T,{expand:!0,padding:r})}var r=void 0;e&&(r={right:oe(t,"space.text",0)});var n=oe(t,"align.text","bottom");this.add(a,{proportion:1,align:n,padding:r})}if(e){var r;this.orientation===0?r={top:oe(t,"space.actionTop",0),bottom:oe(t,"space.actionBottom",0)}:r={left:oe(t,"space.actionLeft",0),right:oe(t,"space.actionRight",0)},this.add(e,{proportion:0,padding:r}),d&&(d=Ss.call(this,e,e,1))}this.addChildrenMap("background",s),this.addChildrenMap("icon",c),this.addChildrenMap("iconMask",C),this.addChildrenMap("name",S),this.addChildrenMap("value",l),this.addChildrenMap("bar",T),this.addChildrenMap("action",e),this.addChildrenMap("actionMask",d)},E7=function(i,t,s){return i.toString()};const P7=Phaser.Math.Clamp,b7={setValueTextFormatCallback(i,t){return this.valueTextFormatCallback=i,this.valueTextFormatCallbackScope=t,this},getFormatValueText(i,t,s){i===void 0&&(i=this.value),t===void 0&&(t=this.minValue),s===void 0&&(s=this.maxValue);var c;return this.valueTextFormatCallbackScope?c=this.valueTextFormatCallback(i,t,s):c=this.valueTextFormatCallback.call(this.valueTextFormatCallbackScope,i,t,s),c},updateValueText(i,t,s){var c=this.childrenMap.value;return c&&this.valueTextFormatCallback&&(c.setText(this.getFormatValueText(i,t,s)),c.layout&&c.layout()),this},setValue(i,t,s){return i=P7(i,t,s),this.value=i,this.minValue=t,this.maxValue=s,this.updateValueText(i,t,s),this.setBarValue(i,t,s),this}};class Uv extends ee{constructor(t,s){super(t,s),this.type="rexNameValueLabel",S7.call(this,t,s)}get nameText(){var t=this.childrenMap.name;return t===void 0?"":t.text}set nameText(t){var s=this.childrenMap.name;s!==void 0&&s.setText(t)}setNameText(t){return this.nameText=t,this}get valueText(){var t=this.childrenMap.value;return t===void 0?"":t.text}set valueText(t){var s=this.childrenMap.value;s!==void 0&&s.setText(t)}setValueText(t){return this.valueText=t,this}get barValue(){var t=this.childrenMap.bar;if(t!==void 0)return t.value}set barValue(t){var s=this.childrenMap.bar;s!==void 0&&s.setValue(t)}setBarValue(t,s,c){var C=this.childrenMap.bar;return C===void 0?this:(C.setValue(t,s,c),this)}easeBarValueTo(t,s,c){var C=this.childrenMap.bar;return C===void 0?this:(C.easeValueTo(t,s,c),this)}setTexture(t,s){var c=this.childrenMap.icon;if(c!==void 0)return c.setTexture(t,s),this}get texture(){var t=this.childrenMap.icon;if(t!==void 0)return t.texture}get frame(){var t=this.childrenMap.icon;if(t!==void 0)return t.frame}postLayout(t,s,c){var C=this.childrenMap.iconMask;C&&(C.setPosition(),this.resetChildPositionState(C));var S=this.childrenMap.actionMask;return S&&(S.setPosition(),this.resetChildPositionState(S)),this}resize(t,s){super.resize(t,s);var c=this.childrenMap.iconMask;c&&c.resize();var C=this.childrenMap.actionMask;return C&&C.resize(),this}}Object.assign(Uv.prototype,b7);xt.register("nameValueLabel",function(i){var t=new Uv(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.NameValueLabel",Uv);const eh=ee.prototype.add,b0=ee.prototype.addSpace;var lc=function(i){var t=!i.isRexSpace,s=!t||this.buttonsExpand?1:0;if(this.sizerChildren.length===0)if(t){var c=!this.buttonsExpand&&(this.buttonsAlign==="right"||this.buttonsAlign==="center"||this.buttonsAlign==="bottom");c&&b0.call(this),eh.call(this,i,{proportion:s,expand:!0});var C=!this.buttonsExpand&&this.buttonsAlign==="center";C&&b0.call(this),this.hasTailSpace=C}else eh.call(this,i,{proportion:s,expand:!0}),this.hasTailSpace=!1;else if(this.hasTailSpace){var S=this.sizerChildren.length-1;eh.call(this,i,{index:S,proportion:s,expand:!0})}else eh.call(this,i,{proportion:s,expand:!0});return t&&this.buttonGroup.add(i),this};const M7={addButton(i){if(Ts(i))for(var t=i,s=0,c=t.length;s<c;s++)lc.call(this,t[s]);else lc.call(this,i);return this},addButtons(i){for(var t=0,s=i.length;t<s;t++)lc.call(this,i[t]);return this}},w7=ee.prototype.remove,A7=ee.prototype.clear;var hc=function(i,t){return this.getParentSizer(i)!==this?this:(this.buttonGroup.remove(i),w7.call(this,i,t),this)};const R7={remove(i,t){if(Ts(i))for(var s=i,c=0,C=s.length;c<C;
6414c++)hc.call(this,s[c],t);else hc.call(this,i,t);return this},clear(i){var t=this.buttonGroup.buttons;return t.length=0,A7.call(this,i),this},removeButton(s,t){var s=this.getButton(s);return s?(this.remove(s,t),this):this},clearButtons(i){for(var t=this.buttonGroup.buttons,s=t.length-1;s>=0;s--)hc.call(this,t[s],i);return this}};var O7=function(i,t,s){if(i){var c=this.setValueCallback,C=this.setValueCallbackScope;c&&(C?c.call(C,i,t,s):c(i,t,s)),this.fireEvent("button.statechange",i,t,s)}},L7=function(i){var t=this;i._selected=void 0,Object.defineProperty(i,"selected",{get:function(){return i._selected},set:function(s){if(i._selected!==s){var c=i._selected;i._selected=s,O7.call(t,i,s,c)}},enumerable:!0,configurable:!0}),i.selected=!1};const F7={add(i){return this.buttons.push(i),i._click||(i._click=new pn(i,this.clickConfig),i._click.on("click",function(t,s,c,C){this.fireEvent("button.click",s,c,C)},this).on("enable",function(t,s){this.fireEvent("button.enable",s)},this).on("disable",function(t,s){this.fireEvent("button.disable",s)},this),i.on("pointerover",function(t,s,c,C){this.fireEvent("button.over",i,t,C)},this).on("pointerout",function(t,s){this.fireEvent("button.out",i,t,s)},this).on("pointerdown",function(t,s,c,C){this.fireEvent("button.down",i,t,C)},this).on("pointerup",function(t,s){this.fireEvent("button.up",i,t,s)},this)),this.buttonsType&&(i.name===void 0&&console.error(`${this.parent.constructor.name}: Option button miss value`),L7.call(this,i)),this},addMultiple(i){for(var t=0,s=i.length;t<s;t++)this.add(i[t]);return this}},I7=Phaser.Utils.Array.Remove,D7={remove(i){return this.buttonsType&&delete i.selected,I7(this.buttons,i),this},clear(){if(this.buttonsType)for(var i=this.buttons,t=0,s=i.length;t<s;t++)delete i[t].selected;return this.buttons.length=0,this}};var B7=function(i,t,...s){if(this.buttons){var c;if(typeof t=="number"){if(c=t,t=this.buttons[c],!t)return}else if(c=this.buttons.indexOf(t),c===-1)return;this.eventEmitter!==this.parent&&this.parent.emit(i,t,c,...s),this.groupName!==void 0?this.eventEmitter.emit(i,t,this.groupName,c,...s):this.eventEmitter.emit(i,t,c,...s)}};const Eo=Phaser.Utils.Objects.GetValue,k7={setButtonsType(i){i===void 0&&(i={});var t=Eo(i,"buttonsType",i.type);if(this.buttonsType=t,!this.buttonsType)return this;var s,c;switch(s=Eo(i,"setValueCallback",void 0),c=Eo(i,"setValueCallbackScope",void 0),s===void 0&&(s=Eo(i,"setButtonStateCallback",void 0),c=Eo(i,"setButtonStateCallbackScope",void 0)),this.setValueCallback=s,this.setValueCallbackScope=c,t){case"radio":this.setRadioType();break;case"checkboxes":this.setCheckboxesType();break}return this},setRadioType(){var i=this.parent,t=this.buttons;i._value=void 0;var s=void 0;return Object.defineProperty(i,"value",{get:function(){return i._value},set:function(c){if(i._value!==c){i._value=c;for(var C=0,S=t.length;C<S;C++){var l=t[C];l.rexSizer.hidden||(s===void 0?l.name===c?l.selected=!0:l.selected=!1:s===C?l.selected=!0:l.selected=!1)}}},enumerable:!0,configurable:!0}),i.on("button.click",function(c){s=this.buttons.indexOf(c),i.value=c.name,s=void 0},this),this},setCheckboxesType(){var i=this.parent;return i.on("button.click",function(t){t.selected=!t.selected}),this},clearAllButtonsState(){for(var i=this.buttons,t=0,s=i.length;t<s;t++){var c=i[t];c.selected=!1}return this},getAllButtonsState(){for(var i={},t=this.buttons,s=0,c=t.length;s<c;s++){var C=t[s];C.rexSizer.hidden||(i[C.name]=C.selected)}return i},setSelectedButtonName(i){return this.parent.value=i,this},getSelectedButtonName(){return this.parent.value},setButtonState(i,t){t===void 0&&(t=!0);for(var s=this.buttons,c=0,C=s.length;c<C;c++){var S=s[c];if(!S.rexSizer.hidden&&S.name===i){S.selected=t;break}}return this},getButtonState(i){for(var t=this.buttons,s=0,c=t.length;s<c;s++){var C=t[s];if(!C.rexSizer.hidden&&C.name===i)return C.selected}}};var G7=function(i,t){if(i)if(Ts(i)){for(var s,c=0,C=i.length;c<C;c++)if(s=M0(i[c],t),s)return s}else{var s;for(var S in i)if(s=M0(i[S],t),s)return s}else return null},M0=function(i,t){return i?i.hasOwnProperty("name")?i.name===t?i:null:GetElementByName(i,t):null};const Ru={getButton(i){var t=this.buttons,s,c=typeof i;switch(c){case"number":s=t[i];break;case"string":s=G7(t,i);break;default:s=i,t.indexOf(s)===-1&&(s=void 0);break}return s},setButtonEnable(i,t){var s=this.buttons;if(i===void 0||typeof i=="boolean"){t=i;for(var c=0,C=s.length;c<C;c++)s[c]._click.setEnable(t)}else this.getButton(i)._click.setEnable(t);return this},toggleButtonEnable(i){var t=this.buttons;if(i===void 0||typeof i=="boolean")for(var s=0,c=t.length;s<c;s++)t[s]._click.toggleEnable();else this.getButton(i)._click.toggleEnable();return this},getButtonEnable(i){return i===void 0&&(i=0),this.getButton(i)._click.enable},emitButtonClick(i){var t=this.buttonGroup?this.buttonGroup:this;return t.fireEvent("button.click",i),this},showButton(i){return Gn(this.getButton(i)),this},hideButton(i){return Nn(this.getButton(i)),this},isButtonShown(i){return Tv(this.getButton(i)),this}
6414,forEachButtton(i,t){for(var s=this.buttons,c=0,C=s.length;c<C;c++)t?i.call(t,s[c],c,s):i(s[c],c,s);return this}};class Ou{constructor(t){this.parent=t.parent,this.eventEmitter=t.eventEmitter,this.groupName=t.groupName,this.clickConfig=t.clickConfig,this.buttonsType=void 0,this.buttons=[]}destroy(){this.parent=void 0,this.eventEmitter=void 0,this.clickConfig=void 0,this.buttons=void 0}}var N7={fireEvent:B7};Object.assign(Ou.prototype,F7,D7,k7,Ru,N7);const Wv={clearAllButtonsState(){return this.buttonGroup.clearAllButtonsState(),this},getAllButtonsState(){return this.buttonGroup.getAllButtonsState()},setSelectedButtonName(i){return this.buttonGroup.setSelectedButtonName(i),this},getSelectedButtonName(){return this.buttonGroup.getSelectedButtonName()},setButtonState(i,t){return this.buttonGroup.setButtonState(i,t),this},getButtonState(i){return this.buttonGroup.getButtonState(i)}},Er=Phaser.Utils.Objects.GetValue;let _e=class extends ee{constructor(t,s){s===void 0&&(s={});var c=s.space;typeof c=="number"&&(s.space={item:c}),super(t,s),this.type="rexButtons",this.buttonGroup=new Ou({parent:this,eventEmitter:Er(s,"eventEmitter",this),groupName:Er(s,"groupName",void 0),clickConfig:Er(s,"click",void 0)}).setButtonsType(s);var C=Er(s,"background",void 0),S=Er(s,"buttons",void 0);
6414this.buttonsExpand=Er(s,"expand",!1),this.buttonsAlign=Er(s,"align",void 0),C&&this.addBackground(C),S&&this.addButtons(S),this.addChildrenMap("background",C),this.addChildrenMap("buttons",this.buttonGroup.buttons)}destroy(t){!this.scene||this.ignoreDestroy||(super.destroy(t),this.buttonGroup.destroy(),this.buttonGroup=void 0)}get buttons(){return this.buttonGroup.buttons}get groupName(){return this.buttonGroup.groupName}set groupName(t){this.buttonGroup.groupName=t}get eventEmitter(){return this.buttonGroup.eventEmitter}};Object.assign(_e.prototype,M7,R7,Ru,Wv);xt.register("buttons",function(i){var t=new _e(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.Buttons",_e);const V7=yn.prototype.add,z7={addButton(i,t,s){return V7.call(this,i,t,s,void 0,0,this.buttonsExpand),this.buttonGroup.add(i),this},addButtons(i,t){for(var s=0,c=i;s<c;s++)this.addButton(i[s],void 0,t);return this}},Y7=yn.prototype.remove,X7=yn.prototype.clear;var uc=function(s,t){var s=this.getButton(s);return s?(this.buttonGroup.remove(s),Y7.call(this,s,t),this):this};const U7={remove(i,t){if(Ts(i))for(var s=i,c=0,C=s.length;c<C;c++)uc.call(this,s[c],t);else uc.call(this,i,t);return this},clear(i){var t=this.buttonGroup.buttons;return t.length=0,X7.call(this,i),this},removeButton(i,t){return this.remove(i,t),this},clearButtons(i){for(var t=this.buttonGroup.buttons,s=t.length-1;s>=0;s--)uc.call(this,t[s],i);return this}},Fs=Phaser.Utils.Objects.GetValue;class Lu extends yn{constructor(t,s){s===void 0&&(s={});var c=Fs(s,"row",0),C=Fs(s,"column",s.col||0),S=Fs(s,"createCellContainerCallback"),l=Fs(s,"buttons",void 0),T=Fs(s,"expand",!0),e=T?1:0;if(S&&(s.createCellContainerCallback=void 0),l!==void 0){c=Math.max(c,l.length);for(var d=0,g=l.length;d<g;d++)C=Math.max(C,l[d].length)}s.row=c,s.column=C,s.columnProportions=e,s.rowProportions=e,super(t,s),this.type="rexGridButtons",this.buttonGroup=new Ou({parent:this,eventEmitter:Fs(s,"eventEmitter",this),groupName:Fs(s,"groupName",void 0),clickConfig:Fs(s,"click",void 0)}).setButtonsType(s);var r=Fs(s,"background",void 0);if(this.buttonsExpand=T,Fs(s,"space",void 0),r&&this.addBackground(r),l)for(var a,h,n=0,o=l.length;n<o;n++){a=l[n];for(var f=0,u=a.length;f<u;f++)h=a[f],h&&this.addButton(h,f,n)}else if(S)for(var v=0;v<c;v++)for(var m=0;m<C;m++){var h=S(t,m,v);h&&this.addButton(h,m,v)}this.addChildrenMap("background",r),this.addChildrenMap("buttons",this.buttonGroup.buttons)}destroy(t){!this.scene||this.ignoreDestroy||(super.destroy(t),this.buttonGroup.destroy(),this.buttonGroup=void 0)}get buttons(){return this.buttonGroup.buttons}get groupName(){return this.buttonGroup.groupName}set groupName(t){this.buttonGroup.groupName=t}get eventEmitter(){return this.buttonGroup.eventEmitter}}Object.assign(Lu.prototype,z7,U7,Ru,Wv);xt.register("gridButtons",function(i){var t=new Lu(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.GridButtons",Lu);const yC=Hr.prototype.add;var ih=function(i){return yC.call(this,i),this.buttonGroup.add(i),this};const W7={addButton(i){if(Ts(i))for(var t=i,s=0,c=t.length;s<c;s++)ih.call(this,t[s]);else ih.call(this,i);return this},addButtons(i){if(Ts(i[0]))for(var t=i,s,c=0,C=t.length-1;c<=C;c++){s=t[c];for(var S=0,l=s.length;S<l;S++)ih.call(this,s[S]);c>C&&yC.addNewLine(this)}else for(var S=0,l=i.length;S<l;S++)ih.call(this,i[S]);return this}},H7=Hr.prototype.remove,$7=Hr.prototype.clear;var dc=function(s,t){var s=this.getButton(s);return s?(this.buttonGroup.remove(s),H7.call(this,s,t),this):this};const j7={remove(i,t){if(Ts(i))for(var s=i,c=0,C=s.length;c<C;c++)dc.call(this,s[c],t);else dc.call(this,i,t);return this},clear(i){var t=this.buttonGroup.buttons;return t.length=0,$7.call(this,i),this},removeButton(i,t){return this.remove(i,t),this},clearButtons(i){for(var t=this.buttonGroup.buttons,s=t.length-1;s>=0;s--)dc.call(this,t[s],i);return this}},ma=Phaser.Utils.Objects.GetValue;class Br extends Hr{constructor(t,s){s===void 0&&(s={});var c=s.space;typeof c=="number"&&(s.space={item:c,line:c}),super(t,s),this.type="rexFixWidthButtons",this.buttonGroup=new Ou({parent:this,eventEmitter:ma(s,"eventEmitter",this),groupName:ma(s,"groupName",void 0),clickConfig:ma(s,"click",void 0)}).setButtonsType(s);var C=ma(s,"background",void 0),S=ma(s,"buttons",void 0);
6414this.buttonsAlign=ma(s,"align",void 0),C&&this.addBackground(C),S&&this.addButtons(S),this.addChildrenMap("background",C),this.addChildrenMap("buttons",this.buttonGroup.buttons)}destroy(t){!this.scene||this.ignoreDestroy||(super.destroy(t),this.buttonGroup.destroy(),this.buttonGroup=void 0)}get buttons(){return this.buttonGroup.buttons}get groupName(){return this.buttonGroup.groupName}set groupName(t){this.buttonGroup.groupName=t}get eventEmitter(){return this.buttonGroup.eventEmitter}}Object.assign(Br.prototype,W7,j7,Ru,Wv);xt.register("fixWidthButtons",function(i){var t=new Br(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.FixWidthButtons",Br);const K7={setAccept(i){return this.childrenMap.fileChooser.setAccept(i),this},setMultiple(i){return this.childrenMap.fileChooser.setMultiple(i),this},loadFile(i,t,s,c,C){return this.childrenMap.fileChooser.loadFile(i,t,s,c,C),this},loadFilePromise(i,t,s,c){return this.childrenMap.fileChooser.loadFilePromise(i,t,s,c)}},w0=Phaser.Utils.Objects.GetValue;class Hv extends tr{constructor(t,s){super(t,s),this.type="rexFileSelectorButton";var c=new il(t);t.add.existing(c),this.addBackground(c),this.addChildrenMap("fileChooser",c),this.setAccept(w0(s,"accept","")),this.setMultiple(w0(s,"multiple",!1)),c.on("change",function(C){var S=C.files;S.length!==0&&(S=Array.from(S),this.emit("select",S,this))},this)}get files(){return this.childrenMap.fileChooser.files}}Object.assign(Hv.prototype,K7);xt.register("fileSelectorButton",function(i){var t=new Hv(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.FileSelectorButton",Hv);const Z7={getChoice(i){var t=this.childrenMap.choicesSizer;if(t)return t.getButton(i)},getAction(i){return this.childrenMap.actionsSizer.getButton(i)},getToolbar(i){return this.childrenMap.toolbarSizer.getButton(i)},getLeftToolbar(i){return this.childrenMap.leftToolbarSizer.getButton(i)},setChoiceEnable(i,t){var s=this.childrenMap.choicesSizer;return s&&s.setButtonEnable(i,t),this},setActionEnable(i,t){return this.childrenMap.actionsSizer.setButtonEnable(i,t),this},setToolbarEnable(i,t){return this.childrenMap.toolbarSizer.setButtonEnable(i,t),this},setLeftToolbarEnable(i,t){return this.childrenMap.leftToolbarSizer.setButtonEnable(i,t),this},toggleChoiceEnable(i){var t=this.childrenMap.choicesSizer;return t&&t.toggleButtonEnable(i),this},toggleActionEnable(i){return this.childrenMap.actionsSizer.toggleButtonEnable(i),this},toggleToolbarEnable(i){return this.childrenMap.toolbarSizer.toggleButtonEnable(i),this},toggleLeftToolbarEnable(i){return this.childrenMap.leftToolbarSizer.toggleButtonEnable(i),this},getChoiceEnable(i){var t=this.childrenMap.choicesSizer;return t?t.getButtonEnable(i):!1},getActionEnable(i){return this.childrenMap.actionsSizer.getButtonEnable(i)},getToolbarEnable(i){return this.childrenMap.toolbarSizer.getButtonEnable(i)},getLeftToolbarEnable(i){return this.childrenMap.leftToolbarSizer.getButtonEnable(i)},emitChoiceClick(i){var t=this.childrenMap.choicesSizer;return t&&t.emitButtonClick(i),this},emitActionClick(i){return this.childrenMap.actionsSizer.emitButtonClick(i),this},emitToolbarClick(i){return this.childrenMap.toolbarSizer.emitButtonClick(i),this},emitLeftToolbarClick(i){return this.childrenMap.leftToolbarSizer.emitButtonClick(i),this},showChoice(i){var t=this.childrenMap.choicesSizer;return t&&t.showButton(i),this},showAction(i){return this.childrenMap.actionsSizer.showButton(i),this},showToolbar(i){return this.childrenMap.toolbarSizer.showButton(i),this},showLeftToolbar(i){return this.childrenMap.leftToolbarSizer.showButton(i),this},hideChoice(i){var t=this.childrenMap.choicesSizer;return t&&t.hideButton(i),this},hideAction(i){return this.childrenMap.actionsSizer.hideButton(i),this},hideToolbar(i){return this.childrenMap.toolbarSizer.hideButton(i),this},hideLeftToolbar(i){return this.childrenMap.leftToolbarSizer.hideButton(i),this},addChoice(i){var t=this.childrenMap.choicesSizer;return t&&t.addButton(i),this},addAction(i){return this.childrenMap.actionsSizer.addButton(i),this},addToolbar(i){return this.childrenMap.toolbarSizer.addButton(i),this},addLeftToolbar(i){return this.childrenMap.leftToolbarSizer.addButton(i),this},removeChoice(i,t){var s=this.childrenMap.choicesSizer;return s&&s.removeButton(i,t),this},removeAction(i,t){return this.childrenMap.actionsSizer.removeButton(i,t),this},removeToolbar(i,t){return this.childrenMap.toolbarSizer.removeButton(i,t),this},removeLeftToolbar(i,t){return this.childrenMap.leftToolbarSizer.removeButton(i,t),this},clearChoices(i){var t=this.childrenMap.choicesSizer;return t&&t.clearButtons(i),this},clearActions(i){return this.childrenMap.actionsSizer.clearButtons(i),this},clearToolbar(i){return this.childrenMap.toolbarSizer.clearButtons(i),this},clearLeftToolbar(i){return this.childrenMap.leftToolbarSizer.clearButtons(i),this}
6414,forEachChoice(i,t){var s=this.childrenMap.choicesSizer;return s&&s.forEachButtton(i,t),this},forEachAction(i,t){return this.childrenMap.actionsSizer.forEachButtton(i,t),this},forEachToolbar(i,t){return this.childrenMap.toolbarSizer.forEachButtton(i,t),this},forEachLeftToolbar(i,t){return this.childrenMap.leftToolbarSizer.forEachButtton(i,t),this},setAllButtonsEnable(i){return i===void 0&&(i=!0),this.childrenMap.toolbarSizer&&this.setToolbarEnable(i),this.childrenMap.leftToolbarSizer&&this.setLeftToolbarEnable(i),this.childrenMap.actionsSizer&&this.setActionEnable(i),this.childrenMap.choicesSizer&&this.setChoiceEnable(i),this},getChoicesButtonStates(){var i=this.childrenMap.choicesSizer;return i?i.getAllButtonsState():{}},getChoicesButtonState(i){var t=this.childrenMap.choicesSizer;return i===void 0?t?t.getAllButtonsState():{}:t?t.getButtonState(i):!1},setChoicesButtonState(i,t){var s=this.childrenMap.choicesSizer;return s&&s.setButtonState(i,t),this},clearChoicesButtonStates(){var i=this.childrenMap.choicesSizer;return i&&i.clearAllButtonsState(),this},getChoicesSelectedButtonName(){var i=this.childrenMap.choicesSizer;return i?i.getSelectedButtonName():""},setChoicesSelectedButtonName(i){var t=this.childrenMap.choicesSizer;return t&&t.setSelectedButtonName(i),this}},J7={onCreateModalBehavior(i){i.on("button.click",function(t,s,c,C,S){if(s==="actions"){var l={index:c,text:t.text,button:t,dialog:i};switch(i.buttonsType){case"radio":l.value=i.getChoicesSelectedButtonName();break;case"checkboxes":l.value=i.getChoicesButtonStates();break;default:l.value=void 0}i.modalClose(l)}})},modal(i,t){return i&&i.defaultBehavior===!1?this.onCreateModalBehavior=!1:delete this.onCreateModalBehavior,bv.modal.call(this,i,t),this}};
6414var CC={};Object.assign(CC,Z7,J7);const Ft=Phaser.Utils.Objects.GetValue;class Fu extends ee{constructor(t,s){s===void 0&&(s={}),s.orientation=1,super(t,s),this.type="rexDialog",this.eventEmitter=Ft(s,"eventEmitter",this);var c=Ft(s,"background",void 0),C=Ft(s,"title",void 0),S=Ft(s,"toolbar",void 0),l=Ft(s,"toolbarBackground",void 0),T=Ft(s,"leftToolbar",void 0),e=Ft(s,"leftToolbarBackground",void 0),d=Ft(s,"content",void 0),g=Ft(s,"description",void 0),r,a=Ft(s,"choices",void 0),h=Ft(s,"choicesBackground",void 0),n,o=Ft(s,"actions",void 0),f=Ft(s,"actionsBackground",void 0),u=Ft(s,"click",void 0);c&&this.addBackground(c);var v;S&&(v=new _e(t,{groupName:"toolbar",background:l,buttons:S,orientation:0,space:{item:Ft(s,"space.toolbarItem",0)},click:u,eventEmitter:this.eventEmitter}));var m;if(T&&(m=new _e(t,{groupName:"leftToolbar",background:e,buttons:T,orientation:0,space:{item:Ft(s,"space.leftToolbarItem",0)},click:u,eventEmitter:this.eventEmitter})),C||S||T){var p=!!C&&Ft(s,"expand.title",!0),x=Ft(s,"align.title","center"),y=C&&!p&&x==="center"||!C&&(S||T),P=!y,b;P?b=new ee(t,{orientation:0}):b=new hs(t);var E=P?!0:{height:!0};if(m&&b.add(m,{align:"left",expand:E}),C){P&&!p&&x==="right"&&b.addSpace();var M={left:Ft(s,"space.titleLeft",0),right:Ft(s,"space.titleRight",0)},w=p?1:0;b.add(C,{align:x,proportion:w,expand:E,padding:M}),P&&!p&&x==="left"&&b.addSpace()}v&&(P&&!C&&b.addSpace(),b.add(v,{align:"right",expand:E}));var M;(d||g||a||o)&&(M={bottom:Ft(s,"space.title",0),top:Ft(s,"space.titleTop",0)});var w=Ft(s,"proportion.title",0);this.add(b,{padding:M,proportion:w,expand:!0})}if(d){var A=Ft(s,"align.content","center"),R=Ft(s,"space.content",0),M={left:Ft(s,"space.contentLeft",0),right:Ft(s,"space.contentRight",0),bottom:g||a||o?R:0},w=Ft(s,"proportion.content",0),L=Ft(s,"expand.content",!0);this.add(d,{align:A,padding:M,proportion:w,expand:L})}if(g){var A=Ft(s,"align.description","center"),O=Ft(s,"space.description",0),M={left:Ft(s,"space.descriptionLeft",0),right:Ft(s,"space.descriptionRight",0),bottom:a||o?O:0},w=Ft(s,"proportion.description",0),L=Ft(s,"expand.description",!0);this.add(g,{align:A,padding:M,proportion:w,expand:L})}if(a){var I=Ft(s,"choicesType","").split("-"),D=Po(I,"wrap")?Br:Po(I,"grid")?Lu:_e,B=Po(I,"radio")?"radio":Po(I,"checkboxes")?"checkboxes":void 0,z={left:Ft(s,"space.choicesBackgroundLeft",0),right:Ft(s,"space.choicesBackgroundRight",0),top:Ft(s,"space.choicesBackgroundTop",0),bottom:Ft(s,"space.choicesBackgroundBottom",0)},X=Ft(s,"space.choice",0);D===_e?z.item=X:D===Br?(z.item=X,z.line=Ft(s,"space.choiceLine",X)):(z.column=Ft(s,"space.choiceColumn",X),z.row=Ft(s,"space.choiceRow",X));var W={width:Ft(s,"choicesWidth",void 0),height:Ft(s,"choicesHeight",void 0),groupName:"choices",buttonsType:B,background:h,buttons:a,space:z,click:u,eventEmitter:this.eventEmitter,setValueCallback:Ft(s,"choicesSetValueCallback",void 0),setValueCallbackScope:Ft(s,"choicesSetValueCallbackScope",void 0)};D===_e&&(W.orientation=Po(I,"x")?0:1),r=new D(t,W);var j=Ft(s,"space.choices",0),M={left:Ft(s,"space.choicesLeft",0),right:Ft(s,"space.choicesRight",0),bottom:o?j:0},A=Ft(s,"align.choices","center"),w=Ft(s,"proportion.choices",0),L=Ft(s,"expand.choices",!0);this.add(r,{align:A,padding:M,proportion:w,expand:L}),this.buttonsType=B}if(o){n=new _e(t,{groupName:"actions",background:f,buttons:o,orientation:0,space:{item:Ft(s,"space.action",0)},expand:Ft(s,"expand.actions",!1),align:Ft(s,"align.actions","center"),click:u,eventEmitter:this.eventEmitter});var M={left:Ft(s,"space.actionsLeft",0),right:Ft(s,"space.actionsRight",0),bottom:Ft(s,"space.actionsBottom",0)},w=Ft(s,"proportion.action",0);this.add(n,{align:"center",padding:M,proportion:w,expand:!0})}bo(this,"click"),bo(this,"over"),bo(this,"out"),bo(this,"enable"),bo(this,"disable"),this.addChildrenMap("background",c),this.addChildrenMap("title",C),this.addChildrenMap("toolbar",S),this.addChildrenMap("leftToolbar",T),this.addChildrenMap("content",d),this.addChildrenMap("description",g),this.addChildrenMap("choices",r?r.buttons:void 0),this.addChildrenMap("actions",n?n.buttons:void 0),this.addChildrenMap("choicesSizer",r),this.addChildrenMap("actionsSizer",n),this.addChildrenMap("toolbarSizer",v),this.addChildrenMap("leftToolbarSizer",m)}}var Po=function(i,t){return i.indexOf(t)!==-1},A0={actions:"action",choices:"choice",toolbar:"toolbar",leftToolbar:"leftToolbar"},bo=function(i,t){i.on(`button.${t}`,function(s,c,C,S,l){A0.hasOwnProperty(c)&&i.emit(`${A0[c]}.${t}`,s,C,S,l)})};Object.assign(Fu.prototype,CC);xt.register("dialog",function(i){var t=new Fu(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.Dialog",Fu);var es=function(i,t,s){var c=new Yv(i,t,s);return i.add.existing(c),c},Q7=function(i){return i===void 0&&(i={}),q7.call(this,i),_7.call(this,i),tk.call(this,i),ek.call(this,i),this},q7=function(i){var t=this.childrenMap.title;t.resetDisplayContent(i.title)},_7=function(i){var t=this.childrenMap.content;if(t.resetDisplayContent)t.resetDisplayContent(i.content);else{var s=i.content||"";t.setText(s)}},tk=function(i){var t=this.childrenMap.actions;if(t){var s=i.buttons;if(s){for(var S=this.scene,l=this.defaultActionConfig,T=this.defaultActionButtonCreator,e=0,d=s.length;e<d;e++){var g=s[e],r=t[e];r||(r=es(S,l,T),this.addAction(r)),r.show().resetDisplayContent(g)}this.buttonMode=s.length;for(var e=s.length,d=t.length;e<d;e++)t[e].hide()}else{var c=t[0];c&&c.resetDisplayContent(i.buttonA);var C=t[1];C&&C.resetDisplayContent(i.buttonB)}}},ek=function(i){var t=this.childrenMap.choices;if(t){var s=i.choices;s||(s=[]);for(var c=this.scene,C=this.defaultChoiceConfig,S=this.defaultActionButtonCreator,l=0,T=s.length;l<T;l++){var e=s[l];typeof e=="string"&&(e={text:e});var d=t[l];d||(d=es(c,C,S),this.addChoice(d)),d.show().resetDisplayContent(e);var g;e.hasOwnProperty("value")?g=e.value:g=e.text,d.setName(g)}for(var l=s.length,T=t.length;l<T;l++)t[l].hide()}},ik=function(i,t){Dr(i)&&(t=i,i=void 0),i===void 0&&(i={});var s=this.buttonMode===0;return i.hasOwnProperty("anyTouchClose")||(i.anyTouchClose=s),i.hasOwnProperty("manualClose")||(i.manualClose=!s),bv.modal.call(this,i,t),this},sk={resetDisplayContent:Q7,modal:ik},nk=function(i){i.setHoverState&&i.setHoverState(!0)},rk=function(i){i.setHoverState&&i.setHoverState(!1)}
6414,ak=function(i,t,s,c){i.setActiveState&&i.setActiveState(c)},ok=function(i){i.setDisableState&&i.setDisableState(!1)},lk=function(i){i.setDisableState&&i.setDisableState(!0)},hk=function(){this.on("button.over",nk).on("button.out",rk).on("button.enable",ok).on("button.disable",lk).on("button.statechange",ak)};const TC={v:0,vertical:0,y:0,h:1,horizontal:1,x:1,xy:2,vh:2};var $v=function(i,t){t===void 0&&(t="scrollMode"),i.hasOwnProperty(t)||(i[t]=uk(i));var s=i[t];return typeof s=="string"&&(s=TC[s]),s},uk=function(i){var t=!!i.sliderY||!!i.scrollerY,s=!!i.sliderX||!!i.scrollerX,c;return t&&s?c=2:t?c=0:s?c=1:c=0,c};const Je=Phaser.Utils.Objects.GetValue;var dk=function(i,t,s){var c=Je(s,"child"),C=Je(c,"gameObject",void 0);if(C){var S=Je(s,"space.child",0);i.childMargin={};var l=i.childMargin,T={};if(typeof S=="number")switch(i.scrollMode){case 0:case 1:l.top=0,l.bottom=0,l.left=0,l.right=0;break;default:l.top=S,l.bottom=S,l.left=S,l.right=S;break}else switch(i.scrollMode){case 0:l.top=Je(S,"top",0),l.bottom=Je(S,"bottom",0),T.left=Je(S,"left",0),T.right=Je(S,"right",0);break;case 1:l.top=Je(S,"left",0),l.bottom=Je(S,"right",0),T.top=Je(S,"top",0),T.bottom=Je(S,"bottom",0);break;default:l.top=Je(S,"top",0),l.bottom=Je(S,"bottom",0),l.left=Je(S,"left",0),l.right=Je(S,"right",0);break}t.add(C,{column:1,row:1,align:Je(c,"align","center"),padding:T,expand:{width:Je(c,"expandWidth",!0),height:Je(c,"expandHeight",!0)}})}i.addChildrenMap("child",C)};const R0=Phaser.Math.Percent;var SC=function(i,t,s){var c;return i.y===t.y?c=R0(s.x,i.x,t.x):i.x===t.x&&(c=R0(s.y,i.y,t.y)),c},ck=function(i,t,s){if(this.enable){cc.x=t,cc.y=s;var c,C;this.reverseAxis?(c=this.getEndPoint(),C=this.getStartPoint()):(c=this.getStartPoint(),C=this.getEndPoint()),this.value=SC(c,C,cc)}},cc={},O0=function(i,t,s){if(this.enable&&i.isDown){fc.x=i.worldX,fc.y=i.worldY;var c,C;this.reverseAxis?(c=this.getEndPoint(),C=this.getStartPoint()):(c=this.getStartPoint(),C=this.getEndPoint());var S=SC(c,C,fc);this.stopEaseValue(),this.easeValueDuration===0||Math.abs(this.value-S)<.1?this.value=S:this.easeValueTo(S)}},fc={},EC=function(i,t){t===void 0&&(t=fk);var s=this.childrenMap.thumb,c=s.x,C=s.y;return Zo(s,this.innerLeft,this.innerTop,this.innerWidth,this.innerHeight,i),t.x=s.x,t.y=s.y,s.x=c,s.y=C,t},fk={};const vk=Phaser.Display.Align.LEFT_CENTER,pk=Phaser.Display.Align.TOP_CENTER;var mk=function(i){if(i===void 0&&(i=gk),this.childrenMap.thumb){var t=this.orientation===0?vk:pk;EC.call(this,t,i)}else this.orientation===0?(i.x=this.innerLeft+1,i.y=this.centerY):(i.x=this.centerX,i.y=this.innerTop+1);return i},gk={};const xk=Phaser.Display.Align.RIGHT_CENTER,yk=Phaser.Display.Align.BOTTOM_CENTER;var Ck=function(i){if(i===void 0&&(i=Tk),this.childrenMap.thumb){var t=this.orientation===0?xk:yk;EC.call(this,t,i)}else this.orientation===0?(i.x=this.innerRight-1,i.y=this.centerY):(i.x=this.centerX,i.y=this.innerBottom-1);return i},Tk={};const L0=Phaser.Math.Linear;var Sk=function(i,t,s,c){return c===void 0&&(c=Ek),c.x=L0(t.x,s.x,i),c.y=L0(t.y,s.y,i),c},Ek={},Pk=function(i){var t=this.childrenMap.thumb;if(t===void 0)return this;i===void 0&&(i=this.value);var s,c;return this.reverseAxis?(s=this.getEndPoint(),c=this.getStartPoint()):(s=this.getStartPoint(),c=this.getEndPoint()),Sk(i,s,c,t),this.resetChildPositionState(t),this};const bk=Phaser.Display.Align.LEFT_CENTER,Mk=Phaser.Display.Align.TOP_CENTER,wk=Phaser.Display.Align.RIGHT_CENTER,Ak=Phaser.Display.Align.BOTTOM_CENTER;var Rk=function(i){var t=this.childrenMap.indicator;if(t===void 0)return this;i===void 0&&(i=this.value);var s=this.reverseAxis,c,C,S=this.childrenMap.thumb;if(S)if(this.orientation===0){var l=de(S);if(s){var T=S.x-l*S.originX;c=this.right-T}else{var T=S.x-l*S.originX,e=T+l;c=e-this.left}}else{var d=ie(S);if(s){var g=S.y-d*S.originY;C=this.bottom-g}else{var g=S.y-d*S.originY,r=g+d;C=r-this.top}}else this.orientation===0?c=this.width*i:C=this.height*i;wi(t,c,C);var a;s?a=this.orientation===0?wk:Ak:a=this.orientation===0?bk:Mk,w1(t,this,a),this.resetChildPositionState(t)};
6414const fs=Phaser.Utils.Objects.GetValue,sh=Phaser.Utils.Objects.IsPlainObject,Ok=Phaser.Math.Clamp,Lk=Phaser.Math.Snap.To;class Ka extends Ur(ee){constructor(t,s){super(t,s),this.type="rexSlider",this.bootProgressBase(s),this.reverseAxis=fs(s,"reverseAxis",!1);var c=fs(s,"background",void 0),C=fs(s,"track",void 0),S=fs(s,"indicator",void 0),l=fs(s,"thumb",void 0);c&&(sh(c)&&(c=ts(t,c)),this.addBackground(c)),C&&(sh(C)&&(C=ts(t,C)),this.add(C,{proportion:1,expand:!0,minWidth:this.orientation===0?0:void 0,minHeight:this.orientation===1?0:void 0})),S&&(sh(S)&&(S=ts(t,S)),this.pin(S)),l&&(sh(l)&&(l=ts(t,l)),this.pin(l));var T=fs(s,"input",0);switch(typeof T=="string"&&(T=Fk[T]),T){case 0:l&&(l.setInteractive(),this.scene.input.setDraggable(l),l.on("drag",ck,this).on("dragstart",function(e){this.eventEmitter.emit("inputstart",e)},this).on("dragend",function(e){this.eventEmitter.emit("inputend",e)},this));break;case 1:this.on("pointerdown",O0,this).on("pointermove",O0,this).on("pointerdown",function(e){this.eventEmitter.emit("inputstart",e)},this).on("pointerup",function(e){this.eventEmitter.emit("inputend",e)},this).on("pointerover",function(e){e.isDown&&this.eventEmitter.emit("inputstart",e)},this).on("pointerout",function(e){e.isDown&&this.eventEmitter.emit("inputend",e)},this).setInteractive();break}this.addChildrenMap("background",c),this.addChildrenMap("track",C),this.addChildrenMap("indicator",S),this.addChildrenMap("thumb",l),this.setEnable(fs(s,"enable",void 0)),this.setGap(fs(s,"gap",void 0)),this.setValue(fs(s,"value",0),fs(s,"min",void 0),fs(s,"max",void 0))}setEnable(t){return t===void 0&&(t=!0),this.enable=t,this}setGap(t,s,c){return t&&s!==void 0&&(t=t/(c-s)),this.gap=t,this}get value(){return this._value}set value(t){this.gap!==void 0&&(t=Lk(t,this.gap));var s=this._value;this._value=Ok(t,0,1),s!==this._value&&(this.updateThumb(this._value),this.updateIndicator(this._value),this.eventEmitter.emit("valuechange",this._value,s,this.eventEmitter))}postLayout(t,s,c){return this.updateThumb(),this.updateIndicator(),this}}const Fk={pan:0,drag:0,click:1,none:-1};var Ik={getStartPoint:mk,getEndPoint:Ck,updateThumb:Pk,updateIndicator:Rk};Object.assign(Ka.prototype,Ik);const Si=Phaser.Utils.Objects.GetValue;class jv extends ee{constructor(t,s){super(t,s),this.type="rexScrollBar";var c=Si(s,"background",void 0),C=Si(s,"buttons",void 0),S=Si(C,"top",Si(C,"left",void 0)),l=Si(C,"bottom",Si(C,"right",void 0)),T,e=Si(s,"slider",void 0);if(c&&this.addBackground(c),S){this.add(S);var d=new Va(S);d.on("intouch",function(){if(this.enable){var f=T.reverseAxis?this.scrollStep:-this.scrollStep;this.value+=f}},this)}if(e){e.orientation=this.orientation,e.eventEmitter=this,e.value=null;var g;if(this.orientation===0){var r=Si(e,"width",void 0);g=r===void 0?1:0}else{var a=Si(e,"height",void 0);g=a===void 0?1:0}T=new Ka(t,e),t.add.existing(T),this.add(T,{proportion:g})}if(l){this.add(l);var d=new Va(l);d.on("intouch",function(){if(this.enable){var u=T.reverseAxis?-this.scrollStep:this.scrollStep;this.value+=u}},this)}var h=[S,l];this.addChildrenMap("background",c),this.addChildrenMap("slider",T),this.addChildrenMap("buttons",h);var n=Si(s,"valuechangeCallback",null);if(n!==null){var o=Si(s,"valuechangeCallbackScope",void 0);this.on("valuechange",n,o)}this.setEnable(Si(s,"enable",void 0)),this.setValue(Si(s,"value",0)),this.setScrollStep(Si(C,"step",.01))}setScrollStep(t){return this.scrollStep=t,this}get enable(){return this.childrenMap.slider?this.childrenMap.slider.enable:!1}set enable(t){this.childrenMap.slider&&this.childrenMap.slider.setEnable(t)}setEnable(t){return t===void 0&&(t=!0),this.enable=t,this}get value(){return this.childrenMap.slider?this.childrenMap.slider.value:0}set value(t){this.childrenMap.slider&&(this.childrenMap.slider.value=t)}setValue(t,s,c){return this.childrenMap.slider&&this.childrenMap.slider.setValue(t,s,c),this}addValue(t,s,c){return this.childrenMap.slider&&this.childrenMap.slider.addValue(t,s,c),this}getValue(t,s){return this.childrenMap.slider?this.childrenMap.slider.getValue(t,s):0}easeValueTo(t,s,c){return this.childrenMap.slider&&this.childrenMap.slider.easeValueTo(t,s,c),this}stopEaseValue(){return this.childrenMap.slider&&this.childrenMap.slider.stopEaseValue(),this}setEaseValueDuration(t){return this.childrenMap.slider&&this.childrenMap.slider.setEaseValueDuration(t),this}setEaseValueFunction(t){return this.childrenMap.slider&&this.childrenMap.slider.setEaseValueFunction(t),this}}var Dk=function(i,t){t===void 0&&(t={});var s=Kn(t);t={slider:s},t.orientation=s.orientation,delete s.orientation,t.background=s.background,delete s.background,t.buttons=s.buttons,delete s.buttons;var c=new jv(i,t);i.add.existing(c);
6414var C=c.childrenMap.slider;return c.addChildrenMap("track",C.childrenMap.track),c.addChildrenMap("indicator",C.childrenMap.indicator),c.addChildrenMap("thumb",C.childrenMap.thumb),c};class Bk extends xn{constructor(t,s){super(s),this.parent=t,this.init()}init(){this.start("IDLE")}next_IDLE(){var t,s=this.parent,c=s.dragState;return c.isDown&&(t=s.dragThreshold===0?"DRAG":"DRAGBEGIN"),t}update_IDLE(t,s){this.next()}next_DRAGBEGIN(){var t,s=this.parent,c=s.dragState;return c.isDown?t=c.pointer.getDistance()>=s.dragThreshold?"DRAG":"DRAGBEGIN":t="IDLE",t}update_DRAGBEGIN(t,s){this.next()}next_DRAG(){var t,s=this.parent,c=s.dragState;return c.isUp&&(s.outOfBounds?t="BACK":s.slidingEnable?t="SLIDE":t="IDLE"),t}update_DRAG(t,s){var c=this.parent,C=c.dragState;C.justMoved&&c.dragging(),this.next()}enter_DRAG(){this.parent.onDragStart()}exit_DRAG(){this.parent.onDragEnd()}next_SLIDE(){var t,s=this.parent,c=s.dragState;return c.isDown?t="DRAG":s.isSliding||(t="IDLE"),t}enter_SLIDE(){this.parent.onSliding()}exit_SLIDE(){this.parent.stop()}update_SLIDE(t,s){this.parent.sliding(t,s),this.next()}next_BACK(){var t,s=this.parent,c=s.dragState;return c.isDown?t="DRAG":s.isPullBack||(t="IDLE"),t}enter_BACK(){this.parent.onPullBack()}exit_BACK(){this.parent.stop()}update_BACK(t,s){this.parent.pullBack(t,s),this.next()}}const nh=Phaser.Utils.Objects.GetValue,kk=Phaser.Math.Distance.Between;class Gk extends ke{constructor(t,s){super(t,s),this._enable=void 0,t.setInteractive(nh(s,"inputConfig",void 0)),this.resetFromJSON(s),this.boot()}resetFromJSON(t){return this.pointer=void 0,this.isInTouched=!1,this.holdStartTime=void 0,this.x=void 0,this.y=void 0,this.preX=void 0,this.preY=void 0,this.localX=void 0,this.localY=void 0,this.justMoved=!1,this.setEnable(nh(t,"enable",!0)),this.holdThreshold=nh(t,"holdThreshold",50),this.pointerOutReleaseEnable=nh(t,"pointerOutRelease",!0),this}boot(){this.parent.on("pointerdown",this.onPointIn,this),this.parent.on("pointerup",this.onPointOut,this),this.pointerOutReleaseEnable&&this.parent.on("pointerout",this.onPointOut,this),this.parent.on("pointermove",this.onPointerMove,this),this.scene.sys.events.on("preupdate",this.preupdate,this)}shutdown(t){this.isShutdown||(this.scene.sys.events.off("preupdate",this.preupdate,this),this.pointer=void 0,super.shutdown(t))}get enable(){return this._enable}set enable(t){this._enable!==t&&(t||(this.isInTouched=!1,this.pointer=void 0),this._enable=t)}setEnable(t){return t===void 0&&(t=!0),this.enable=t,this}toggleEnable(){return this.setEnable(!this.enable),this}setPointerOutReleaseEnable(t){return t===void 0&&(t=!0),this.pointerOutReleaseEnable=t,this}get isDown(){return this.pointer&&this.pointer.isDown}get isUp(){return!this.isDown}get dx(){return this.x-this.preX}get dy(){return this.y-this.preY}get dt(){var t=Zf(this.scene);return t}get speed(){if(this.x===this.preX&&this.y===this.preY)return 0;var t=kk(this.preX,this.preY,this.x,this.y),s=t/(this.dt*.001);return s}get speedX(){return this.dx/(this.dt*.001)}get speedY(){return this.dy/(this.dt*.001)}onPointIn(t,s,c){!this.enable||!t.isDown||this.pointer!==void 0||(this.pointer=t,this.localX=s,this.localY=c)}onPointOut(t){!this.enable||this.pointer!==t||(this.pointer=void 0)}onPointerMove(t,s,c){!this.enable||!t.isDown||this.pointer!==t||(this.localX=s,this.localY=c)}preupdate(t,s){if(this.enable){var c=this.pointer;this.justMoved=!1,c&&!this.isInTouched?(this.x=c.worldX,this.y=c.worldY,this.preX=c.worldX,this.preY=c.worldY,this.isInTouched=!0,this.holdStartTime=void 0,this.emit("touchstart",c,this.localX,this.localY)):c&&this.isInTouched?this.x===c.x&&this.y===c.y?this.holdStartTime===void 0?this.holdStartTime=t:t-this.holdStartTime>this.holdThreshold&&(this.preX=this.x,this.preY=this.y):(this.preX=this.x,this.preY=this.y,this.x=c.worldX,this.y=c.worldY,this.holdStartTime=void 0,this.justMoved=!0,this.emit("touchmove",c,this.localX,this.localY)):!c&&this.isInTouched&&(this.isInTouched=!1,this.holdStartTime=void 0,this.emit("touchend",c))}}}const vc=Phaser.Utils.Objects.GetValue;class Nk{constructor(t){this.resetFromJSON(t)}resetFromJSON(t){return this.setValue(vc(t,"value",0)),this.setSpeed(vc(t,"speed",0)),this.setAcceleration(vc(t,"acceleration",0)),this}reset(){this.setValue(0),this.setSpeed(0),this.setAcceleration(0)}setValue(t){return this.value=t,this}setSpeed(t){return this.speed=t,this}setAcceleration(t){return this.acceleration=t,this}updateSpeed(t){return this.acceleration!==0&&(this.speed+=this.acceleration*t,this.speed<0&&(this.speed=0)),this}getDeltaValue(t){return this.updateSpeed(t),this.speed<=0?0:this.speed*t}update(t){return this.updateSpeed(t),this.speed>0&&(this.value+=this.getDeltaValue(t)),this}get isMoving(){return this.speed>0}}class Vk{constructor(){this.value,this.dir,this.movement=new Nk}init(t,s,c,C,S){return this.value=t,this.end=S,S!==void 0?this.dir=t<S:this.dir=s,this.movement.setSpeed(c).setAcceleration(-C),this}stop(){this.movement.reset()}update(t){var s=this.movement.getDeltaValue(t);return this.dir||(s=-s),this.end===void 0?this.value+=s:s===0?this.value=this.end:(this.value+=s,this.dir?this.value>this.end&&(this.value=this.end):this.value<this.end&&(this.value=this.end)),this}get isMoving(){return this.movement.isMoving}}
6414const Ne=Phaser.Utils.Objects.GetValue,zk=Phaser.Math.Clamp;class Yk extends ke{constructor(t,s){super(t,s);var c=Ne(s,"enable",!0);this._state=new Bk(this,{enable:c,eventEmitter:!1});var C={inputConfig:Ne(s,"inputConfig",void 0),enable:c,pointerOutRelease:Ne(s,"pointerOutRelease",!0),eventEmitter:!1};this.dragState=new Gk(t,C),this._enable=void 0,this._value=void 0,this._slowDown=new Vk;var S=Ne(s,"valuechangeCallback",null);if(S!==null){var l=Ne(s,"valuechangeCallbackScope",void 0);this.on("valuechange",S,l)}if(S=Ne(s,"overmaxCallback",null),S!==null){var l=Ne(s,"overmaxCallbackScope",void 0);this.on("overmax",S,l)}if(S=Ne(s,"overminCallback",null),S!==null){var l=Ne(s,"overminCallbackScope",void 0);this.on("overmin",S,l)}this.resetFromJSON(s),this.boot()}resetFromJSON(t){this.setOrientationMode(Ne(t,"orientation",0)),this.setDragThreshold(Ne(t,"threshold",10)),this.setSlidingDeceleration(Ne(t,"slidingDeceleration",5e3)),this.setBackDeceleration(Ne(t,"backDeceleration",2e3));var s=Ne(t,"dragRate",1);s=s*(Ne(t,"dragReverse",!1)?-1:1),this.setDragRate(s);var c=Ne(t,"bounds",void 0);return c?this.setBounds(c):this.setBounds(Ne(t,"max",0),Ne(t,"min",0)),this.setValue(Ne(t,"value",this.maxValue||0)),this.setEnable(Ne(t,"enable",!0)),this}boot(){this.scene.sys.events.on("preupdate",this._state.update,this._state)}shutdown(t){this.isShutdown||(this.scene.sys.events.off("preupdate",this._state.update,this._state),this._state.destroy(t),this.dragState.destroy(t),this._state=void 0,this.dragState=void 0,super.shutdown(t))}get enable(){return this._enable}set enable(t){if(this._enable!==t)return this._enable=t,this._state.setEnable(t),this.dragState.setEnable(t),this}setEnable(t){return t===void 0&&(t=!0),this.enable=t,this}toggleEnable(){return this.setEnable(!this.enable),this}setOrientationMode(t){return typeof t=="string"&&(t=Xk[t]),this.orientationMode=t,this}setDragThreshold(t){return this.dragThreshold=t,this}setSlidingDeceleration(t){return this.slidingDeceleration=t,this}setBackDeceleration(t){return this.backDeceleration=t,this}setDragRate(t){return this.dragRate=t,this}setBounds(t,s){if(Array.isArray(t)){var c=t;t=c[0],s=c[1]}return t<s?(this.minValue=t,this.maxValue=s):(this.minValue=s,this.maxValue=t),this}get value(){return this._value}set value(t){if(t!==this._value){var s=this._value,c=this.overMax(t),C=this.overMin(t);c&&this.emit("overmax",t,s),C&&this.emit("overmin",t,s),this.backEnable||(c&&(t=this.maxValue),C&&(t=this.minValue)),this._value=t,this.emit("valuechange",t,s)}}setValue(t,s){return s===void 0&&(s=!1),s&&(t=zk(t,this.minValue,this.maxValue)),this.value=t,this}addValue(t,s){return this.setValue(this.value+t,s),this}get state(){return this._state.state}get isDragging(){return this.dragState.isInTouched}get outOfMaxBound(){return this.overMax(this.value)}get outOfMinBound(){return this.overMin(this.value)}get outOfBounds(){return this.outOfMinBound||this.outOfMaxBound}overMax(t){return this.maxValue!=null&&t>this.maxValue}overMin(t){return this.minValue!=null&&t<this.minValue}get backEnable(){return typeof this.backDeceleration=="number"}get isPullBack(){return this._slowDown.isMoving}get slidingEnable(){return typeof this.slidingDeceleration=="number"}get isSliding(){return this._slowDown.isMoving}get dragDelta(){var t;return this.orientationMode===0?t=this.dragState.dy:this.orientationMode===1?t=this.dragState.dx:t=0,t*=this.dragRate,t}get dragSpeed(){var t;return this.orientationMode===0?t=this.dragState.speedY:this.orientationMode===1?t=this.dragState.speedX:t=0,t*=this.dragRate,t}onDragStart(){this.emit("dragstart")}onDragEnd(){this.emit("dragend")}dragging(){this.value+=this.dragDelta}onSliding(){var t=this.value,s=this.dragSpeed;if(s===0){this._slowDown.stop(),this._state.next();return}var c=this.slidingDeceleration;this._slowDown.init(t,s>0,Math.abs(s),c)}sliding(t,s){s*=.001;var c=this._slowDown.update(s).value;this.overMax(c)?(this.value=this.maxValue,this._slowDown.stop()):this.overMin(c)?(this.value=this.minValue,this._slowDown.stop()):this.value=c}onPullBack(){var t=this.value,s=this.outOfMinBound?this.minValue:this.maxValue,c=Math.abs(s-t),C=this.backDeceleration,S=Math.sqrt(2*C*c);this._slowDown.init(t,void 0,S,C,s)}pullBack(t,s){s*=.001,this.value=this._slowDown.update(s).value,this._slowDown.isMoving||this._state.next()}stop(){this._slowDown.stop()}}const Xk={y:0,v:0,vertical:0,x:1,h:1,horizontal:1}
6414,rh=Phaser.Utils.Objects.GetValue;class Uk extends ke{constructor(t,s){if(super(t,s),this.parent!==this.scene?this.focusMode=rh(s,"focus",!0):this.focusMode=!1,this.setSpeed(rh(s,"speed",.1)),this.setEnable(rh(s,"enable",!0)),!this.focusMode)this.scene.input.on("wheel",this.onSceneScroll,this);else{var t=this.parent;t.setInteractive(rh(s,"inputConfig",void 0)).on("wheel",function(C,S,l,T,e){this.enable&&this.scroll(l)},this)}}destroy(){this.focusMode||this.scene.input.off("wheel",this.onSceneScroll,this)}onSceneScroll(t,s,c,C,S,l){this.enable&&this.scroll(C)}setEnable(t){return t===void 0&&(t=!0),this.enable=t,this}setSpeed(t){return this.speed=t,this}scroll(t){t*=this.speed,this.emit("scroll",t,this.parent,this)}}const Ei=Phaser.Utils.Objects.GetValue;var ah=function(i,t,s,c){s=s.toUpperCase();var C=s==="Y",S=i.scrollMode===2,l=i.childrenMap.child,T,e,d=`slider${s}`;if(S||c.hasOwnProperty(d)?T=Ei(c,d,void 0):T=Ei(c,"slider",void 0),T){T===!0&&(T={}),T.orientation=C?1:0,e=Dk(i.scene,T);var g,r,a,h=Ei(T,"position",0);typeof h=="string"&&(h=Wk[h]);var n=Ei(c,`space.slider${s}`,void 0);n===void 0&&(n=Ei(c,"space.slider",void 0),n===void 0&&(S?n=0:n=Ei(c,"space.child",0)));var o=typeof n=="number";C?h===0?(g=2,r=1,a=o?{left:n}:n):(g=0,r=1,a=o?{right:n}:n):h===0?(g=1,r=2,a=o?{top:n}:n):(g=1,r=0,a=o?{bottom:n}:n),t.add(e,{column:g,row:r,align:"center",padding:a,expand:!0}),i[`hideUnscrollableSlider${s}`]=Ei(T,"hideUnscrollableSlider",!1),i[`adaptThumb${s}SizeMode`]=Ei(T,"adaptThumbSize",!1),i[`minThumb${s}Size`]=Ei(T,"minThumbSize",void 0)}else i[`hideUnscrollableSlider${s}`]=!1,i[`adaptThumb${s}SizeMode`]=!1,i[`minThumb${s}Size`]=void 0;var f,u,v=`scroller${s}`;S||c.hasOwnProperty(v)?f=Ei(c,v,!0):f=Ei(c,"scroller",!0),f&&l&&(f===!0&&(f={}),f.orientation=C?0:1,u=new Yk(l,f));var m=Ei(c,S?`mouseWheelScroller${s}`:"mouseWheelScroller",!1),p;if(m&&l&&(p=new Uk(l,m)),i.addChildrenMap(`slider${s}`,e),i.addChildrenMap(`scroller${s}`,u),i.addChildrenMap(`mouseWheelScroller${s}`,p),(!S||C)&&(i.hideUnscrollableSlider=i[`hideUnscrollableSlider${s}`],i.adaptThumbSizeMode=i[`adaptThumb${s}SizeMode`],i.minThumbSize=i[`minThumb${s}Size`],i.addChildrenMap("slider",e),i.addChildrenMap("scroller",u),i.addChildrenMap("mouseWheelScroller",p)),e){var x,y;S?(x=C?"t":"s",y=`scroll${s}`):(x="t",y="scroll"),e.on("valuechange",function(E){i[x]=E,i.emit(y,i)})}if(u){var P,y;S?(P=`childO${s}`,y=`scroll${s}`):(P="childOY",y="scroll"),u.on("valuechange",function(M){i[P]=M,i.emit(y,i)})}if(p){var b=`addChildO${s}`;p.on("scroll",function(E){i[b](-E,!0)})}};const Wk={right:0,left:1,bottom:0,top:1},oh=Phaser.Utils.Objects.GetValue;var Hk=function(i,t){var s=i.scene,c=[0,1,0],C=[0,1,0],S=oh(t,"width"),l=oh(t,"height");if(!S){var T=oh(t,"child.expandWidth",!0);T||(c[1]=0)}if(!l){var e=oh(t,"child.expandHeight",!0);e||(C[1]=0)}var d=new yn(s,{column:3,row:3,columnProportions:c,rowProportions:C});switch(dk(i,d,t),i.scrollMode){case 0:ah(i,d,"y",t);break;case 1:ah(i,d,"x",t);break;default:ah(i,d,"y",t),ah(i,d,"x",t);break}return d},$k=function(){switch(this.scrollMode){case 0:case 1:pc.call(this),this.updateController(),mc.call(this),gc.call(this);break;default:pc.call(this,"y"),pc.call(this,"x"),this.updateController(),mc.call(this,"y"),mc.call(this,"x"),gc.call(this,"y"),gc.call(this,"x");break}return this},pc=function(i){var t,s,c,C;switch(this.scrollMode){case 0:case 1:t=this.topChildOY,s=this.bottomChildOY,c=this.childrenMap.scroller,C=this.childrenMap.slider;break;default:i=i.toUpperCase(),i==="Y"?(t=this.topChildOY,s=this.bottomChildOY):(t=this.leftChildOX,s=this.rightChildOX),c=this.childrenMap[`scroller${i}`],C=this.childrenMap[`slider${i}`]}c&&c.setBounds(t,s),C&&C.setEnable(t!==s)},mc=function(i){switch(this.scrollMode){case 0:case 1:var t=this.childrenMap.slider;t&&this.hideUnscrollableSlider&&this.setChildVisible(t,this.isOverflow);break;default:i=i.toUpperCase();var t=this.childrenMap[`slider${i}`],s=this[`hideUnscrollableSlider${i}`],c=this[`isOverflow${i}`];t&&s&&this.setChildVisible(t,c);break}},gc=function(i){switch(this.scrollMode){case 0:case 1:if(!this.adaptThumbSizeMode)return;var S=this.childrenMap.slider;if(!S)return;var t=Math.min(this.childVisibleHeight/this.childHeight,1),l=S.childrenMap.track,T=S.childrenMap.thumb,e=this.minThumbSize;if(this.scrollMode===0){var s=l.displayHeight*t;e!==void 0&&s<e&&(s=e),wi(T,void 0,s)}else{var c=l.displayWidth*t;e!==void 0&&c<e&&(c=e),wi(T,c,void 0)}F0(S);break;default:i=i.toUpperCase();var C=this[`adaptThumb${i}SizeMode`];if(!C)return;var S=this.childrenMap[`slider${i}`];
6414if(!S)return;var l=S.childrenMap.track,T=S.childrenMap.thumb,e=this[`minThumb${i}Size`];if(i==="Y"){var t=Math.min(this.childVisibleHeight/this.childHeight,1),s=l.displayHeight*t;e!==void 0&&s<e&&(s=e),wi(T,void 0,s)}else{var t=Math.min(this.childVisibleWidth/this.childWidth,1),c=l.displayWidth*t;e!==void 0&&c<e&&(c=e),wi(T,c,void 0)}F0(S);break}},F0=function(i){var t=i.minWidth,s=i.minHeight;i.minWidth=i.width,i.minHeight=i.height,i.layout(),i.minWidth=t,i.minHeight=s},jk=function(){switch(this.scrollMode){case 0:case 1:var i=this.childrenMap.scroller,t=this.childrenMap.slider;i&&i.setValue(this.childOY),t&&t.setValue(this.t);break;default:var s=this.childrenMap.scrollerY,c=this.childrenMap.sliderY,C=this.childrenMap.scrollerX,S=this.childrenMap.sliderX;s&&s.setValue(this.childOY),c&&c.setValue(this.t),C&&C.setValue(this.childOX),S&&S.setValue(this.s);break}};const Is=Phaser.Utils.Objects.GetValue,lh=Phaser.Math.Clamp;class nl extends ee{constructor(t,s){s===void 0&&(s={});var c=$v(s),C=c===1;s.orientation=C?0:1,super(t,s),this.type=Is(s,"type","rexScrollable"),this.scrollMode=c;var S=Is(s,"background",void 0);S&&this.addBackground(S);var l=Is(s,"header",void 0);if(l){var T=Is(s,"align.header","center"),e=Is(s,"space.header",0),d;C?d={right:e}:d={bottom:e},this.add(l,{proportion:0,align:T,padding:d,expand:Is(s,"expand.header",!0)})}var g=Hk(this,s);g&&this.add(g,{proportion:1,align:"center",padding:0,expand:!0});var r=Is(s,"footer",void 0);if(r){var T=Is(s,"align.footer","center"),a=Is(s,"space.footer",0),d;C?d={left:a}:d={top:a},this.add(r,{proportion:0,align:T,padding:d,expand:Is(s,"expand.footer",!0)})}this.addChildrenMap("background",S),this.addChildrenMap("header",l),this.addChildrenMap("footer",r),this.runLayoutFlag=!1}postLayout(t,s,c){return this.resizeController(),this.runLayoutFlag||(this.runLayoutFlag=!0,this.setT(0),this.scrollMode===2&&this.setS(0)),this}set t(t){var s=this.childMargin;if(s.top!==0||s.bottom!==0){var c=this.childrenMap.child,C=c.topChildOY-c.bottomChildOY,S=C+s.top+s.bottom,l=S*t-s.top;t=C!==0?l/C:0}this.childrenMap.child.t=t,this.updateController()}get t(){var t=this.childrenMap.child.t,s=this.childMargin;if(s.top!==0||s.bottom!==0){var c=this.childrenMap.child,C=c.topChildOY-c.bottomChildOY,S=C+s.top+s.bottom,l=C*t+s.top;t=S!==0?l/S:0}return t}set s(t){var s=this.childMargin;if(s.left!==0||s.right!==0){var c=this.childrenMap.child,C=c.leftChildOX-c.rightChildOX,S=C+s.left+s.right,l=S*t-s.left;t=C!==0?l/C:0}this.childrenMap.child.s=t,this.updateController()}get s(){var t=this.childrenMap.child.s,s=this.childMargin;if(s.left!==0||s.right!==0){var c=this.childrenMap.child,C=c.leftChildOX-c.rightChildOX,S=C+s.left+s.right,l=C*t+s.left;t=S!==0?l/S:0}return t}set childOY(t){this.childrenMap.child.childOY=t,this.updateController()}get childOY(){return this.childrenMap.child.childOY}set childOX(t){this.childrenMap.child.childOX=t,this.updateController()}get childOX(){return this.childrenMap.child.childOX}get topChildOY(){return this.childrenMap.child.topChildOY+this.childMargin.top}get bottomChildOY(){return this.childrenMap.child.bottomChildOY-this.childMargin.bottom}get leftChildOX(){return this.childrenMap.child.leftChildOX+this.childMargin.left}get rightChildOX(){return this.childrenMap.child.rightChildOX-this.childMargin.right}get childVisibleHeight(){return this.childrenMap.child.childVisibleHeight}get childHeight(){return this.childrenMap.child.childHeight}get childVisibleWidth(){return this.childrenMap.child.childVisibleWidth}get childWidth(){return this.childrenMap.child.childWidth}get isOverflow(){var t=this.childrenMap.child;return t.topChildOY!==t.bottomChildOY}get isOverflowY(){return this.isOverflow}get isOverflowX(){var t=this.childrenMap.child;return t.leftChildOX!==t.rightChildOX}setChildOY(t,s){return s===void 0&&(s=!1),s&&(t=lh(t,this.bottomChildOY,this.topChildOY)),this.childOY=t,this}addChildOY(t,s){return this.setChildOY(this.childOY+t,s),this}setT(t,s){return s===void 0&&(s=!1),s&&(t=lh(t,0,1)),this.t=t,this}addT(t,s){return this.setT(this.t+t,s),this}scrollToTop(){return this.t=0,this}scrollToBottom(){if(this.t=1,this.t===0)return this;do this.t=1;while(this.t!==1);return this}
6414setChildOX(t,s){return s===void 0&&(s=!1),s&&(t=lh(t,this.leftChildOX,this.rightChildOX)),this.childOX=t,this}addChildOX(t,s){return this.setChildOX(this.childOX+t,s),this}setS(t,s){return s===void 0&&(s=!1),s&&(t=lh(t,0,1)),this.s=t,this}addS(t,s){return this.setS(this.s+t,s),this}scrollToLeft(){return this.s=0,this}scrollToRight(){if(this.s=1,this.s===0)return this;do this.s=1;while(this.s!==1);return this}get sliderEnable(){var t=this.childrenMap.slider;return t?t.enable:!1}set sliderEnable(t){var s=this.childrenMap.slider;s&&s.setEnable(t)}setSliderEnable(t){return t===void 0&&(t=!0),this.sliderEnable=t,this}get sliderYEnable(){return this.sliderEnable}set sliderYEnable(t){this.sliderEnable=t}setSliderYEnable(t){return this.setSliderEnable(t),this}get sliderXEnable(){var t=this.childrenMap.sliderX;return t?t.enable:!1}set sliderXEnable(t){var s=this.childrenMap.sliderX;s&&s.setEnable(t)}setSliderXEnable(t){return t===void 0&&(t=!0),this.sliderXEnable=t,this}get scrollerEnable(){var t=this.childrenMap.scroller;return t?t.enable:!1}set scrollerEnable(t){var s=this.childrenMap.scroller;s&&s.setEnable(t)}setScrollerEnable(t){return t===void 0&&(t=!0),this.scrollerEnable=t,this}get scrollerYEnable(){return this.scrollerEnable}set scrollerYEnable(t){this.scrollerEnable=t}setScrollerYEnable(t){return this.setScrollerEnable(t),this}get scrollerXEnable(){var t=this.childrenMap.scrollerX;return t?t.enable:!1}set scrollerXEnable(t){var s=this.childrenMap.scrollerX;s&&s.setEnable(t)}setScrollerXEnable(t){return t===void 0&&(t=!0),this.scrollerXEnable=t,this}get scrollerXEnable(){var t=this.childrenMap.scrollerX;return t?t.enable:!1}set scrollerXEnable(t){var s=this.childrenMap.scrollerX;s&&s.setEnable(t)}setScrollerXEnable(t){return t===void 0&&(t=!0),this.scrollerXEnable=t,this}get mouseWheelScrollerEnable(){var t=this.childrenMap.mouseWheelScroller;return t?t.enable:!1}set mouseWheelScrollerEnable(t){var s=this.childrenMap.mouseWheelScroller;s&&s.setEnable(t)}setMouseWheelScrollerEnable(t){return t===void 0&&(t=!0),this.mouseWheelScrollerEnable=t,this}get mouseWheelScrollerYEnable(){return this.mouseWheelScrollerEnable}set mouseWheelScrollerYEnable(t){this.mouseWheelScrollerEnable=t}setMouseWheelScrollerYEnable(t){return this.setMouseWheelScrollerEnable(t),this}get mouseWheelScrollerXEnable(){var t=this.childrenMap.mouseWheelScrollerX;return t?t.enable:!1}set mouseWheelScrollerXEnable(t){var s=this.childrenMap.mouseWheelScrollerX;s&&s.setEnable(t)}setMouseWheelScrollerXEnable(t){return t===void 0&&(t=!0),this.mouseWheelScrollerXEnable=t,this}setDropZoneEnable(t){t===void 0&&(t=!0);var s=this.childrenMap.child;return s.setInteractive(),s.input.dropZone=t,this}}var Kk={resizeController:$k,updateController:jk};Object.assign(nl.prototype,Kk);const Ri=0,Ni=1,Vi=2;var Za=function(i){var t;return gC(i)?t=Vi:Vv(i)?t=Ri:t=Ni,t},Kv=function(i,t,s){var c=Za(i);switch(c){case Ri:s=i.getWrappedText(t);break;case Ni:s=i.getPenManager(t,s);break;case Vi:i.maxWidth>0?s=i.setText(t).getTextBounds().wrappedText.split(` 6415`):s=t.split(` 6416`);break}return s},Zk=function(i){return i!==void 0&&(this.text=i),this.lines=Kv(this.textObject,this.text,this.lines),this.linesCount=this.lines.length,this._textHeight=void 0,this._textVisibleHeight=void 0,this.updateTextObject(),this},PC=function(i){return(i-this.textLineSpacing)/(this.textLineHeight+this.textLineSpacing)},bC=function(i){return i*(this.textLineHeight+this.textLineSpacing)-this.textLineSpacing},Jk=function(i){var t=i+this.visibleLinesCount+1,s;switch(this.textObjectType){case Ri:s=this.lines.slice(i,t).join(` 6417`);break;case Ni:var c=this.lines.getLineStartIndex(i),C=this.lines.getLineEndIndex(t-1);s=this.lines.getSliceTagText(c,C,!0);break;case Vi:s=this.lines.slice(i,t).join(` 6418`);break}return s},Zv=function(i,t){var s=Za(i);switch(s){case Ri:var S=i.style,c=S.wordWrapWidth,C=S.wordWrapCallback;S.wordWrapWidth=0,S.wordWrapCallback=void 0,i.setText(t),S.wordWrapWidth=c,S.wordWrapCallback=C;break;case Ni:var S=i.style,l=S.wrapMode;S.wrapMode=0,i.setText(t),S.wrapMode=l;break;case Vi:var T=i._maxWidth;i._maxWidth=0,i.setText(t),i._maxWidth=T;break}},MC=function(){var i=this.textObject.rexSizer;this.textObject.y+=i.offsetY-i.preOffsetY,i.preOffsetY=i.offsetY,this.resetChildPositionState(this.textObject),this.textCropEnable&&Qk.call(this)},Qk=function(){if(this.textObject.setCrop){var i=this.textObject.rexSizer.offsetY,t,s;i<=0?(t=-i,s=this.height):(t=0,s=this.height-i),this.textObject.setCrop(0,t,this.width,s)}},qk=function(){var i=Math.max(Math.floor(PC.call(this,-this.textOY)),0),t=bC.call(this,i)+this.textOY,s=Jk.call(this,i);return Zv(this.textObject,s),this.textObject.rexSizer.offsetY=t,MC.call(this),this},_k=function(){return this._textLineHeight=void 0,this._textLineSpacing=void 0,this._visibleLinesCount=void 0,this._textHeight=void 0,this._textVisibleHeight=void 0,qo.call(this),this},tG=function(i,t,s){if(s+=this.textLineHeight+this.textLineSpacing,!(this.textObjectWidth===t&&this._textObjectRealHeight===s)){switch(this.textObjectWidth=t,this._textObjectRealHeight=s,this.textObjectType){case Ri:case Ni:i.setFixedSize(t,s);var c=i.style,C=Math.max(t,0);this.textObjectType===Ri?c.wordWrapWidth=C:(c.wrapMode===0&&(c.wrapMode=1),c.wrapWidth=C);break;case Vi:i.setMaxWidth(t);break}this.setText()}},eG=function(){var i,t,s,c=this.left,C=this.top,S,l,T,e;i=this.textObject,i.rexSizer.hidden||(t=i.rexSizer,s=t.padding,S=c+s.left,l=C+s.top,T=this.width-s.left-s.right,e=this.height-s.top-s.bottom,tG.call(this,i,T,e),Zo(i,S,l,T,e,t.align),t.preOffsetY=0,MC.call(this),this.textMask&&(this.textMask.setPosition().resize(),this.resetChildPositionState(this.textMask)))};
6418const iG={setText:Zk,updateTextObject:qk,preLayout:_k,layoutChildren:eG},I0=Phaser.Utils.Objects.IsPlainObject,Di=Phaser.Utils.Objects.GetValue,sG=Phaser.Display.Align.TOP_LEFT;class wC extends Wr{constructor(t,s,c,C,S,l){I0(s)?(l=s,s=Di(l,"x",0),c=Di(l,"y",0),C=Di(l,"width",void 0),S=Di(l,"height",void 0)):I0(C)&&(l=C,C=Di(l,"width",void 0),S=Di(l,"height",void 0)),super(t,s,c,C,S,l),this.type="rexTextBlock",this.textObject=void 0,this.linesCount=0,this.textMask=void 0,this.textObjectType=void 0,this._textLineHeight=void 0,this._textLineSpacing=void 0,this._visibleLinesCount=void 0,this._textHeight=void 0,this._textVisibleHeight=void 0,this._textObjectRealHeight=0,this.lines=void 0,this.text=Di(l,"content",""),this._textOY=0,this.execeedTopState=!1,this.execeedBottomState=!1,this.setClampMode(Di(l,"clamplTextOY",!0)),this.alwaysScrollable=Di(l,"alwaysScrollable",!1);var T=Di(l,"background",void 0),e=Di(l,"text",void 0);e===void 0&&(e=nG(t)),this.textCropEnable=Di(l,"textCrop",!!e.setCrop);var d=Di(l,"textMask",!this.textCropEnable);T&&this.addBackground(T),this.add(e),this.sizerChildren=[e];var g=this.getSizerConfig(e);g.align=sG,g.padding=Jn(0),g.expand=!0,this.textObject=e,this.textObjectType=Za(e),g.preOffsetY=0,g.offsetY=0,d&&(this.textMask=Ss.call(this,this.textObject,this)),this.addChildrenMap("background",T),this.addChildrenMap("text",e)}destroy(t){if(!(!this.scene||this.ignoreDestroy)){if(this.textObject=void 0,this.textMask=void 0,this.lines){switch(this.textObjectType){case Ri:this.lines.length=0;break;case Ni:this.lines.destroy();break;case Vi:this.lines.length=0;break}this.lines=void 0}super.destroy(t)}}setClampMode(t){return t===void 0&&(t=!0),this.clampTextOY=t,this}get textLineHeight(){if(this._textLineHeight===void 0){var t;switch(this.textObjectType){case Ri:case Ni:var s=this.textObject.style;t=s.metrics.fontSize+s.strokeThickness;break;case Vi:var c=this.textObject.fontSize/this.textObject.fontData.size;t=this.textObject.fontData.lineHeight*c;break}this._textLineHeight=t}return this._textLineHeight}get textLineSpacing(){if(this._textLineSpacing===void 0){var t;switch(this.textObjectType){case Ri:case Ni:t=this.textObject.lineSpacing;break;case Vi:t=0;break}this._textLineSpacing=t}return this._textLineSpacing}get visibleLinesCount(){return this._visibleLinesCount===void 0&&(this._visibleLinesCount=Math.floor(PC.call(this,this._textObjectRealHeight))),this._visibleLinesCount}get topTextOY(){return 0}get bottomTextOY(){return-this.textVisibleHeight}get textHeight(){return this._textHeight===void 0&&(this._textHeight=bC.call(this,this.linesCount)),this._textHeight}get textObjectHeight(){return this._textObjectRealHeight-(this.textLineHeight+this.textLineSpacing)}get textVisibleHeight(){if(this._textVisibleHeight===void 0){var t=this.textHeight-this.textObjectHeight;!this.alwaysScrollable&&t<0&&(t=0),this._textVisibleHeight=t}return this._textVisibleHeight}textOYExceedTop(t){return t===void 0&&(t=this.textOY),t>this.topTextOY}textOYExeceedBottom(t){return t===void 0&&(t=this.textOY),t<this.bottomTextOY}get textOY(){return this._textOY}set textOY(t){var s=this.topTextOY,c=this.bottomTextOY,C=this.textOYExceedTop(t),S=this.textOYExeceedBottom(t);this.clampTextOY&&(this.visibleLinesCount>this.linesCount?t=0:C?t=s:S&&(t=c)),this._textOY!==t&&(this._textOY=t,this.updateTextObject()),C&&(this.execeedTopState||this.emit("execeedtop",this,t,s)),this.execeedTopState=C,S&&(this.execeedBottomState||this.emit("execeedbottom",this,t,c)),this.execeedBottomState=S}setTextOY(t){return this.textOY=t,this}set t(t){this.textOY=-this.textVisibleHeight*t}get t(){var t=this.textVisibleHeight;return t===0?0:this.textOY/-t}setTextOYByPercentage(t){return this.t=t,this}}var nG=function(i){return i.add.text(0,0,"")};Object.assign(wC.prototype,iG);var rG=function(i){Object.defineProperty(i,"childOY",{configurable:!0,get:function(){return i.textOY},set:function(t){i.textOY=t}}),Object.defineProperty(i,"topChildOY",{get:function(){return i.topTextOY}}),Object.defineProperty(i,"bottomChildOY",{get:function(){return i.bottomTextOY}}),Object.defineProperty(i,"childVisibleHeight",{get:function(){return i.textObjectHeight}}),Object.defineProperty(i,"childHeight",{get:function(){return i.textHeight}})};const aG={setText(i){var t=this.childrenMap.child;return t.setText(i),this.resizeController(),this},appendText(i){return this.setText(this.text+i),this}},oG={scrollToLine(i){return this.setChildOY(-this.lineHeight*i),this},scrollToNextLine(i){i===void 0&&(i=1);var t=this.lineIndex+i;return this.scrollToLine(t),this}}
6418,Ds=Phaser.Utils.Objects.GetValue;class rl extends nl{constructor(t,s){s===void 0&&(s={});var c=Ds(s,"text",void 0),C=Ds(s,"textWidth",void 0),S=Ds(s,"textHeight",void 0),l=Ds(s,"textCrop",!!c.setCrop),T=Ds(s,"textMask",!l),e=Ds(s,"content",""),d=new wC(t,{width:C,height:S,text:c,textMask:T,textCrop:l&&!T,content:e,clamplTextOY:Ds(s,"clamplChildOY",!1),alwaysScrollable:Ds(s,"alwaysScrollable",!1)});t.add.existing(d),rG(d),s.scrollMode=0,s.type="rexTextArea",s.child={gameObject:d,expandWidth:C===void 0,expandHeight:S===void 0};var g=Ds(s,"space",void 0);g&&(g.child=Ds(g,"text",0)),super(t,s),this.addChildrenMap("text",c)}get text(){return this.childrenMap.child.text}get lineHeight(){var t=this.childrenMap.child;return t.textLineHeight+t.textLineSpacing}get lineIndex(){return Math.floor(-this.childOY/this.lineHeight)}get linesCount(){var t=this.childrenMap.child;return t.linesCount}get contentHeight(){var t=this.childrenMap.child;return t.textHeight}}Object.assign(rl.prototype,aG,oG);const hh=Phaser.Utils.Objects.GetValue;var lG=function(i,t,s){t=t?zi(t):{};var c=hh(s,"background",ts),C=hh(s,"text",mC),S=hh(s,"track",ts),l=hh(s,"thumb",ts);c?t.background=c(i,t.background):delete t.background,C?t.text=C(i,t.text):delete t.text;var T=t.slider;T!==!1&&(T===void 0&&(T={}),S?T.track=S(i,T.track):delete T.track,l?T.thumb=l(i,T.thumb):delete T.thumb,t.slider=T);var e=new rl(i,t);return i.add.existing(e),e};const hG=Phaser.Utils.Objects.GetValue;var uG=function(i,t,s){var c=hG(t,"$type");c===void 0&&t&&(t.hasOwnProperty("slider")||t.hasOwnProperty("scroller"))&&(c="textarea");var C;switch(c){case"textarea":C=new lG(i,t,s);break;default:C=new es(i,t,s);break}return i.add.existing(C),C};const dG=Phaser.Utils.Objects.GetValue;class Jv extends Fu{constructor(t,s,c){s=s?zi(s):{},c===void 0&&(c={});var C=dG(c,"background",ts);C?s.background=C(t,s.background):delete s.background,s.title=es(t,s.title,c.title),s.content=uG(t,s.content,c.content),s.content instanceof rl&&Gs(s,"height")&&!Gs(s,"proportion.content")&&mt(s,"proportion.content",1);var S=s.button,l=s.buttonA||S,T=s.buttonB||S,e=s.buttonMode;e===void 0&&(e=l&&T?2:l?1:0);var d=c.button,g=c.buttonA||d,r=c.buttonB||d;switch(e){case 2:s.actions=[es(t,l,g),es(t,T,r)];break;case 1:s.actions=[es(t,l,g)];break;case 0:break;default:s.actions=[];break}var a=s.choice;a&&(s.choices=[]),super(t,s),this.type="rexConfirmDialog",this.buttonMode=e,this.defaultActionConfig=S,this.defaultActionButtonCreator=d,this.defaultChoiceConfig=a,this.defaultChoiceCreator=c.choice;var h=this.childrenMap.actions;this.addChildrenMap("buttonA",h?h[0]:null),this.addChildrenMap("buttonB",h?h[1]:null),hk.call(this)}}Object.assign(Jv.prototype,sk);xt.register("confirmDialog",function(i,t){var s=new Jv(this.scene,i,t);return this.scene.add.existing(s),s});mt(window,"RexPlugins.UI.ConfirmDialog",Jv);const uh=Phaser.Utils.Objects.GetValue;var al=function(i,t,s){var c=uh(i,`proportion.${t}`,s.proportion),C=uh(i,`align.${t}`,"center"),S=uh(i,`space.${t}`,void 0);if(typeof S=="number"&&s.paddingKey){var l=S;S={},S[s.paddingKey]=l}var T=uh(i,`expand.${t}`,!0);return{proportion:c,align:C,padding:S,expand:T}},Iu=function(i){return al(i,"header",{proportion:0,paddingKey:"bottom"})},Du=function(i){return al(i,"leftSide",{proportion:0,paddingKey:"right"})},Bu=function(i){return al(i,"content",{proportion:1})},ku=function(i){return al(i,"rightSide",{proportion:0,paddingKey:"left"})},Gu=function(i){return al(i,"footer",{proportion:0,paddingKey:"top"})},dn=function(i){return{proportion:1,align:"center",padding:0,expand:!0}},cn=function(i,t){var s=new ee(i,{orientation:t});return i.add.existing(s),s},cG=function(i){var t=this.scene,s=i.header;s&&this.add(s,Iu(i));var c=cn(t,0);this.add(c,dn());var C=i.leftSide;C&&c.add(C,Du(i));var S=i.content;S&&c.add(S,Bu(i));var l=i.rightSide;l&&c.add(l,ku(i));var T=i.footer;T&&this.add(T,Gu(i))},fG=function(i){var t=this.scene,s=i.header;s&&this.add(s,Iu(i));var c=cn(t,0);this.add(c,dn());var C=i.leftSide;C&&c.add(C,Du(i));var S=cn(t,1);c.add(S,dn());var l=cn(t,0);S.add(l,dn());var T=i.content;T&&l.add(T,Bu(i));var e=i.rightSide;e&&l.add(e,ku(i));var d=i.footer;d&&S.add(d,Gu(i))},vG=function(i){var t=this.scene,s=i.header;s&&this.add(s,Iu(i));var c=cn(t,0);this.add(c,dn());var C=cn(t,1);c.add(C,dn());var S=cn(t,0);C.add(S,dn());var l=i.leftSide;l&&S.add(l,Du(i));var T=i.content;T&&S.add(T,Bu(i));var e=i.footer;
6418e&&C.add(e,Gu(i));var d=i.rightSide;d&&c.add(d,ku(i))},pG=function(i){var t=this.scene,s=i.header;s&&this.add(s,Iu(i));var c=cn(t,0);this.add(c,dn());var C=i.leftSide;C&&c.add(C,Du(i));var S=cn(t,1);c.add(S,dn());var l=i.content;l&&S.add(l,Bu(i));var T=i.footer;T&&S.add(T,Gu(i));var e=i.rightSide;e&&c.add(e,ku(i))};const D0=Phaser.Utils.Objects.GetValue,B0=[cG,fG,vG,pG];var mG=function(i){this.clear(!0);var t=D0(i,"background",void 0);t&&this.addBackground(t);var s=D0(i,"layoutMode",0);typeof s=="string"&&(s=gG[s.toUpperCase()]);var c=B0[s]||B0[0];c.call(this,i),this.addChildrenMap("background",i.background),this.addChildrenMap("header",i.header),this.addChildrenMap("leftSide",i.leftSide),this.addChildrenMap("content",i.content),this.addChildrenMap("rightSide",i.rightSide),this.addChildrenMap("footer",i.footer)};const gG={FFF:0,LFF:1,FFR:2,LFR:3};class Qv extends ee{constructor(t,s){s===void 0&&(s={}),s.orientation=1,super(t,s),this.type="rexHolyGrail",this.build(s)}}var xG={build:mG};Object.assign(Qv.prototype,xG);xt.register("holyGrail",function(i){var t=new Qv(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.HolyGrail",Qv);const yG={getButtonsSizer(i){return this.childrenMap[`${i}ButtonsSizer`]},getButton(i,t){var s=this.getButtonsSizer(i);return s?s.getButton(t):void 0},setButtonEnable(i,t,s){return this.getButtonsSizer(i).setButtonEnable(t,s),this},setLeftButtonEnable(i,t){return this.childrenMap.leftButtonsSizer.setButtonEnable(i,t),this},setRightButtonEnable(i,t){return this.childrenMap.rightButtonsSizer.setButtonEnable(i,t),this},setTopButtonEnable(i,t){return this.childrenMap.topButtonsSizer.setButtonEnable(i,t),this},setBottomButtonEnable(i,t){return this.childrenMap.bottomButtonsSizer.setButtonEnable(i,t),this},toggleButtonEnable(i,t){return this.getButtonsSizer(i).toggleButtonEnable(t),this},toggleLeftButtonEnable(i){return this.childrenMap.leftButtonsSizer.toggleButtonEnable(i),this},toggleRightButtonEnable(i){return this.childrenMap.rightButtonsSizer.toggleButtonEnable(i),this},toggleTopButtonEnable(i){return this.childrenMap.topButtonsSizer.toggleButtonEnable(i),this},toggleBottomButtonEnable(i){return this.childrenMap.bottomButtonsSizer.toggleButtonEnable(i),this},getButtonEnable(i,t){return this.getButtonsSizer(i).getButtonEnable(t)},getLeftButtonEnable(i){return this.childrenMap.leftButtonsSizer.getButtonEnable(i)},getRightButtonEnable(i){return this.childrenMap.rightButtonsSizer.getButtonEnable(i)},getTopButtonEnable(i){return this.childrenMap.topButtonsSizer.getButtonEnable(i)},getBottomButtonEnable(i){return this.childrenMap.bottomButtonsSizer.getButtonEnable(i)},emitButtonClick(i,t){var s=this.getButtonsSizer(i);return s?(s.emitButtonClick(t),this):this},emitLeftButtonClick(i){return this.childrenMap.leftButtonsSizer.emitButtonClick(i),this},emitRightButtonClick(i){return this.childrenMap.rightButtonsSizer.emitButtonClick(i),this},emitTopButtonClick(i){return this.childrenMap.topButtonsSizer.emitButtonClick(i),this},emitBottomButtonClick(i){return this.childrenMap.bottomButtonsSizer.emitButtonClick(i),this},getLeftButton(i){return this.childrenMap.leftButtonsSizer.getButton(i)},getRightButton(i){return this.childrenMap.rightButtonsSizer.getButton(i)},getTopButton(i){return this.childrenMap.topButtonsSizer.getButton(i)},getBottomButton(i){return this.childrenMap.bottomButtonsSizer.getButton(i)},showButton(i,t){return Gn(this.getButton(i,t)),this},showLeftButton(i){return Gn(this.getLeftButton(i)),this},showRightButton(i){return Gn(this.getRightButton(i)),this},showTopButton(i){return Gn(this.getTopButton(i)),this},showBottomButton(i){return Gn(this.getBottomButton(i)),this},hideButton(i,t){return Nn(this.getButton(i,t)),this},hideLeftButton(i){return Nn(this.getLeftButton(i)),this},hideRightButton(i){return Nn(this.getRightButton(i)),this},hideTopButton(i){return Nn(this.getTopButton(i)),this},hideBottomButton(i){return Nn(this.getBottomButton(i)),this},addButton(i,t){return this.getButtonsSizer(i).addButton(t),this},addLeftButton(i){return this.addButton("left",i),this},addRightButton(i){return this.addButton("right",i),this},addTopButton(i){return this.addButton("top",i),this},removeButton(i,t,s){return this.getButtonsSizer(i).removeButton(t,s),this},removeLeftButton(i,t){return this.removeButton("left",i,t),this},removeRightButton(i,t){return this.removeButton("right",i,t),this},removeTopButton(i,t){return this.removeButton("top",i,t),this},removeBottomButton(i,t){return this.removeButton("bottom",i,t),this},clearButtons(i,t){return this.getButtonsSizer(i).clearButtons(t),this},clearLeftButtons(i){return this.clearButtons("left",i),this},clearRightButtons(i){return this.clearButtons("right",i),this},clearTopButtons(i){return this.clearButtons("top",i),this},clearBottomButtonss(i){return this.clearButtons("bottom",i),this}
6418,forEachButton(i,t,s){return this.getButtonsSizer(i).forEachButtton(t,s),this},forEachLeftButton(i,t){return this.childrenMap.leftButtonsSizer.forEachButtton(i,t),this},forEachRightButton(i,t){return this.childrenMap.rightButtonsSizer.forEachButtton(i,t),this},forEachTopButton(i,t){return this.childrenMap.topButtonsSizer.forEachButtton(i,t),this},forEachBottomButton(i,t){return this.childrenMap.bottomButtonsSizer.forEachButtton(i,t),this}},Se=Phaser.Utils.Objects.GetValue;class qv extends yn{constructor(t,s){s===void 0&&(s={}),s.column=3,s.row=3,super(t,s),this.type="rexTabs",this.eventEmitter=Se(s,"eventEmitter",this);var c=Se(s,"background",void 0),C=Se(s,"panel",void 0),S=Se(s,"leftButtons",void 0),l=Se(s,"leftButtonsBackground",void 0),T,e=Se(s,"rightButtons",void 0),d=Se(s,"rightButtonsBackground",void 0),g,r=Se(s,"topButtons",void 0),a=Se(s,"topButtonsBackground",void 0),h,n=Se(s,"bottomButtons",void 0),o=Se(s,"bottomButtonsBackground",void 0),f,u=Se(s,"click",void 0);if(c&&this.addBackground(c),C&&this.add(C,1,1,"center",0,!0),S){var v=Se(s,"space.leftButtonsOffset",0),m=Se(s,"space.leftButton",0);T=new _e(t,{groupName:"left",background:l,buttons:S,orientation:1,space:{item:m},align:Se(s,"align.leftButtons",void 0),click:u,eventEmitter:this.eventEmitter});var p={top:v};this.add(T,0,1,"top",p,!1)}if(e){var x=Se(s,"space.rightButtonsOffset",0),y=Se(s,"space.rightButton",0);g=new _e(t,{groupName:"right",background:d,buttons:e,orientation:1,space:{item:y},align:Se(s,"align.rightButtons",void 0),click:u,eventEmitter:this.eventEmitter});var p={top:x};this.add(g,2,1,"top",p,!1)}if(r){var P=Se(s,"space.topButtonsOffset",0),b=Se(s,"space.topButton",0);h=new _e(t,{groupName:"top",background:a,buttons:r,orientation:0,space:{item:b},align:Se(s,"align.topButtons",void 0),click:u,eventEmitter:this.eventEmitter});var p={left:P};this.add(h,1,0,"left",p,!1)}if(n){var E=Se(s,"space.bottomButtonsOffset",0),M=Se(s,"space.bottomButton",0);f=new _e(t,{groupName:"bottom",background:o,buttons:n,orientation:0,space:{item:M},align:Se(s,"align.bottomButtons",void 0),click:u,eventEmitter:this.eventEmitter});var p={left:E};this.add(f,1,2,"left",p,!1)}this.addChildrenMap("background",c),this.addChildrenMap("panel",C),this.addChildrenMap("leftButtons",S),this.addChildrenMap("rightButtons",e),this.addChildrenMap("topButtons",r),this.addChildrenMap("bottomButtons",n),this.addChildrenMap("leftButtonsSizer",T),this.addChildrenMap("rightButtonsSizer",g),this.addChildrenMap("topButtonsSizer",h),this.addChildrenMap("bottomButtonsSizer",f)}}Object.assign(qv.prototype,yG);xt.register("tabs",function(i){var t=new qv(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.Tabs",qv);xt.register("slider",function(i){var t=new Ka(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.Slider",Ka);class AC{constructor(t,s){this.container=null,this._deltaHeight=0,this.setParent(t)}setParent(t){this.parent=t,this.parentContainer=t.getParentContainer()}destroy(t){t===void 0&&(t=!1),t||this.destroyContainer(),this.deltaHeight=0,this.data=void 0,this.container=null,this.parent=void 0,this.parentContainer=void 0}get table(){return this.parent}get scrollMode(){return this.parentContainer.scrollMode}get colIndx(){return this.parent.cellIndxeToColIndex(this.index)}get rowIndx(){return this.parent.cellIndxeToRowIndex(this.index)}getContainer(){return this.container}setContainer(t){return t?(this.container&&this.container.destroy(),this.container=t,this.parentContainer.add(t),this):(this.destroyContainer(),this)}destroyContainer(){return this.container&&(this.container.destroy(),this.container=null),this}popContainer(){if(this.container){var t=this.container;return this.container=null,this.parentContainer.remove(t),t}else return null}setXY(t,s){return this.container&&this.parentContainer.setChildLocalPosition(this.container,t,s
6418),this}setCellContainerAlign(t){return typeof t=="string"&&(t=$a[t]),this.cellContainerAlign=t,this}get deltaHeight(){return this._deltaHeight}set deltaHeight(t){t==null&&(t=0);var s=this.parent;this._deltaHeight===0&&t!==0?s.nonZeroDeltaHeightCount++:this._deltaHeight!==0&&t===0&&s.nonZeroDeltaHeightCount--;var c=this._deltaHeight!==t;if(this._deltaHeight=t,c){s.resetTotalRowsHeight();var C=this.scrollMode===0?"cellheightchange":"cellwidthchange";this.parentContainer.emit(C,this,this.container,this.parentContainer)}}get deltaWidth(){return this.deltaHeight}set deltaWidth(t){this.deltaHeight=t}setDeltaHeight(t){return this.deltaHeight=t,this}setDeltaWidth(t){return this.deltaHeight=t,this}get height(){return this.scrollMode===0?this.deltaHeight+this.parent.defaultCellHeight:this.parent.defaultCellWidth}set height(t){this.scrollMode!==1&&this.setDeltaHeight(t-this.parent.defaultCellHeight)}setHeight(t){return this.height=t,this}get width(){return this.scrollMode===0?this.parent.defaultCellWidth:this.deltaHeight+this.parent.defaultCellHeight}set width(t){this.scrollMode!==0&&this.setDeltaHeight(t-this.parent.defaultCellHeight)}setWidth(t){return this.width=t,this}get scene(){return this.parentContainer.scene}}Object.assign(AC.prototype,Jh);const k0=Phaser.Utils.Objects.GetValue,CG=Phaser.Utils.Array.SpliceOne;class TG{constructor(t,s){this.parent=t,this.cells=[],this.cellPool=new zs,this.resetFromJSON(s)}resetFromJSON(t){t===void 0&&(t={}),this.colCount=void 0,this.nonZeroDeltaHeightCount=0,this.resetTotalRowsHeight();var s=t.cellHeight;s===void 0&&(s=30);var c=t.cellWidth;return c===void 0&&(c=30),this.setDefaultCellHeight(s),this.setDefaultCellWidth(c),this.initCells(k0(t,"cellsCount",0)),this.setColumnCount(k0(t,"columns",1)),this}destroy(t){this.cellPool.destroy(),this.cells=void 0,this.parent=void 0}get defaultCellHeightMode(){return this.nonZeroDeltaHeightCount===0}setDefaultCellHeight(t){return this.defaultCellHeight=t,this}setDefaultCellWidth(t){return this.defaultCellWidth=t,this}initCells(t){var s=this.cells;s.length=t;for(var c=0;c<t;c++)s[c]=null;return this}insertNewCells(t,s){var c=this.cells;if(t===c.length){var C=t+s;c.legth=C;for(var S=t;S<C;S++)c[S]=null}else{var l=[];l.length=s;for(var S=0;S<s;S++)l[S]=null;this.cells.splice(t,0,...l)}return this.resetTotalRowsHeight(),this}removeCells(t,s){for(var c=t+s,C=t;C<c;C++)this.freeCell(C);return c===this.cells.length?this.cells.length=t:(s===1?CG(this.cells,t):this.cells.splice(t,s),this.buildCellIndex(t)),this.resetTotalRowsHeight(),this}setColumnCount(t){return this.colCount=t,this.resetTotalRowsHeight(),this}get rowCount(){return Math.ceil(this.cells.length/this.colCount)}get cellsCount(){return this.cells.length}isValidCellIdx(t){return t>=0&&t<this.cells.length}heightToRowIndex(t,s){if(s===void 0&&(s=0),t===0)return 0;if(this.defaultCellHeightMode){var T=t/this.defaultCellHeight;switch(s){case 1:T=Math.ceil(T);break;default:T=Math.floor(T);break}return T}for(var c=this.rowCount,C=t,S,l,T=0;;)if(l=this.getRowHeight(T),C-=l,S=T>=0&&T<c,C>0&&S)T+=1;else{if(C===0)return s===2&&(T+=1),T;if(s===1){var e=T;T+=1,S=T>=0&&T<c,S||(T=e)}return T}}widthToColIndex(t,s){if(t===0)return 0;var c=t/this.defaultCellWidth;return s?c=Math.ceil(c):c=Math.floor(c),c}colRowToCellIndex(t,s){return t>=this.colCount?null:s*this.colCount+t}rowIndexToHeight(t,s){if(this.defaultCellHeightMode)return(s-t+1)*this.defaultCellHeight;for(var c,C=0,S=t;S<=s;S++)c=this.getRowHeight(S),C+=c;return C}colIndexToWidth(t,s){return(s-t+1)*this.defaultCellWidth}getRowHeight(t){var s=this.colCount;if(s<=1)return this.getCellHeight(this.colRowToCellIndex(0,t));for(var c=0,C,S=0;S<s;S++)C=this.getCellHeight(this.colRowToCellIndex(S,t)),c<C&&(c=C);return c}getColWidth(t){return this.defaultCellWidth}getCellHeight(t){if(!this.isValidCellIdx(t))return 0;var s;if(this.defaultCellHeightMode)s=this.defaultCellHeight;else{var c=this.getCell(t,!1),C=c?c.deltaHeight:0;s=this.defaultCellHeight+C}return s}resetTotalRowsHeight(){this._totalRowsHeight=null}get totalRowsHeight(){return this._totalRowsHeight===null&&(this._totalRowsHeight=this.rowIndexToHeight(0,this.rowCount-1)),this._totalRowsHeight}get totalColumnWidth(){return this.colCount*this.defaultCellWidth}cellIndxeToColIndex(t){return t%this.colCount}cellIndxeToRowIndex(t){return Math.floor(t/this.colCount)}getCell(t,s){if(!this.isValidCellIdx(t))return null;if(s===void 0&&(s=!0),this.cells[t]===null&&s){var c=this.newCell(t);this.cells[t]=c}return this.cells[t]}newCell(t){var s=this.cellPool.pop();return s===null?s=new AC(this):s.setParent(this),s.index=t,s}buildCellIndex(t){t===void 0&&(t=0);for(var s=this.cells,c,C=t,S=s.length;C<S;C++)c=s[C],c&&(c.index=C);return this}getParentContainer(){return this.parent}freeCell(t){return typeof t=="number"&&(t=this.cells[t]),t?(t.destroy(),this.cellPool.push(t),this):this}}var SG=function(i){var t=this.table,s=this.topTableOY,c=this.bottomTableOY,C=i>this.topTableOY,S=i<this.bottomTableOY;if(this.clampTableOXY){var l=t.rowCount,T=t.heightToRowIndex(this.instHeight,1);l<T?i=0:C?i=s:S&&(i=c)}return this._tableOY!==i&&(this._tableOY=i),C&&(this.execeedTopState||this.emit
6418("execeedtop",this,i,s)),this.execeedTopState=C,S&&(this.execeedBottomState||this.emit("execeedbottom",this,i,c)),this.execeedBottomState=S,this},EG=function(i){var t=this.table,s=this.leftTableOX,c=this.rightTableOX,C=i>this.leftTableOX,S=i<this.rightTableOX;if(this.clampTableOXY){var l=t.colCount,T=t.widthToColIndex(this.instWidth,!0);l<T?i=0:C?i=s:S&&(i=c)}return this._tableOX!==i&&(this._tableOX=i),C&&(this.execeedLeftState||this.emit("execeedleft",this,i,s)),this.execeedLeftState=C,S&&(this.execeedRightState||this.emit("execeedright",this,i,c)),this.execeedRightState=S,this},_v=function(i){return i.hasOwnProperty("geometryMask")?i.geometryMask:i.bitmapMask};const PG=Phaser.Geom.Intersects.RectangleToRectangle,bG=Phaser.Geom.Rectangle.Overlaps;var MG=function(i,t,s){if(t){s===void 0&&(s=i.getAllChildren());for(var c=i.getBounds(),C=_v(t),S,l,T,e=0,d=s.length;e<d;e++)if(S=s[e],S!==C&&wG(S))if(S.getBounds)switch(l=S.getBounds(l),T=AG(c,l),T){case 4:RG(i,S);break;case 0:PG(c,l)||bG(c,l)?xc(i,S,t):OG(i,S);break;default:xc(i,S,t);break}else xc(i,S,t)}},wG=function(i){if(!i.displayList)return!1;for(;;){var t=i.rexContainer;if(t)if(t.visible){var s=t.parent;if(s){i=s;continue}else return!0}else return!1;else return i.visible}},AG=function(i,t){var s=t.top,c=t.bottom,C=t.left,S=t.right,l=0;return l+=i.contains(C,s)?1:0,l+=i.contains(C,c)?1:0,l+=i.contains(S,s)?1:0,l+=i.contains(S,c)?1:0,l},RG=function(i,t,s){t.hasOwnProperty("isRexContainerLite")?(t.syncChildrenEnable=!1,i.setChildMaskVisible(t,!0),t.syncChildrenEnable=!0):(t.clearMask&&t.clearMask(),i.setChildMaskVisible(t,!0))},xc=function(i,t,s){t.hasOwnProperty("isRexContainerLite")?(t.syncChildrenEnable=!1,i.setChildMaskVisible(t,!0),t.syncChildrenEnable=!0):(t.setMask&&t.setMask(s),i.setChildMaskVisible(t,!0))},OG=function(i,t,s){t.hasOwnProperty("isRexContainerLite")?(t.syncChildrenEnable=!1,i.setChildMaskVisible(t,!1),t.syncChildrenEnable=!0):(t.clearMask&&t.clearMask(),i.setChildMaskVisible(t,!1))};const yc=Phaser.Utils.Objects.GetValue,LG={update:0,everyTick:1},RC={setupChildrenMask(i){return i===!1?this:(this.setMaskUpdateMode(yc(i,"updateMode",0)),this.enableChildrenMask(yc(i,"padding",0)),this.setMaskLayer(yc(i,"layer",void 0)),this.startMaskUpdate(),this)},destroyChildrenMask(){return this.childrenMask?(this.stopMaskUpdate(),this.childrenMask.destroy(),this.childrenMask=void 0,this):this},setMaskUpdateMode(i){return typeof i=="string"&&(i=LG[i]),this.maskUpdateMode=i,this},startMaskUpdate(){this.scene.game.events.on("poststep",this.maskChildren,this)},stopMaskUpdate(){this.scene.game.events.off("poststep",this.maskChildren,this)},enableChildrenMask(i){var t=Ss.call(this,null,this,0,i);return this.childrenMask=t.createGeometryMask(),this},setMaskChildrenFlag(i){return i===void 0&&(i=!0),this.maskChildrenFlag=i,this},setMaskLayer(i){return this.maskLayer=i,this},maskChildren(){return!this.childrenMask||!this.maskChildrenFlag||this.alpha===0||!this.visible?this:(this.privateRenderLayer?this.privateRenderLayer.setMask(this.childrenMask):this.maskLayer?(this.addToLayer(this.maskLayer),this.maskLayer.setMask(this.childrenMask)):MG(this,this.childrenMask),this.maskUpdateMode===0&&(this.maskChildrenFlag=!1),this)},layoutChildrenMask(){if(!this.childrenMask)return this;var i=_v(this.childrenMask);return i.setPosition().resize(),this.resetChildPositionState(i),this}};var FG=function(){if(this.cellsCount!==0){var i=this.table;this.startRowIndex=Math.max(i.heightToRowIndex(-this.tableOY,2),0);for(var t=this.startRowIndex,s=Math.max(i.widthToColIndex(-this.tableOX),0),c=s,C=i.colRowToCellIndex(c,t),S=this.bottomBound,l=this.rightBound,T=i.cellsCount-1,e=i.colCount-1,d=this.getCellTLX(c),g=d,r=this.getCellTLY(t);r<S&&C<=T;){if(this.table.isValidCellIdx(C)){var a=i.getCell(C,!0);this.visibleCells.set(a),this.preVisibleCells.contains(a)||this.showCell(a);var h,n;if(this.scrollMode===0?(h=g,n=r):(h=r,n=g),a.cellContainerAlign==null)a.setXY(h,n);else{var o=a.getContainer();Zo(o,h,n,a.width,a.height,a.cellContainerAlign),a.setXY(o.x,o.y)}}g<l&&c<e?(g+=i.getColWidth(c),c+=1):(g=d,r+=i.getRowHeight(t),c=s,t+=1),C=i.colRowToCellIndex(c,t)}}},OC=function(i){var t=null,s=i.getContainer();if(s?(t=s,i.popContainer()):this.cellContainersPool&&(t=this.cellContainersPool.getFirstDead(),t!==null&&t.setActive(!0).setVisible(!0)),this.emit
6418("cellvisible",i,t,this),this.cellContainersPool){var s=i.getContainer();s?t===null?this.cellContainersPool.add(s):t!==s&&(this.cellContainersPool.add(s),this.cellContainersPool.killAndHide(t)):t!==null&&this.cellContainersPool.killAndHide(t)}},IG=function(i){var t=this.scrollMode===0?this.topLeftX:this.topLeftY,s=this.tableOX+this.table.colIndexToWidth(0,i-1)+t;return s},DG=function(i){var t=this.scrollMode===0?this.topLeftY:this.topLeftX,s=this.tableOY+this.table.rowIndexToHeight(0,i-1)+t;return s},BG=function(){var i=this.preVisibleCells,t=this.visibleCells;i.iterate(function(s){t.contains(s)||this.hideCell(s)},this)},LC=function(i){if(this.emit("cellinvisible",i),this.cellContainersPool){var t=i.popContainer();t&&this.cellContainersPool.killAndHide(t)}i.destroyContainer()},kG=function(i){return i===void 0&&(i=!1),i&&(G0.call(this),this.hideCells()),G0.call(this),this.showCells(),this.hideCells(),this.setMaskChildrenFlag(),this},G0=function(){var i=this.preVisibleCells;this.preVisibleCells=this.visibleCells,this.visibleCells=i,this.visibleCells.clear()},GG=function(i){var t=this.table.getCell(i,!1);return t&&this.visibleCells.contains(t)},FC=function(i,t){t-=this.y+this.topLeftY,i-=this.x+this.topLeftX;var s=this.tableOY-(this.scrollMode===0?t:i),c=this.tableOX-(this.scrollMode===0?i:t),C=this.table,S=C.heightToRowIndex(-s,0),l=C.widthToColIndex(-c),T=C.colRowToCellIndex(l,S);return T===null||!this.isCellVisible(T)?null:T},NG=function(i,t){var s=FC.call(this,i,t);if(s!==null)return this.getCellContainer(s)},VG=function(i,t){return this.visibleCells.each(i,t),this},zG=function(i,t){return this.visibleCells.iterate(i,t),this},YG=function(i,t){return this.table.cells.slice().forEach(i,t),this},XG=function(i,t){return this.table.cells.forEach(i,t),this},UG=function(i){var t=this.cellsCount;return t===i?this:(t>i?this.removeCells(i,t-i):this.insertNewCells(t,i-t),this)};const WG=Phaser.Math.Clamp;var HG=function(i,t){return typeof i=="object"&&(i=i.index),t===void 0&&(t=1),t<=0?this:(i=WG(i,0,this.cellsCount),this.table.insertNewCells(i,t),this)},$G=function(i,t){if(typeof i=="object"&&(i=i.index),t===void 0&&(t=1),i<0&&(t+=i,i=0),t<=0)return this;if(i>this.cellsCount)return this;for(var s,c=i,C=i+t;c<C;c++)s=this.getCell(c,!1),s&&(this.visibleCells.contains(s)&&(LC.call(this,s),this.visibleCells.delete(s)),this.preVisibleCells.delete(s));return this.table.removeCells(i,t),this},jG=function(i){return this.table.colCount===i?this:(this.table.setColumnCount(i),this)},KG=function(i,t){return this.setCellsCount(i*t),this.table.setColumnCount(i),this},ZG=function(i){var t=this.table.getCell(i,!1);return!t||!t.container?this:(OC.call(this,t),this)},IC={setTableOY:SG,setTableOX:EG,showCells:FG,showCell:OC,getCellTLX:IG,getCellTLY:DG,hideCells:BG,hideCell:LC,updateTable:kG,isCellVisible:GG,pointToCellIndex:FC,pointToCellContainer:NG,eachVisibleCell:VG,iterateVisibleCell:zG,eachCell:YG,iterateCell:XG,setCellsCount:UG,insertNewCells:HG,removeCells:$G,setColumnCount:jG,setGridSize:KG,updateVisibleCell:ZG};Object.assign(IC,RC);const JG=Phaser.GameObjects.Group,N0=Phaser.Structs.Set,Bs=Phaser.Utils.Objects.GetValue;let DC=class extends Ui{constructor(t,s,c,C,S,l){l===void 0&&(l={}),super(t,s,c,C,S),this.type="rexGridTable",this._tableOX=0,this._tableOY=0,this.visibleCells=new N0,this.preVisibleCells=new N0,this.execeedTopState=!1,this.execeedBottomState=!1,this.execeedLeftState=!1,this.execeedRightState=!1;var T=Bs(l,"reuseCellContainer",!1);T&&(this.cellContainersPool=new JG(t));var e=Bs(l,"cellVisibleCallback",null);if(e!==null){var d=Bs(l,"cellVisibleCallbackScope",void 0);this.on("cellvisible",e,d)}if(e=Bs(l,"cellInvisibleCallback",null),e!==null){var d=Bs(l,"cellInvisibleCallbackScope",void 0);this.on("cellinvisible",e,d)}Bs(l,"enableLayer",!1)&&this.enableLayer(),this.setupChildrenMask(Bs(l,"mask",void 0)),this.setScrollMode(Bs(l,"scrollMode",0)),this.setClampMode(Bs(l,"clamplTableOXY",!0));var g,r,a,h=this.scrollMode===0;if(h?(g=l.cellWidth,r=l.cellHeight,a=l.columns):(g=l.cellHeight,r=l.cellWidth,a=Bs(l,"rows",l.columns)),a||(a=1),this.expandCellSize=g===void 0,this.expandCellSize){var C=h?this.width:this.height;g=C/a}l.cellWidth=g,l.cellHeight=r,l.columns=a,this.table=new TG(this,l),this.updateTable()}destroy(t){!this.scene||this.ignoreDestroy||(this.destroyChildrenMask(),this.table.destroy(t),this.table=void 0,this.cellContainersPool&&(this.cellContainersPool.destroy(!0),this.cellContainersPool=void 0),super.destroy(t))}setScrollMode(t){return typeof t=="string"&&(t=QG[t.toLowerCase()]),this.scrollMode=t,this}setClampMode(t){return t===void 0&&(t=!0),this.clampTableOXY=t,this}
6418get tableOY(){return this._tableOY}get tableOX(){return this._tableOX}set tableOY(t){this.setTableOY(t).updateTable()}set tableOX(t){this.setTableOX(t).updateTable()}setTableOXY(t,s){return this.setTableOY(s).setTableOX(t),this}addTableOY(t){return this.setTableOY(this.tableOY+t),this}addTableOX(t){return this.setTableOX(this.tableOX+t),this}addTableOXY(t,s){return this.addTableOY(s).addTableOX(t),this}setTableOYByPercentage(t){return this.setTableOY(-this.tableVisibleHeight*t),this}getTableOYPercentage(){var t=this.tableVisibleHeight;return t===0?0:this.tableOY/-t}setTableOXByPercentage(t){return this.setTableOX(-this.tableVisibleWidth*t),this}getTableOXPercentage(){var t=this.tableVisibleWidth;return t===0?0:this.tableOX/-t}set t(t){this.setTableOYByPercentage(t).updateTable()}get t(){return this.getTableOYPercentage()}set s(t){this.setTableOXByPercentage(t).updateTable()}get s(){return this.getTableOXPercentage()}scrollToBottom(){if(this.t=1,this.t===0)return this;do this.t=1;while(this.t!==1);return this}scrollToRow(t){this.scrollToBottom();var s=this.table.rowIndexToHeight(0,t-1);return this.setTableOY(-s).updateTable(),this}scrollToNextRow(t){return t===void 0&&(t=1),this.scrollToRow(this.startRowIndex+t),this}getCell(t){return this.table.getCell(t,!0)}getCellContainer(t){var s=this.table.getCell(t,!1),c;return s&&(c=s.getContainer()),c}get cellsCount(){return this.table.cellsCount}get columnCount(){return this.table.colCount}setCellHeight(t,s){var c;return typeof t=="number"?c=this.table.getCell(t,!0):c=t,c.height=s,this}setCellWidth(t,s){var c;return typeof t=="number"?c=this.table.getCell(t,!0):c=t,c.width=s,this}get instHeight(){return this.scrollMode===0?this.height:this.width}get instWidth(){return this.scrollMode===0?this.width:this.height}get tableHeight(){return this.table.totalRowsHeight}get tableWidth(){return this.table.totalColumnWidth}get topTableOY(){return 0}get bottomTableOY(){return-this.tableVisibleHeight}get leftTableOX(){return 0}get rightTableOX(){return-this.tableVisibleWidth}get tableVisibleHeight(){var t=this.tableHeight-this.instHeight;return t<0&&(t=0),t}get tableVisibleWidth(){var t=this.tableWidth-this.instWidth;return t<0&&(t=0),t}get bottomLeftY(){return-(this.displayHeight*this.originY)+this.displayHeight}
6418get topRightX(){return-(this.displayWidth*this.originX)+this.displayWidth}get topLeftX(){return-(this.displayWidth*this.originX)}get topLeftY(){return-(this.displayHeight*this.originY)}get bottomBound(){return this.scrollMode===0?this.bottomLeftY:this.topRightX}get rightBound(){return this.scrollMode===0?this.topRightX:this.bottomLeftY}resize(t,s){return this.width===t&&this.height===s?this:(super.resize(t,s),this.expandCellSize&&this.table.setDefaultCellWidth(this.instWidth/this.table.colCount),this.updateTable(!0),this.layoutChildrenMask(),this.maskChildren(),this)}};Object.assign(DC.prototype,IC);const QG={v:0,vertical:0,h:1,horizontal:1};var qG=function(i){Object.defineProperty(i,"childOY",{configurable:!0,get:function(){return i.tableOY},set:function(t){i.tableOY=t}}),Object.defineProperty(i,"childOX",{configurable:!0,get:function(){return i.tableOX},set:function(t){i.tableOX=t}}),Object.defineProperty(i,"topChildOY",{get:function(){return i.topTableOY}}),Object.defineProperty(i,"bottomChildOY",{get:function(){return i.bottomTableOY}}),Object.defineProperty(i,"leftChildOX",{get:function(){return i.leftTableOX}}),Object.defineProperty(i,"rightChildOX",{get:function(){return i.rightTableOX}}),Object.defineProperty(i,"childVisibleHeight",{get:function(){return i.instHeight}}),Object.defineProperty(i,"childHeight",{get:function(){return i.tableHeight}}),Object.defineProperty(i,"childVisibleWidth",{get:function(){return i.instWidth}}),Object.defineProperty(i,"childWidth",{get:function(){return i.tableWidth}})},_G=function(i){i.on("cellvisible",function(t,l,c){var C=this.createCellContainerCallback,S=this.createCellContainerCallbackScope;t.item=this.items[t.index],t.items=this.items;var l;S?l=C.call(S,t,l,c):l=C(t,l,c),l&&(t.cellContainerAlign==null&&l.setOrigin&&l.setOrigin(0),l.isRexSizer&&l.layout()),t.item=void 0,t.items=void 0,t.setContainer(l)},this)},Us=function(i,t,s,c,C,S,l){var T;if(C===void 0?T=c:T=s.pointToCellIndex(c,C),T!=null){var e=s.getCellContainer(T);e&&i.emit(t,e,T,S,l)}},tN=function(i,t){i.on("pointerdown",function(s,c,C,S){Us(this.eventEmitter,"cell.down",i,s.worldX,s.worldY,s,S)},this).on("pointerup",function(s,c,C,S){Us(this.eventEmitter,"cell.up",i,s.worldX,s.worldY,s,S)},this)},eN=function(i,t){i.on("pointermove",V0,this).on("pointerover",V0,this).on("pointerout",iN,this)},V0=function(i,t,s,c){var C=this.childrenMap.child,S=C.pointToCellIndex(i.worldX,i.worldY);if(S!==C.input.lastOverCellIndex){var l=C.input.lastOverCellIndex;C.input.lastOverCellIndex=S,Us(this.eventEmitter,"cell.out",C,l,void 0,i,c),Us(this.eventEmitter,"cell.over",C,S,void 0,i,c)}},iN=function(i,t){var s=this.childrenMap.child,c=s.input.lastOverCellIndex;s.input.lastOverCellIndex=void 0,Us(this.eventEmitter,"cell.out",s,c,void 0,i,t)};const sN=Phaser.Utils.Objects.GetValue;var nN=function(i,t){var s=sN(t,"click",void 0);s!==!1&&(s===void 0&&(s={}),s.threshold=10,i._click=new pn(i,s),i._click.on("click",function(c,C,S,l){Us(this.eventEmitter,"cell.click",C,S.worldX,S.worldY,S,l)},this))};const rN=Phaser.Utils.Objects.GetValue;var aN=function(i,t){var s=rN(t,"tap",void 0);s!==!1&&(i._tap=new mu(i,s),i._tap.on("tap",function(c,C,S){var l=`cell.${c.tapsCount}tap`;Us(this.eventEmitter,l,c.gameObject,c.worldX,c.worldY,S)},this))};const oN=Phaser.Utils.Objects.GetValue;var lN=function(i,t){var s=oN(t,"press",void 0);s!==!1&&(i._press=new gu(i,s),i._press.on("pressstart",function(c,C,S){Us(this.eventEmitter,"cell.pressstart",i,c.worldX,c.worldY,S)},this).on("pressend",function(c,C,S){Us(this.eventEmitter,"cell.pressend",i,c.worldX,c.worldY,S)},this))};const hN=Phaser.Utils.Objects.GetValue;var uN=function(i,t){var s=hN(t,"swipe",void 0);s!==!1&&(s===void 0&&(s={}),s.dir="4dir",i._swipe=new el(i,s),i._swipe.on("swipe",function(c,C,S){var l=c.left?"left":c.right?"right":c.up?"up":"down";Us(this.eventEmitter,`cell.swipe${l}`,i,c.worldX,c.worldY,S)},this))},dN=function(i,t){i.setInteractive(),tN.call(this,i,t),eN.call(this,i,t),nN.call(this,i,t),aN.call(this,i,t),lN.call(this,i,t),uN.call(this,i,t)},cN=function(i){i===void 0?this.items=[]:this.items=i;var t=this.childrenMap.child;return t.setCellsCount(this.items.length),t.updateTable(!0),this.resizeController(),this};const fN={scrollToRow(i){var t=this.childrenMap.child;return t.scrollToRow(i),this},scrollToNextRow(i){var t=this.childrenMap.child;return t.scrollToNextRow(i),this}}
6418,vs=Phaser.Utils.Objects.GetValue;class tp extends nl{constructor(t,s){s===void 0&&(s={});var c=$v(s),C=vs(s,"table",void 0);C===void 0&&(C={}),C.scrollMode=c===2?0:c,C.clamplTableOXY=vs(s,"clamplChildOY",!1);var S=vs(C,"width",void 0),l=vs(C,"height",void 0),T=new DC(t,0,0,S,l,C);t.add.existing(T);var e,d;C.scrollMode===0?(e=S===void 0,d=l===void 0):(e=l===void 0,d=S===void 0),qG(T),T._minWidth=S===void 0?0:void 0,T._minHeight=l===void 0?0:void 0,s.type="rexGridTable",s.child={gameObject:T,expandWidth:e,expandHeight:d};var g=vs(s,"space",void 0);g&&(g.child=vs(g,"table",0)),super(t,s),this.addChildrenMap("table",T),this.addChildrenMap("tableLayer",T.maskLayer),this.eventEmitter=vs(s,"eventEmitter",this);var r=vs(s,"createCellContainerCallback",ci),a=vs(s,"createCellContainerCallbackScope",void 0);this.setCreateCellContainerCallback(r,a),_G.call(this,T),this.resizeControllerFlag=!1;var h=c===0?"cellheightchange":"cellwidthchange";T.on(h,function(){this.resizeControllerFlag=!0},this),vs(C,"interactive",!0)&&dN.call(this,T,C),this.setItems(vs(s,"items",[])),t.game.events.on("poststep",this.onPostStep,this)}destroy(t){!this.scene||this.ignoreDestroy||(this.scene.game.events.off("poststep",this.onPostStep,this),super.destroy(t))}setCreateCellContainerCallback(t,s){return this.createCellContainerCallback=t,this.createCellContainerCallbackScope=s,this}refresh(){return this.setItems(this.items),this}getCell(t){var s=this.childrenMap.child;return s.getCell(t)}getCellContainer(t){var s=this.childrenMap.child;return s.getCellContainer(t)}updateVisibleCell(t){var s=this.childrenMap.child;return s.updateVisibleCell(t)}onPostStep(){this.resizeControllerFlag&&(this.resizeController(),this.resizeControllerFlag=!1)}get startRowIndex(){var t=this.childrenMap.child;return t.startRowIndex}}var vN={setItems:cN};Object.assign(tp.prototype,fN,vN);xt.register("gridTable",function(i){var t=new tp(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.GridTable",tp);var ep=function(i,t){return i.sameOrientation?i.orientation=t.orientation:i.orientation=t.orientation===0?1:0,i},pN=function(i,t){i.popUp(ep(i.root.easeIn,i))},mN=function(i,t){i.scaleDown(ep(i.root.easeOut,i))};const gN={setTransitInCallback(i){return i===void 0&&(i=pN),this.transitInCallback=i,this},setTransitOutCallback(i){return i===void 0&&(i=mN),this.transitOutCallback=i,this}};var xN=function(i,t,s,c,C){var S=Ho(i),l=S.time.delayedCall(t,function(){S.sys.events.once("postupdate",function(){s.call(c,C)})});return l};const yN={delayCall(i,t,s){return this.timer=xN(this,i,t,s),this},removeDelayCall(){return this.timer&&(this.timer.remove(!1),this.timer=void 0),this}};
6418var CN=function(i,t){var c=this.childrenMap.subMenu;if(c&&c.parentButton===i)return this;this.collapseSubMenu();var s;this.root.toggleOrientation?s=this.orientation===0?1:0:s=this.orientation;var c=new this.constructor(this.scene,{items:t,orientation:s,space:this.space,createBackgroundCallback:this.root.createBackgroundCallback,createBackgroundCallbackScope:this.root.createBackgroundCallbackScope,createButtonCallback:this.root.createButtonCallback,createButtonCallbackScope:this.root.createButtonCallbackScope,easeIn:this.root.easeIn,easeOut:this.root.easeOut,_rootMenu:this.root,_parentMenu:this,_parentButton:i});return this.pin(c),this.childrenMap.subMenu=c,this.root.emit("expand",c,i,this),this},TN=function(){var i=this.root;i.emit("collapse",this,this.parentButton,i);var t=i.easeOut.duration;return i.transitOutCallback(this,t),this.collapseSubMenu(),this.delayCall(t,this.destroy,this),this},SN=function(){var i=this.childrenMap.subMenu;return i===void 0?this:(this.childrenMap.subMenu=void 0,this.remove(i),i.collapse(),this)},BC={expandSubMenu:CN,collapse:TN,collapseSubMenu:SN};Object.assign(BC,gN,yN);var EN=function(i,t,s,c){var C;return s&&(t.scene=i,c?C=s.call(c,t):C=s(t),t.scene=void 0),C},PN=function(i,t,s,c){var C,S=[],l;if(t&&s)for(var T=0,e=t.length;T<e;T++)C=t[T],C.scene=i,c?l=s.call(c,C,T,t):l=s(C,T,t),C.scene=void 0,S.push(l);return S},bN=function(i){i.on(i.root.expandEventName,function(t,s){if(!this._isPassedEvent){var c=this.root.childrenKey,C=this.items[s][c];C&&this.expandSubMenu(t,C)}},i).on("button.click",function(t,s,c,C){this!==this.root&&(this.root._isPassedEvent=!0,this.root.emit("button.click",t,s,c,C),this.root._isPassedEvent=!1)},i).on("button.over",function(t,s,c,C){this!==this.root&&(this.root._isPassedEvent=!0,this.root.emit("button.over",t,s,c,C),this.root._isPassedEvent=!1)},i).on("button.out",function(t,s,c,C){this!==this.root&&(this.root._isPassedEvent=!0,this.root.emit("button.out",t,s,c,C),this.root._isPassedEvent=!1)},i)},z0=function(i,t){return typeof t=="number"&&(t={duration:t}),t.hasOwnProperty("orientation")&&t.orientation!==void 0?t.sameOrientation=Pu(t.orientation)===i.orientation:t.sameOrientation=!0,t.destroy=!1,t},MN=function(){var i=this.root,t=i.easeIn.duration;i.transitInCallback(this,t),this!==this.root&&this.delayCall(t,function(){this.root.emit("popup.complete",this)},this)};const pi=Phaser.Utils.Objects.GetValue;class ip extends _e{constructor(t,s){s===void 0&&(s={}),s.hasOwnProperty("orientation")||(s.orientation=1);var c=s._rootMenu,C=s._parentMenu,S=s._parentButton,l=pi(s,"popup",!0),T=pi(s,"items",void 0),e=pi(s,"createBackgroundCallback",void 0),d=pi(s,"createBackgroundCallbackScope",void 0);s.background=EN(t,T,e,d);var g=pi(s,"createButtonCallback",void 0),r=pi(s,"createButtonCallbackScope",void 0);if(s.buttons=PN(t,T,g,r),super(t,s),this.type="rexMenu",this.items=T,this.root=c===void 0?this:c,this.isRoot=this.root===this,this.parentMenu=C,this.parentButton=S,this.timer=void 0,this.isRoot){this.isPopUpMode=l;var a=s.bounds;a===void 0&&(a=Ha(t)),this.bounds=a,this.subMenuSide=[this.y<a.centerY?pf:Rh,this.x<a.centerX?vf:Ah];var h=pi(s,"subMenuSide",void 0);h!==void 0&&(typeof h=="string"&&(h=wN[h]),this.subMenuSide[this.orientation]=h),this.toggleOrientation=pi(s,"toggleOrientation",!1),this.expandEventName=pi(s,"expandEvent","button.click"),this.easeIn=z0(this,pi(s,"easeIn",0)),this.easeOut=z0(this,pi(s,"easeOut",0)),this.setTransitInCallback(pi(s,"transitIn")),this.setTransitOutCallback(pi(s,"transitOut")),this.createBackgroundCallback=e,this.createBackgroundCallbackScope=d,this.createButtonCallback=g,this.createButtonCallbackScope=r,this.childrenKey=pi(s,"childrenKey","children"),this._isPassedEvent=!1,this.pointerDownOutsideCollapsing=pi(s,"pointerDownOutsideCollapsing",!0),this.pointerDownOutsideCollapsing&&t.input.on("pointerdown",this.onPointerDownOutside,this)}var n=0,o=0;if(!this.root.easeIn.sameOrientation){var f=ep(this.root.easeIn,this).orientation,u=C?C.orientation:this.orientation,h=this.root.subMenuSide[u];f===0&&h===Ah&&(n=1),f===1&&h===Rh&&(o=1)}if(l&&this.setOrigin(n,o).layout(),!this.isRoot){this.setScale(this.root.scaleX,this.root.scaleY);var h=this.root.subMenuSide[C.orientation];switch(h){case Ah:this.alignTop(S.top).alignRight(S.left);break;case vf:this.alignTop(S.top).alignLeft(S.right);break;case Rh:this.alignLeft(S.left).alignBottom(S.top);break;case pf:this.alignLeft(S.left).alignTop(S.bottom);break}}bN(this),l&&(this.pushIntoBounds(this.root.bounds),MN.call(this))}destroy(t){!this.scene||this.ignoreDestroy||(this.isRoot&&this.pointerDownOutsideCollapsing&&this.scene.input.off("pointerdown",this.onPointerDownOutside,this),super.destroy(t),this.removeDelayCall())}isInTouching(t){return super.isInTouching(t)?!0:this.childrenMap.subMenu?this.childrenMap.subMenu.isInTouching(t):!1}onPointerDownOutside(t){this.isInTouching(t)||(this.isPopUpMode?this.collapse():this.collapseSubMenu())}}const Ah=2,vf=0,Rh=3,pf=1,wN={up:Rh,down:pf,left:Ah,right:vf};Object.assign(ip.prototype,BC);xt.register("menu",function(i){var t=new ip(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.Menu",ip);var AN={setWrapEnable(i){return i===void 0&&(i=!0),this.listWrapEnable=i,this},setCreateButtonCallback(i){return this.listCreateButtonCallback=i,this}
6418,setCreateListBackgroundCallback(i){return this.listCreateBackgroundCallback=i,this},setButtonClickCallback(i){return this.listOnButtonClick=i,this},setButtonOverCallback(i){return this.listOnButtonOver=i,this},setButtonOutCallback(i){return this.listOnButtonOut=i,this},setListExpandDirection(i){return typeof i=="string"&&(i=RN[i]),this.listExpandDirection=i,this},setListEaseInDuration(i){return i===void 0&&(i=0),this.listEaseInDuration=i,this},setListEaseOutDuration(i){return i===void 0&&(i=0),this.listEaseOutDuration=i,this},setListTransitInCallback(i){return this.listTransitInCallback=i,this},settListTransitOutCallback(i){return this.listTransitOutCallback=i,this},setListBounds(i){return this.listBounds=i,this},setListWidth(i){return this.listWidth=i,this},setListHeight(i){return this.listHeight=i,this},setListSize(i,t){return this.setListWidth(i).setListHeight(t),this},setListAlignmentMode(i){return this.listAlignMode=i,this},setListAlignmentSide(i){return i===void 0&&(i=""),this.listAlignSide=i,this},setListSpace(i){return i===void 0&&(i={}),this.listSpace=i,this},setListDraggable(i){return i===void 0&&(i=!0),this.listDraggable=i,this}};const RN={down:0,up:1};var ON=function(){var i=this.scene,t,s=this.listCreateBackgroundCallback;s&&(t=s.call(this,i),i.add.existing(t));var c=[],C=this.listCreateButtonCallback;if(C)for(var S=this.options,l=0,T=S.length;l<T;l++){var e=C.call(this,i,S[l],l,S);i.add.existing(e),c.push(e)}var d=this.listWidth;d===void 0&&(this.listAlignMode==="text"?d=this.getElement("text").width:d=this.width);var g=this.listHeight,r;return this.listWrapEnable?r=new Br(i,{width:d,height:g,background:t,buttons:c,space:this.listSpace,draggable:this.listDraggable}):r=new _e(i,{width:d,height:g,orientation:"y",background:t,buttons:c,space:this.listSpace,draggable:this.listDraggable}),i.add.existing(r),r},LN=function(i,t,s,c,C){c===void 0&&(c="Linear");var S={};switch(S.mode=0,s){case 0:case"x":S.end={x:0};break;case 1:case"y":S.end={y:0};break;default:S.end=0;break}return S.duration=t,S.ease=c,C===void 0?C=new zo(i,S):C.resetFromJSON(S),C.restart(),C},FN=function(i,t,s,c,C){return Gs(i,t)?le(i,t):s&&Gs(i,s)?le(i,s):c&&Gs(i,c)?le(i,c):C};const ga=Phaser.Utils.Objects.GetValue;var IN=function(i,t){var s=ga(t,"expandDirection",void 0);typeof s=="string"&&(s=DN[s]);var c=FN(t,"alignTarget","alignTargetX"),C=ga(t,"alignTargetY",c),S=ga(t,"alignOffsetX",0),l=ga(t,"alignOffsetY",0),T=ga(t,"alignSide",""),e=T.includes("right"),d=ga(t,"bounds"),g=s===0,r=s===1,a=!g&&!r,h=e?1:0,n=g||a?0:1;i.setOrigin(h,n);var o,f;e?o=c.getTopRight().x:o=c.getTopLeft().x,f=C.getBottomLeft().y,i.setPosition(o+S,f+l);var u=d;u||(u=Ha(i.scene)),a&&i.getBottomLeft().y>u.bottom&&(f=C.getTopLeft().y,i.setOrigin(0,1).setPosition(o+S,f+l))};const DN={down:0,up:1},Y0=Phaser.Utils.Objects.GetValue;class kC extends cu{constructor(t,s){s===void 0&&(s={}),s.transitIn==null&&(s.transitIn=function(S,l){xv(S,l,"y","Cubic")}),s.transitOut==null&&(s.transitOut=function(S,l){LN(S,l,"y","Linear")}),s.manualClose=!0,s.clickOutsideClose=!0,s.destroy=!0,super(t,s),IN(t,s),t.isRexSizer&&t.layout();var c=Y0(s,"touchOutsideClose",!1),C=Y0(s,"anyTouchClose",!1);C&&(c=!1),C?this.once("open",this.anyTouchClose,this):c&&this.once("open",this.touchOutsideClose,this),this.requestOpen()}shutdown(t){this.isShutdown||(this.scene.input.off("pointerup",this.touchCloseCallback,this),super.shutdown(t))}touchOutsideClose(){return this.scene.input.on("pointerup",this.touchCloseCallback,this),this.clickOutsideTest=!0,this}anyTouchClose(){return this.scene.input.once("pointerup",this.touchCloseCallback,this),this}touchCloseCallback(t){this.clickOutsideTest&&Yo(this.parent,t.worldX,t.worldY)||this.requestClose()}onOpen(){this.emit("open",this.parent,this),super.onOpen()}onClose(){this.emit("close",this.parent,this),super.onClose()}}var BN=function(){if(this.listPanel)return this;var i=ON.call(this);i.on("button.over",function(c,C,S,l){this.listOnButtonOver&&this.listOnButtonOver.call(this,c,C,S,l),this.emit("button.over",this,i,c,C,S,l)},this).on("button.out",function(c,C,S,l){this.listOnButtonOut&&this.listOnButtonOut.call(this,c,C,S,l),this.emit
6418("button.out",this,i,c,C,S,l)},this);var t;!this.listAlignMode||this.listAlignMode==="label"?t=this:t=this.getElement(this.listAlignMode);var s=new kC(i,{duration:{in:this.listEaseInDuration,out:this.listEaseOutDuration},transitIn:this.listTransitInCallback,transitOut:this.listTransitOutCallback,expandDirection:this.listExpandDirection,alignTargetX:t,alignTargetY:this,alignSide:this.listAlignSide,bounds:this.listBounds,anyTouchClose:!0}).on("open",function(){i.on("button.click",function(c,C,S,l){this.listOnButtonClick&&this.listOnButtonClick.call(this,c,C,S,l),this.emit("button.click",this,i,c,C,S,l)},this),this.emit("list.open",this,i)},this).on("close",function(){this.listPanel=void 0,this.dropDownBehavior=void 0},this);return this.listPanel=i,this.dropDownBehavior=s,this.pin(i),this},kN=function(){return this.dropDownBehavior?(this.dropDownBehavior.requestClose(),this):this},GN=function(){return this.listPanel?this.closeListPanel():this.openListPanel(),this},GC={openListPanel:BN,closeListPanel:kN,toggleListPanel:GN};Object.assign(GC,AN);const Me=Phaser.Utils.Objects.GetValue;class ol extends tr{constructor(t,s){super(t,s),this.type="rexDropDownList",this.timer=void 0,this.setOptions(Me(s,"options"));var c=Me(s,"list");this.setWrapEnable(Me(c,"wrap",!1)),this.setCreateButtonCallback(Me(c,"createButtonCallback")),this.setCreateListBackgroun
6418dCallback(Me(c,"createBackgroundCallback")),this.setButtonClickCallback(Me(c,"onButtonClick")),this.setButtonOverCallback(Me(c,"onButtonOver")),this.setButtonOutCallback(Me(c,"onButtonOut")),this.setListExpandDirection(Me(c,"expandDirection")),this.setListEaseInDuration(Me(c,"easeIn",500)),this.setListEaseOutDuration(Me(c,"easeOut",100)),this.setListTransitInCallback(Me(c,"transitIn")),this.settListTransitOutCallback(Me(c,"transitOut")),this.setListSize(Me(c,"width"),Me(c,"height")),this.setListAlignmentMode(Me(c,"alignParent","text")),this.setListAlignmentSide(Me(c,"alignSide","")),this.setListBounds(Me(c,"bounds")),this.setListSpace(Me(c,"space")),this.setListDraggable(Me(c,"draggable",!1)),this.setValueChangeCallback(Me(s,"setValueCallback"),Me(s,"setValueCallbackScope")),this.setValue(Me(s,"value")),this.onClick(this.toggleListPanel,this)}destroy(t){!this.scene||this.ignoreDestroy||(this.listPanel&&(this.listPanel.destroy(t),this.listPanel=void 0),super.destroy(t))}setOptions(t){return t===void 0&&(t=[]),this.options=t,this}setValueChangeCallback(t,s){return this.valueChangeCallback=t,this.valueChangeCallbackScope=s,this}setValue(t){return this.value=t,this}get value(){return this._value}set value(t){if(this._value!==t){var s=this._value;this._value=t;var c=this.valueChangeCallback,C=this.valueChangeCallbackScope;c&&(C?c.call(C,this,t,s):c(this,t,s)),this.emit("valuechange",this,t,s)}}emitButtonClick(t){var s=this.options[t];return s?(this.emit("button.click",this,void 0,s,t),this):this}}Object.assign(ol.prototype,GC);xt.register("dropDownList",function(i){var t=new ol(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.DropDownList",ol);var NC=function(i,t,s){t=t?zi(t):{},s===void 0&&(s={});var c=t.label||t.button,C=t.button||t.label;delete t.label,delete t.button;var S=s.label||s.button||s,l=s.button||s.label||s,T=zv(i,c,S);return T.list=t.list||{},T.list.createButtonCallback=function(e,d){var g=es(e,C,l).resetDisplayContent({text:d.text});return d.hasOwnProperty("value")&&(g.value=d.value),g},T.list.onButtonOver=function(e,d,g,r){e.setHoverState&&e.setHoverState(!0)},T.list.onButtonOut=function(e,d,g,r){e.setHoverState&&e.setHoverState(!1)},T};class VC extends ol{constructor(t,s,c){s=NC(t,s,c),super(t,s),this.type="rexSimpleDropDownList"}setOptions(t){t===void 0&&(t=[]);for(var s=0,c=t.length;s<c;s++){var C=t[s];typeof C=="string"&&(t[s]={text:C,value:C})}return super.setOptions(t),this}}xt.register("simpleDropDownList",function(i,t){var s=new VC(this.scene,i,t);return this.scene.add.existing(s),s});mt(window,"RexPlugins.UI.SimpleDropDownList",VC);var NN=function(i){var t=Za(i),s,c,C;switch(t){case Ri:case Ni:s=i.height-i.padding.top-i.padding.bottom,c=i.lineSpacing,C=i.style.metrics.fontSize+i.style.strokeThickness;break;case Vi:s=i.height,c=0;var S=i.fontSize/i.fontData.size;C=i.fontData.lineHeight*S;break}return(s-c)/(C+c)},VN=function(i,t){i===void 0&&(i=this.startLineIndex),t===void 0&&(t=i+this.pageLinesCount);var s;switch(this.textObjectType){case Ri:case Vi:s=this.lines.slice(i,t).join(` 6419`);break;case Ni:var c=this.lines.getLineStartIndex(i),C=this.lines.getLineEndIndex(t-1);s=this.lines.getSliceTagText(c,C,!0);break}return s},Cc=function(i){return Array.isArray(i)?i=i.join(` 6420`):typeof i=="number"&&(i=i.toString()),i};const zN={clearText(){return this.sections.length=0,this.pageStartIndexes.length=0,this.lines.length=0,this},appendPage(s){var t=this.totalLinesCount;this.sections.push(Cc(s));var s=this.sections.join(` 6421`);this.lines=Kv(this.parent,s,this.lines);for(var c=this.totalLinesCount-t,C=Math.ceil(c/this.pageLinesCount),S=0;S<C;S++)this.pageStartIndexes.push(t+S*this.pageLinesCount);return this},setText(i,t){t===void 0&&(t=!0),t&&this.resetPageIdx(),this.clearText();for(var s=Cc(i).split(this.pageBreak),c=0,C=s.length;c<C;c++)this.appendPage(s[c]);return this},appendText(i){var t=this.content+Cc(i);return this.setText(t,!1),this}},YN=Phaser.Math.Clamp,XN={getPage(i){return i===void 0&&(i=this.pageIndex),this.setPageIndex(i).getLines(this.startLineIndex,this.endLineIndex)},getNextPage(){return this.getPage(this.pageIndex+1)},getPreviousPage(){return this.getPage(this.pageIndex-1)},getFirstPage(){return this.getPage(0)},getLastPage(){return this.getPage(this.lastPageIndex)},resetPageIdx(){return this.pageIndex=-1,this},setPageIndex(i){return i=YN(i,0,this.lastPageIndex),this.pageIndex=i,this.startLineIndex=this.pageStartIndexes[i],this.endLineIndex=this.pageStartIndexes[i+1],this}},UN={showPage(i){return this.displayText(this.getPage(i)),this},showNextPage(){return this.displayText(this.getNextPage()),this},showPreviousPage(){return this.displayText(this.getPreviousPage()),this},showFirstPage(){return this.displayText(this.getFirstPage()),this},showLastPage(){return this.displayText(this.getLastPage()),this},show(){return this.displayText(this.getLines()),this},showNextLine(){return this.displayText(this.setStartLineIndex(this.startLineIndex+1).getLines()),this},showPreviousLine(){return this.displayText(this.setStartLineIndex(this.startLineIndex-1).getLines()),this},displayText(i){Zv(this.parent,i)}};var zC={getLines:VN};Object.assign(zC,zN,XN,UN);
6421const Mo=Phaser.Utils.Objects.GetValue,WN=Phaser.Math.Clamp;class Nu extends ke{constructor(t,s){super(t,{eventEmitter:!1}),this.textObjectType=Za(this.parent),this.pageStartIndexes=[],this.lines=Kv(this.parent,""),this.sections=[],this.resetFromJSON(s)}resetFromJSON(t){return this.setMaxLines(Mo(t,"maxLines",void 0)),this.setPageBreak(Mo(t,"pageBreak",`\f 6422`)),this.setText(Mo(t,"text","")),this.setStartLineIndex(Mo(t,"start",0)),this.setPageIndex(Mo(t,"page",-1)),this}toJSON(){return{maxLines:this.maxLines,text:this.content,start:this.startLineIndex,page:this.pageIndex,pageBreak:this.pageBreak}}shutdown(t){if(!this.isShutdown){switch(this.textObjectType){case Ri:this.lines.length=0;break;case Ni:this.lines.destroy();break;case Vi:this.lines.length=0;break}this.pageStartIndexes.length=0,this.sections.length=0,this.lines=void 0,this.pageStartIndexes=void 0,this.sections=void 0,super.shutdown(t)}}setMaxLines(t){return this.maxLines=t,this}setPageBreak(t){return this.pageBreak=t,this}get pageCount(){return this.pageStartIndexes.length}get lastPageIndex(){return this.pageCount-1}get isFirstPage(){return this.pageIndex<=0}get isLastPage(){return this.pageIndex>=this.pageCount-1}get totalLinesCount(){return this.lines?this.lines.length:0}get startLineIndex(){return this._startLineIndex}set startLineIndex(t){t=WN(t,0,this.totalLinesCount-1),this._startLineIndex=t}setStartLineIndex(t){return this.startLineIndex=t,this}get pageLinesCount(){if(this.maxLines!==void 0)return this.maxLines;var t;switch(this.textObjectType){case Ri:case Ni:var s=this.parent.style.maxLines;s>0?t=s:t=Math.floor(NN(this.parent));break;case Vi:t=this.totalLinesCount;break}return t}get content(){return this.sections.join(this.pageBreak)}}Object.assign(Nu.prototype,zC);var HN=function(i,t){var s=Za(i);switch(s){case Ri:i.style.syncFont(i.canvas,i.context),t=i.runWordWrap(t);break;case Ni:t=i.getText(t,void 0,void 0,!0);break;case Vi:t=i.setText(t).getTextBounds().wrappedText;break}return t};const wo=Phaser.Utils.Objects.GetFastValue,Tc=Phaser.Utils.Objects.GetValue;class sp extends ke{constructor(t,s){super(t,s),this.timer=null,this.resetFromJSON(s)}resetFromJSON(t){this.setTextWrapEnable(Tc(t,"wrap",!1)),this.setTypeMode(Tc(t,"typeMode",0)),this.setTypingSpeed(Tc(t,"speed",333)),this.setTextCallback=wo(t,"setTextCallback",null),this.setTextCallbackScope=wo(t,"setTextCallbackScope",null),this.setTypingContent(wo(t,"text","")),this.typingIdx=wo(t,"typingIdx",0),this.insertIdx=null,this.insertChar=null;var s=wo(t,"elapsed",null);return s!==null&&this.start(void 0,void 0,this.typingIdx,s),this}shutdown(t){this.isShutdown||(this.freeTimer(),super.shutdown(t))}setTypeMode(t){return typeof t=="string"&&(t=$N[t]),this.typeMode=t,this}setTypeSpeed(t){return this.speed=t,this}setTypingSpeed(t){return this.speed=t,this}setTextWrapEnable(t){return t===void 0&&(t=!0),this.textWrapEnable=t,this}set text(t){var s=X0(t);this.textWrapEnable&&(s=HN(this.parent,s)),this._text=s}get text(){return this._text}get isTyping(){return this.getTimer()!==null}get isLastChar(){return this.typingIdx===this.textLen}start(t,s,c,C){return t!==void 0&&this.setTypingContent(t),s!==void 0&&(this.speed=s),c===void 0&&(c=0),this.typingIdx=c+1,this.speed===0?this.stop(!0):(this.setText(""),this.startTimer(C)),this}appendText(t){var s=this.text.concat(X0(t));return this.isTyping?this.setTypingContent(s):this.start(s,void 0,this.textLen),this}stop(t){var s=this.getTimer();if(s&&this.freeTimer(),t){for(;!this.isLastChar;)this.getTypingString(this.text,this.typingIdx,this.textLen,this.typeMode),this.emit("typechar",this.insertChar),this.typingIdx++;this.setText(this.text),this.emit("type"),this.emit("complete",this,this.parent)}return this}pause(){var t=this.getTimer();return t&&(t.paused=!0),this}resume(){var t=this.getTimer();return t&&(t.paused=!1),this}setTypingContent(t){return this.text=t,this.textLen=this.getTextLength(this.text),this}onTyping(){var t=this.getTypingString(this.text,this.typingIdx,this.textLen,this.typeMode);this.setText(t),this.emit("typechar",this.insertChar),this.emit("type"),this.isLastChar?(this.freeTimer(),this.emit
6422("complete",this,this.parent)):(this.timer.delay=this.speed,this.typingIdx++)}getTypingString(t,s,c,C){var S;if(C===0){var l=0,T=s;this.insertIdx=T,S=this.getSubString(t,l,T)}else if(C===1){var T=c,l=T-s;this.insertIdx=0,S=this.getSubString(t,l,T)}else if(C===2){var e=c/2,l=Math.floor(e-s/2),T=l+s;this.insertIdx=s%2?s:0,S=this.getSubString(t,l,T)}else if(C===3){var d=Math.floor(s/2),g;if(d>0){var T=c,l=T-d;g=this.getSubString(t,l,T)}else g="";var r=s-d,a;if(r>0){var l=0,T=l+r;this.insertIdx=T,a=this.getSubString(t,l,T)}else a="",this.insertIdx=0;S=a+g}return this.insertChar=S.charAt(this.insertIdx-1),S}startTimer(t){this.timer&&this.freeTimer();var s;return t===void 0?s=0:(this.speed,s=t),this.timer=this.scene.time.addEvent({delay:1e-4,startAt:s,loop:!0,callback:this.onTyping,callbackScope:this}),this}getTimer(){return this.timer}freeTimer(){return this.timer&&(this.timer.remove(),this.timer=null),this}setText(t){this.setTextCallback&&(this.setTextCallbackScope?t=this.setTextCallback.call(this.setTextCallbackScope,t,this.isLastChar,this.insertIdx):t=this.setTextCallback(t,this.isLastChar,this.insertIdx)),this.textWrapEnable?Zv(this.parent,t):this.parent.setText(t)}getTextLength(t){var s=this.parent,c;return s.getPlainText?c=s.getPlainText(t).length:c=t.length,c}getSubString(t,s,c){var C=this.parent,S;return C.getSubString?S=C.getSubString(t,s,c):S=t.slice(s,c),S}}var X0=function(i){return Array.isArray(i)?i=i.join(` 6423`):typeof i=="number"&&(i=i.toString()),i};const $N={"left-to-right":0,"right-to-left":1,"middle-to-sides":2,"sides-to-middle":3},U0=Phaser.Utils.Objects.GetValue;var jN=function(i,t){t===void 0&&(t="rexTextBox");class s extends i{constructor(C,S){super(C,S),this.type=t;var l=this.childrenMap.text;this.page=new Nu(l,U0(S,"page",void 0)),this.typing=new sp(l,U0(S,"typing",S.type)),this.typing.on("complete",this.onPageEnd,this).on("type",this.onType,this).on("typechar",this.onTypeChar,this),this.textWidth=l.width,this.textHeight=l.height}start(C,S){return this.page.setText(C),S!==void 0&&this.setTypingSpeed(S),this.emit("start"),this.typeNextPage(),this}typeNextPage(){if(this.isLastPage)this.emit("complete");else{var C=this.page.getNextPage();this.typing.start(C)}return this}pause(){return this.isTyping&&(this.typing.pause(),this.emit("pause")),this}
6423resume(){return this.isTyping||(this.emit("resume"),this.typing.resume()),this}stop(C){return this.typing.stop(C),this}showLastPage(){return this.typing.stop(),this.page.showLastPage(),this.emit("type"),this.onPageEnd(),this}setTypeSpeed(C){return this.typing.setTypingSpeed(C),this}setTypingSpeed(C){return this.typing.setTypingSpeed(C),this}get isTyping(){return this.typing.isTyping}get isLastPage(){return this.page.isLastPage}get isFirstPage(){return this.page.isFirstPage}get pageCount(){return this.page.pageCount}get pageIndex(){return this.page.pageIndex}get typingSpeed(){return this.typing.speed}onType(){var C=this.childrenMap.text;(this.textWidth!==C.width||this.textHeight!==C.height)&&(this.textWidth=C.width,this.textHeight=C.height,this.getTopmostSizer().layout()),this.emit("type")}onTypeChar(C){this.emit("typechar",C)}onPageEnd(){var C=this.isLastPage;this.emit("pageend"),C&&this.emit("complete")}}return s};class YC extends jN(Xv){constructor(t,s){s===void 0&&(s={}),s.hasOwnProperty("layoutMode")||(s.layoutMode=1),super(t,s)}}xt.register("textBox",function(i){var t=new YC(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.TextBox",YC);const Bi=Phaser.Utils.Objects.GetValue;class XC extends ee{constructor(t,s){super(t,s),this.type="rexNumberBar";var c=Bi(s,"background",void 0),C=Bi(s,"icon",void 0),S=Bi(s,"iconMask",void 0),l=Bi(s,"slider",void 0),T=Bi(s,"text",void 0),e=Bi(s,"space.icon",0),d=Bi(s,"space.slider",0);if(c&&this.addBackground(c),C){var g;this.orientation===0?(l||T)&&(g={right:e}):(l||T)&&(g={bottom:e}),this.add(C,{proportion:0,align:"center",padding:g}),S&&(S=Ss.call(this,C,C,1))}var r;if(l){l.orientation=this.orientation,l.eventEmitter=this,l.value=null,l.hasOwnProperty("input")||(l.input=-1),r=new Ka(t,l),t.add.existing(r);var g;this.orientation===0?T&&(g={right:d}):T&&(g={bottom:d});var a;if(this.orientation===0){var h=Bi(l,"width",void 0);a=h===void 0?1:0}else{var n=Bi(l,"height",void 0);a=n===void 0?1:0}this.add(r,{proportion:a,align:"center",padding:g})}T&&this.add(T),this.addChildrenMap("background",c),this.addChildrenMap("icon",C),this.addChildrenMap("iconMask",S),this.addChildrenMap("slider",r),this.addChildrenMap("text",T);var o=Bi(s,"valuechangeCallback",null);if(o!==null){var f=Bi(s,"valuechangeCallbackScope",void 0);this.on("valuechange",o,f)}this.setEnable(Bi(s,"enable",void 0)),this.setValue(Bi(s,"value",0))}get enable(){return this.childrenMap.slider?this.childrenMap.slider.enable:!1}set enable(t){this.childrenMap.slider&&this.childrenMap.slider.setEnable(t)}setEnable(t){return t===void 0&&(t=!0),this.enable=t,this}get value(){return this.childrenMap.slider?this.childrenMap.slider.value:0}set value(t){this.childrenMap.slider&&(this.childrenMap.slider.value=t)}setValue(t,s,c){return this.childrenMap.slider&&this.childrenMap.slider.setValue(t,s,c),this}addValue(t,s,c){return this.childrenMap.slider&&this.childrenMap.slider.addValue(t,s,c),this}getValue(t,s){return this.childrenMap.slider?this.childrenMap.slider.getValue(t,s):0}easeValueTo(t,s,c){return this.childrenMap.slider&&this.childrenMap.slider.easeValueTo(t,s,c),this}stopEaseValue(){return this.childrenMap.slider&&this.childrenMap.slider.stopEaseValue(),this}setEaseValueDuration(t){return this.childrenMap.slider&&this.childrenMap.slider.setEaseValueDuration(t),this}setEaseValueFunction(t){return this.childrenMap.slider&&this.childrenMap.slider.setEaseValueFunction(t),this}get text(){var t=this.childrenMap.text;if(t===void 0)return"";var s;return t.text?s=t.text:s=t.getData("text"),s}set text(t){var s=this.childrenMap.text;s!==void 0&&(s.setText?s.setText(t):s.setData("text",t))}setText(t){return this.text=t,this}}xt.register("numberBar",function(i){var t=new XC(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.NumberBar",XC);xt.register("scrollBar",function(i){var t=new jv(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.ScrollBar",jv);const Sc=Phaser.Utils.Objects.GetValue,W0={leftTop:"left-top",centerTop:"center-top",rightTop:"right-top",leftCenter:"left-center",center:"center",rightCenter:"r
6423ight-center",leftBottom:"left-bottom",centerBottom:"center-bottom",rightBottom:"right-bottom"};class UC extends hs{constructor(t,s){super(t,s),this.type="rexBadge";var c=Sc(s,"background",void 0);c&&this.addBackground(c),this.addChildrenMap("background",c);var C=Sc(s,"main",void 0);C&&this.add(C,{key:"main",align:"center",expand:!1}),this.addChildrenMap("main",C);for(var S in W0){var l=Sc(s,S,void 0);l&&(this.add(l,{key:S,align:W0[S],expand:!1}),this.addChildrenMap(S,l))}}}xt.register("badgeLabel",function(i){var t=new UC(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.BadgeLabel",UC);const KN=hs.prototype.add;var H0=function(i,t,s,c,C,S,l,T,e){return i.setVisible(!1),KN.call(this,i,t,s,c,C,S,l,T,e),this};const ZN={add:H0,addPage:H0};var JN=function(i){return i===void 0?null:this.sizerChildren.hasOwnProperty(i)?this.sizerChildren[i]:null};const $0=Ui.prototype.setChildVisible;var QN=function(i,t){this._previousKey=this._currentKey;var s=this.previousPage;s&&(this.swapMode===0?($0.call(this,s,!1),this.emit("pageinvisible",s,this._previousKey,this)):s.destroy()),i&&!this.sizerChildren.hasOwnProperty(i)&&this.emit("createpage",i,this),this._currentKey=i;var c=this.currentPage;return c&&($0.call(this,c,!0),this.emit("pagevisible",c,this._currentKey,this),t===void 0&&(t=this.fadeInDuration),t>0&&c.setAlpha(0).fadeIn(t,1)),this},qN=function(i){return this.sizerChildren.hasOwnProperty(i)},WC={getPage:JN,swapPage:QN,hasPage:qN};Object.assign(WC,ZN);const j0=Phaser.Utils.Objects.GetValue;class Vu extends hs{constructor(t,s){super(t,s),this.type="rexPages",this.childrenMap=this.sizerChildren,this._previousKey=void 0,this._currentKey=void 0,this.setSwapMode(j0(s,"swapMode",0)),this.setFadeInDuration(j0(s,"fadeIn",0))}setSwapMode(t){return typeof t=="string"&&(t=_N[t]),this.swapMode=t,this}setFadeInDuration(t){return this.fadeInDuration=t,this}get previousKey(){return this._previousKey}get currentKey(){return this._currentKey}set currentKey(t){this.swapPage(t)}get currentPage(){return this.getPage(this.currentKey)}get previousPage(){return this.getPage(this.previousKey)}get keys(){return Object.keys(this.sizerChildren)}}Object.assign(Vu.prototype,WC);const _N={invisible:0,destroy:1};xt.register("pages",function(i){var t=new Vu(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.Pages",Vu);const tV=Phaser.GameObjects.Mesh;class HC extends tV{get tint(){return this.vertices.length===0?16777215:this.vertices[0].color}setInteractive(){var t=function(s,c,C){for(var S=this.faces,l=0;l<S.length;l++){var T=S[l];if(T.contains(c,C))return!0}return!1}.bind(this);return this.scene.sys.input.enable(this,t),this}forceUpdate(){return this.dirtyCache[10]=1,this}}const $C=Phaser.Math.Vector3,eV=Phaser.Math.Matrix4;var K0=new $C,Z0=new $C,J0=new eV,iV=function(i,t,s,c,C,S,l){t===void 0&&(t=0),s===void 0&&(s=0),c===void 0&&(c=0),C===void 0&&(C=0),S===void 0&&(S=0),l===void 0&&(l=0),K0.set(t,s,c),Z0.set(C,S,l),J0.fromRotationXYTranslation(Z0,K0,!0);for(var T=0,e=i.vertices.length;T<e;T++)i.vertices[T].transformMat4(J0)};const sV=Phaser.Utils.Objects.IsPlainObject,Pr=Phaser.Utils.Objects.GetValue,nV=Phaser.Geom.Mesh.GenerateGridVerts,Ec=Phaser.Math.RadToDeg,Oh=Phaser.Math.DegToRad,jC=45,rV=1+1/Math.sin(Oh(jC));let KC=class extends HC{constructor(t,s,c,C,S,l){sV(s)&&(l=s,s=Pr(l,"x",0),c=Pr(l,"y",0),C=Pr(l,"key",null),S=Pr(l,"frame",null)),super(t,s,c,C,S),this.type="rexPerspectiveImage",this.setSizeToFrame(),this.resetPerspective(),this.panZ(rV),this.hideCCW=Pr(l,"hideCCW",!0);var T=Pr(l,"gridWidth",0),e=Pr(l,"gridHeight",T);this.resetVerts(T,e),this.prevFrame=this.frame}preUpdate(t,s){this.prevFrame!==this.frame&&(this.prevFrame=this.frame,this.syncSize()),super.preUpdate(t,s)}get originX(){return .5}get originY(){return .5}resetPerspective(){return this.setPerspective(this.width,this.height,jC),this}resetVerts(S,l){if(S!==void 0&&(this.gridWidth=S),l!==void 0&&(this.gridHeight=l),this.clear(),this.dirtyCache[9]=-1,this.width===0||this.height===0)return this;var c=this.frame.cutWidth,C=this.frame.cutHeight,S,l;this.gridWidth===0?S=Math.max(c/8,32):l=this.gridWidth,this.gridHeight===0?l=Math.max(C/8,32):l=this.gridHeight,nV({mesh:this,width:c/this.height,height:C/this.height,widthSegments:Math.ceil(c/S),heightSegments:Math.ceil(C/l)});var T=this.transformInfo;return T&&this.transformVerts(T.x,T.y,T.z,T.rotateX,T.rotateY,T.rotateZ),this}syncSize(){return this.setSizeToFrame(),this.resetPerspective(),this.resetVerts(),this}get rotationX(){return this.modelRotation.x}set rotationX(t){this.modelRotation.x=t}get angleX(){return Ec(this.rotationX)}set angleX(t){this.rotationX=Oh(t)}get rotationY(){return this.modelRotation.y}set rotationY(t){this.modelRotation.y=t}get angleY(){return Ec(this.rotationY)}set angleY(t){this.rotationY=Oh(t)}get rotationZ(){return this.modelRotation.z}set rotationZ(t){this.modelRotation.z=t}get angleZ(){return Ec(this.rotationZ)}set angleZ(t){this.rotationZ=Oh(t)}transformVerts(t,s,c,C,S,l){return t===void 0&&(t=0),s===void 0&&(s=0),c===void 0&&(c=0),C===void 0&&(C=0),S===void 0&&(S=0),l===void 0&&(l=0),this.transformInfo||(this.transformInfo={}),this.transformInfo.x=t,this.transformInfo.y=s,this.transformInfo.rotateX=C,this.transformInfo.rotateY=S,this.transformInfo.rotateZ=l,iV(this,t,s,c,C,S,l),this}};const aV=Phaser.Textures.DynamicTexture;var ZC=function(i,t,s){t===void 0&&(t=2),s===void 0&&(s=2);var c=new aV(i.sys.textures,null,t,s);return c};
6423const oV=Phaser.Utils.Objects.IsPlainObject,dh=Phaser.Utils.Objects.GetValue;class JC extends KC{constructor(t,s,c,C,S,l){oV(s)&&(l=s,s=dh(l,"x",0),c=dh(l,"y",0),C=dh(l,"width",32),S=dh(l,"height",32));var T=ZC(t,C,S);super(t,s,c,T,null,l),this.type="rexPerspectiveRenderTexture",this.rt=this.texture}destroy(t){!this.scene||this.ignoreDestroy||(super.destroy(t),this.rt.destroy(),this.rt=null)}snapshot(t,s){return s===void 0&&(s={}),s.gameObjects=t,s.renderTexture=this.rt,iv(s),(this.width!==this.frame.realWidth||this.height!==this.frame.realHeight)&&this.syncSize(),this}}Phaser.Animations.AnimationState;Phaser.Utils.Objects.IsPlainObject;Phaser.Utils.Objects.GetValue;var ys=function(i,t,s,c){if(Array.isArray(i))for(var C=!1,S=0,l=i.length;S<l;S++){var T=i[S];if(!(c&&!T)&&(s?C=t.call(s,T,S,i):C=t(T,S,i),C))return}else{var C=!1;for(var e in i){var T=i[e];if(!(c&&!T)&&(s?C=t.call(s,T,e,i):C=t(T,e,i),C))return}}};const xa=Phaser.Math.RadToDeg,ya=Phaser.Math.DegToRad;class lV extends Ui{constructor(t,s,c,C,S,l){super(t,s,c,C,S),this.faces=l,ys(l,function(T){T.setPosition(s,c),this.add(T)},this,!0)}get rotationX(){return 0}set rotationX(t){}get angleX(){return xa(this.rotationX)}set angleX(t){this.rotationX=ya(t)}get rotateX(){return xa(this.rotationX)}set rotateX(t){this.rotationX=ya(t)}get rotationY(){return 0}set rotationY(t){}get angleY(){return xa(this.rotationY)}set angleY(t){this.rotationY=ya(t)}get rotateY(){return xa(this.rotationY)}set rotateY(t){this.rotationY=ya(t)}get rotationZ(){return 0}set rotationZ(t){}get angleZ(){return xa(this.rotationZ)}set angleZ(t){this.rotationZ=ya(t)}get rotateZ(){return xa(this.rotationZ)}set rotateZ(t){this.rotationZ=ya(t)}setDebug(t,s){return ys(this.faces,function(c){c.setDebug(t,s)},null,!0),this}panX(t){return ys(this.faces,function(s){s.panX(t)},null,!0),this}panY(t){return ys(this.faces,function(s){s.panY(t)},null,!0),this}panZ(t){return ys(this.faces,function(s){s.panZ(t)},null,!0),this}transformVerts(t,s,c,C,S,l){return ys(this.faces,function(T){T.transformVerts(t,s,c,C,S,l)},null,!0),this}forEachFace(t,s,c){return ys(this.faces,t,s,c),this}}const hV=Phaser.Utils.Objects.IsPlainObject,uV={key:"__WHITE"},dV={image:KC,rendertexture:JC};var Q0=function(i,t){t===void 0&&(t=uV);var s;return hV(t)?(t.hasOwnProperty("type")||(t.hasOwnProperty("key")?t.type="image":t.hasOwnProperty("width")&&(t.type="rendertexture")),s=new dV[t.type](i,t),i.add.existing(s)):s=t,s},cV=function(i,t,s){var c;if(s===void 0){c=[];for(var C,S,l=0,T=t.length;l<T;l++)S=t[l],S?C=Q0(i,S):C=null,c.push(C)}else{c={};for(var C,e,l=0,T=s.length;l<T;l++)e=s[l],t.hasOwnProperty(e)?C=Q0(i,t[e]):C=null,c[e]=C}return c};const fV=Phaser.Math.DegToRad,q0=fV(180);var vV=function(i,t){var s=t.back;s&&(i.orientation===0?s.transformVerts(0,0,0,0,q0,0):s.transformVerts(0,0,0,q0,0,0))};const Pc=Phaser.Utils.Objects.GetValue,pV=Phaser.Math.Linear;let mV=class extends Vr{constructor(t,s){super(t,s),this.resetFromJSON(s),this.boot()}resetFromJSON(t){return super.resetFromJSON(t),this.setEase(Pc(t,"ease","Cubic")),this.setFrontToBackDirection(Pc(t,"frontToBack",0)),this.setBackToFrontDirection(Pc(t,"backToFront",1)),this}setFrontToBackDirection(t){return typeof t=="string"&&(t=_0[t]),this.endAngleFB=t===0?180:-180,this}setBackToFrontDirection(t){return typeof t=="string"&&(t=_0[t]),this.endAngleBF=t===0?-180:180,this}start(t,s){if(this.timer.isRunning)return this;this.timer.setDelay(this.delay).setDuration(t);var c=s+1,C=this.parent;return C.face===0?(this.startAngle=0,this.endAngle=this.endAngleFB*c):(this.startAngle=this.endAngleBF,this.endAngle=this.startAngle-this.endAngleBF*c),super.start(),this}flip(t,s){return this.isRunning?this:(t===void 0&&(t=this.duration),s===void 0&&(s=0),this.start(t,s),this.emit("start",this.parent,this),this.parent.currentFaceIndex=(this.parent.currentFaceIndex+s+1)%2,this)}flipRight(t,s){return this.parent.currentFaceIndex===0?this.setFrontToBackDirection(0):this.setBackToFrontDirection(0),this.flip(t,s),this}flipLeft(t,s){return this.parent.currentFaceIndex===0?this.setFrontToBackDirection(1):this.setBackToFrontDirection(1),this.flip(t,s),this}updateGameObject(t,s){var c=this.easeFn(s.t),C=pV(this.startAngle,this.endAngle,c);t.orientation===0?t.angleY=C:t.angleX=C}};const _0={right:0,"left-to-right":0,left:1,"right-to-left":1}
6423,gV=Phaser.Utils.Objects.IsPlainObject,br=Phaser.Utils.Objects.GetValue,xV=["back","front"];class yV extends lV{constructor(t,s,c,C){gV(s)&&(C=s,s=br(C,"x",0),c=br(C,"y",0));var S=cV(t,C,xV),l=S.back,T=S.front,e=br(C,"width"),d=br(C,"height");if(e===void 0||d===void 0){if(e===void 0){var g=T?T.width:0,r=l?l.width:0;e=Math.max(g,r)}if(d===void 0){var a=T?T.height:0,h=l?l.height:0;d=Math.max(a,h)}}super(t,s,c,e,d,S),this.type="rexPerspectiveCard",this.frontFaceRotationX=0,this.frontFaceRotationY=0,this.frontFaceRotationZ=0,ys(S,function(o,f){this[`${f}Face`]=o},this);var n=br(C,"flip",void 0);n!==!1&&(this.flip=new mV(this,n)),this.setOrientation(br(C,"orientation",0)),vV(this,S),this.setFace(br(C,"face",0))}get rotationX(){return this.frontFaceRotationX}set rotationX(t){this.frontFaceRotationX!==t&&(this.frontFaceRotationX=t,ys(this.faces,function(s){s.rotationX=t},null,!0))}get rotationY(){return this.frontFaceRotationY}set rotationY(t){this.frontFaceRotationY!==t&&(this.frontFaceRotationY=t,ys(this.faces,function(s){s.rotationY=t},null,!0))}get rotationZ(){return this.frontFaceRotationZ}set rotationZ(t){this.frontFaceRotationZ!==t&&(this.frontFaceRotationZ=t,ys(this.faces,function(s){s.rotationZ=t},null,!0))}setOrientation(t){return typeof t=="string"&&(t=CV[t]),this.orientation=t,this}get face(){return this.currentFaceIndex}set face(t){typeof t=="string"&&(t=TV[t]),this.currentFaceIndex=t;var s=t===1,c=s?180:0;this.orientation===0?this.angleY=c:this.angleX=c}setFace(t){return this.face=t,this}toggleFace(){var t=this.face===0?1:0;return this.setFace(t),this}}const CV={x:0,horizontal:0,h:0,y:1,vertical:1,v:1},TV={front:0,back:1};Phaser.Utils.Objects.GetValue;Phaser.Math.RadToDeg;Phaser.Math.DegToRad;Phaser.Math.Angle.WrapDegrees;Phaser.Math.Angle.ShortestBetween;Phaser.Math.Wrap;Phaser.Math.Linear;Phaser.Utils.Objects.IsPlainObject;Phaser.Utils.Objects.GetValue;Phaser.Math.DegToRad;Phaser.Math.RadToDeg;Phaser.Math.Angle.WrapDegrees;Phaser.Math.Linear;Phaser.Math.Wrap;Phaser.Utils.Objects.IsPlainObject;Phaser.Utils.Objects.GetValue;Phaser.Math.Wrap;const SV=Phaser.Utils.Objects.GetValue;var EV=function(i,t,s){t.visibleSibling=[],t.isRunning=!1,t.useParentBounds=SV(s,"useParentBounds",!1),t.setPosition(i.x,i.y).setVisible(!1),i.pin(t)},QC=function(i,t){if(!i)return!1;for(var s=t.visibleSibling,c=0,C=s.length;c<C;c++)i.setChildVisible(s[c],!0);return s.length=0,i.setChildVisible(t,!1),t.isRunning=!1,!0},PV=function(i,t){if(!i)return!1;QC(i,t);var s=t.useParentBounds;iv({gameObjects:i.getAllVisibleChildren(),renderTexture:t.rt,x:t.x,y:t.y,width:s?i.displayWidth:void 0,height:s?i.displayHeighth:void 0,originX:s?i.originX:void 0,originY:s?i.originY:void 0}),i.setChildVisible(t,!0);for(var c=t.visibleSibling,C=i.children,S=0,l=C.length;S<l;S++){var T=C[S];T.visible&&T!==t&&(i.setChildVisible(T,!1),c.push(T))}return t.isRunning=!0,!0},qC=function(i){return class extends i{constructor(s,c){var C=s.scene;super(C,0,0,1,1,c),C.add.existing(this),EV(s,this,c)}destroy(s){!this.scene||this.ignoreDestroy||(this.exit(),super.destroy(s))}enter(){var s=PV(this.rexContainer.parent,this);return s&&this.syncSize(),this}exit(){return QC(this.rexContainer.parent,this),this}}};class _C extends qC(JC){get perspectiveState(){return this.isRunning}}const bV=Phaser.Utils.Objects.GetValue;var MV=function(i){var t=this.scene;this.setSnapshotPadding(bV(i,"snapshotPadding",0)),i=Kn(i),delete i.width,delete i.height,i.front={width:1,height:1},i.back={width:1,height:1};var s=new yV(t,i);t.add.existing(s);var c=s.flip;if(c){var C=this;c.on("start",function(){C.enterPerspectiveMode()}).on("complete",function(){C.exitPerspectiveMode()})}return s};const wV=["front","back"],AV={enterPerspectiveMode(){return this.isInPerspectiveMode?this:(this.setChildVisible(this.perspectiveCard,!0),this.snapshotFace(0),this.snapshotFace(1),this.setChildVisible(this.childrenMap.front,!1),this.setChildVisible(this.childrenMap.back,!1),this.perspectiveCard.setSize(this.width,this.height),this)},exitPerspectiveMode(){if(!this.isInPerspectiveMode)return this;this.setChildVisible(this.perspectiveCard,!1);var i=this.perspectiveCard.face===0;return this.setChildVisible(this.childrenMap.front,i),this.setChildVisible(this.childrenMap.back,!i),this},setSnapshotPadding(i){return this.snapshotPadding=i,this},snapshotFace(i){typeof i=="number"&&(i=wV[i]);var t=this.perspectiveCard.faces[i],s=this.childrenMap[i];t.rt.clear();var c=s.visible;s.visible=!0;var C=s.isRexContainerLite?s.getAllVisibleChildren():s;return t.snapshot(C,{padding:this.snapshotPadding}),s.visible=c,this}}
6423,tx=Phaser.Utils.Objects.GetValue;class np extends hs{constructor(t,s){super(t,s),this.type="rexPerspectiveCard";var c=s.back,C=tx(s,"expand.back",!0);this.add(c,{key:"back",expand:C});var S=s.front,l=tx(s,"expand.front",!0);this.add(S,{key:"front",expand:l}),this.perspectiveCard=MV.call(this,s),this.pin(this.perspectiveCard),this.exitPerspectiveMode(!1)}get flip(){return this.perspectiveCard.flip}get face(){return this.perspectiveCard.face}set face(t){if(!(this.flip&&this.flip.isRunning)){this.perspectiveCard.face=t;var s=t===0,c=this.childrenMap.front,C=this.childrenMap.back;this.setChildVisible(c,s),this.setChildVisible(C,!s)}}setFace(t){return this.face=t,this}toggleFace(){var t=this.face===0?1:0;return this.setFace(t),this}get isInPerspectiveMode(){return this.perspectiveCard.visible}get rotationX(){return this.perspectiveCard.rotationX}set rotationX(t){this.enterPerspectiveMode(),this.perspectiveCard.rotationX=t}get angleX(){return this.perspectiveCard.angleX}set angleX(t){this.enterPerspectiveMode(),this.perspectiveCard.angleX=t}get rotationY(){return this.perspectiveCard.rotationY}set rotationY(t){this.enterPerspectiveMode(),this.perspectiveCard.rotationY=t}get angleY(){return this.perspectiveCard.angleY}set angleY(t){this.enterPerspectiveMode(),this.perspectiveCard.angleY=t}get rotationZ(){return this.perspectiveCard.rotationZ}set rotationZ(t){this.enterPerspectiveMode(),this.perspectiveCard.rotationZ=t}get angleZ(){return this.perspectiveCard.angleZ}set angleZ(t){this.enterPerspectiveMode(),this.perspectiveCard.angleZ=t}panX(t){return this.enterPerspectiveMode(),this.perspectiveCard.panX(t),this}panY(t){return this.enterPerspectiveMode(),this.perspectiveCard.panY(t),this}panZ(t){return this.enterPerspectiveMode(),this.perspectiveCard.panZ(t),this}transformVerts(t,s,c,C,S,l){return this.enterPerspectiveMode(),this.perspectiveCard.transformVerts(t,s,c,C,S,l),this}forEachFace(t,s,c){return this.enterPerspectiveMode(),this.perspectiveCard.forEachFace(t,s,c),this}}Object.assign(np.prototype,AV);xt.register("perspectiveCard",function(i){var t=new np(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.PerspectiveCard",np);var RV=function(i){var t=this.getElement("tabs.buttons");if(!(i>=t.length))return t[i].name},OV=function(i){for(var t=this.getElement("tabs.buttons"),s=0,c=t.length;s<c;s++)if(t[s].name===i)return s};const LV=Phaser.Utils.Objects.IsPlainObject,bc=Phaser.Utils.Objects.GetValue,FV=Phaser.Utils.String.UUID;var IV=function(i,t,s){if(LV(i)){var c=i;i=bc(c,"key"),t=bc(c,"tab"),s=bc(c,"page")}return i||(i=FV()),t.name=i,this.childrenMap.tabs.addButton(t),this.childrenMap.pages.addPage(s,{key:i}),this},DV=function(i,t){var s;if(typeof i=="number"?s=i:s=this.getPageIndex(i),s!=null){var c;t!==void 0&&(c=this.childrenMap.pages.fadeInDuration,this.childrenMap.pages.fadeInDuration=t),this.childrenMap.tabs.emitButtonClick(s),c!==void 0&&(this.childrenMap.pages.fadeInDuration=c)}return this},BV=function(i){return this.swapPage(0,i),this},kV=function(i){var t=this.getElement("tabs.buttons").length-1;return this.swapPage(t,i),this};const GV={swapPage:DV,swapFirstPage:BV,swapLastPage:kV};var NV=function(i,t){typeof i=="number"&&(i=this.getPageKey(i));var s=this.childrenMap.tabs,c=s.getByName(i),C=this.childrenMap.pages,S=C.getElement(i);return!c||!S?this:(C.removeChildrenMap(i),s.removeButton(c,t),C.remove(S,t),this)};const VV={removePage:NV};var zV=function(i){return typeof i=="number"&&(i=this.getPageKey(i)),this.childrenMap.pages.getPage(i)},YV=function(i){var t;return typeof i=="number"?t=i:t=this.getPageIndex(i),this.getElement("tabs.buttons")[t]},tT={getPageKey:RV,getPageIndex:OV,addPage:IV,getPage:zV,getTab:YV};Object.assign(tT,GV,VV);const Mr=Phaser.Utils.Objects.GetValue,ch=ee.prototype.add;let zu=class extends ee{constructor(t,s){s===void 0&&(s={});var c=Mr(s,"tabPosition","top"),C=c==="left"||c==="right"?"x":"y";s.orientation=C,super(t,s),this.type="rexTabPages";var S=Mr(s,"background",void 0);S&&this.addBackground(S);var l=Mr(s,"pages"),T=new Vu(t,l);t.add.existing(T);var e=C==="y",d=e?Mr(s,"wrapTabs",!1):!1,g=Mr(s,"tabs",void 0);g===void 0&&(g={});var r=d?Br:_e;g.orientation=e?"x":"y",g.buttonsType="radio";var a=new r(t,g);t.add.existing(a);var h=d?!0:Mr(s,"expand.tabs",!1),n=Mr(s,"align.tabs","left");switch(c){case"top":case"left":ch.call(this,a,{proportion:0,expand:h,align:n}),ch.call(this,T,{proportion:1,expand:!0});break;case"bottom":case"right":ch.call(this,T,{proportion:1,expand:!0}),ch.call(this,a,{proportion:0,expand:h,align:n});break}this.addChildrenMap("background",S),this.addChildrenMap("tabs",a),this.addChildrenMap("pages",T),a.on("button.click",function(o){var f=o.name;T.hasPage(f)&&T.swapPage(f)}),a.on("button.statechange",function(o,f,u,v){var m=u?"tab.focus":"tab.blur";
6423this.emit(m,o,o.name)},this),T.on("pagevisible",function(o,f,u){this.emit("page.focus",o,f)}),T.on("pageinvisible",function(o,f,u){this.emit("page.blur",o,f)})}get currentKey(){return this.getElement("pages").currentKey}set currentKey(t){this.showPage(t)}get keys(){return this.getElement("pages").keys}get currentPage(){return this.getElement("pages").currentPage}get previousPage(){return this.getElement("pages").previousPage}};Object.assign(zu.prototype,tT);xt.register("tabPages",function(i){var t=new zu(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.TabPages",zu);class XV extends cu{constructor(t,s){s===void 0&&(s={}),s.destroy=!1,super(t,s)}onOpen(){this.emit("open",this.parent,this),super.onOpen()}onClose(){this.emit("close",this.parent,this),super.onClose()}}const UV={expand(i){if(this.expanded===!0)return this;i===void 0&&(i=this.transitionDuration),this.expanded=!0;var t=this.childrenMap.title,s=this.childrenMap.child;this.show(s);var c=this.reLayoutTarget?this.reLayoutTarget:this.getTopmostSizer();return c.layout(),t.emit("folder.expand",i,this),s.emit("folder.expand",i,this),this.emit("expand.start",this),this.childTransition.once("open",function(){this.emit("expand.complete",this)},this).requestOpen(null,i),this},collapse(i){if(this.expanded===!1)return this;i===void 0&&(i=this.transitionDuration),this.expanded=!1;var t=this.childrenMap.title,s=this.childrenMap.child;return t.emit("folder.collapse",i,this),s.emit("folder.collapse",i,this),this.emit("collapse.start",this),this.childTransition.once("close",function(){this.setChildScale(s,1,1).hide(s);var c=this.reLayoutTarget?this.reLayoutTarget:this.getTopmostSizer();c.layout(),this.emit("collapse.complete",this)},this).requestClose(null,i),this},toggle(i){return this.expanded?this.collapse(i):this.expand(i),this}};var WV=function(i,t){yv.popUp.call(i,t,this.expandDirection)},HV=function(i,t){yv.scaleDown.call(i,t,this.expandDirection)};const $V={setTransitionDuration(i){return this.transitionDuration=i,this.childTransition.setTransitInTime(i).setTransitOutTime(i),this},setExpandCallback(i){return i===void 0&&(i=WV.bind(this)),this.childTransition.setTransitInCallback(i),this},setCollapseCallback(i){return i===void 0&&(i=HV.bind(this)),this.childTransition.setTransitOutCallback(i),this}},ps=Phaser.Utils.Objects.GetValue;let Yu=class extends ee{constructor(t,s){s===void 0&&(s={}),s.hasOwnProperty("orientation")||(s.orientation=1),super(t,s),this.type="rexFolder",this.expanded=void 0,this.expandDirection=this.orientation===1?"y":"x";var c=s.background,C=s.title,S=s.child;c&&this.addBackground(c);var l=this.orientation===1?"left":"top",r=ps(s,"align.title",l),a=ps(s,"expand.title",!0);this.add(C,{proportion:0,align:r,expand:a});var T=ps(s,"toggleByTarget",void 0),e=ps(s,"toggleClickConfig");T===void 0&&(T=C),T&&G1.onClick.call(T,function(){this.toggle()},this,e),this.childTransition=new XV(S);var d=ps(s,"customChildOrigin",!1);if(!d){var g=this.rtl?1:0;S.setOrigin(g)}var r=ps(s,"align.child","left"),a=ps(s,"expand.child",!0),h=a?1:0;this.add(S,{proportion:h,align:r,expand:a}),this.addChildrenMap("title",C),this.addChildrenMap("child",S),this.addChildrenMap("background",c);var n=s.transition;this.setTransitionDuration(ps(n,"duration",200)),this.setExpandCallback(ps(n,"expandCallback",void 0)),this.setCollapseCallback(ps(n,"collapseCallback",void 0)),this.reLayoutTarget=ps(s,"reLayoutTarget",void 0);var o=s.onExpandStart;o&&this.on("expand.start",o);var f=s.onExpandComplete;f&&this.on("expand.complete",f);var u=s.onCollapseStart;u&&this.on("collapse.start",u);var v=s.onCollapseComplete;v&&this.on("collapse.complete",v)}};Object.assign(Yu.prototype,UV,$V);xt.register("folder",function(i){var t=new Yu(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.Folder",Yu);xt.register("textArea",function(i){var t=new rl(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.TextArea",rl);var jV=function(i){Object.defineProperty(i,"childOY",{configurable:!0,get:function(){return i.textOY},set:function(t){i.textOY=t}}),Object.defineProperty(i,"topChildOY",{get:function(){return i.topTextOY}}),Object.defineProperty(i,"bottomChildOY",{get:function(){return i.bottomTextOY}}),Object.defineProperty(i,"childVisibleHeight",{get:function(){return i.textVisibleHeight}}),Object.defineProperty(i,"childHeight",{get:function(){return i.contentHeight}})};const KV={setText(i){var t=this.childrenMap.child;return t.setText(i),this},appendText(i){return this.setText(this.text+i),this}},ZV={scrollToLine(i){return this.setChildOY(-this.lineHeight*i),this},scrollToNextLine(i){i===void 0&&(i=1);var t=this.lineIndex+i;return this.scrollToLine(t),this}}
6423,fh=Phaser.Utils.Objects.GetValue;class Xu extends nl{constructor(t,s){s===void 0&&(s={});var c=fh(s,"text"),C;mn(c)?C=c:(c===void 0&&(c={}),c.textArea=!0,C=new $o(t,c),t.add.existing(C)),jV(C);var S=c.width===void 0,l=c.height===void 0;S&&(C.minWidth=0),l&&(C.minHeight=0),s.scrollMode=0,s.type="rexTextAreaInput",s.child={gameObject:C,expandWidth:S,expandHeight:l};var T=fh(s,"space",void 0);T&&(T.child=fh(T,"text",0)),s.scroller=!1,super(t,s),this.addChildrenMap("text",C);var e,d;C.on("cursorin",function(){var r=C.textOY,a=C.contentHeight,h=e!==r,n=d!==a;e=r,d=a,n&&this.resizeController(),(h||n)&&(this.t=C.t)},this),C.on("textchange",function(r){this.emit("textchange",r,this)},this);var g=fh(s,"content",void 0);g&&this.setText(g)}get text(){return this.childrenMap.child.text}get lineHeight(){var t=this.childrenMap.child;return t.lineHeight}get lineIndex(){return Math.floor(-this.childOY/this.lineHeight)}get linesCount(){var t=this.childrenMap.child;return t.linesCount}get contentHeight(){var t=this.childrenMap.child;return t.contentHeight}get readOnly(){var t=this.childrenMap.child;return t.readOnly}set readOnly(t){var s=this.childrenMap.child;s.readOnly=t}setReadOnly(t){var s=this.childrenMap.child;return s.setReadOnly(t),this}}Object.assign(Xu.prototype,KV,ZV);xt.register("textAreaInput",function(i){var t=new Xu(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.TextAreaInput",Xu);var JV=function(){if(this.rexSizer.hidden)return 0;var i,t=this.child,s=t.rexSizer;if(s.hidden)i=0;else switch(this.scrollMode){case 0:i=this.getChildWidth(t);break;case 1:i=0;break;default:i=0;break}return i},QV=function(){if(this.rexSizer.hidden)return 0;var i,t=this.child,s=t.rexSizer;if(s.hidden)i=0;else switch(this.scrollMode){case 0:i=0;break;case 1:i=this.getChildHeight(t);break;default:i=0;break}return i},qV=function(i){return i===void 0&&(i=[]),this.child&&this.child.isRexSizer&&i.push(this.child),i},_V=function(){var i=this.left,t=this.top;switch(this.scrollMode){case 0:t+=this.childOY;break;case 1:i+=this.childOY;break;default:t+=this.childOY,i+=this.childOX;break}this.child.setPosition(i,t),this.resetChildPositionState(this.child),this.setMaskChildrenFlag()},tz=function(){var i=this.child,t,s;if(!i.rexSizer.hidden){switch(this.scrollMode){case 0:t=this.width;break;case 1:s=this.height;break}i.isRexSizer?i.runLayout(this,t,s):wi(i,t,s),this.resetChildPosition(),this.layoutChildrenMask(),this.maskChildren()}},ez=function(i,t){t||i.clearMask&&i.clearMask(!1)},eT={getChildrenWidth:JV,getChildrenHeight:QV,getChildrenSizers:qV,resetChildPosition:_V,layoutChildren:tz,removeChildCallback:ez};Object.assign(eT,RC);const ex=Phaser.Utils.Objects.IsPlainObject,Zi=Phaser.Utils.Objects.GetValue,iz=Phaser.Display.Align.TOP_LEFT;class iT extends Wr{constructor(t,s,c,C,S,l){ex(s)?(l=s,s=Zi(l,"x",0),c=Zi(l,"y",0),C=Zi(l,"width",void 0),S=Zi(l,"height",void 0)):ex(C)&&(l=C,C=Zi(l,"width",void 0),S=Zi(l,"height",void 0)),super(t,s,c,C,S,l),this.type="rexScrollableBlock",this.child=void 0,this.childrenMask=void 0,this._childOY=0,this._childOX=0,this.execeedTopState=!1,this.execeedBottomState=!1,this.execeedLeftState=!1,this.execeedRightState=!1,this.setScrollMode(Zi(l,"scrollMode",0));var T=Zi(l,"clamplChildOY",!0),e=Zi(l,"clamplChildOX",T);this.setClampMode(T,e);var d=Zi(l,"child",void 0),g=Zi(l,"expand",!0);d.setOrigin&&d.setOrigin(0),this.add(d),this.sizerChildren=[d];var r=this.getSizerConfig(d);r.align=iz,r.expand=g,this.child=d,this.setupChildrenMask(Zi(l,"mask",void 0)),this.childrenMask&&(this.maskGameObject=_v(this.childrenMask))}destroy(t){!this.scene||this.ignoreDestroy||(this.destroyChildrenMask(),this.child=void 0,super.destroy(t))}setScrollMode(t){return typeof t=="string"&&(t=TC[t.toLowerCase()]),this.scrollMode=t,this}setClampMode(t,s){return this.clampChildOY=t,this.clampChildOX=s,this}get instHeight(){return this.scrollMode===0||this.scrollMode===2?this.height:this.width}get instWidth(){return this.scrollMode===0||this.scrollMode===2?this.width:this.height}get childHeight(){return this.scrollMode===0||this.scrollMode===2?ie(this.child):de(this.child)}get childWidth(){return this.scrollMode===0||this.scrollMode===2?de(this.child):ie(this.child)}get topChildOY(){return 0}get bottomChildOY(){return-this.visibleHeight}get leftChildOX(){return 0}get rightChildOX(){return-this.visibleWidth}get childVisibleHeight(){return this.instHeight}get childVisibleWidth(){return this.instWidth}get visibleHeight(){var t=this.childHeight-this.childVisibleHeight;return t<0&&(t=0),t}get visibleWidth(){var t=this.childWidth-this.childVisibleWidth;return t<0&&(t=0),t}childOYExceedTop(t){return t===void 0&&(t=this.childOY),t>this.topChildOY}childOYExeceedBottom(t){return t===void 0&&(t=this.childOY),t<this.bottomChildOY}childOXExceedLeft(t){return t===void 0&&(t=this.childOX),t>this.leftChildOX}childOXExeceedRight(t){return t===void 0&&(t=this.childOX),t<this.rightChildOX}get childOY(){return this._childOY}set childOY(t){var s=this.topChildOY,c=this.bottomChildOY,C=this.childOYExceedTop(t),S=this.childOYExeceedBottom(t);this.clampChildOY&&(this.childVisibleHeight>this.childHeight?t=0:C?t=s:S&&(t=c)),this._childOY!==t&&(this._childOY=t,this.resetChildPosition()),C&&(this.execeedTopState||this.emit
6423("execeedtop",this,t,s)),this.execeedTopState=C,S&&(this.execeedBottomState||this.emit("execeedbottom",this,t,c)),this.execeedBottomState=S}get childOX(){return this._childOX}set childOX(t){var s=this.leftChildOX,c=this.rightChildOX,C=this.childOXExceedLeft(t),S=this.childOXExeceedRight(t);this.clampChildOX&&(this.childVisibleWidth>this.childWidth?t=0:C?t=s:S&&(t=c)),this._childOX!==t&&(this._childOX=t,this.resetChildPosition()),C&&(this.execeedLeftState||this.emit("execeedleft",this,t,s)),this.execeedLeftState=C,S&&(this.execeedRightState||this.emit("execeedright",this,t,c)),this.execeedRightState=S}setChildOY(t){return this.childOY=t,this}setChildOX(t){return this.childOX=t,this}set t(t){this.childOY=-this.visibleHeight*t}get t(){var t=this.visibleHeight;return t===0?0:this.childOY/-t}set s(t){this.childOX=-this.visibleWidth*t}get s(){var t=this.visibleWidth;return t===0?0:this.childOX/-t}setChildOYByPercentage(t){return this.t=t,this}setChildOXByPercentage(t){return this.s=t,this}}Object.assign(iT.prototype,eT);var sz=function(i,t){if(!this.hasChild(i))return this;switch(this.scrollMode){case 0:vh.call(this,i,"y",t);break;case 1:vh.call(this,i,"x",t);break;default:vh.call(this,i,"y",t),vh.call(this,i,"x",t);break}return this};const ix=["top","bottom","centerY","center"],sx=["left","right","centerX","center"];var vh=function(i,t,s){t=t.toUpperCase();var c=t==="Y",C=this.childrenMap.child,S;if(c){if(s)for(var l=0,T=ix.length;l<T;l++){var e=ix[l];if(s.indexOf(e)!==-1){s=e;break}}switch(s){case"top":S=C.top-i.getTopLeft().y;break;case"bottom":S=C.bottom-i.getBottomLeft().y;break;case"centerY":case"center":S=C.centerY-i.getCenter().y;break;default:var d=C.top-i.getTopLeft().y,g=C.bottom-i.getBottomLeft().y;d<=0&&g>=0?S=0:S=Math.abs(d)<=Math.abs(g)?d:g;break}}else{if(s)for(var l=0,T=sx.length;l<T;l++){var e=sx[l];if(s.indexOf(e)!==-1){s=e;break}}switch(s){case"left":S=C.left-i.getTopLeft().x;break;case"right":S=C.right-i.getTopRight().x;break;case"centerX":case"center":S=C.centerX-i.getCenter().x;break;default:var r=C.left-i.getTopLeft().x,a=C.right-i.getTopRight().x;r<=0&&a>=0?S=0:S=Math.abs(r)<=Math.abs(a)?r:a;break}}switch(this.scrollMode){case 0:case 1:this.childOY+=S;break;default:this[`childO${t}`]+=S;break}};const An=Phaser.Utils.Objects.GetValue;class rp extends nl{constructor(t,s){s===void 0&&(s={});var c=$v(s),C=An(s,"panel",void 0);C===void 0&&(C={}),C.scrollMode=c,C.clamplChildOY=An(s,"clamplChildOY",!1),C.clamplChildOX=An(s,"clamplChildOX",!1);var S=new iT(t,C);t.add.existing(S);var l,T;switch(c){case 0:l=An(s,"expand.panel",!0),T=!0;break;case 1:l=!0,T=An(s,"expand.panel",!0);break;default:l=!0,T=!0}s.type="rexScrollablePanel",s.child={gameObject:S,expandWidth:l,expandHeight:T,align:An(s,"align.panel","center")};var e=An(s,"space",void 0);e&&(e.child=An(e,"panel",0)),super(t,s),this.addChildrenMap("panel",S.child),this.addChildrenMap("panelLayer",S.maskLayer),this.addChildrenMap("mask",S.maskGameObject),this.addChildrenMap("scrollableBlock",S)}setChildrenInteractive(t){return t===void 0&&(t={}),t.hasOwnProperty("eventEmitter")||(t.eventEmitter=this),t.hasOwnProperty("targets")||(t.targets=[this.childrenMap.panel]),Rv(this.childrenMap.child,t),this}}var nz={scrollToChild:sz};Object.assign(rp.prototype,nz);xt.register("scrollablePanel",function(i){var t=new rp(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.ScrollablePanel",rp);const ph={popUp:function(i,t){i.popUp(t)},scaleDown:function(i,t){i.scaleDown(t)},fadeIn:function(i,t){i.fadeIn(t)},fadeOut:function(i,t){i.fadeOut(t)}};var mf=function(i,t,s){var c=le(s,"reverse",!1),C;if(Ts(i[0]))if(c)for(var l=i.length,S=l-1;S>=0;S--)C=mf(i[S],t,s);else for(var S=0,l=i.length;S<l;S++)C=mf(i[S],t,s);else C=rz(i,t,s);return C},rz=function(i,t,s){var c=le(s,"argsConvert",void 0),C=le(s,"argsConvertScope",void 0),S=i[0];if(Rn=Qf(Rn,i,1),c){c===!0&&(c=Wf,C=void 0);for(var l=0,T=Rn.length;l<T;l++)C?Rn[l]=c.call(C,Rn[l],i):Rn[l]=c(Rn[l],i)}var e;typeof S=="string"?(e=t[S],e==null&&(e=le(t,S,null))):e=S;var d=e.apply(t,Rn);return d},Rn=[];
6423const ms=Phaser.Utils.Objects.GetValue;class az extends ke{constructor(t,s){super(t,s);var c=ms(s,"clock",void 0);c||(c=new Wy(t)),this.clock=c,this.clock.on("update",this.update,this),this.resetFromJSON(s)}resetFromJSON(t){return this.clock.resetFromJSON(ms(t,"clock",void 0)),this.state=ms(t,"state",0),this.commands=ms(t,"commands",[]),this.scope=ms(t,"scope",void 0),this.setTimeUnit(ms(t,"timeUnit",0)),this.setDtMode(ms(t,"dtMode",0)),this.index=ms(t,"index",0),this.nextTime=ms(t,"nextTime",0),this}toJSON(){return{clock:this.clock.toJSON(),state:this.state,commands:this.commands,scope:this.scope,timeUnit:this.timeUnit,dtMode:this.dtMode,index:this.index,nextTime:this.nextTime}}shutdown(t){this.isShutdown||(this.clock.shutdown(t),this.commands=void 0,super.shutdown(t))}load(t,s,c){this.stop();var C=ms(c,"timeUnit",void 0);C!==void 0&&this.setTimeUnit(C);var S=ms(c,"dtMode",void 0);return S!==void 0&&this.setDtMode(S),t=t.filter(function(l){var T=l[0];return!isNaN(T)}).map(function(l){var T=l[0];return typeof T=="string"&&(l[0]=parseFloat(l[0])),l}),this.dtMode===0&&t.sort(function(l,T){var e=l[0],d=T[0];return e>d?1:e<d?-1:0}),this.commands=t,this.scope=s,this}start(t){return t===void 0&&(t=0),this.stop(),this.index=0,this.state=1,this.nextTime=this.getNextDt(0),this.clock.start(t),this.update(t),this.emit("start",this.parent,this),this}pause(){return this.clock.pause(),this.emit("pause",this.parent,this),this}resume(){return this.clock.resume(),this.emit("resume",this.parent,this),this}stop(){return this.clock.stop(),this.state=0,this.emit("stop",this.parent,this),this}seek(t){return this.clock.seek(t),this}seekToNext(){return this.seek(this.nextTime),this}get isPlaying(){return this.clock.isRunning}get completed(){return this.state===2}get timeScale(){return this.clock.timeScale}set timeScale(t){this.clock.timeScale=t}setTimeScale(t){return this.timeScale=t,this}get now(){return this.clock.now}update(t){if(this.nextTime>t)return this;for(var s=this.commands.length-1;;){var c=this.commands[this.index],C=c[1];if(Ts(C)||(C=Qf(oz,c,1)),mf(C,this.scope),this.emit("runcommand",C,this.scope),this.index===s)return this.complete(),this;if(this.index++,this.nextTime=this.getNextDt(this.nextTime),this.nextTime>t)return this}}complete(){this.clock.stop(),this.state=2,this.emit("complete",this.parent,this)}getNextDt(t){var s=this.commands[this.index][0];return this.timeUnit===1&&(s=s*1e3),this.dtMode===1&&(s+=t),s}setDtMode(t){return typeof t=="string"&&(t=hz[t]),this.dtMode=t,this}setTimeUnit(t){return typeof t=="string"&&(t=lz[t]),this.timeUnit=t,this}}var oz=[];const lz={ms:0,s:1,sec:1},hz={abs:0,absolute:0,inc:1,increment:1},Ao=Phaser.Utils.Objects.GetValue;class sT extends tr{constructor(t,s){s===void 0&&(s={text:createDefaultTextObject(t)}),super(t,s),this.type="rexToast",this.setTransitInTime(Ao(s,"duration.in",200)),this.setDisplayTime(Ao(s,"duration.hold",1200)),this.setTransitOutTime(Ao(s,"duration.out",200)),this.setTransitInCallback(Ao(s,"transitIn",On.popUp)),this.setTransitOutCallback(Ao(s,"transitOut",On.scaleDown)),this.player=new az(this,{dtMode:1}),this.messages=[],this.scaleX0=void 0,this.scaleY0=void 0,this.setVisible(!1)}destroy(t){!this.scene||this.ignoreDestroy||(this.player.destroy(),this.player=void 0,this.messages=void 0,super.destroy(t))}setDisplayTime(t){return this.displayTime=t,this}setTransitOutTime(t){return this.transitOutTime=t,this}setTransitInTime(t){return this.transitInTime=t,this}setTransitInCallback(t){switch(typeof t=="string"&&(t=On[t]),t){case On.popUp:t=ph.popUp;break;case On.fadeIn:t=ph.fadeIn;break}return t||(t=ci),this.transitInCallback=t,this}setTransitOutCallback(t){switch(typeof t=="string"&&(t=On[t]),t){case On.scaleDown:t=ph.scaleDown;break;case On.fadeOut:t=ph.fadeOut;break}return t||(t=ci),this.transitOutCallback=t,this}setScale(t,s){return s===void 0&&(s=t),this.scaleX0=t,this.scaleY0=s,super.setScale(t,s),this}showMessage(t){if(this.scaleX0===void 0&&(this.scaleX0=this.scaleX),this.scaleY0===void 0&&(this.scaleY0=this.scaleY),t===void 0){if(this.messages.length===0)return this;t=this.messages.shift()}if(this.player.isPlaying)return this.messages.push(t),this;this.setScale(this.scaleX0,this.scaleY0).setVisible(!0),typeof t=="string"?this.setText(t):t(this),this.layout();var s=[[0,[this.transitInCallback,this,this.transitInTime]],[this.transitInTime,[ci]],[this.displayTime,[this.transitOutCallback,this,this.transitOutTime]],[this.transitOutTime,[this.setVisible,!1]],[30,[ci]]];return this.player.load(s,this).once("complete",function(){this.showMessage()},this).start(),this}}
6423const On={popUp:0,fadeIn:1,scaleDown:0,fadeOut:1};xt.register("toast",function(i){var t=new sT(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.Toast",sT);var uz=function(i,t){if(t===!1)return null;if(mn(t))return t;var s=new Qn(i,t);return i.add.existing(s),s},ll=function(i,t,s){s===void 0&&(s=!0),s?t=t?zi(t):{}:t||(t={});var c=new $o(i,t);return i.add.existing(c),c};const nx=["AliceBlue","AntiqueWhite","Aqua","Aquamarine","Azure","Beige","Bisque","Black","BlanchedAlmond","Blue","BlueViolet","Brown","BurlyWood","CadetBlue","Chartreuse","Chocolate","Coral","CornflowerBlue","Cornsilk","Crimson","Cyan","DarkBlue","DarkCyan","DarkGoldenRod","DarkGray","DarkGrey","DarkGreen","DarkKhaki","DarkMagenta","DarkOliveGreen","DarkOrange","DarkOrchid","DarkRed","DarkSalmon","DarkSeaGreen","DarkSlateBlue","DarkSlateGray","DarkSlateGrey","DarkTurquoise","DarkViolet","DeepPink","DeepSkyBlue","DimGray","DimGrey","DodgerBlue","FireBrick","FloralWhite","ForestGreen","Fuchsia","Gainsboro","GhostWhite","Gold","GoldenRod","Gray","Grey","Green","GreenYellow","HoneyDew","HotPink","IndianRed","Indigo","Ivory","Khaki","Lavender","LavenderBlush","LawnGreen","LemonChiffon","LightBlue","LightCoral","LightCyan","LightGoldenRodYellow","LightGray","LightGrey","LightGreen","LightPink","LightSalmon","LightSeaGreen","LightSkyBlue","LightSlateGray","LightSlateGrey","LightSteelBlue","LightYellow","Lime","LimeGreen","Linen","Magenta","Maroon","MediumAquaMarine","MediumBlue","MediumOrchid","MediumPurple","MediumSeaGreen","MediumSlateBlue","MediumSpringGreen","MediumTurquoise","MediumVioletRed","MidnightBlue","MintCream","MistyRose","Moccasin","NavajoWhite","Navy","OldLace","Olive","OliveDrab","Orange","OrangeRed","Orchid","PaleGoldenRod","PaleGreen","PaleTurquoise","PaleVioletRed","PapayaWhip","PeachPuff","Peru","Pink","Plum","PowderBlue","Purple","RebeccaPurple","Red","RosyBrown","RoyalBlue","SaddleBrown","Salmon","SandyBrown","SeaGreen","SeaShell","Sienna","Silver","SkyBlue","SlateBlue","SlateGray","SlateGrey","Snow","SpringGreen","SteelBlue","Tan","Teal","Thistle","Tomato","Turquoise","Violet","Wheat","White","WhiteSmoke","Yellow","YellowGreen"],dz=[15792383,16444375,65535,8388564,15794175,16119260,16770244,0,16772045,255,9055202,10824234,14596231,6266528,8388352,13789470,16744272,6591981,16775388,14423100,65535,139,35723,12092939,11119017,11119017,25600,12433259,9109643,5597999,16747520,10040012,9109504,15308410,9419919,4734347,3100495,3100495,52945,9699539,16716947,49151,6908265,6908265,2003199,11674146,16775920,2263842,16711935,14474460,16316671,16766720,14329120,8421504,8421504,32768,11403055,15794160,16738740,13458524,4915330,16777200,15787660,15132410,16773365,8190976,16775885,11393254,15761536,14745599,16448210,13882323,13882323,9498256,16758465,16752762,2142890,8900346,7833753,7833753,11584734,16777184,65280,3329330,16445670,16711935,8388608,6737322,205,12211667,9662683,3978097,8087790,64154,4772300,13047173,1644912,16121850,16770273,16770229,16768685,128,16643558,8421376,7048739,16753920,16729344,14315734,15657130,10025880,11529966,14381203,16773077,16767673,13468991,16761035,14524637,11591910,8388736,6697881,16711680,12357519,4286945,9127187,16416882,16032864,3050327,16774638,10506797,12632256,8900331,6970061,7372944,7372944,16775930,65407,4620980,13808780,32896,14204888,16737095,4251856,15631086,16113331,16777215,16119285,16776960,10145074];var gf={},rx;for(var mh=0,cz=nx.length;mh<cz;mh++)rx=nx[mh].toLowerCase(),gf[rx]=dz[mh];var fz=function(i){return i=i.toLowerCase(),gf.hasOwnProperty(i)?gf[i]:null},vz=function(i){return typeof i!="string"||(i.startsWith("#")?i=parseInt(i.substring(1),16):i.startsWith("0x")?i=parseInt(i.substring(2),16):i=fz(i)),i};const pz=Phaser.Utils.String.Pad;var ax=function(i,t){t===void 0&&(t="0x");var s=i.toString(16).toUpperCase();return s=pz(s,6,0,1),s=t+s,s},mz=function(i,t){i&&(i.setTint?i.setTint(t):i.setFillStyle&&i.setFillStyle(t))};const Ji=Phaser.Utils.Objects.GetValue,gz=Phaser.Utils.Objects.IsPlainObject,xz=Phaser.Math.Clamp;let ap=class extends ee{constructor(t,s){s===void 0&&(s={}),s.orientation=0,super(t,s),this.type="rexColorInputLite";var c=Ji(s,"background",void 0),C=Ji(s,"swatch"),S;gz(C)&&(S=Ji(C,"size"));var l=uz(t,Ji(s,"swatch")),T=Ji(s,"inputText",!0),e;
6423if(T&&(e=ll(t,T)),c&&this.addBackground(c),l){S=Ji(s,"swatchSize",S);var d;S!==void 0?(wi(l,S,S),d=!1):d=Ji(s,"squareExpandSwatch",!0);var g=d?1:0;this.add(l,{proportion:0,expand:!1,fitRatio:g})}if(e){var r=Ji(T,"width")===void 0?1:0,a=Ji(T,"height")===void 0;this.add(e,{proportion:r,expand:a})}this.addChildrenMap("background",c),this.addChildrenMap("swatch",l),this.addChildrenMap("inputText",e),e&&e.on("close",function(){this.setValue(e.value)},this);var h=Ji(s,"valuechangeCallback",null);if(h!==null){var n=Ji(s,"valuechangeCallbackScope",void 0);this.on("valuechange",h,n)}this.setValue(Ji(s,"value",0))}get value(){return this._value}set value(t){if(typeof t=="string"){if(t=vz(t),t==null){var c=this.childrenMap.inputText;c&&c.setText(ax(this._value));return}}else t=xz(Math.floor(t),0,16777215);if(this._value!==t){this._value=t;var s=this.childrenMap.swatch;s&&mz(s,t);var c=this.childrenMap.inputText;c&&c.setText(ax(t)),this.emit("valuechange",this._value)}}setValue(t){return this.value=t,this}get color(){return this._value}set color(t){this.value=t}setColor(t){return this.color=t,this}};var yz={setCreateColorPickerBackgroundCallback(i){return this.colorPickerCreateBackgroundCallback=i,this},setColorPickerHPalettePosition(i){return this.colorPickerHPalettePosition=i,this},setColorPickerExpandDirection(i){return typeof i=="string"&&(i=Cz[i]),this.colorPickerExpandDirection=i,this},setColorPickerEaseInDuration(i){return i===void 0&&(i=0),this.colorPickerEaseInDuration=i,this},setColorPickerEaseOutDuration(i){return i===void 0&&(i=0),this.colorPickerEaseOutDuration=i,this},setColorPickerTransitInCallback(i){return this.colorPickerTransitInCallback=i,this},setColorPickerTransitOutCallback(i){return this.colorPickerTransitOutCallback=i,this},setColorPickerBounds(i){return this.colorPickerBounds=i,this},setColorPickerWidth(i){return this.colorPickerWidth=i,this},setColorPickerHeight(i){return this.colorPickerHeight=i,this},setColorPickerSize(i,t){return this.setColorPickerWidth(i).setColorPickerHeight(t),this},setColorPickerSpace(i){return i===void 0&&(i={}),this.colorPickerSpace=i,this},setColorComponentsHeight(i){return this.colorComponentsHeight=i,this},setColorComponentsFormatLabelConfig(i){return this.colorComponentsFormatLabelConfig=i,this},setColorComponentsInputTextConfig(i){return this.colorComponentsInputTextConfig=i,this},setColorComponentsSpace(i){return i===void 0&&(i={}),this.colorComponentsSpace=i,this}};const Cz={down:0,up:1},nT=Phaser.Display.Color,Vh=Phaser.Math.Percent;var Tz=function(i,t,s){s===void 0&&(s=!1);var c=i.width,C=i.height,S=new nT;if(s)for(var l=0;l<C;l++){var T=Vh(l,0,C);S.setFromHSV(T,1,1),t.fillStyle=S.rgba,t.fillRect(0,l,c,1)}else for(var e=0;e<c;e++){var T=Vh(e,0,c);S.setFromHSV(T,1,1),t.fillStyle=S.rgba,t.fillRect(e,0,1,C)}},Sz=function(i,t,s){for(var c=i.width,C=i.height,S=t.getImageData(0,0,c,C),l=S.data,T=new nT,e=0;e<C;e++)for(var d=0;d<c;d++){var g=Vh(d,0,c),r=1-Vh(e,0,C);T.setFromHSV(s,g,r);var a=(e*c+d)*4;l[a]=T.red,l[a+1]=T.green,l[a+2]=T.blue,l[a+3]=255}t.putImageData(S,0,0)};const Ez=Phaser.Display.Color,ox=Phaser.Math.Percent,Pz=Phaser.Display.Color.ColorToRGBA,bz=Phaser.Display.Color.HSVToRGB;class Mz extends Xr{constructor(t,s,c,C,S,l){s===void 0&&(s=0),c===void 0&&(c=0),C===void 0&&(C=2),S===void 0&&(S=2),super(t,s,c,C,S),this.type="rexColorPicker.HPaletteCanvas",this.colorObject=ne
6423w Ez,this.setOrientation(l),this.setSize(C,S)}setOrientation(t){return this.orientation=Pu(t),this}updateTexture(){return Tz(this.canvas,this.context,this.orientation),super.updateTexture(),this}get color(){return this.colorObject.color}get hue(){return this._hue}set hue(t){this._hue=t}getHue(t,s){return t===void 0?this.hue:(this.orientation===0?this.hue=ox(t,0,this.width):this.hue=ox(s,0,this.height),this.hue)}getColor(t,s){if(t===void 0)return this.color;var c=this.getHue(t,s);return this.colorObject.setFromRGB(bz(c,1,1)),this.colorObject.color}setColor(t){return this.color===t?this:this}colorToLocalPosition(t,s){return s===void 0?s={}:s===!0&&(Mc===void 0&&(Mc={}),s=Mc),this.colorObject.setFromRGB(Pz(t)),this.orientation===0?(s.x=this.width*this.colorObject.h,s.y=this.height/2):(s.x=this.width/2,s.y=this.height*this.colorObject.h),s}}var Mc=void 0,wz=Phaser.Math.RotateAround,rT=function(i,t,s,c){c===void 0?c={}:c===!0&&(wc===void 0&&(wc={}),c=wc),t-=i.width*i.originX,s-=i.height*i.originY;var C={x:t*i.scaleX,y:s*i.scaleY};return wz(C,0,0,-i.rotation),c.x=i.x+t,c.y=i.y+s,c},wc;class Az extends hs{constructor(t,s){s===void 0&&(s={}),super(t,s);var c=s.width!=null?1:0,C=new Mz(t).setOrientation(c);t.add.existing(C),this.type="rexColorPicker.HPalette",C.setInteractive().on("pointerdown",this.onPaletteCanvasPointerDown,this).on("pointermove",this.onPaletteCanvasPointerDown,this);var S=new Qn(t,{strokeColor:16777215,strokeWidth:2});t.add.existing(S),this.add(C,{key:"paletteCanvas",expand:!0}).add(S,{key:"marker",expand:!1})}resize(t,s){if(this.width===t&&this.height===s)return this;super.resize(t,s);var c=Math.min(t,s);return this.childrenMap.marker.setSize(c,c),this}onPaletteCanvasPointerDown(t,s,c,C){if(t.isDown){var S=this.childrenMap.paletteCanvas,l=S.getColor(s,c);this.setMarkerPosition(l),this.emit("input",l)}}get color(){return this.childrenMap.paletteCanvas.color}setColor(t){if(this.color===t)return this;var s=this.childrenMap.paletteCanvas;return s.setColor(t),this.setMarkerPosition(t),this}setMarkerPosition(t){var s=this.childrenMap.paletteCanvas,c=this.childrenMap.marker,C=s.colorToLocalPosition(t,!0);return rT(s,C.x,C.y,c),this.resetChildPositionState(c),this}getHue(t,s){var c=this.childrenMap.paletteCanvas;return c.getHue(t,s)}}const Rz=Phaser.Display.Color,lx=Phaser.Math.Percent,hx=Phaser.Display.Color.ColorToRGBA,Oz=Phaser.Display.Color.HSVToRGB;class Lz extends Xr{constructor(t,s,c,C,S,l){s===void 0&&(s=0),c===void 0&&(c=0),C===void 0&&(C=2),S===void 0&&(S=2),super(t,s,c,C,S),this.type="rexColorPicker.SVPaletteCanvas",l===void 0&&(l=1),this.colorObject=ne
6423w Rz,this.setHue(l),this.setSize(C,S)}get color(){return this.colorObject.color}get hue(){return this._hue}set hue(t){this._hue!==t&&(this._hue=t,this.colorObject.h=t,this.dirty=!0)}setHue(t){return this.hue=t,this}updateTexture(){return Sz(this.canvas,this.context,this.hue),super.updateTexture(),this}getColor(t,s){if(t===void 0)return this.colorObject.color;var c=lx(t,0,this.width),C=1-lx(s,0,this.height);return this.colorObject.setFromRGB(Oz(this.hue,c,C)),this.colorObject.color}setColor(t){return this.color===t?this:(this.colorObject.setFromRGB(hx(t)),this.setHue(this.colorObject.h),this)}colorToLocalPosition(t,s){return s===void 0?s={}:s===!0&&(Ac===void 0&&(Ac={}),s=Ac),this.colorObject.setFromRGB(hx(t)),s.x=this.width*this.colorObject.s,s.y=this.height*(1-this.colorObject.v),s}}var Ac=void 0;class Fz extends hs{constructor(t,s){super(t,s);var c=new Lz(t);t.add.existing(c),this.type="rexColorPicker.SVPalette",c.setInteractive().on("pointerdown",this.onPaletteCanvasPointerDown,this).on("pointermove",this.onPaletteCanvasPointerDown,this);var C=new Qn(t,{radius:5,strokeColor:16777215,strokeWidth:2});t.add.existing(C),this.add(c,{key:"paletteCanvas",expand:!0}).add(C,{key:"marker",expand:!1})}onPaletteCanvasPointerDown(t,s,c,C){if(t.isDown){var S=this.childrenMap.paletteCanvas,l=S.getColor(s,c);this.setMarkerPosition(l),this.emit("input",l)}}get color(){return this.childrenMap.paletteCanvas.color}setHue(t){var s=this.childrenMap.paletteCanvas;return s.setHue(t),this}setColor(t){if(this.color===t)return this;var s=this.childrenMap.paletteCanvas;return s.setColor(t),this.setMarkerPosition(t),this}setMarkerPosition(t){var s=this.childrenMap.paletteCanvas,c=this.childrenMap.marker,C=s.colorToLocalPosition(t,!0);return rT(s,C.x,C.y,c),this.resetChildPositionState(c),this}}const gs=Phaser.Utils.Objects.GetValue;class op extends ee{constructor(t,s){super(t,s),this.type="rexColorPicker",this.freezePalettes=!1;var c=gs(s,"hPalette.position",0);typeof c=="string"&&(c=Iz[c]);var C=c===0||c===2?1:0;this.setOrientation(C);var S=gs(s,"background",void 0),l,T;if(this.orientation===0){var l=gs(s,"hPalette.width",void 0);l===void 0&&(l=gs(s,"hPalette.size",10))}else T=gs(s,"hPalette.height",void 0),T===void 0&&(T=gs(s,"hPalette.size",10));var e=new Az(t,{width:l,height:T});t.add.existing(e);var d=gs(s,"svPalette.width",void 0),g=gs(s,"svPalette.height",void 0),r=new Fz(t,{width:d,height:g});t.add.existing(r),S&&this.addBackground(S);var a={proportion:0,expand:!0},h,n;this.orientation===0?(h=d===void 0?1:0,n=g===void 0):(h=g===void 0?1:0,n=d===void 0);var o={proportion:h,expand:n};c===0||c===3?this.add(r,o).add(e,a):this.add(e,a).add(r,o),e.on("input",function(){r.setHue(e.getHue()),this.setValue(r.color,!0)},this),r.on("input",function(){this.setValue(r.color,!0)},this),this.addChildrenMap("background",S),this.addChildrenMap("hPalette",e),this.addChildrenMap("svPalette",r);var f=gs(s,"valuechangeCallback",null);if(f!==null){var u=gs(s,"valuechangeCallbackScope",void 0);this.on("valuechange",f,u)}this.setValue(gs(s,"value",16777215))}get value(){return this._value}set value(t){if(this._value!==t){var s=this._value;this._value=t,this.freezePalettes||this.updatePalettes(),this.emit("valuechange",t,s,this)}}setValue(t,s){return this.freezePalettes=!!s,this.value=t,this.freezePalettes=!1,this}get color(){return this._value}set color(t){this.value=t}setColor(t){return this.color=t,this}updatePalettes(){return this.childrenMap.hPalette.setColor(this.color),this.childrenMap.svPalette.setColor(this.color),this}postLayout(t,s,c){return this.childrenMap.hPalette.setMarkerPosition(this.value),this.childrenMap.svPalette.setMarkerPosition(this.value),this}}var Iz={bottom:0,left:1,top:2,right:3};const ks=Phaser.Utils.Objects.GetValue,Dz=Phaser.Display.Color,Bz=Phaser.Display.Color.ColorToRGBA,kz=Phaser.Display.Color.HSVToRGB,wr=Phaser.Math.Clamp;class lp extends ee{constructor(t,s){s===void 0&&(s={}),s.orientation=0,super(t,s),this.type="rexColorComponents",this.colorObject=ne
6423w Dz;var c=ks(s,"background",void 0),C=ks(s,"formatLabel",void 0);mn(C)||(C=es(t,C).resetDisplayContent());var S=[];if(s.inputText0&&s.inputText1&&s.inputText2)S.push(s.inputText0),S.push(s.inputText1),S.push(s.inputText2);else for(var l=ks(s,"inputText"),T=0;T<3;T++){var e=ll(t,l).setMaxLength(3).setNumberInput();S.push(e)}c&&this.addBackground(c);var g=ks(s,"proportion.formatLabel",0),d=!!C.isRexContainerLite,r=ks(s,"expand.formatLabel",d);this.add(C,{proportion:g,expand:r});for(var g=ks(l,"width")===void 0?1:0,r=ks(l,"height")===void 0,T=0,a=S.length;T<a;T++)this.add(S[T],{proportion:g,expand:r});this.addChildrenMap("background",c),this.addChildrenMap("formatLabel",C),this.addChildrenMap("components",S),this.onClick(C,this.toggleColorFormat,this);for(var T=0,a=S.length;T<a;T++)S[T].on("close",function(){this.updateColorObject(),this.setValue(this.colorObject.color)},this);var h=ks(s,"valuechangeCallback",null);if(h!==null){var n=ks(s,"valuechangeCallbackScope",void 0);this.on("valuechange",h,n)}C.setText("RGB"),this.setValue(ks(s,"value",16777215))}get value(){return this._value}set value(t){t=wr(Math.floor(t),0,16777215),this._value!==t&&(this._value=t,this.colorObject.setFromRGB(Bz(t)),this.updateComponents(),this.emit("valuechange",this._value))}setValue(t){return this.value=t,this}get color(){return this._value}set color(t){this.value=t}setColor(t){return this.color=t,this}get colorFormat(){return this.childrenMap.formatLabel.text}set colorFormat(t){this.colorFormat!==t&&(this.childrenMap.formatLabel.setText(t),this.updateComponents())}setColorFormat(t){return this.colorFormat=t,this}toggleColorFormat(){return this.colorFormat=this.colorFormat==="RGB"?"HSV":"RGB",this}updateComponents(){var t=this.childrenMap.components,s,c,C;return this.colorFormat==="RGB"?(s=this.colorObject.red,c=this.colorObject.green,C=this.colorObject.blue):(s=Math.floor(this.colorObject.h*360),c=Math.floor(this.colorObject.s*100),C=Math.floor(this.colorObject.v*100)),t[0].setValue(s),t[1].setValue(c),t[2].setValue(C),this}updateColorObject(){var t=this.childrenMap.components;if(this.colorFormat==="RGB"){var s=wr(t[0].value,0,255),c=wr(t[1].value,0,255),C=wr(t[2].value,0,255);this.colorObject.setTo(s,c,C)}else{var S=wr(t[0].value,0,359)/360,l=wr(t[1].value,0,100)/100,T=wr(t[2].value,0,100)/100;this.colorObject.setFromRGB(kz(S,l,T))}return this}}const Rc=Phaser.Utils.Objects.GetValue;class Gz extends ee{constructor(t,s){s===void 0&&(s={}),s.orientation=1,super(t,s),this.type="rexColorInput.ColorPickerPanel";var c=Rc(s,"background",void 0),C=new op(t,{hPalette:s.hPalette||{},svPalette:s.svPalette||{},space:{item:Rc(s,"space.hPalette",8)}});t.add.existing(C);var S;s.colorComponents&&(S=new lp(t,s.colorComponents),t.add.existing(S)),c&&(this.addBackground(c),new fu(c,{stopAllLevels:!1})),this.add(C,{proportion:1,expand:!0}),S&&this.add(S,{proportion:0,expand:!0}),this.addChildrenMap("background",c),this.addChildrenMap("colorPicker",C),this.addChildrenMap("colorComponents",S),C.on("valuechange",function(l){this.setValue(l)},this),S&&S.on("valuechange",function(l){this.setValue(l)},this),this.setValue(Rc(s,"value",16777215))}get value(){return this._value}set value(t){if(this._value!==t){this._value=t;var s=this.childrenMap.colorPicker;s.setValue(t);var c=this.childrenMap.colorComponents;c&&c.setValue(t),this.emit("valuechange",t)}}setValue(t){return this.value=t,this}}Phaser.Utils.Objects.GetValue;var Nz=function(t){var t=this.scene,s,c=this.colorPickerCreateBackgroundCallback;c&&(s=c.call(this,t),t.add.existing(s));var C=this.colorPickerWidth;C===void 0&&(C=this.width);var S=this.colorPickerHeight;S===void 0&&(S=C);var l;this.colorComponentsHeight>0?l={height:this.colorComponentsHeight,formatLabel:this.colorComponentsFormatLabelConfig,inputText:this.colorComponentsInputTextConfig,space:this.colorComponentsSpace}:l=!1;var T=new Gz(t,{width:C,height:S,background:s,space:this.colorPickerSpace,hPalette:{position:this.colorPickerHPalettePosition},colorComponents:l,value:this.value});return t.add.existing(T),T},Vz=function(){if(!this.colorPicker){var i=Nz.call(this).layout(),t=new kC(i,{duration:{in:this.colorPickerEaseInDuration,out:this.colorPickerEaseOutDuration},transitIn:this.colorPickerTransitInCallback,transitOut:this.colorPickerTransitOutCallback,expandDirection:this.colorPickerExpandDirection,alignTargetX:this,alignTargetY:this,bounds:this.colorPickerBounds,touchOutsideClose:!0}).on("open",function(){i.on("valuechange",function(s){this.setValue(s)},this)},this).on("close",function(){this.colorPicker=void 0,this.dropDownBehavior=void 0},this);return this.colorPicker=i,this.dropDownBehavior=t,this.pin(i),this}},aT={openColorPicker:Vz};
6423Object.assign(aT,yz);const si=Phaser.Utils.Objects.GetValue;class Uu extends ap{constructor(t,s){s===void 0&&(s={}),super(t,s),this.type="rexColorInput",s.hasOwnProperty("colorPicker")||(s.colorPicker={background:{color:0}});var c=s.colorPicker,C=c!==!1&&c!==null;if(C){this.setColorPickerSize(si(c,"width",160),si(c,"height",170));var S,l=si(c,"background");l?S=function(h){return ts(h,l)}:S=si(c,"createBackgroundCallback"),this.setCreateColorPickerBackgroundCallback(S),this.setColorPickerHPalettePosition(si(c,"hPalettePosition",0)),this.setColorPickerExpandDirection(si(c,"expandDirection")),this.setColorPickerEaseInDuration(si(c,"easeIn",200)),this.setColorPickerEaseOutDuration(si(c,"easeOut",200)),this.setColorPickerTransitInCallback(si(c,"transitIn")),this.setColorPickerTransitOutCallback(si(c,"transitOut")),this.setColorPickerBounds(si(c,"bounds"));var T=si(c,"space");T===void 0&&(T={left:10,right:10,top:10,bottom:10,item:8}),this.setColorPickerSpace(T)}var e=s.colorComponents,d=e!==!1&&e!==null;if(C&&d){this.setColorComponentsHeight(si(e,"height",30)),this.setColorComponentsFormatLabelConfig(si(e,"formatLabel"));var g=si(e,"inputText");g||(g=si(s,"inputText")),this.setColorComponentsInputTextConfig(g);var r=si(e,"space");r===void 0&&(r={item:8}),this.setColorComponentsSpace(r)}var a=this.childrenMap.swatch;a&&C&&this.onClick(a,this.openColorPicker,this)}}Object.assign(Uu.prototype,aT);xt.register("colorInput",function(i){var t=new Uu(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.ColorInput",Uu);xt.register("colorInputLite",function(i){var t=new ap(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.ColorInputBase",ap);xt.register("colorPicker",function(i){var t=new op(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.ColorPicker",op);xt.register("colorComponents",function(i){var t=new lp(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.ColorComponents",lp);var zz=function(){return function(i,t,s,c){t!=="panel"&&s.setChildVisible(i,!0)}},Yz=function(){return function(i,t,s,c){t!=="panel"&&s.setChildVisible(i,!1)}};const Xz={show:zz,hide:Yz};var Uz=function(i,t){return t===void 0&&(t=1),function(s,c,C,S){c!=="panel"&&C.fadeChild(s,S?0:i,t)}},Wz=function(i,t){return t===void 0&&(t=0),function(s,c,C,S){c!=="panel"&&C.fadeChild(s,S?0:i,t)}};const Hz={show:Uz,hide:Wz};var ux=function(i,t){return function(s,c,C,S){c!=="panel"&&C.moveChild(s,S?0:i,t)}};const $z={show:ux,hide:ux};var dx=function(i,t){return function(s,c,C,S){c==="panel"&&C.moveChild(s,S?0:i,t)}};const jz={show:dx,hide:dx},Oc={visible:Xz,fade:Hz,move:$z,"move-panel":jz};var Kz=function(i){var t,s;[t,...s]=typeof i=="string"?[i]:i;var c,C;return Oc.hasOwnProperty(t)?(c=Oc[t].show.apply(null,s),C=Oc[t].hide.apply(null,s)):(c=ci,C=ci),{show:c,hide:C}};const Zz={showChild(i,t){var s=this.sizerChildren[i];return s&&(this.emit("showchild",s,i,this,t),this.resetChildState(s)),this},hideChild(i,t){var s=this.sizerChildren[i];return s&&(this.emit("hidechild",s,i,this,t),this.resetChildState(s)),this},swapChild(i,t){return this.currentChildKey===i||(this.currentChildKey==="panel"||i==="panel"?(this.previousChildKey=this.currentChildKey,this.currentChildKey=i,this.hideChild(this.previousChildKey,t),this.showChild(this.currentChildKey,t)):(this.swapChild("panel",t),this.swapChild(i,t))),this},showPanel(i){return this.swapChild("panel",i),this},showLeftSide(){return this.swapChild("leftSide"),this},showRightSide(){return this.swapChild("rightSide"),this},showTopSide(){return this.swapChild("topSide"),this},showBottomSide(){return this.swapChild("bottomSide"),this},hideLeftSide(){return this.currentChildKey=="leftSide"&&this.showPanel(),this},hideRightSide(){return this.currentChildKey=="rightSide"&&this.showPanel(),this},hideTopSide(){return this.currentChildKey=="topSide"&&this.showPanel(),this},hideBottomSide(){return this.currentChildKey=="bottomSide"&&this.showPanel(),this},toggleLeftSide(){var i=this.currentChildKey!=="panel"?"panel":"leftSide";return this.swapChild(i),this},toggleRightSide(){var i=this.currentChildKey!=="panel"?"panel":"rightSide";return this.swapChild(i),this},toggleTopSide(){var i=this.currentChildKey!=="panel"?"panel":"topSide";return this.swapChild(i),this},toggleBottomSide(){var i=this.currentChildKey!=="panel"?"panel":"bottomSide";return this.swapChild(i),this}},Jz=Ui.prototype.setChildVisible,Qz={setChildVisible(i,t){var s;if(typeof i=="string"){var s=i;i=this.sizerChildren[s]}else s=yu(this.sizerChildren,i);return t===void 0&&(t=this.currentChildKey===s),Jz.call(this,i,t),this}},qz={fadeChild(i,t,s){var c;return typeof i=="string"?(c=i,i=this.sizerChildren[c]):c=yu(this.sizerChildren,i),t===void 0&&(t=500),s===void 0&&(s=this.currentChildKey===c?1:0),i.fadeIn(t,{start:i.alpha,end:s}),this},fadeChildPromise(i,t,s){return typeof i=="string"&&(i=this.sizerChildren[key]),this.fadeChild(i,t,s),i._fade?ri(i._fade):Promise.resolve()}},_z={moveChild(i,t,s,c){var C;typeof i=="string"?(C=i,i=this.sizerChildren[C]):C=yu(this.sizerChildren,i),t===void 0&&(t=500);var S=this.currentChildKey===C;if(c===void 0)switch(C){case"leftSide":case"rightSide":c=de(i);break;case"topSide":case"bottomSide":c=ie(i);break;default:if(S)switch(this.previousChildKey){case"leftSide":case"rightSide":c=de(this.sizerChildren[this.previousChildKey]);break;case"topSide":case"bottomSide":c=ie(this.sizerChildren[this.previousChildKey]);break;default:c=0;break}else switch(this.currentChildKey){case"leftSide":case"rightSide":c=de(this.sizerChildren[this.currentChildKey]);break;case"topSide":case"bottomSide":c=ie(this.sizerChildren[this.currentChildKey]);break;default:c=0;break}break}var l,T,e,d;if(S)switch(C){case"panel":switch(this.previousChildKey){case"leftSide":l=!0;break;case"rightSide":T=!0;break;case"topSide":e=!0;break;case"bottomSide":d=!0;break}break;case"leftSide":T=!0;break;case"rightSide":l=!0;break;case"topSide":d=!0;break;case"bottomSide":e=!0;break}else switch(C){case"panel":switch(this.currentChildKey){case"leftSide":T=!0;break;case"rightSide":l=!0;break;case"topSide":d=!0;break;case"bottomSide":e=!0;break}break;case"leftSide":l=!0;break;case"rightSide":T=!0;break;case"topSide":e=!0;break;case"bottomSide":d=!0;break}return l?i.moveTo(t,`-=${c}`,void 0,s):T?i.moveTo(t,`+=${c}`,void 0,s):e?i.moveTo(t,void 0,`-=${c}`,s):d?i.moveTo(t,void 0,`+=${c}`,s):i.moveTo(0),this},moveChildPromise(i,t,s,c){return typeof i=="string"&&(i=this.sizerChildren[key]),this.moveChild(i,t,s,c),i._easeMove?ri(i._easeMove):Prom
6423ise.resolve()}};var oT={};Object.assign(oT,Qz,qz,_z);const Pi=Phaser.Utils.Objects.GetValue;class hp extends hs{constructor(t,s){super(t,s),this.type="rexSides",this.childrenMap=this.sizerChildren,this.previousChildKey=void 0,this.currentChildKey=void 0;var c=Pi(s,"showChildCallback",void 0);if(c)if(Dr(c)){var C=Pi(s,"showChildCallbackScope",void 0);this.on("showchild",c,C);var S=Pi(s,"hideChildCallback",void 0),l=Pi(s,"hideChildCallbackScope",void 0);this.on("hidechild",S,l)}else{var T=Kz(c);this.on("showchild",T.show),this.on("hidechild",T.hide)}var e=Pi(s,"background",void 0),d=Pi(s,"panel",void 0),g=Pi(s,"leftSide",void 0),r=Pi(s,"rightSide",void 0),a=Pi(s,"topSide",void 0),h=Pi(s,"bottomSide",void 0);if(e&&this.addBackground(e),d&&this.add(d,"panel","center",0,!0),g){var n=Pi(s,"expand.left",!0);this.add(g,"leftSide","left-top",0,{height:n})}if(r){var n=Pi(s,"expand.right",!0);this.add(r,"rightSide","right-top",0,{height:n})}if(a){var n=Pi(s,"expand.top",!0);this.add(a,"topSide","left-top",0,{width:n})}if(h){var n=Pi(s,"expand.bottom",!0);this.add(h,"bottomSide","left-bottom",0,{width:n})}}reset(){return this.previousChildKey=void 0,this.currentChildKey="panel",this.showChild("panel",!0),this.hideChild("leftSide",!0),this.hideChild("rightSide",!0),this.hideChild("topSide",!0),this.hideChild("bottomSide",!0),this}}Object.assign(hp.prototype,Zz,oT);xt.register("sides",function(i){var t=new hp(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.Sides",hp);var tY=function(i){var t=!0;return i.hasOwnProperty("accept")||(t=!1,console.error(`[Tweaker] Can't register inputHandler '${i.name}', missing 'accept' callback.`)),i.hasOwnProperty("build")||(t=!1,console.error(`[Tweaker] Can't register inputHandler '${i.name}', missing 'build' callback.`)),t&&this.inputHandlers.unshift(i),this};const eY=Phaser.Utils.Array.GetFirst,iY=Phaser.Utils.Array.Remove;var sY=function(i){var t=eY(this.inputHandlers,"name",i);return t&&iY(this.inputHandlers,t),this};class lT extends tr{constructor(t,s){s=zv(t,s),super(t,s),this.type="rexTweaker.Title"}setTitle(t){return t=t?zi(t):{},t.hasOwnProperty("text")||(t.hasOwnProperty("title")?t.text=t.title:t.text=""),this.resetDisplayContent(t),this}}class nY extends lT{constructor(t,s){s===void 0&&(s={}),super(t,s),this.type="rexTweaker.FolderTitle";var c=new lu(t,s.expandedIcon);t.add.existing(c),this.addSpace().add(c,{proportion:0,expand:!1,padding:1,fitRatio:1}),this.addChildrenMap("expandedIcon",c)}setExpandedState(t){t===void 0&&(t=!0);var s=t?"down":"right",c=this.childrenMap.expandedIcon;return c.setDirection(s),this}}var hT=function(i,t){var s=new cp(i,t);return i.add.existing(s),s},up=function(i,t,s){return ts(i,s)};const rY={setBindingTarget(i){var t=this.childrenMap.child;return t.setBindingTarget(i),this}},aY={getMaxInputRowTitleWidth(){var i=this.childrenMap.child,t=i.getMaxInputRowTitleWidth();return t+this.getInnerPadding("left")},setInputRowTitleWidth(i){i-=this.getInnerPadding("left");var t=this.childrenMap.child;return t.setInputRowTitleWidth(i),this}};class uT extends Yu{constructor(t,s){super(t,s),this.type="rexTweaker.Folder"}setTitle(t){var s=this.childrenMap.title;return s.setTitle(t),this}}Object.assign(uT.prototype,rY,aY);const Ca=Phaser.Utils.Objects.GetValue;var oY=function(i,t,s){var c=Ca(s,"title")||{},C=new nY(i,c);i.add.existing(C),C.on("folder.expand",function(){C.setExpandedState(!0)}).on("folder.collapse",function(){C.setExpandedState(!1)});var S={root:Ca(s,"root"),styles:Ca(s,"tweaker"),space:Ca(s,"space")||{}},l=hT(i,S),T=Ca(s,"background"),e=up(i,t,T),d=new uT(i,{orientation:1,title:C,child:l,background:e,transition:{duration:Ca(s,"transition.duration",200)}});return i.add.existing(d),d};const cx=Phaser.Utils.Objects.GetValue;var lY=function(i){var t=this.scene,s=cx(this.styles,"folder")||{};s.tweaker=this.styles,s.root=this.root;var c=oY(t,i,s);delete s.tweaker,delete s.root,this.add(c,{expand:!0}),c.setTitle(i);var C=cx(i,"expanded",!0);C?c.expand(0):c.collapse(0);var S=c.getElement("child");return i.key&&this.root.addChildrenMap(i.key,S),S};const hY={setBindingTarget(i){for(var t=this.childrenMap.pages.children,s=0,c=t.length;s<c;s++)t[s].setBindingTarget(i);return this}},uY={getMaxInputRowTitleWidth(){for(var i=0,t=this.childrenMap.pages.children,s=0,c=t.length;s<c;s++)i=Math.max(i,t[s].getMaxInputRowTitleWidth());return i+this.getInnerPadding("left")},setInputRowTitleWidth(i){i-=this.getInnerPadding("left");for(var t=this.childrenMap.pages.children,s=0,c=t.length;s<c;s++)t[s].setInputRowTitleWidth(i);return this}};
6423class dT extends zu{constructor(t,s){super(t,s),this.type="rexTweaker.TabPages"}}Object.assign(dT.prototype,hY,uY);const gh=Phaser.Utils.Objects.GetValue;var dY=function(i,t,s){var c=new dT(i,s);i.add.existing(c);for(var C=gh(s,"tab"),S={root:gh(s,"root"),styles:gh(s,"tweaker")},l=gh(t,"pages")||[],T=0,e=l.length;T<e;T++){var d=l[T];c.addPage({key:d.title,tab:es(i,C).setActiveState(!1).resetDisplayContent({text:d.title}),page:hT(i,S)})}return c.on("tab.focus",function(g,r){g.setActiveState(!0)}).on("tab.blur",function(g,r){g.setActiveState(!1)}),c};const fx=Phaser.Utils.Objects.GetValue;var cY=function(i){var t=this.scene,s=fx(this.styles,"tab")||{};s.tweaker=this.styles,s.root=this.root;var c=dY(t,i,s);delete s.tweaker,delete s.root,this.add(c,{expand:!0});for(var C=fx(i,"pages")||[],S=[],l=0,T=0,e=C.length;T<e;T++){var d=c.getPage(T),g=C[T].show;g&&(l=T);var r=C[T].key;r&&this.root.addChildrenMap(r,d),S.push(d)}return c.swapPage(l,0),S};const fY={setupBinding(){var i=this.childrenMap.inputField;return i.on("valuechange",function(t){!this.bindingTarget||!this.autoUpdateEnable||(this.bindingTarget[this.bindTargetKey]=t)},this),this},setAutoUpdateEnable(i){return i===void 0&&(i=!0),this.autoUpdateEnable=i,this},setBindingTarget(i,t){return this.bindingTarget=i,t!==void 0&&this.setBindingTargetKey(t),this.syncTargetValue(),this},setBindingTargetKey(i){return this.bindTargetKey=i,this},syncTargetValue(){if(!this.bindingTarget||!this.bindTargetKey)return this;var i=this.childrenMap.inputField;return i.syncValue(this.bindingTarget[this.bindTargetKey]),this}},vY={startMonitorTarget(){return this.isMonitoring?this:(this.isMonitoring=!0,this.scene.events.on("postupdate",this.onMonitorTarget,this),this)},stopMonitorTarget(){return this.isMonitoring?(this.isMonitoring=!1,this.scene.events.off("postupdate",this.onMonitorTarget,this),this):this},onMonitorTarget(){if(this.bindingTarget){var i=this.bindingTarget[this.bindTargetKey],t=this.childrenMap.inputField;t.value!==i&&t.syncValue(i)}}},pY={getMinTitleWidth(){var i=this.childrenMap.title;if(!i||i.orientation!==0)return 0;var t=i.rexSizer.padding,s=this.getChildWidth(this.childrenMap.title)+t.left+t.right;return s+this.getInnerPadding("left")},setMinTitleWidth(i){var t=this.childrenMap.title;if(!t||t.orientation!==0)return this;var s=t.rexSizer.padding;return i-=s.left+s.right,t.minWidth=i,this}},Lc=Phaser.Utils.Objects.GetValue;class dp extends ee{constructor(t,s){super(t,s),this.type="rexTweaker.InputRow",this.bindingTarget=void 0,this.bindTargetKey=void 0,this.autoUpdateEnable=!0;var c=s.inputTitle,C=s.inputField,S=s.background,d=Lc(s,"proportion.title",0),l=Lc(s,"space.title",0),T;this.orientation===0?T={right:l}:T={bottom:l},this.add(c,{proportion:d,expand:!0,padding:T});var e=s.parentOrientation===1?1:0,d=Lc(s,"proportion.inputField",e);this.add(C,{proportion:d,expand:!0}),S&&this.addBackground(S),this.addChildrenMap("title",c),this.addChildrenMap("inputField",C),this.addChildrenMap("background",S),this.setupBinding()}destroy(t){!this.scene||this.ignoreDestroy||(this.stopMonitorTarget(),super.destroy(t))}setTitle(t){var s=this.childrenMap.title;return s.setTitle(t),this}preLayout(){var t=this.childrenMap.title;t&&(t.minWidth=0),super.preLayout()}}Object.assign(dp.prototype,fY,vY,pY);var cT=function(i,t,s){var c=new lT(i,s);return i.add.existing(c),c},mY=function(i){i===void 0&&(i=ee);class t extends i{get bindingTarget(){return this.getParentSizer().bindingTarget}get bindingKey(){return this.getParentSizer().bindTargetKey}get value(){return this._value}validate(c){return this.syncValueFlag||!this.validateCallback?!0:this.validateCallback(c,this._value,this.bindingTarget,this.bindingKey)}getFotmatText(c){return this.textFormatCallback?c=this.textFormatCallback(c):c=c.toString(),c}
6423set value(c){if(this._value!==c&&(this.validate(c)||(c=this._value),this.displayValueCallback&&this.displayValueCallback(this,c),this._value!==c)){var C=this._value;this._value=c,this.syncValueFlag||this.emit("valuechange",c,C,this.bindingTarget,this.bindingKey)}}getValue(){return this.value}setValue(c){return this.value=c,this}syncValue(c){return this.syncValueFlag=!0,this.value=c,this.syncValueFlag=!1,this}setup(c,C){return C===void 0&&(C=!1),(C||c.hasOwnProperty("format"))&&this.setTextFormatCallback(c.format),(C||c.hasOwnProperty("onValidate"))&&this.setValidateCallback(c.onValidate),this.setupCallback&&this.setupCallback(this,c,C),this}setSetupCallback(c){return this.setupCallback=c,this}setDisplayValueCallback(c){return this.displayValueCallback=c,this}setTextFormatCallback(c){return this.textFormatCallback=c,this}setValidateCallback(c){return this.validateCallback=c,this}}return t},gY=function(i,t,s){for(var c,C=this.inputHandlers,S=0,l=C.length;S<l;S++){var T=C[S];if(T.accept(t)){var e=mY(T.baseClass);c=new e(i),i.add.existing(c),c.setSetupCallback(T.setup).setDisplayValueCallback(T.displayValue),T.build(c,s);break}}return c&&c.setup(t,!0),c};const vx=Phaser.Utils.Objects.GetValue;var xY=function(i,t,s){var c=gY.call(this,i,t,s);if(!c)return null;var C=vx(s,"title")||{},S=cT(i,t,C),l=vx(s,"background")||{},T=ts(i,l),e=new dp(i,{...t,...s,inputTitle:S,inputField:c,background:T});return i.add.existing(e),e.setTitle(t),e},yY=function(i,t,s){arguments.length===1?(s=i,i=s.bindingTarget,t=s.bindingKey):(s===void 0&&(s={}),s.bindingTarget=i,s.bindingKey=t),s.title||(s.title=t),s.bindingTarget&&s.bindingKey?s.value=s.bindingTarget[s.bindingKey]:s.value=void 0;var c=this.styles.inputRow||{};c.parentOrientation=this.styles.orientation;var C=xY.call(this,this.scene,s,c);if(!C)return console.error(`[Tweaker] Can't add Input 6424 title: ${s.title} 6425 view: ${s.view} 6426`),this;var S=C.childrenMap.inputField,l;return this.orientation===1?l=0:(l=this.itemWidth>0?0:1,C.setMinWidth(this.itemWidth)),this.add(C,{proportion:l,expand:!0}),s.onValueChange&&S.on("valuechange",s.onValueChange),C.setAutoUpdateEnable(s.autoUpdate),C.setBindingTarget(i,t),s.monitor&&C.startMonitorTarget(),s.key&&this.root.addChildrenMap(s.key,C),this},CY=function(i,t){var s=new Qn(i,t);return i.add.existing(s),s},TY=function(i,t){var s=new _e(i,t);return i.add.existing(s),s};const Fc=Phaser.Utils.Objects.GetValue;var SY=function(i,t,s){for(var c=Fc(s,"title")||{},C=cT(i,t,c),S=t.buttons,l=Fc(s,"button")||{},T=[],e=0,d=S.length;e<d;e++){var g=es(i,l);T.push(g);var r=S[e];g.resetDisplayContent({text:r.label}),g.callback=r.callback}var a=TY(i,{buttons:T,expand:T.length===1}),h=Fc(s,"background")||{},n=CY(i,h),o=new dp(i,{...s,inputTitle:C,inputField:a,background:n});return i.add.existing(o),o.setTitle(t),a.on("button.click",function(f){f.callback(o.bindingTarget)}),o};const EY=Phaser.Utils.Objects.GetValue;var px=function(i){var t=this.scene;i===void 0&&(i={}),i.hasOwnProperty("label")&&(i.buttons=[{label:i.label,callback:i.callback}],delete i.label,delete i.callback);var s=i.bindingTarget;delete i.bindingTarget;var c=EY(this.styles,"inputRow")||{},C=SY(t,i,c);return this.add(C,{expand:!0}),s&&C.setBindingTarget(s),i.key&&this.root.addChildrenMap(i.key,C),this};const PY=Phaser.Utils.Objects.GetValue;var bY=function(i){var t=this.scene,s=PY(this.styles,"separator"),c=up(t,i,s);return this.add(c,{expand:!0}),this},MY=function(i){for(var t=this.sizerChildren,s=0,c=t.length;s<c;s++){var C=t[s];C.setBindingTarget&&C.setBindingTarget(i)}return this},wY=function(){for(var i=0,t=this.sizerChildren,s=0,c=t.length;s<c;s++){var C=t[s];C.rexSizer.hidden||(C.getMinTitleWidth?i=Math.max(i,C.getMinTitleWidth()):C.getMaxInputRowTitleWidth&&(i=Math.max(i,C.getMaxInputRowTitleWidth())))}return i+this.getInnerPadding("left")},AY=function(i){i-=this.getInnerPadding("left");for(var t=this.sizerChildren,s=0,c=t.length;s<c;s++){var C=t[s];C.rexSizer.hidden||(C.setMinTitleWidth?C.setMinTitleWidth(i):C.setInputRowTitleWidth&&C.setInputRowTitleWidth(i))}return this},RY={registerInputHandler:tY,removeInputHandler:sY,addFolder:lY,addTab:cY,addInput:yY,addButton:px,addButtons:px,addSeparator:bY,setBindingTarget:MY,getMaxInputRowTitleWidth:wY,setInputRowTitleWidth:AY};
6426const xh=Phaser.Utils.Objects.GetValue;class cp extends ee{constructor(t,s){if(s===void 0&&(s={}),s.orientation===void 0&&(s.orientation=1),super(t,s),this.type="rexTweakerShell",this.root=s.root||this,this.styles=xh(s,"styles")||{},this.styles.orientation=this.orientation,this.itemWidth=xh(this.styles,"itemWidth",0),this.root===this&&this.orientation===1){var c=xh(s,"inputRow.alignTitle");if(c===void 0){var C=xh(this.styles,"inputRow.proportion.title");c=!C}else c&&mt(this.styles,"inputRow.proportion.title",0);this.alignInputRowTitle=c}else this.alignInputRowTitle=!1,this.inputHandlers=this.root.inputHandlers;var S=up(t,void 0,s.background);S&&this.addBackground(S)}preLayout(){super.preLayout(),this.alignInputRowTitle&&this.setInputRowTitleWidth(this.getMaxInputRowTitleWidth())}}Object.assign(cp.prototype,RY);var OY=function(i,t){t===void 0&&(t=!0);var s=i.getElement("inputText");s.setReadOnly(t)};const LY={name:"TextInput",accept(i){return i.hasOwnProperty("view")?i.view==="string":typeof i.value=="string"},build(i,t){var s=i.scene;i.type="rexTweaker.TextInput";var c=t.inputText,C=ll(s,c);i.add(C,{proportion:1,expand:!0,key:"inputText"}),C.on("close",function(){i.setValue(C.value)})},setup(i,t,s){(s||t.hasOwnProperty("inputTextReadOnly"))&&OY(i,!!t.inputTextReadOnly)},displayValue(i,t){var s=i.getElement("inputText");s.setText(i.getFotmatText(t))}};var FY=function(i,t,s){s===void 0&&(s=!0),s?t=t?zi(t):{}:t||(t={});var c=new Xu(i,t);return i.add.existing(c),c},IY=function(i,t){t===void 0&&(t=!0);var s=i.getElement("inputText");s.setReadOnly(t)};const DY={name:"TextAreaInput",accept(i){return i.hasOwnProperty("view")?i.view==="textarea":!1},build(i,t){var s=i.scene;this.type="rexTweaker.TextAreaInput";var c=t.inputTextArea;c===void 0&&(c={}),c.hasOwnProperty("text")||(c.text=t.inputText),c.hasOwnProperty("slider")||(c.slider=t.slider);var C=FY(s,c);i.add(C,{proportion:1,expand:!0,key:"inputText"}),C.on("close",function(){i.setValue(C.value)})},setup(i,t,s){(s||t.hasOwnProperty("inputTextReadOnly"))&&IY(i,!!t.inputTextReadOnly)},displayValue(i,t){var s=i.getElement("inputText");s.setText(i.getFotmatText(t))}};var BY=function(i,t){t===void 0&&(t=!0);var s=i.getElement("inputText");s.setReadOnly(t)};const kY={name:"NumberInput",accept(i){return i.hasOwnProperty("view")?i.view==="number":typeof i.value=="number"},build(i,t){var s=i.scene;i.type="rexTweaker.NumberInput";var c=t.inputNumber||t.inputText,C=ll(s,c).setNumberInput();i.add(C,{proportion:1,expand:!0,key:"inputText"}),C.on("close",function(){i.setValue(C.value)})},setup(i,t,s){(s||t.hasOwnProperty("inputTextReadOnly"))&&BY(i,!!t.inputTextReadOnly)},displayValue(i,t){var s=i.getElement("inputText");s.setText(i.getFotmatText(t))}};var GY=function(i,t){var s=new Ka(i,t);return i.add.existing(s),s};const Ic=Phaser.Utils.Objects.GetValue,NY=Phaser.Math.Linear,VY=Phaser.Math.Snap.Floor;var zY=function(i,t,s,c){i.minValue=t,i.maxValue=s,i.step=c;var C=i.getElement("slider");C.setGap(c,t,s)},YY=function(i,t){t===void 0&&(t=!0);var s=i.getElement("inputText");s.setReadOnly(t)};const XY={name:"RangeInput",accept(i){return i.hasOwnProperty("view")?i.view==="range":typeof i.value=="number"&&i.hasOwnProperty("min")&&i.hasOwnProperty("max")},build(i,t){var s=i.scene;i.type="rexTweaker.RangeInput";var c=t.slider,C=i.orientation===0?"track.height":"track.width",S=Ic(c,C),l=GY(s,c),g=t.parentOrientation===1?2:0,r=Ic(t,"proportion.range.slider",g),T=S===void 0;i.add(l,{proportion:r,expand:T,key:"slider"});var e=t.inputNumber||t.inputText,d=ll(s,e).setNumberInput(),g=t.parentOrientation===1?1:0,r=Ic(t,"proportion.range.inputText",g);i.add(d,{proportion:r,expand:!0,key:"inputText"}),d.on("close",function(){i.setValue(d.value)}),l.on("valuechange",function(){var a=NY(i.minValue,i.maxValue,l.value);i.step&&(a=VY(a,i.step,i.minValue)),i.setValue(a)})},setup(i,t,s){(s||t.hasOwnProperty("max"))&&zY(i,t.min,t.max,t.step),(s||t.hasOwnProperty("inputTextReadOnly"))&&YY(i,!!t.inputTextReadOnly)},displayValue(i,t){var s=i.getElement("slider");s.setValue(t,i.minValue,i.maxValue);var c=i.getElement("inputText");c.setText("").setText(i.getFotmatText(t))}};var UY=function(i,t,s){s===void 0&&(s=!0),s?t=t?zi(t):{}:t||(t={});var c=new Uu(i,t);return i.add.existing(c),c};const WY={name:"ColorInput",accept(i){return i.hasOwnProperty("view")?i.view==="color":!1},build(i,t){var s=i.scene;i.type="rexTweaker.ColorInput";var c=t.colorInput,C=UY(s,c);i.add(C,{proportion:1,expand:!0,key:"colorInput"}),C.on("valuechange",function(S){i.setValue(S)})},displayValue(i,t){var s=i.getElement("colorInput");s.setValue(t)}};var HY=function(i,t){var s=new qf(i,t);return i.add.existing(s),s};const $Y={name:"CheckboxInput",accept(i){return i.hasOwnProperty("view")?i.view==="boolean":typeof i.value=="boolean"},build(i,t){var s=i.scene;i.type="rexTweaker.CheckboxInput";
6426var c=t.checkbox,C=HY(s,c),S=c.size;S!==void 0&&C.setSize(S,S);var l=S!==void 0?0:1;i.add(C,{proportion:0,expand:!1,fitRatio:l,key:"checkbox"}),C.on("valuechange",function(T){i.setValue(T)})},displayValue(i,t){var s=i.getElement("checkbox");s.setValue(t)}};var jY=function(i,t){var s=new _f(i,t);return i.add.existing(s),s};const KY={name:"ToggleSwitchInput",accept(i){return i.hasOwnProperty("view")?i.view==="toggleSwitch":!1},build(i,t){var s=i.scene;i.type="rexTweaker.ToggleSwitchInput";var c=t.toggleSwitch,C=jY(s,c),S=c.size;S!==void 0&&C.setSize(S,S);var l=S!==void 0?0:1;i.addSpace().add(C,{proportion:0,expand:!1,fitRatio:l,key:"toggleSwitch"}),C.on("valuechange",function(T){i.setValue(T)})},displayValue(i,t){var s=i.getElement("toggleSwitch");s.setValue(t)}};var ZY=function(i,t){t=NC(i,t);var s=new ol(i,t);return i.add.existing(s),s},fT=function(i,t){for(var s=0,c=i.length;s<c;s++){var C=i[s];if(C.value===t)return s}},JY=function(i,t){var s=fT(i,t);if(s!=null)return i[s].text},QY=function(i,t){var s=i.getElement("list");s.setOptions(t)};const qY={name:"ListInput",accept(i){return i.hasOwnProperty("view")?i.view==="list":i.hasOwnProperty("options")},build(i,t){var s=i.scene;i.type="rexTweaker.ListInput";var c=ZY(s,t.list);i.add(c,{proportion:1,expand:!0,key:"list"}),c.on("button.click",function(C,S,l,T,e,d){i.setValue(l.value)})},setup(i,t,s){(s||t.hasOwnProperty("options"))&&QY(i,t.options)},displayValue(i,t){var s=i.getElement("list"),c=JY(s.options,t);s.resetDisplayContent({text:c})}};var _Y=function(i,t){var s=new _e(i,t);return i.add.existing(s),s},tX=function(i,t){for(var s=0,c=i.length;s<c;s++){var C=i[s];C&&C.setActiveState(s===t)}};const eX=Phaser.Utils.Objects.GetValue;var iX=function(i,t){var s=i.getElement("list");s.options=t;var c=i.scene,C=s.buttonConfig;s.clearButtons(!0);for(var S=0,l=t.length;S<l;S++){var T=t[S],e=es(c,C).setActiveState(!1).resetDisplayContent({text:T.text});s.addButton(e)}};const sX={name:"ButtonsInput",accept(i){return i.hasOwnProperty("view")?i.view==="buttons":!1},build(i,t){var s=i.scene;i.type="rexTweaker.ButtonsInput";var c=t.button?zi(t.button):{},C=eX(c,"expand",!0);C&&(c.align="center"),delete c.expand;var S=_Y(s,{expand:C});S.buttonConfig=c,i.add(S,{proportion:1,expand:!0,key:"list"}),S.on("button.click",function(l,T,e,d){var g=S.options[T];g&&(i._selectedIndex=T,i.setValue(g.value),i._selectedIndex=void 0)})},setup(i,t,s){(s||t.hasOwnProperty("options"))&&iX(i,t.options)},displayValue(i,t){var s=i.getElement("list"),c=i._selectedIndex;c===void 0&&(c=fT(s.options,t)),tX(s.getElement("buttons"),c)}};var nX=function(){this.registerInputHandler(LY).registerInputHandler(DY).registerInputHandler(kY).registerInputHandler(XY).registerInputHandler(WY).registerInputHandler($Y).registerInputHandler(KY).registerInputHandler(qY).registerInputHandler(sX)};class vT extends cp{constructor(t,s){s===void 0&&(s={}),s.styles===void 0&&(s.styles={}),s.background=s.styles.background||{},s.space=s.styles.space||{},super(t,s),this.type="rexTweaker",this.inputHandlers=[],nX.call(this)}destroy(t){!this.scene||this.ignoreDestroy||(super.destroy(t),this.inputHandlers=void 0)}}xt.register("tweaker",function(i){var t=new vT(this.scene,i);return this.scene.add.existing(t),t});mt(window,"RexPlugins.UI.Tweaker",vT);xt.register("click",function(i,t){return new pn(i,t)});mt(window,"RexPlugins.UI.Click",pn);xt.register("clickOutside",function(i,t){return new Mv(i,t)});mt(window,"RexPlugins.UI.ClickOutside",Mv);xt.register("inTouching",function(i,t){return new Va(i,t)});mt(window,"RexPlugins.UI.InTouching",Va);xt.register("tap",function(i,t){return mn(i)||(t=i,i=this.scene),new mu(i,t)});mt(window,"RexPlugins.UI.Tap",mu);xt.register("press",function(i,t){return mn(i)||(t=i,i=this.scene),new gu(i,t)});mt(window,"RexPlugins.UI.Press",gu);xt.register("swipe",function(i,t){return mn(i)||(t=i,i=this.scene),new el(i,t)});mt(window,"RexPlugins.UI.Swipe",el);xt.register("pan",function(i,t){return mn(i)||(t=i,i=this.scene),new V1(i,t)});mt(window,"RexPlugins.UI.Pan",V1);var pT=function(i){for(var t=i.scene.input,s=t.manager,c=s.pointersTotal,C=s.pointers,S,l=0;l<c;l++)if(S=C[l],!(!S.primaryDown||t.getDragState(S)!==0||!$f(i,S)))return t.setDragState(S,1),t._drag[S.id]=[i],t.dragDistanceThreshold===0||t.dragTimeThreshold===0?(t.setDragState(S,3),t.processDragStartList(S)):t.setDragState(S,2),!0;return!1};
6426const yh=Phaser.Utils.Objects.GetValue,mx=Phaser.Math.Distance.Between,gx=Phaser.Math.RotateAroundDistance;class mT extends ke{constructor(t,s){super(t,{eventEmitter:!1}),this._enable=void 0,t.setInteractive(yh(s,"inputConfig",void 0)),this.resetFromJSON(s),this.boot()}resetFromJSON(t){return this.pointer=void 0,this.setEnable(yh(t,"enable",!0)),this.setAxisMode(yh(t,"axis",0)),this.setAxisRotation(yh(t,"rotation",0)),this}toJSON(){return{enable:this.enable,axis:this.axisMode,rotation:this.axisRotation}}boot(){var t=this.parent;t.on("dragstart",this.onDragStart,this),t.on("drag",this.onDrag,this),t.on("dragend",this.onDragEnd,this)}shutdown(t){this.isShutdown||(this.pointer=void 0,super.shutdown(t))}get enable(){return this._enable}set enable(t){if(this._enable!==t)return t||this.dragend(),this._enable=t,this.scene.input.setDraggable(this.parent,t),this}setEnable(t){return t===void 0&&(t=!0),this.enable=t,this}toggleEnable(){return this.setEnable(!this.enable),this}setAxisMode(t){return typeof t=="string"&&(t=rX[t]),this.axisMode=t,this}setAxisRotation(t){return this.axisRotation=t,this}drag(){return pT(this.parent),this}dragend(){if(this.isDragging)return this.scene.input.setDragState(this.pointer,5),this}onDragStart(t,s,c){this.isDragging||(this.pointer=t)}onDrag(t,s,c){if(this.pointer===t){var C=this.parent;if(this.axisMode===0)C.x=s,C.y=c;else if(this.axisRotation===0)this.axisMode===1?C.x=s:this.axisMode===2&&(C.y=c);else{var S,l={x:s,y:c};S=mx(l.x,l.y,C.x,C.y),l=gx(l,C.x,C.y,-this.axisRotation,S),this.axisMode===1?l.y=C.y:this.axisMode===2&&(l.x=C.x),S=mx(l.x,l.y,C.x,C.y),l=gx(l,C.x,C.y,this.axisRotation,S),C.x=l.x,C.y=l.y}}}onDragEnd(t,s,c,C){this.pointer===t&&(this.pointer=void 0)}get isDragging(){return this.pointer!==void 0}}const rX={both:0,"h&v":0,"x&y":0,horizontal:1,h:1,x:1,vertical:2,v:2,y:2};xt.register("drag",function(i,t){return new mT(i,t)});mt(window,"RexPlugins.UI.Drag",mT);xt.register("pinch",function(i){return new z1(this.scene,i)});mt(window,"RexPlugins.UI.Pinch",z1);xt.register("rotate",function(i){return new Av(this.scene,i)});mt(window,"RexPlugins.UI.Rotate",Av);const aX=Phaser.Utils.Objects.IsPlainObject,xx=Phaser.Utils.Objects.GetValue;var yx=function(i,t,s){var c;if(i===void 0)i=s.texture.key,t=s.frame.name;else if(aX(i)){var C=i;i=xx(C,"key",s.texture.key),t=xx(C,"frame",s.frame.name)}else typeof i=="string"||(c=i);return c===void 0&&(c=function(S){S.setTexture(i,t)}),c};const Ro=Phaser.Utils.Objects.GetValue,oX=Phaser.Utils.Objects.GetAdvancedValue,lX=Phaser.Math.Linear;class gT extends Vr{constructor(t,s){super(t,s),this.resetFromJSON(s),this.boot()}resetFromJSON(t){return super.resetFromJSON(t),this.setDuration(oX(t,"duration",500)),this.setEase(Ro(t,"ease","Sine")),this.setOrientation(Ro(t,"orientation",0)),this.setFrontFace(Ro(t,"front",void 0)),this.setBackFace(Ro(t,"back",void 0)),this.setFace(Ro(t,"face",0)),this}setOrientation(t){return typeof t=="string"&&(t=hX[t]),this.orientation=t,this}get face(){return this._face}set face(t){typeof t=="string"&&(t=uX[t]),this._face=t,t===0&&this.frontFaceCallback?this.frontFaceCallback(this.parent):t===1&&this.backFaceCallback&&this.backFaceCallback(this.parent)}setFace(t){return this.face=t,this}toggleFace(){var t=this.face===0?1:0;return this.setFace(t),this}setFrontFace(t,s){return this.frontFaceCallback=yx(t,s,this.parent),this}setBackFace(t,s){return this.backFaceCallback=yx(t,s,this.parent),this}start(){if(this.timer.isRunning)return this;var t=this.parent;return this.orientation===0?this.scale0=t.scaleX:this.scale0=t.scaleY,this.timer.setDelay(this.delay).setDuration(this.duration/2).setRepeat(1),super.start(),this}flip(t){return this.isRunning?this:(t!==void 0&&this.setDuration(t),this.start(),this)}updateGameObject(t,s){s.justRestart&&this.toggleFace();var c=s.t;s.isOddIteration&&(c=1-c),c=this.easeFn(c);var C=lX(this.scale0,0,c);this.orientation===0?t.scaleX=C:t.scaleY=C}}const hX={x:0,horizontal:0,y:1,vertical:1},uX={front:0,back:1};xt.register("flip",function(i,t){return new gT(i,t)});mt(window,"RexPlugins.UI.Flip",gT);xt.register("shake",function(i,t){return new Cv(i,t)});mt(window,"RexPlugins.UI.Shake",Cv);xt.register("touchEventStop",function(i,t){return new fu(i,t)});mt(window,"RexPlugins.UI.TouchEventStop",fu);xt.register("perspective",function(i,t){return new _C(i,t)});mt(window,"RexPlugins.UI.Perspective",_C);
6426const xT=Phaser.Math.RotateAround;var Dc=function(i,t,s){var c=i.width/2,C=i.height/2;return di.x=t-c,di.y=s-C,xT(di,0,0,i.rotation),di.x*=i.scaleX,di.y*=i.scaleY,di.x+=i.x,di.y+=i.y,di},dX=function(i,t,s){var c=i.width/2,C=i.height/2;return di.x=t-i.x,di.y=s-i.y,di.x/=i.scaleX,di.y/=i.scaleY,xT(di,0,0,-i.rotation),di.x+=c,di.y+=C,di},di={x:0,y:0};class cX{constructor(t,s){this.parent=t,this.vertex=s,this._localX=void 0,this._localY=void 0}destroy(){this.parent=void 0,this.vertex=void 0}updateVertexPosition(t,s){var c=this.parent,C=c.height,S=c.frame.cutWidth/C/2,l=c.frame.cutHeight/C/2,T=t/C-S,e=s/C-l,d=this.vertex;return d.x=T,d.y=-e,c.forceUpdate(),this}get localX(){return this._localX}set localX(t){this.setLocalXY(t,this._localY)}get localY(){return this._localY}set localY(t){this.setLocalXY(this._localX,t)}get localXOrigin(){return this._localXOrigin}get localYOrigin(){return this._localYOrigin}resetLocalXY(t,s){return this._localXOrigin=t,this._localYOrigin=s,this._localX=t,this._localY=s,this}setLocalXY(t,s,c){return this._localX===t&&this._localY===s?this:(this._localX=t,this._localY=s,c||this.updateVertexPosition(t,s),this)}setWorldXY(t,s){if(this._worldX===t&&this._worldY===s)return this;var c=dX(this.parent,t,s);return this.setLocalXY(c.x,c.y),this}setPosition(t,s){return this.setWorldXY(t,s),this}getWorldXY(){return Dc(this.parent,this._localX,this._localY)}get x(){var t=Dc(this.parent,this._localX,this._localY);return t.x}set x(t){this.setWorldXY(t,this.y)}get y(){var t=Dc(this.parent,this._localX,this._localY);return t.y}set y(t){this.setWorldXY(this.x,t)}}const fX=Phaser.Geom.Mesh.Vertex,vX=Phaser.Geom.Mesh.Face;var pX=function(i){for(var t=i.isNinePointMode,s=t?9:4,c=i.vertices,C=i.faces,S=i.controlPoints,l=0;l<s;l++){var T=new fX;c.push(T),S.push(new cX(i,T))}var e;t?e=xX:i.fourPointsModeRTL?e=gX:e=mX;for(var l=0,d=e.length;l<d;l+=3){var g=c[e[l+0]],r=c[e[l+1]],a=c[e[l+2]];C.push(new vX(g,r,a))}t?(i.topLeft=S[0],i.topCenter=S[1],i.topRight=S[2],i.centerLeft=S[3],i.center=S[4],i.centerRight=S[5],i.bottomLeft=S[6],i.bottomCenter=S[7],i.bottomRight=S[8]):(i.topLeft=S[0],i.topRight=S[1],i.bottomLeft=S[2],i.bottomRight=S[3])};const mX=[0,2,3,0,3,1],gX=[1,3,2,1,2,0],xX=[0,3,4,0,4,1,1,4,2,4,5,2,3,6,4,6,7,4,4,7,8,4,8,5];var yX=function(i){var t,s=0,c=i.height,C=0,S=i.width;if(i.isNinePointMode){var l=(C+S)/2,T=(s+c)/2;t=[C,s,l,s,S,s,C,T,l,T,S,T,C,c,l,c,S,c]}else t=[C,s,S,s,C,c,S,c];return t};const CX=Phaser.Utils.Objects.IsPlainObject,Ta=Phaser.Utils.Objects.GetValue;let TX=class extends HC{constructor(t,s,c,C,S,l){CX(s)&&(l=s,s=Ta(l,"x",0),c=Ta(l,"y",0),C=Ta(l,"key",null),S=Ta(l,"frame",null)),super(t,s,c,C,S),this.type="rexQuadImage",this.isNinePointMode=Ta(l,"ninePointMode",!1),this.fourPointsModeRTL=Ta(l,"rtl",!1),this.controlPoints=[],pX(this),this.hideCCW=!1,this.syncSize()}destroy(t){if(!(!this.scene||this.ignoreDestroy)){super.destroy(t);for(var s=0,c=this.controlPoints.length;s<c;s++)this.controlPoints[s].destroy();this.controlPoints=void 0}}resetVerts(){this.dirtyCache[9]=-1;for(var t=yX(this),s=this.width,c=this.height,C=this.frame.cutWidth/c/2,S=this.frame.cutHeight/c/2,l=this.frame.u0,T=this.frame.u1,e=this.frame.v0,d=this.frame.v1,g=T-l,r=d-e,a=this.controlPoints,h=0,n=t.length;h<n;h+=2){var o=t[h+0],f=t[h+1],u=h/2,v=o/c-C,m=f/c-S,p=l+g*(o/s),x=e+r*(f/c);this.vertices[u].set(v,-m,0).setUVs(p,x),a[u].resetLocalXY(o,f)}return this}syncSize(){return this.setSizeToFrame(),this.setOrtho(this.width/this.height,1),this.resetVerts(),this}};Phaser.Utils.Objects.IsPlainObject;Phaser.Utils.Objects.GetValue;var Cx=function(i,t,s){t===void 0&&(t=0),s===void 0&&(s=0);for(var c=i.width,C=i.height,S=c*.5,l=C*.5,T=Math.tan(t)*l,e=Math.tan(s)*S,d=i.controlPoints,g=0,r=d.length;g<r;g++){var a=d[g],h=a.localXOrigin,n=a.localYOrigin;a.localX=h+(n>l?T:-T),a.localY=n+(h>S?e:-e)}};const SX=Phaser.Utils.Objects.IsPlainObject,Ch=Phaser.Utils.Objects.GetValue,Tx=Phaser.Math.DegToRad,Sx=Phaser.Math.RadToDeg;class EX extends TX{constructor(t,s,c,C,S){if(SX(s)){var l=s;s=Ch(l,"x",0),c=Ch(l,"y",0),C=Ch(l,"key",null),S=Ch(l,"frame",null)}super(t,s,c,C,S),this.type="rexSkewmage",this._skewX=0,this._skewY=0}get skewX(){return this._skewX}set skewX(t){this._skewX=t,Cx(this,this._skewX,this._skewY)}get skewXDeg(){return Sx(this._skewX)}set skewXDeg(t){this.skewX=Tx(t)}get skewY(){return this._skewY}set skewY(t){this._skewY=t,Cx(this,this._skewX,this._skewY)}get skewYDeg(){return Sx(this._skewY)}set skewYDeg(t){this.skewY=Tx(t)}setSkewX(t){return this.skewX=t,this}setSkewY(t){return this.skewY=t,this}setSkew(t,s){return s===void 0&&(s=t),this.skewX=t,this.skewY=s,this}setSkewXDeg(t){return this.skewXDeg=t,this}setSkewYDeg(t){return this.skewYDeg=t,this}setSkewDeg(t,s){return s===void 0&&(s=t),this.skewXDeg=t,this.skewYDeg=s,this}}
6426const PX=Phaser.Utils.Objects.IsPlainObject,Th=Phaser.Utils.Objects.GetValue;class bX extends EX{constructor(t,s,c,C,S){if(PX(s)){var l=s;s=Th(l,"x",0),c=Th(l,"y",0),C=Th(l,"width",32),S=Th(l,"height",32)}var T=ZC(t,C,S);super(t,s,c,T,null),this.type="rexSkewRenderTexture",this.rt=this.texture}destroy(t){!this.scene||this.ignoreDestroy||(super.destroy(t),this.rt.destroy(),this.rt=null)}}class yT extends qC(bX){get skewState(){return this.isRunning}}xt.register("skew",function(i,t){return new yT(i,t)});mt(window,"RexPlugins.UI.Skew",yT);xt.register("anchor",function(i,t){return new gv(i,t)});mt(window,"RexPlugins.UI.Anchor",gv);xt.register("textTyping",function(i,t){return new sp(i,t)});mt(window,"RexPlugins.UI.TextTyping",sp);xt.register("textPage",function(i,t){return new Nu(i,t)});mt(window,"RexPlugins.UI.TextPage",Nu);var wa=void 0,MX=function(i){i!==wa&&(wa!==void 0&&wa.close(),wa=i)},wX=function(i){i===wa&&(wa=void 0)};const on=Phaser.Utils.Objects.GetValue,AX=Phaser.Utils.Objects.Clone;var RX=function(i,t){t===void 0&&(t={}),t=AX(t);var s=i.scene,c=i.style,C=on(t,"backgroundColor",c.backgroundColor);C===null&&(C="transparent"),t.text=on(t,"text",i.text),t.fontFamily=on(t,"fontFamily",c.fontFamily),t.fontSize=on(t,"fontSize",c.fontSize),t.color=on(t,"color",c.color),t.backgroundColor=C,t.direction=on(t,"rtl",c.rtl)?"rtl":"ltr",t.align=on(t,"align",OX(c)),t.direction==="rtl"&&Vv(i)&&(t.align="right");var S=new Eu(s,i.x,i.y,on(t,"width",i.width),on(t,"height",i.height),t);S.setOrigin(i.originX,i.originY).setScrollFactor(i.scrollFactorX,i.scrollFactorY);var l=i.parentContainer;return l?l.add(S):s.add.existing(S),S},OX=function(i){return i.hasOwnProperty("align")?i.align:i.hasOwnProperty("halign")?i.halign:"left"},LX=function(i,t,s){return i.time.delayedCall(0,t,[],s)};const Sa=Phaser.Utils.Objects.GetValue,FX=Phaser.Utils.Objects.Merge;var IX=function(i,t){i===void 0&&(i={}),i=FX(i,this.openConfig),MX(this),Dr(i)&&(t=i,i=void 0);var s=Sa(i,"inputType",void 0);s===void 0&&(s=Sa(i,"type","text")),t===void 0&&(t=Sa(i,"onClose",void 0));var c=Sa(i,"onOpen",void 0),C=Sa(i,"onTextChanged",void 0);return this.inputText=RX(this.parent,i).on("textchange",function(S){var l=S.text;C?C(this.parent,l):this.parent.text=l},this).setFocus(),this.parent.setVisible(!1),this.onClose=t,Sa(i,"enterClose",s!=="textarea")&&this.scene.input.keyboard.once("keydown-ENTER",this.close,this),this.delayCall=LX(this.scene,function(){this.scene.input.once("pointerdown",this.close,this),c&&c(this.parent),this.emit("open",this.parent)},this),this},DX=function(){return wX(this),this.parent.setVisible(!0),this.inputText&&(this.inputText.destroy(),this.inputText=void 0),this.delayCall&&(this.delayCall.remove(),this.delayCall=void 0),this.scene.input.keyboard.off("keydown-ENTER",this.close,this),this.scene.input.off("pointerdown",this.close,this),this.onClose&&this.onClose(this.parent),this.emit("close",this.parent),this},BX={open:IX,close:DX};const kX=Phaser.Utils.Objects.GetValue;class Wu extends ke{constructor(t,s){super(t),this.inputText=void 0,this.onClose=void 0,this.delayCall=void 0,this.setOpenConfig(s);var c=kX(s,"clickEnable",!0);c&&t.on("pointerdown",function(){this.open()},this).setInteractive()}shutdown(t){this.isShutdown||(this.close(),super.shutdown(t))}setOpenConfig(t){return t===void 0&&(t={}),this.openConfig=t,this}get isOpened(){return this.inputText!==void 0}get text(){return this.isOpened?this.inputText.text:this.parent.text}}Object.assign(Wu.prototype,BX);var GX=function(i,t,s){return i._edit||(i._edit=new Wu(i,{clickEnable:!1})),i._edit.open(t,s),i._edit};xt.register("textEdit",function(i,t){return new Wu(i,t)});mt(window,"RexPlugins.UI.TextEdit",Wu);const Bc=65535;var zh=function(i,t,s){if(t==null)return i;if(t===0)return kc(i,0,s),i;var c=i.text.length;if(c===0)return kc(i,t,s),i;var C=Math.floor(t*1.5/c);s!==void 0&&C>s&&(C=Math.floor(s));for(var S={},l=Px(i,C,t,s,S),T=0;T<=Bc&&l!==0;T++){if(C+=l,C<0){C=0;break}l=Px(i,C,t,s,S)}return T===Bc&&console.warn(`FontSizeFit: Test count exceeds ${Bc}`),i.setFontSize(C),kc(i,t,s),i},Ex=function(i,t,s){return s[t]===void 0&&(i.setFontSize(t),s[t]={width:i.width,height:i.height}),s[t]},Px=function(i,t,s,c,C){var S=Ex(i,t,C),l=Ex(i,t+1,C),T;if(c!==void 0)if(S.height<=c&&l.height>c)T=0;else{if(S.height>c)return-1;T=Math.floor(c-S.height)}var e;if(S.width<=s&&l.width>s)return 0;if(S.width>s)return-1;var e=Math.floor(s-S.width);return T===void 0?e:Math.min(e,T)},kc=function(i,t,s){var c=i.style;c&&(c.fixedWidth=t,c.parent.width=t,s!==void 0&&(c.fixedHeight=s,c.parent.height=s),c.update(!1))};
6426const Gc=Phaser.Utils.Objects.GetValue;var NX=function(i,t){typeof t=="number"&&(t={minWidth:t});var s=Gc(t,"minWidth",0),c=Gc(t,"minHeight",0),C=Gc(t,"fitHeight",!1);return i._minWidth=s,i._minHeight=c,C?(i.runWidthWrap=function(S){return i.setFixedSize&&i.setFixedSize(0,0),i.setFontSize(1),i},i.resize=function(S,l){return zh(i,S,l),i}):(i.runWidthWrap=function(S){return i.setFixedSize&&i.setFixedSize(0,0),zh(i,S,void 0),i},i.resize=function(S,l){return i.width===S&&i.height===l||i.setFixedSize(S,l),i}),i};class CT extends Phaser.Plugins.ScenePlugin{constructor(t,s){super(t,s),this.add=new xt(t)}start(){var t=this.scene.events;t.on("destroy",this.destroy,this)}isInTouching(t,s,c,C){return t.visible?vu(t,s,c,C):!1}get viewport(){return Ha(this.scene,this.scene.cameras.main,!0)}}var VX={getParentSizer:as,getTopmostSizer:T1,hide:Nn,show:Gn,isShown:Tv,edit:GX,wrapExpandText:xC,fontSizeExpandText:NX,fontSizeResize:zh,setFontSizeToFitWidth:zh,waitEvent:nu,waitComplete:ri,delayPromise:q1,setChildrenInteractive:Rv,fadeIn:uu,fadeOutDestroy:du,easeMoveTo:O1,easeMoveFrom:L1,modal:Pv,modalPromise:$F,modalClose:k1,requestDrag:pT,openFileChooser:tC};Object.assign(CT.prototype,VX);const er=(i,t)=>{const s=At.DEBUG_ALPHA,c=At.TILE_SIZE;t.forEach(C=>{const S=i.add.rectangle(C.x*c,C.y*c,C.w*c,C.h*c,"0xc8c8c8",s).setOrigin(0,0);i.physics.add.existing(S),S.body.immovable=!0,i.physics.add.collider(i.player,S)})},ir=(i,t)=>{const s=At.DEBUG_ALPHA,c=At.TILE_SIZE;let C=null;function S(l,T,e,d){const g=t.find(r=>r.key===e);g&&g.cb&&g.cb(),d.isOverlaping=!0,C&&clearTimeout(C),C=setTimeout(()=>{d.isOverlaping=!1,g!=null&&g.offCb&&g.offCb(),clearTimeout(C),C=null},100)}t.forEach(l=>{const T=i.add.rectangle(l.x*c,l.y*c,l.w*c,l.h*c*.2,"0xa3v2c6",s).setOrigin(0,0),e=i.add.text(l.x*c,l.y*c,l.key,{fontSize:"13px",fontFamily:At.FONT});e.setOrigin(0),e.setAlpha(Pf?1:0),i.physics.add.existing(T),T.body.immovable=!0,i.physics.add.overlap(i.player,T,(d,g)=>S(d,g,l.key,i))})},ye=(i,t,s)=>{var c;(c=i.textTimer)==null||c.remove(),i.textTimer=null,i.scene.start(t,s),s!=null&&s.returnTo&&t!==jt.COLLEGE&&t!==jt.COLLEGE_2&&t!==jt.COLLEGE_3&&sessionStorage.setItem("playerPosition",JSON.stringify({x:s.returnTo.x*At.TILE_SIZE,y:(s.returnTo.y-.6)*At.TILE_SIZE}))},$r=()=>{const{getActualStage:i}=Te(),{stage:t}=i();switch(t){case 1:return jt.COLLEGE;case 2:return jt.COLLEGE_2;case 3:return jt.COLLEGE_3;default:return jt.COLLEGE}},Hu=(i,t,s)=>{const C=i.add.container(0,0),S=i.add.image(0,0,"btn_l").setOrigin(0,0).setDepth(1),l=i.add.image(t-25,0,"btn_r").setOrigin(0,0).setDepth(1),T=i.add.container(25,0),e=Math.ceil((t-25*2)/25);for(let g=0;g<e;g++){const r=i.add.sprite(g*25,0,"btn_c").setOrigin(0,0).setDepth(0);T.add(r)}const d=i.add.text(0,0,s,{fontSize:"24px",fill:"#000",fontFamily:At.FONT}).setOrigin(0,0);return d.x=t/2-d.width/2,d.y=d.height/2,C.add([S,T,l,d]),C.setInteractive(),C},Sh=Xh({x:0,y:0}),bx=Xh({x:0,y:0}),Mx=it(!1),Lh=it(""),Oo=it(null),Nc=()=>{Lh.value=""},zX=()=>({setActualPosition:(C,S,l,T,e)=>{if(Mx.value=!0,l!==Lh.value)return Lh.value=l,Oo.value=T,Sh.x=C,Sh.y=S,e()},updatePositionOnWin:()=>{Oo.value.player.x=bx.x,Oo.value.player.y=bx.y},updatePositionOnLose:()=>{Oo.value.player.x=Sh.x,Oo.value.player.y=Sh.y+50},cleanCanchaValue:()=>{Mx.value=!1,Lh.value=""}}),{setActualPosition:Ar}=zX(),fp=i=>{const t=i.make.tilemap({key:"map",tileHeight:At.TILE_SIZE,tileWidth:At.TILE_SIZE}),s=t.addTilesetImage("colegio_tp","colegio_tp");t.createLayer("ground",s,0,0),t.createLayer("walls",s,0,0),t.createLayer("buildings",s,0,0),t.createLayer("roof",s,0,0).setDepth(2)},vp=i=>{er(i,[{x:0,y:0,w:46,h:3},{x:0,y:3,w:1,h:29},{x:0,y:32,w:46,h:3},{x:1,y:28,w:20,h:1.3},{x:25,y:28,w:20,h:1.3},{x:45,y:3,w:1,h:29},{x:18,y:24,w:4,h:4},{x:24,y:24,w:4,h:4},{x:21,y:22,w:1,h:2},{x:24,y:22,w:1,h:2},{x:3,y:22,w:13,h:3},{x:3,y:25,w:3,h:.3},{x:7,y:25,w:3,h:.3},{x:11,y:25,w:3,h:.3},{x:15,y:25,w:1,h:.3},{x:3,y:16,w:13,h:3},{x:3,y:19,w:3,h:.3},{x:7,y:19,w:3,h:.3},{x:11,y:19,w:3,h:.3},{x:15,y:19,w:1,h:.3},{x:3,y:7,w:13,h:7},{x:3,y:14,w:6,h:.3},{x:11,y:14,w:5,h:.3},{x:3,y:3,w:3,h:1.3},{x:7,y:3,w:3,h:1.3},{x:11,y:3,w:3,h:1.3},{x:15,y:3,w:1,h:1.3},{x:3,y:3,w:13,h:1},{x:10,y:3,w:1,h:1.4},{x:19,y:14,w:8,h:3},{x:19,y:17,w:1,h:.3},{x:21,y:17,w:4,h:.3},{x:26,y:17,w:1,h:.3},{x:18,y:3,w:.1,h:2},{x:21,y:3,w:.1,h:2}
6426,{x:22,y:3,w:.1,h:2},{x:25,y:3,w:.1,h:2},{x:27,y:3,w:2,h:1.2},{x:30,y:4,w:13,h:5},{x:30,y:9,w:5,h:.3},{x:37,y:9,w:6,h:.3},{x:30,y:11,w:13,h:3},{x:30,y:14,w:5,h:.3},{x:37,y:14,w:6,h:.3},{x:30,y:16,w:13,h:3},{x:30,y:19,w:1,h:.3},{x:32,y:19,w:3,h:.3},{x:36,y:19,w:3,h:.3},{x:40,y:19,w:3,h:.3},{x:30,y:22,w:13,h:3},{x:30,y:25,w:1,h:.3},{x:32,y:25,w:3,h:.3},{x:36,y:25,w:3,h:.3},{x:40,y:25,w:3,h:.3},{x:17.5,y:6.5,w:11,h:5},{x:9,y:29,w:1,h:3},{x:35,y:29,w:1,h:3}])},pp=i=>{const t=()=>ye(i,jt.CLASSROOM,{returnTo:{x:6,y:26},locationName:"CLASSROOM_1"}),s=()=>ye(i,jt.CLASSROOM,{returnTo:{x:10,y:26},locationName:"CLASSROOM_2"}),c=()=>ye(i,jt.CLASSROOM,{returnTo:{x:14,y:26},locationName:"CLASSROOM_3"}),C=()=>ye(i,jt.CLASSROOM,{returnTo:{x:6,y:20},locationName:"CLASSROOM_4"}),S=()=>ye(i,jt.CLASSROOM,{returnTo:{x:10,y:20},locationName:"CLASSROOM_5"}),l=()=>ye(i,jt.CLASSROOM,{returnTo:{x:14,y:20},locationName:"CLASSROOM_6"}),T=()=>ye(i,jt.CLASSROOM,{returnTo:{x:31,y:20},locationName:"CLASSROOM_7"}),e=()=>ye(i,jt.CLASSROOM,{returnTo:{x:35,y:20},locationName:"CLASSROOM_8"}),d=()=>ye(i,jt.CLASSROOM,{returnTo:{x:39,y:20},locationName:"CLASSROOM_9"}),g=()=>ye(i,jt.CLASSROOM,{returnTo:{x:31,y:26},locationName:"CLASSROOM_10"}),r=()=>ye(i,jt.CLASSROOM,{returnTo:{x:35,y:26},locationName:"CLASSROOM_11"}),a=()=>ye(i,jt.CLASSROOM,{returnTo:{x:39,y:26},locationName:"CLASSROOM_12"}),h=()=>{var o;!((o=i.message)!=null&&o.isWriting)&&!i.isOverlaping&&Es(i,"La puerta está cerrada",{btns:[{text:"Cerrar",cb:()=>{bh(i)}}]})};ir(i,[{key:"classroom-1-1",x:6,y:25,w:1,h:1,cb:t},{key:"classroom-1-2",x:10,y:25,w:1,h:1,cb:s},{key:"classroom-1-3",x:14,y:25,w:1,h:1,cb:c},{key:"classroom-2-1",x:6,y:19,w:1,h:1,cb:C},{key:"classroom-2-2",x:10,y:19,w:1,h:1,cb:S},{key:"classroom-2-3",x:14,y:19,w:1,h:1,cb:l},{key:"classroom-3-1",x:31,y:19,w:1,h:1,cb:T},{key:"classroom-3-2",x:35,y:19,w:1,h:1,cb:e},{key:"classroom-3-3",x:39,y:19,w:1,h:1,cb:d},{key:"classroom-4-1",x:31,y:25,w:1,h:1,cb:g},{key:"classroom-4-2",x:35,y:25,w:1,h:1,cb:r},{key:"classroom-4-3",x:39,y:25,w:1,h:1,cb:a},{key:"bath-1",x:20,y:17,w:1,h:1,cb:()=>ye(i,jt.BATH,{returnTo:{x:22,y:20},locationName:"BATH_1"})},{key:"bath-2",x:25,y:17,w:1,h:1,cb:()=>ye(i,jt.BATH,{returnTo:{x:25,y:20},locationName:"BATH_2"})},{key:"gym",x:9,y:14,w:2,h:1,cb:()=>h(),offCb:()=>bh(i)},{key:"nursery-1",x:6,y:4,w:1,h:1,cb:()=>ye(i,jt.PRINCIPAL,{returnTo:{x:6,y:5},locationName:"PRINCIPAL"})},{key:"nursery-2",x:10,y:4,w:1,h:3,cb:()=>h(),offCb:()=>bh(i)},{key:"nursery-3",x:14,y:4,w:1,h:1,cb:()=>ye(i,jt.NURSERY,{returnTo:{x:14,y:5},locationName:"NURSERY"})},{key:"casino",x:35,y:9,w:2,h:1,cb:()=>ye(i,jt.CASINO,{returnTo:{x:36,y:10},locationName:"CASINO"})},{key:"library",x:35,y:14,w:2,h:1,cb:()=>ye(i,jt.LIBRARY,{returnTo:{x:35,y:15},locationName:"LIBRARY"})},{key:"kiosko",x:27,y:4,w:2,h:1.5,cb:()=>{const o=async()=>{console.log("CALL INTERACTION"),await qi(i,"kiosko",!0),await Qe(2),Nc()};Ar(i.player.x,i.player.y,"bottom",i,o)}},{key:"exit",x:22,y:28,w:2,h:1,cb:()=>{i.player.x=1472,i.player.y=1337.6}},{key:"entrance",x:22,y:21.9,w:2,h:1,cb:()=>{i.player.x=1472,i.player.y=1804.8}},{key:"cancha_bottom",x:17.5,y:11.4,w:11,h:1,cb:()=>{console.log("BOTTOM");const o=async()=>{console.log("CALL INTERACTION"),await qi(i,"cancha",!0)};Ar(i.player.x,i.player.y,"bottom",i,o)}},{key:"cancha_top",x:17.5,y:6.4,w:11,h:1,cb:()=>{console.log("TOP");const o=async()=>{console.log("CALL INTERACTION"),await qi(i,"cancha",!0)};Ar(i.player.x,i.player.y,"top",i,o)}},{key:"cancha_left",x:17.3,y:6.6,w:.2,h:24.2,cb:()=>{console.log("LEFT");const o=async()=>{console.log("CALL INTERACTION"),await qi(i,"cancha",!0)};Ar(i.player.x,i.player.y,"left",i,o)}},{key:"cancha_right",x:28.5,y:6.6,w:.2,h:24.2,cb:()=>{console.log("RIGHT");const o=async()=>{console.log("CALL INTERACTION"),await qi(i,"cancha",!0)};Ar(i.player.x,i.player.y,"right",i,o)}},{key:"cimarra-left",x:10,y:29,w:.2,h:15,cb:()=>{const o=async()=>{console.log("CALL INTERACTION"),await qi(i,"cimarra",!0),await Qe(2),Nc()};Ar(i.player.x,i.player.y,"right",i,o)}},{key:"cimarra-right",x:34.8,y:29,w:.2,h:15,cb:()=>{const o=async()=>{console.log("CALL INTERACTION"),await qi(i,"cimarra",!0),await Qe(2),Nc()};Ar(i.player.x,i.player.y,"left",i,o)}}])},mp=i=>{const t=i.cameras.main;t.width,t.height;const s=2944,c=2240;t.setBounds(0,0,s,c)},gp=i=>{const t=window.innerWidth,s=window.innerHeight,c=5,C=At.MESSAGE_OFFSET,S=i.add.container(0,0).setDepth(c),l=i.add.rectangle(0,0,100,100,"0x000000",.5),T={wordWrap:{width:t-C*3,useAdvancedWrap:!0},fontSize:"21px",fontFamily:At.FONT},e=i.add.text(C,C,"MENÃ",T).setDepth(10);l.setOrigin(0,0),S.add([l,e]),S.setScrollFactor(0),l.setPosition(0,0),l.height=e.height+C*2,l.width=e.width+C*2,S.x=t-C-l.width,S.y=s-C-l.height,i.input.on("pointerdown",d=>{Phaser.Geom.Rectangle.Contains(l.getBounds(),d.x,d.y)&&(ut.click&&ut.click(),i.isMovableClick=!1,i.showMenu(i))})},$u=i=>{const t=i.cameras.main,s=t.width,c=t.height;return{camera:t,screenWidth:s,screenHeight:c}},xp=i=>{const{logout:t}=os(),{userDataModalHandler:s}
6426=$s(i),c=window.innerWidth;if(i.isDisplayingMenu)return;console.log("MENU");const{screenWidth:C,screenHeight:S}=$u(i),l=5,T=c<500?c-20:500,e=i.add.container(C/2-T/2,S/2-150).setDepth(l),d=i.add.rectangle(0,0,T,270,"0x000000",0);d.setOrigin(0,0);const g=$h(i,d.width,d.height),r=YX(i,d),a=XX(i,d),h=UX(i,d);e.add([d,g,r,a,h]),e.setScrollFactor(0),e.setVisible(!0),i.menu=e,i.isDisplayingMenu=!0,i.input.on("pointerdown",n=>{i.isDisplayingMenu&&(Phaser.Geom.Rectangle.Contains(i.startBtn.getBounds(),n.x,n.y)&&(console.log("START"),ut.click&&ut.click(),re.bg&&re.bg(),t().then(()=>{i.menu.setVisible(!1),i.isDisplayingMenu=!1,ye(i,jt.MAIN)})),Phaser.Geom.Rectangle.Contains(i.closeBtn.getBounds(),n.x,n.y)&&(ut.click&&ut.click(),console.log("CLOSE MENU"),i.menu.setVisible(!1),i.isDisplayingMenu=!1),Phaser.Geom.Rectangle.Contains(i.profileBtn.getBounds(),n.x,n.y)&&(ut.click&&ut.click(),console.log("PROFILE"),s(!0),i.menu.setVisible(!1),i.isDisplayingMenu=!1))})};function YX(i,t){const s=i.add.container(30,110);return i.startBtn=Hu(i,t.width-80,"Cerrar Sesión"),s.add([i.startBtn]),s}function XX(i,t){const s=i.add.container(30,180);return i.closeBtn=Hu(i,t.width-80,"Cerrar Menú"),s.add([i.closeBtn]),s}function UX(i,t){const s=i.add.container(30,40);return i.profileBtn=Hu(i,t.width-80,"Mis Datos"),s.add([i.profileBtn]),s}function WX(i){i.lastPlayerPosition||(i.lastPlayerPosition={x:i.player.x,y:i.player.y}),i.time.addEvent({delay:2e4,callback:()=>{if(i.lastPlayerPosition){if(i.player.x===i.lastPlayerPosition.x&&i.player.y===i.lastPlayerPosition.y){console.log("NO MOVE");const t=i.add.image(i.player.x,i.player.y,"exclamacion").setDepth(11);i.time.delayedCall(500,()=>{t.setVisible(!1)})}i.lastPlayerPosition={x:i.player.x,y:i.player.y}}},loop:!0})}const{getActualStage:HX}=Te(),{showOptions:$X}=Xi(),Ln=it([]);function Vc(i,t){if(t.length<6)throw new Error("Not enough items to assign to locations");const c=Uh([...i]);return t.map((C,S)=>({...c[S],item:C}))}const De={college:"9080c",classroom1:"2311k",nursery:"6754n",food:"2233f",library:"9980l",bath1:"2311b"},jX=i=>{switch(i){case De.college:return"Patio General";case De.classroom1:return"Sala 2° A";case De.nursery:return"EnfermerÃa";case De.food:return"Casino";case De.library:return"Biblioteca";case De.bath1:return"Baño 1";default:return"Patio General"}},wx="savk",sr=i=>{const t=[{sc:De.college,x:10.3,y:30.1,item:"",i:0},{sc:De.college,x:34.3,y:31.6,item:"",i:1},{sc:De.college,x:34.5,y:25.6,item:"",i:2},{sc:De.college,x:42.5,y:19.6,item:"",i:3},{sc:De.college,x:44.6,y:3.1,item:"",i:4},{sc:De.college,x:25.1,y:3.1,item:"",i:5},{sc:De.college,x:16.1,y:3.2,item:"",i:6},{sc:De.college,x:1.8,y:9.8,item:"",i:7},{sc:De.college,x:15.7,y:19.7,item:"",i:8},{sc:De.college,x:8.7,y:25.2,item:"",i:9},{sc:De.classroom1,x:6,y:2,item:"",i:10},{sc:De.nursery,x:2,y:.7,item:"",i:11},{sc:De.food,x:9,y:.35,item:"",i:12},{sc:De.library,x:10.6,y:6.7,item:"",i:13},{sc:De.bath1,x:4.7,y:1.7,item:"",i:14}],s=["item_1","item_2","item_3","item_4","item_5","item_6"],c=HX(),C=localStorage.getItem(wx),S=C?JSON.parse(C):null,l={};if(s.forEach(T=>{l[T]=Ih(c.stage,T)}),!Ln.value.length&&!S){const T={1:Vc(t,s),2:Vc(t,s),3:Vc(t,s)};Ln.value=T[c.stage.toString()],localStorage.setItem(wx,JSON.stringify(T))}else!Ln.value.length&&S&&(Ln.value=S[c.stage.toString()]);Ln.value=Ln.value.filter(T=>{const e={...T};return l[e.item]&&l[e.item]==="off"}),console.log(Ln.value.map(T=>T.i).join(":")),i.delta=0,i.mult=-1,i.items=[],Ln.value.filter(T=>i.locationName===jX(T.sc)).forEach(T=>{if(T.item){const e=i.physics.add.sprite(T.x*64,T.y*64,T.item);e.setOrigin(0),e.setDepth(1),e.setInteractive(),e.setScale(.8),e.body.immovable=!0,i.items.push(e),i.physics.add.collider(i.player,e,()=>{e.destroy(),i.sound.play("item_snd"),yt(c.stage,T.item,"finished"),s.every(g=>Ih(c.stage,g)==="finished")&&(ut.quest&&ut.quest(),$X(!0)),Oa()})}})},nr=(i,t)=>{i.delta+=Math.floor(t),i.delta>500&&(i.delta=0,i.mult*=-1),i.items.forEach(s=>{s.active&&(i.mult===1?s.y=s.y+.05:s.y=s.y-.05)})},{getActualStage:KX,setStageNumber:ZX}=Te(),{showIcon:JX,setQuestStatus:QX,setNextFn:qX,showEpilogo:_X}=Xi(),{showInstructions:tU}=fn();class eU extends $e.Scene{constructor(){super({key:"CollegeScene"});rt(this,"gameSceneData",1);rt(this,"locationName","Patio General");rt(this,"player",null);
6426rt(this,"playerScale",At.PLAYER_SCALE);rt(this,"isPointerDown",!1);rt(this,"isPointerLeft",!1);rt(this,"isPointerRight",!1);rt(this,"isPointerTop",!1);rt(this,"isPointerBottom",!1);rt(this,"isMovableClick",!0);rt(this,"isDisplayingMenu",!1);rt(this,"initialPlayerPosition",{x:19,y:30});rt(this,"message",{container:null,background:null,text:null,isWriting:!1});rt(this,"textTimer",null);rt(this,"isOverlaping",!1);rt(this,"textStyle",{fontSize:"24px",fill:"#fff",fontFamily:At.FONT});rt(this,"characters",null);rt(this,"isDisplayingText",!1);rt(this,"ball",null)}init(s){s&&s.playerReturnTo&&(this.initialPlayerPosition.x=s.playerReturnTo.x,this.initialPlayerPosition.y=s.playerReturnTo.y-.6,console.log("RETURNED !"))}async create(){ls(this),console.log("CREATE !");const s=this;this.setCameraPosition(),this.cameras.main.setZoom(1),this.addMap(this),this.addPlayer(this),this.addMapCollision(this),this.movePlayerController(this),this.addMapOverlaps(this),Es(this,this.locationName).then(()=>{Ks(this,this.locationName)});const c=Rf();c?(this.player.setX(c.x),this.player.setY(c.y)):(this.player.setX(64*22),this.player.setY(64*29)),this.addMenuBtn(this),Ba(this,1),ai(this),he(!1),JX(!0);const{stage:C}=KX();QX(Un(C));const S=()=>(console.log("FINISH 1"),ZX(2),jh(2,!0),Oa().then(()=>{Zx(),re.bg&&re.bg(),_X(!1),s.scene.start(jt.COLLEGE_2)}));this.player.play("player_idle"),qX(S),this.anims.create({key:"pelota_anim",frames:[{key:"pelota_1"},{key:"pelota_2"},{key:"pelota_3"}],frameRate:10,repeat:-1}),this.ball=this.physics.add.sprite(64*18.8,64*10.5,"pelota_1"),this.ball.play("pelota_anim"),this.ball.setScale(.6),this.ball.setVelocity(100,-15),Hh(this),!Ia.bg&&ut.bg&&ut.bg(),localStorage.getItem("instructions1")!==Wh&&tU(1),this.add.image(64*16.5,64*3.5,"red_cross").setDepth(20),sr(this)}update(s,c){this.player&&this.movePlayer(this),Xa&&Le&&(console.log("UPDATED !"),this.characters&&(Object.values(this.characters).forEach(l=>{l&&l.destroy()}),this.characters=null),Ba(this,1),ai(this),he(!1));const C=64*18.8,S=64*24.8;this.ball.x>S?this.ball.setVelocity(-100,15):this.ball.x<C&&this.ball.setVelocity(100,-15),nr(this,c)}addMap(s){fp(s)}addPlayer(s){Zs(s)}movePlayerController(s){Js(s,!0)}movePlayer(s){Qs(s)}addMapCollision(s){vp(s)}addMapOverlaps(s){pp(s)}setCameraPosition(){mp(this)}addMenuBtn(s){gp(s)}cameraData(s){$u(s)}showMenu(s){xp(s)}}const{getActualStage:iU,setStageNumber:sU}=Te(),{showIcon:nU,setQuestStatus:rU,setNextFn:aU,showEpilogo:oU}=Xi(),{showInstructions:lU}=fn();class hU extends $e.Scene{constructor(){super({key:"CollegeScene2"});rt(this,"gameSceneData",2);rt(this,"locationName","Patio General");rt(this,"player",null);rt(this,"playerScale",At.PLAYER_SCALE);rt(this,"isPointerDown",!1);rt(this,"isPointerLeft",!1);rt(this,"isPointerRight",!1);rt(this,"isPointerTop",!1);rt(this,"isPointerBottom",!1);rt(this,"isMovableClick",!0);rt(this,"isDisplayingMenu",!1);rt(this,"initialPlayerPosition",{x:19,y:30});rt(this,"message",{container:null,background:null,text:null,isWriting:!1});rt(this,"textTimer",null);rt(this,"isOverlaping",!1);rt(this,"textStyle",{fontSize:"24px",fill:"#fff",fontFamily:At.FONT});rt(this,"characters",null);rt(this,"isDisplayingText",!1);rt(this,"ball",null);rt(this,"ball2",null)}init(s){s&&s.playerReturnTo&&(this.initialPlayerPosition.x=s.playerReturnTo.x,this.initialPlayerPosition.y=s.playerReturnTo.y-.6,console.log("RETURNED !"))}async create(){const s=this;console.log("CREATE 2!"),ls(this),this.setCameraPosition(),this.cameras.main.setZoom(1),this.addMap(this),this.addPlayer(this),this.addMapCollision(this),this.movePlayerController(this),this.addMapOverlaps(this),Es(this,this.locationName).then(()=>{Ks(this,this.locationName)});const c=Rf();c?(this.player.setX(c.x),this.player.setY(c.y)):(this.player.setX(64*29),this.player.setY(64*26)),this.addMenuBtn(this),Ba(this,2),ai(this),he(!1),nU(!0);const{stage:C}=iU();rU(Un(C)),this.anims.create({key:"pelota_anim",frames:[{key:"pelota_1"},{key:"pelota_2"},{key:"pelota_3"}],frameRate:10,repeat:-1}),this.ball=this.physics.add.sprite(64*20.8,64*13.5,"pelota_1"),this.ball.play("pelota_anim"),this.ball.setScale(.6),this.ball.setVelocityX(50),this.ball2=this.physics.add.sprite(64*18.8,64*10.5,"pelota_1"),this.ball2.play("pelota_anim"),this.ball2.setScale(.6),this.ball2.setVelocity(100,-15),Hh(this),!Ia.bg&&ut.bg&&ut.bg(),this.player.play("player_idle"),this.cameras.main.zoom=1,localStorage.getItem("instructions2")!==Wh&&lU(2),aU(()=>(console.log("FINISH 2"),sU(3),jh(3,!0),Oa().then(()=>{Zx(),re.bg&&re.bg(),oU(!1),s.scene.start(jt.COLLEGE_3)}))),this.add.image(64*16.5,64*3.5,"red_cross").setDepth(20),sr(this)}update(s,c){this.player&&this.movePlayer(this),Xa&&Le&&(console.log("UPDATED !"),this.characters&&(Object.values(this.characters).forEac
6426h(T=>{T&&T.destroy()}),this.characters=null),Ba(this,2),ai(this),he(!1)),nr(this,c),Fe(2,"soccer",[{str:"finished",n:1}])===1?(this.ball&&this.ball.destroy(),this.ball=null):this.ball&&(this.ball.x>1472?this.ball.setVelocityX(-50):this.ball.x<1331.2&&this.ball.setVelocityX(50));const S=64*18.8,l=64*24.8;this.ball2.x>l?this.ball2.setVelocity(-100,15):this.ball2.x<S&&this.ball2.setVelocity(100,-15)}addMap(s){fp(s)}addPlayer(s){Zs(s)}movePlayerController(s){Js(s,!0)}movePlayer(s){Qs(s)}addMapCollision(s){vp(s)}addMapOverlaps(s){pp(s)}setCameraPosition(){mp(this)}addMenuBtn(s){gp(s)}cameraData(s){$u(s)}showMenu(s){xp(s)}}const{getActualStage:uU}=Te(),{showIcon:dU,setQuestStatus:cU}=Xi(),{showInstructions:fU}=fn(),{setScene:vU}=os();class pU extends $e.Scene{constructor(){super({key:"CollegeScene3"});rt(this,"gameSceneData",3);rt(this,"locationName","Patio General");rt(this,"player",null);rt(this,"playerScale",At.PLAYER_SCALE);rt(this,"isPointerDown",!1);rt(this,"isPointerLeft",!1);rt(this,"isPointerRight",!1);rt(this,"isPointerTop",!1);rt(this,"isPointerBottom",!1);rt(this,"isMovableClick",!0);rt(this,"isDisplayingMenu",!1);rt(this,"initialPlayerPosition",{x:19,y:30});rt(this,"message",{container:null,background:null,text:null,isWriting:!1});rt(this,"textTimer",null);rt(this,"isOverlaping",!1);rt(this,"textStyle",{fontSize:"24px",fill:"#fff",fontFamily:At.FONT});rt(this,"characters",null);rt(this,"isDisplayingText",!1);rt(this,"ball",null);rt(this,"ball2",null)}init(s){s&&s.playerReturnTo&&(this.initialPlayerPosition.x=s.playerReturnTo.x,this.initialPlayerPosition.y=s.playerReturnTo.y-.6,console.log("RETURNED !"))}async create(){console.log("CREATE 3!"),vU(this),ls(this),this.setCameraPosition(),this.cameras.main.setZoom(1),this.addMap(this),this.addPlayer(this),this.addMapCollision(this),this.movePlayerController(this),this.addMapOverlaps(this),Es(this,this.locationName).then(()=>{Ks(this,this.locationName)});const c=Rf();c?(this.player.setX(c.x),this.player.setY(c.y)):(this.player.setX(64*29),this.player.setY(64*26)),this.addMenuBtn(this),Ba(this,3),ai(this),he(!1),dU(!0);const{stage:C}=uU();cU(Un(C)),this.anims.create({key:"pelota_anim",frames:[{key:"pelota_1"},{key:"pelota_2"},{key:"pelota_3"}],frameRate:10,repeat:-1}),this.ball2=this.physics.add.sprite(64*18.8,64*10.5,"pelota_1"),this.ball2.play("pelota_anim"),this.ball2.setScale(.6),this.ball2.setVelocity(100,-15),Hh(this),!Ia.bg&&ut.bg&&ut.bg(),this.player.play("player_idle"),this.cameras.main.zoom=1;const S=localStorage.getItem("instructions3");console.log(S),S!==Wh&&fU(3),this.checkIfHasMovement(this),sr(this),this.add.image(64*16.5,64*3.5,"red_cross").setDepth(20)}update(s,c){this.player&&this.movePlayer(this),Xa&&Le&&(console.log("UPDATED !"),this.characters&&(Object.values(this.characters).forEach(l=>{l&&l.destroy()}),this.characters=null),Ba(this,3),ai(this),he(!1)),nr(this,c);const C=64*18.8,S=64*24.8;this.ball2.x>S?this.ball2.setVelocity(-100,15):this.ball2.x<C&&this.ball2.setVelocity(100,-15)}addMap(s){fp(s)}addPlayer(s){Zs(s)}movePlayerController(s){Js(s,!0)}movePlayer(s){Qs(s)}addMapCollision(s){vp(s)}addMapOverlaps(s){pp(s)}setCameraPosition(){mp(this)}addMenuBtn(s){gp(s)}cameraData(s){$u(s)}showMenu(s){xp(s)}checkIfHasMovement(s){WX(s)}}const{getActualStage:mU}=Te();class gU extends $e.Scene{constructor(){super({key:"InnerClassroom"});rt(this,"locationName","");rt(this,"player",null);rt(this,"playerScale",At.PLAYER_SCALE);rt(this,"isPointerDown",!1);rt(this,"isPointerLeft",!1);rt(this,"isPointerRight",!1);rt(this,"isPointerTop",!1);rt(this,"isPointerBottom",!1);rt(this,"isMovableClick",!0);rt(this,"initialPlayerPosition",{x:2.2,y:5.2});rt(this,"playerReturnTo",{x:3.4,y:31});rt(this,"message",{container:null,background:null,text:null,isWriting:!1});rt(this,"textTimer",null)}init(s){if(s&&s.returnTo&&(this.playerReturnTo.x=s.returnTo.x,this.playerReturnTo.y=s.returnTo.y),s)switch(s.locationName){case"CLASSROOM_1":this.locationName="Sala 1° A";break;case"CLASSROOM_2":this.locationName="Sala 1° B";break;case"CLASSROOM_3":this.locationName="Sala 1° C";break;case"CLASSROOM_4":this.locationName="Sala 2° A";break;case"CLASSROOM_5":this.locationName="Sala 2° B";break;case"CLASSROOM_6":this.locationName="Sala 2° C";break;case"CLASSROOM_7":this.locationName="Sala 3° A";break;case"CLASSROOM_8":this.locationName="Sala 3° B";break;case"CLASSROOM_9":this.locationName="Sala 3° C";break;case"CLASSROOM_10":this.locationName="Sala 4° A";break;case"CLASSROOM_11":this.locationName="Sala 4° B";break;case"CLASSROOM_12":this.locationName="Sala 4° C";break;default:this.locationName="Sala de Clases"}}loadChars(){const{stage:s}=mU();s===1&&(this.locationName==="Sala 2° C"&&se(this,{status:"idle",name:"profesor_1",x:.4,y:1.5}),this.locationName==="Sala 3° A"&&se(this,{status:"idle",name:"profe_vero",x:3.5,y:2.5}),this.locationName==="Sala 4° A"&&se(this,{status:"idle",name:"estudiante_h_5",x:4.2,y:1.5}),this.locationName==="Sala 1° B"&&se(this,{status:"idle",name:"estudiante_h_1",x:1.9,y:3})),s===2&&this.locationName==="Sala 2° A"&&(Ih(2,"h_1")!=="finished"&&se(this,{status:"idle",name:"profesor_1",x:.4,y:3}),se(this,{status:"idle",name:"estudiante_h_1",x:2,y:2}),se(this,{status:"idle",name:"estudiante_h_2",x:.5,y:2}),se(this,{status:"idle",name:"estudiante_h_3",x:1,y:2}),se(this,{status:"idle",name:"estudiante_h_4",x:1.5,y:2.2}),se(this,{status:"idle",name:"estudiante_h_5",x:2,y:2.8}),ai(this)),s===3&&this.locationName==="Sala 1° B"&&(se(this,{status:"idle",name:"profe_vero",x:.4,y:3}),ai(this))}create(){ls(this),this.cameras.main.setZoom(1),this.addMap(this),this.addPlayer(this),this.movePlayerController(this),this.addMapCollision(this),this.addMapOverlaps(this),this.characters={},this.loadChars(),Es(this,this.locationName),Ks(this,this.locationName),this.player.play("player_idle"),sr(this),this.add.image(1.5*At.TILE_SIZE,5.5*At.TILE_SIZE,"class_entry")}update(){this.movePlayer(this),Xa&&Le&&this.locationName==="Sala 2° A"&&(console.log("UPDATED !"),this.characters&&(Object.values(this.characters).forEac
6426h(s=>{s&&s.destroy()}),this.characters={},this.loadChars()),he(!1),nr(this,delta))}addMap(s){const c=s.make.tilemap({key:"classroom_map",tileHeight:At.TILE_SIZE,tileWidth:At.TILE_SIZE}),C=c.addTilesetImage("sala_interior","sala_tp");c.createLayer("ground",C,0,0),c.createLayer("tables",C,0,0)}addPlayer(s){Zs(s)}movePlayerController(s){Js(s)}movePlayer(s){Qs(s)}addMapCollision(s){er(s,[{x:-1,y:0,w:1,h:6},{x:-1,y:6,w:7,h:1},{x:0,y:1,w:7,h:1},{x:7,y:2,w:1,h:1},{x:4,y:3,w:3,h:4},{x:1,y:3,w:1,h:1}])}addMapOverlaps(s){ir(s,[{key:"exit-classroom",x:1,y:5.7,w:.5,h:1,cb:()=>ye(s,$r(),{playerReturnTo:this.playerReturnTo})}])}}Te();class xU extends $e.Scene{constructor(){super({key:"LibraryScene"});rt(this,"locationName","Biblioteca");rt(this,"player",null);rt(this,"playerScale",At.PLAYER_SCALE);rt(this,"isPointerDown",!1);rt(this,"isPointerLeft",!1);rt(this,"isPointerRight",!1);rt(this,"isPointerTop",!1);rt(this,"isPointerBottom",!1);rt(this,"isMovableClick",!0);rt(this,"initialPlayerPosition",{x:6.2,y:6.2});rt(this,"playerReturnTo",{x:36,y:15});rt(this,"message",{container:null,background:null,text:null,isWriting:!1});rt(this,"textTimer",null)}init(s){s&&s.returnTo&&(this.playerReturnTo.x=s.returnTo.x,this.playerReturnTo.y=s.returnTo.y)}create(){ls(this),this.addMap(this),this.addPlayer(this),this.movePlayerController(this),this.addMapCollision(this),this.addMapOverlaps(this),Es(this,this.locationName),Ks(this,this.locationName),this.player.play("player_idle"),this.characters={},this.loadChars(),sr(this),this.add.image(5.5*At.TILE_SIZE,6.5*At.TILE_SIZE,"library_entry")}loadChars(){se(this,{status:"idle",name:"estudiante_h_6",x:3.7,y:3.9}),se(this,{status:"idle",name:"estudiante_h_7",x:2.7,y:.9}),se(this,{status:"idle",name:"estudiante_h_8",x:5.7,y:2}),se(this,{status:"idle",name:"estudiante_h_9",x:4.2,y:2.1}),se(this,{status:"idle",name:"estudiante_h_10",x:10.3,y:2.9}),ai(this)}update(s,c){this.movePlayer(this),nr(this,c)}addMap(s){var S;const c=s.make.tilemap({key:"biblio_map",tileHeight:At.TILE_SIZE,tileWidth:At.TILE_SIZE}),C=c.addTilesetImage("biblio_tp","biblio_tp");c.createLayer("ground",C,0,0),(S=c.createLayer("meson",C,0,0))==null||S.setDepth(2),c.createLayer("mesas",C,0,0),c.createLayer("estantes",C,0,0)}addPlayer(s){Zs(s)}movePlayerController(s){Js(s)}movePlayer(s){Qs(s)}addMapCollision(s){er(s,[{x:1,y:3,w:2,h:2.3},{x:8,y:3,w:2,h:2.3},{x:0,y:2,w:11,h:1},{x:-1,y:-1,w:13,h:1},{x:-1,y:7,w:13,h:1},{x:-1,y:0,w:1,h:7},{x:11,y:0,w:1,h:7}])}addMapOverlaps(s){ir(s,[{key:"exit-classroom",x:5,y:6.7,w:.5,h:1,cb:()=>ye(s,$r(),{playerReturnTo:this.playerReturnTo})}])}}class yU extends $e.Scene{constructor(){super({key:"BathScene"});rt(this,"locationName","Baño");rt(this,"player",null);rt(this,"playerScale",At.PLAYER_SCALE);rt(this,"isPointerDown",!1);rt(this,"isPointerLeft",!1);rt(this,"isPointerRight",!1);rt(this,"isPointerTop",!1);rt(this,"isPointerBottom",!1);rt(this,"isMovableClick",!0);rt(this,"initialPlayerPosition",{x:3.2,y:5.2});rt(this,"playerReturnTo",{x:3,y:30});rt(this,"message",{container:null,background:null,text:null,isWriting:!1});rt(this,"textTimer",null);rt(this,"items",[])}init(s){if(s&&s.returnTo&&(this.playerReturnTo.x=s.returnTo.x,this.playerReturnTo.y=s.returnTo.y),s)switch(s.locationName){case"BATH_1":this.locationName="Baño 1";break;case"BATH_2":this.locationName="Baño 2";break;default:this.locationName="Baño"}}create(){ls(this),this.addMap(this),this.addPlayer(this),this.movePlayerController(this),this.addMapCollision(this),this.addMapOverlaps(this),Es(this,this.locationName),Ks(this,this.locationName),this.player.play("player_idle"),this.items=[],this.locationName==="Baño 1"&&sr(this)}update(s,c){this.movePlayer(this),nr(this,c)}addMap(s){var S;const c=s.make.tilemap({key:"bano_map",tileHeight:At.TILE_SIZE,tileWidth:At.TILE_SIZE}),C=c.addTilesetImage("bano_tp","bano_tp");c.createLayer("ground",C,0,0),(S=c.createLayer("upper",C,0,0))==null||S.setDepth(2)}addPlayer(s){Zs(s)}movePlayerController(s){Js(s)}movePlayer(s){Qs(s)}addMapCollision(s){er(s,[{x:0,y:.5,w:5,h:1},{x:-1,y:-1,w:7,h:1},{x:-1,y:6,w:7,h:1},{x:-1,y:0,w:1,h:6},{x:5,y:0,w:1,h:6},{x:0,y:2.5,w:1,h:1.5},{x:4,y:2.5,w:1,h:1.5},{x:4,y:2.5,w:1,h:1.5},{x:0,y:5.4,w:1,h:.6},{x:4,y:5.4,w:1,h:.6}])}addMapOverlaps(s){ir(s,[{key:"exit-classroom",x:2,y:5.7,w:.5,h:1,cb:()=>ye(s,$r(),{playerReturnTo:this.playerReturnTo})}])}}const{getActualStage:CU}=Te();class TU extends $e.Scene{constructor(){super({key:"CasinoScene"});rt(this,"locationName","Casino");rt(this,"player",null);
6426rt(this,"playerScale",At.PLAYER_SCALE);rt(this,"isPointerDown",!1);rt(this,"isPointerLeft",!1);rt(this,"isPointerRight",!1);rt(this,"isPointerTop",!1);rt(this,"isPointerBottom",!1);rt(this,"isMovableClick",!0);rt(this,"initialPlayerPosition",{x:5.2,y:5.2});rt(this,"playerReturnTo",{x:36,y:10});rt(this,"message",{container:null,background:null,text:null,isWriting:!1});rt(this,"textTimer",null)}init(s){s&&s.returnTo&&(this.playerReturnTo.x=s.returnTo.x,this.playerReturnTo.y=s.returnTo.y)}create(){ls(this),this.addMap(this),this.addPlayer(this),this.movePlayerController(this),this.addMapCollision(this),this.addMapOverlaps(this),Es(this,this.locationName),Ks(this,this.locationName),this.player.play("player_idle"),this.characters={},this.loadChars(),sr(this),this.add.image(5.5*At.TILE_SIZE,6.5*At.TILE_SIZE,"casino_entry")}loadChars(){const{stage:s}=CU();s===1?(se(this,{status:"idle",name:"alex",x:5.1,y:1.4}),ai(this)):s===2?(se(this,{status:"idle",name:"xime",x:1.1,y:3}),se(this,{status:"idle",name:"nora",x:2.1,y:3.4}),ai(this)):s===3&&(se(this,{status:"idle",name:"estudiante_h_1",x:1.3,y:2.9}),se(this,{status:"idle",name:"estudiante_h_2",x:.9,y:2.5}),se(this,{status:"idle",name:"estudiante_h_3",x:1.2,y:2}),se(this,{status:"idle",name:"estudiante_h_4",x:4.2,y:1.9}),se(this,{status:"idle",name:"estudiante_h_5",x:9,y:.6}),ai(this))}update(s,c){this.movePlayer(this),nr(this,c)}addMap(s){var S;const c=s.make.tilemap({key:"casino_map",tileHeight:At.TILE_SIZE,tileWidth:At.TILE_SIZE}),C=c.addTilesetImage("casino_tp","casino_tp");c.createLayer("ground",C,0,0),(S=c.createLayer("meson",C,0,0))==null||S.setDepth(2),c.createLayer("mesas",C,0,0),c.createLayer("cocina",C,0,0)}addPlayer(s){var c;Zs(s),(c=this.player)==null||c.setDepth(3)}movePlayerController(s){Js(s)}movePlayer(s){Qs(s)}addMapCollision(s){er(s,[{x:3,y:3,w:2,h:2.3},{x:6,y:3,w:2,h:2.3},{x:9,y:2,w:2,h:3.3},{x:0,y:0,w:11,h:.4},{x:-1,y:-1,w:13,h:1},{x:-1,y:7,w:13,h:1},{x:-1,y:0,w:1,h:7},{x:11,y:0,w:1,h:7},{x:0,y:1.2,w:5.3,h:.2},{x:5,y:0,w:.4,h:1.3}])}addMapOverlaps(s){ir(s,[{key:"exit-classroom",x:5,y:6.7,w:.5,h:1,cb:()=>ye(s,$r(),{playerReturnTo:this.playerReturnTo})}])}}class SU extends $e.Scene{constructor(){super({key:"GymScene"});rt(this,"locationName","Gimnasio Techado");rt(this,"player",null);rt(this,"playerScale",At.PLAYER_SCALE);rt(this,"isPointerDown",!1);rt(this,"isPointerLeft",!1);rt(this,"isPointerRight",!1);rt(this,"isPointerTop",!1);rt(this,"isPointerBottom",!1);rt(this,"isMovableClick",!0);rt(this,"initialPlayerPosition",{x:7.2,y:13});rt(this,"playerReturnTo",{x:9,y:15});rt(this,"message",{container:null,background:null,text:null,isWriting:!1});rt(this,"textTimer",null)}init(s){s&&s.returnTo&&(this.playerReturnTo.x=s.returnTo.x,this.playerReturnTo.y=s.returnTo.y)}create(){ls(this),this.addMap(this),this.addPlayer(this),this.movePlayerController(this),this.addMapCollision(this),this.addMapOverlaps(this),Es(this,this.locationName),Ks(this,this.locationName),this.player.play("player_idle")}update(){this.movePlayer(this)}addMap(s){var S,l;const c=s.make.tilemap({key:"gym_map",tileHeight:At.TILE_SIZE,tileWidth:At.TILE_SIZE}),C=c.addTilesetImage("gym_tp","gym_tp");c.createLayer("ground",C,0,0),(S=c.createLayer("arcos",C,0,0))==null||S.setDepth(2),(l=c.createLayer("caballete",C,0,0))==null||l.setDepth(2),c.createLayer("reflejo",C,0,0)}addPlayer(s){Zs(s)}movePlayerController(s){Js(s)}movePlayer(s){Qs(s)}addMapCollision(s){er(s,[{x:1,y:2,w:.1,h:2.5},{x:1,y:2,w:4,h:.5},{x:4.9,y:2,w:.1,h:2.5},{x:9,y:2,w:.1,h:2.5},{x:9,y:2,w:4,h:.5},{x:12.9,y:2,w:.1,h:2.5},{x:0,y:4,w:1,h:.5},{x:5,y:4,w:4,h:.5},{x:13,y:4,w:1,h:.5},{x:1,y:9.7,w:.2,h:.3},{x:12.8,y:9.7,w:.2,h:.3},{x:2,y:13.7,w:2,h:.3},{x:10,y:13.7,w:2,h:.3},{x:-1,y:-1,w:16,h:1},{x:-1,y:14,w:16,h:1},{x:-1,y:0,w:1,h:14},{x:14,y:0,w:1,h:14}])}addMapOverlaps(s){ir(s,[{key:"exit-classroom",x:6,y:13.7,w:.5,h:1,cb:()=>ye(s,$r(),{playerReturnTo:this.playerReturnTo})}])}}const{getActualStage:EU}=Te();class PU extends $e.Scene{constructor(){super({key:"NurseryScene"});rt(this,"locationName","EnfermerÃa");rt(this,"player",null);
6426rt(this,"playerScale",At.PLAYER_SCALE);rt(this,"isPointerDown",!1);rt(this,"isPointerLeft",!1);rt(this,"isPointerRight",!1);rt(this,"isPointerTop",!1);rt(this,"isPointerBottom",!1);rt(this,"isMovableClick",!0);rt(this,"initialPlayerPosition",{x:3,y:4});rt(this,"playerReturnTo",{x:14,y:5});rt(this,"message",{container:null,background:null,text:null,isWriting:!1});rt(this,"textTimer",null)}init(s){s&&s.returnTo&&(this.playerReturnTo.x=s.returnTo.x,this.playerReturnTo.y=s.returnTo.y)}create(){ls(this),this.addMap(this),this.addPlayer(this),this.movePlayerController(this),this.addMapCollision(this),this.addMapOverlaps(this),Es(this,this.locationName),Ks(this,this.locationName),this.player.play("player_idle"),this.characters={},this.loadChars(),sr(this),this.add.image(2.5*At.TILE_SIZE,4.5*At.TILE_SIZE,"nursery_entry")}loadChars(){const{stage:s}=EU();s===3&&(se(this,{status:"idle",name:"gonzalo",x:.3,y:1.5}),ai(this))}update(s,c){this.movePlayer(this),nr(this,c)}addMap(s){var S,l;const c=s.make.tilemap({key:"nursery_map",tileHeight:At.TILE_SIZE,tileWidth:At.TILE_SIZE}),C=c.addTilesetImage("nursery_tp","nursery_tp");c.createLayer("ground",C,0,0),(S=c.createLayer("table",C,0,0))==null||S.setDepth(2),(l=c.createLayer("camilla",C,0,0))==null||l.setDepth(2)}addPlayer(s){Zs(s)}movePlayerController(s){Js(s)}movePlayer(s){Qs(s)}addMapCollision(s){er(s,[{x:0,y:4,w:1,h:1},{x:0,y:2.5,w:1,h:.5},{x:3,y:3,w:1,h:.1},{x:-1,y:-1,w:6,h:1.7},{x:-1,y:5,w:6,h:1},{x:-1,y:0,w:1,h:5},{x:4,y:0,w:1,h:5}])}addMapOverlaps(s){ir(s,[{key:"exit-classroom",x:2,y:4.9,w:.5,h:.6,cb:()=>ye(s,$r(),{playerReturnTo:this.playerReturnTo})}])}}const{getActualStage:bU}=Te();class MU extends $e.Scene{constructor(){super({key:"PrincipalScene"});rt(this,"locationName","Oficina del Director");rt(this,"player",null);rt(this,"playerScale",At.PLAYER_SCALE);rt(this,"isPointerDown",!1);rt(this,"isPointerLeft",!1);rt(this,"isPointerRight",!1);rt(this,"isPointerTop",!1);rt(this,"isPointerBottom",!1);rt(this,"isMovableClick",!0);rt(this,"initialPlayerPosition",{x:3,y:5});rt(this,"playerReturnTo",{x:6,y:5});rt(this,"message",{container:null,background:null,text:null,isWriting:!1});rt(this,"textTimer",null);rt(this,"characters",{})}init(s){s&&s.returnTo&&(this.playerReturnTo.x=s.returnTo.x,this.playerReturnTo.y=s.returnTo.y)}create(){ls(this);const{stage:s}=bU();if(this.addMap(this),this.addPlayer(this),this.movePlayerController(this),this.addMapCollision(this),this.addMapOverlaps(this),this.add.image(2.5*At.TILE_SIZE,5.5*At.TILE_SIZE,"principal_entry"),s===2){se(this,{status:"idle",name:"director",x:1,y:3});const c=Ih(2,"principal");c&&!["started6","started7","started8"].includes(c)&&se(this,{status:"idle",name:"sub_directora",x:5,y:4})}s===3&&se(this,{status:"idle",name:"director",x:1,y:3}),ai(this),Es(this,this.locationName),Ks(this,this.locationName),this.player.play("player_idle")}update(s,c){this.movePlayer(this),Xa&&Le&&(console.log("UPDATED !"),ai(this))}addMap(s){const c=s.make.tilemap({key:"principal_map",tileHeight:At.TILE_SIZE,tileWidth:At.TILE_SIZE}),C=c.addTilesetImage("principal_tp","principal_tp");c.createLayer("ground",C,0,0),c.createLayer("pc",C,0,0)}addPlayer(s){Zs(s)}movePlayerController(s){Js(s)}movePlayer(s){Qs(s)}addMapCollision(s){er(s,[{x:0,y:2.5,w:6,h:.5},{x:2,y:3,w:2,h:.2},{x:-1,y:6,w:8,h:1},{x:-1,y:0,w:1,h:6},{x:6,y:0,w:1,h:6}])}addMapOverlaps(s){ir(s,[{key:"exit-classroom",x:2,y:5.8,w:.5,h:1,cb:()=>ye(s,$r(),{playerReturnTo:this.playerReturnTo})}])}}const{showModal:wU,setScene:AU}=$s(),{loadPlayerImages:RU,getActualStage:OU}=Te(),{checkStatus:LU}=Gr(),{setLoaderModal:Ax}=Xi(),Lo=window.innerWidth;class FU extends $e.Scene{constructor(){super({key:"MainScene"});rt(this,"mapWidth",2944);rt(this,"mapHeight",2240);rt(this,"startBtn",null);rt(this,"textStyle",{fontSize:"24px",fill:"#fff",fontFamily:At.FONT});rt(this,"accountId","");rt(this,"isLoading",!1)}create(){AU(this);const{accountId:s}=os(),{setCb:c}=Gr();this.accountId=s;const C=this;this.addMap(this),this.setCameraPosition(),this.showInitialMenu();const S=async l=>{Ax(!0),l.nube_01.destroy(),l.nube_02.destroy(),l.nube_03.destroy(),l.nube_04.destroy(),l.nube_05.destroy(),l.nube_06.destroy(),await LU(),await RU(l);const{state:T,stage:e}=OU();switch(jh(e,!1,T),Ax(!1),e){case 1:l.scene.start(jt.COLLEGE);break;case 2:l.scene.start(jt.COLLEGE_2);break;case 3:l.scene.start(jt.COLLEGE_3);break;default:l.scene.start(jt.COLLEGE);break}re.intro&&re.intro()};this.input.on("pointerdown",l=>{if(Phaser.Geom.Rectangle.Contains(this.startBtn.getBounds(),l.x,l.y)){if(this.isLoading)return;ut.click&&ut.click(),this.accountId?S(C):wU(()=>S(C))}}),this.displayNubes(),c(()=>S(C)),Hh(this),re.bg&&re.bg(),ut.intro&&ut.intro()}update(){this.updateNubes()}addMap(s){const c=s.make.tilemap({key:"map",tileHeight:At.TILE_SIZE,tileWidth:At.TILE_SIZE}
6426),C=c.addTilesetImage("colegio_tp","colegio_tp");c.createLayer("ground",C,0,0),c.createLayer("walls",C,0,0),c.createLayer("buildings",C,0,0);const S=c.createLayer("roof",C,0,0);S&&S.setDepth(2),s.textures.get("tileset").source[0].setFilter(Phaser.Textures.FilterMode.NEAREST)}cameraData(){const s=this.cameras.main,c=s.width,C=s.height;return{camera:s,screenWidth:c,screenHeight:C}}setCameraPosition(){const{camera:s,screenWidth:c,screenHeight:C}=this.cameraData(),S=this.mapWidth/2-c/2,l=this.mapHeight/2-C/2;s.scrollX=S,s.scrollY=l+500,s.setBounds(0,0,this.mapWidth,this.mapHeight)}showInitialMenu(){const{screenWidth:s,screenHeight:c}=this.cameraData(),C=5,S=Lo<500?Lo-20:500,l=this.add.container(s/2-S/2,c/2-180).setDepth(C),T=this.add.rectangle(-300,0,S,380,"0x000000",0);T.setOrigin(0,0);const e=this.createStartButton(this,T),d=Lo<480?30:80,g=Lo<480?20:30,r=this.physics.add.sprite(d,g,"logo").setOrigin(0,0);r.setScale(.65);const a=$h(this,T.width,T.height);l.add([T,a,e,r]),l.setScrollFactor(0),l.setVisible(!0)}createStartButton(s,c){const C=Hu(s,c.width-75,this.accountId?"Iniciar Juego":"Iniciar Sesión");return C.x=25,C.y=310,this.startBtn=C,C}displayLogo(){const{screenWidth:s,screenHeight:c}=this.cameraData(),C=this.cameras.main,S=C.scrollY,l=C.scrollX,T=this.physics.add.sprite(l,S,"logo").setOrigin(0,0).setDepth(5),e=Lo>500?.8:.5;T.setScale(e),T.x=l+s/2-T.width/2*e,T.y=S+c/2-T.height/2-130*e}displayNubes(){const s=this.cameras.main,c=s.scrollY,C=s.scrollX+s.height,S=s.scrollX,l=70,T=10;this.nube_01=this.physics.add.sprite(S-400,this.random(C-100,c-100),"nube_01").setOrigin(0,0).setScale(.5).setDepth(2),this.nube_02=this.physics.add.sprite(S-1e3,this.random(C-100,c-100),"nube_02").setOrigin(0,0).setScale(.5).setDepth(2),this.nube_03=this.physics.add.sprite(S-800,this.random(C-100,c-100),"nube_03").setOrigin(0,0).setScale(.5).setDepth(2),this.nube_04=this.physics.add.sprite(S-300,this.random(C-100,c-100),"nube_04").setOrigin(0,0).setScale(.5).setDepth(2),this.nube_05=this.physics.add.sprite(S-2e4,this.random(C-100,c-100),"nube_05").setOrigin(0,0).setScale(.5).setDepth(2),this.nube_06=this.physics.add.sprite(S-200,this.random(C-100,c-100),"nube_06").setOrigin(0,0).setScale(.5).setDepth(2),this.nube_01.setVelocityX(this.random(l,T)),this.nube_02.setVelocityX(this.random(l,T)),this.nube_03.setVelocityX(this.random(l,T)),this.nube_04.setVelocityX(this.random(l,T)),this.nube_05.setVelocityX(this.random(l,T)),this.nube_06.setVelocityX(this.random(l,T)),this.nube_01.alpha=this.random(.8,1),this.nube_02.alpha=this.random(.8,1),this.nube_03.alpha=this.random(.8,1),this.nube_04.alpha=this.random(.8,1),this.nube_05.alpha=this.random(.8,1),this.nube_06.alpha=this.random(.8,1)}updateNubes(){const s=this.cameras.main,c=s.scrollY,C=s.scrollX+s.height,S=s.scrollX,l=60,T=5;this.nube_01.x>s.scrollX+s.width&&(this.nube_01.x=S-this.random(400,1200),this.nube_01.y=c+this.random(-30,C-100),this.nube_01.setVelocityX(this.random(l,T))),this.nube_02.x>s.scrollX+s.width&&(this.nube_02.x=S-this.random(400,1200),this.nube_02.y=c+this.random(-30,C-100),this.nube_02.setVelocityX(this.random(l,T))),this.nube_03.x>s.scrollX+s.width&&(this.nube_03.x=S-this.random(400,1200),this.nube_03.y=c+this.random(-30,C-100),this.nube_03.setVelocityX(this.random(l,T))),this.nube_04.x>s.scrollX+s.width&&(this.nube_04.x=S-this.random(400,1200),this.nube_04.y=c+this.random(-30,C-100),this.nube_04.setVelocityX(this.random(l,T))),this.nube_05.x>s.scrollX+s.width&&(this.nube_05.x=S-this.random(400,1200),this.nube_05.y=c+this.random(-30,C-100),this.nube_05.setVelocityX(this.random(l,T))),this.nube_06.x>s.scrollX+s.width&&(this.nube_06.x=S-this.random(400,1200),this.nube_06.y=c+this.random(-30,C-100),this.nube_06.setVelocityX(this.random(l,T)))}random(s,c){return Math.random()*(s-c)+c}}const Rx=window.innerWidth;class IU extends $e.Scene{constructor(){super({key:"Game1Scene"})}create(){console.log("Game1Scene"),this.buildBg(),this.buildEnemy()}cameraData(){const t=this.cameras.main,s=t.width,c=t.height;return{camera:t,screenWidth:s,screenHeight:c}}buildBg(){const{screenWidth:t,screenHeight:s}=this.cameraData(),c=5,C=Rx<600?Rx-20:600,S=this.add.container(t/2-C/2,s/2-360).setDepth(c),l=this.add.rectangle(0,0,C,750,"0x000000",0);l.setOrigin(0,0);const T=$h(this,l.width,l.height);S.add([l,T]),S.setScrollFactor(0),S.setVisible(!0)}buildEnemy(){const t=this.add.container(100,100).setDepth(10),s=this.add.rectangle(0,0,300,300,"0xc8c8c8",1);s.setOrigin(0,0);const c=oS(this,{w:300,h:300},{x:100,y:100});t.add([s,c]),t.setScrollFactor(0),t.setVisible(!0)}}function DU(){return new $e.Game({type:$e.CANVAS,scale:{mode:$e.Scale.ScaleModes.RESIZE,width:1200,autoCenter:$e.Scale.CENTER_BOTH,height:600},parent:"game",backgroundColor:"#201726",physics:{default:"arcade",arcade:{debug:Pf}},roundPixels:!0,plugins:{scene:[{key:"rexUI",plugin:CT,mapping:"rexUI"}]},scene:[vE,eU,hU,pU,oE,lE,gU,xU,yU,TU,SU,PU,MU,FU,IU]})}const BU=NT({fluid:{type:Boolean,default:!1},...VT(),...zT()},"VContainer"),kU=YT()({name:"VContainer",props:BU(),setup(i,t){let{slots:s}=t;const{rtlClasses:c}=XT();return UT(()=>ot(i.tag,{class:["v-container",{"v-container--fluid":i.fluid},c.value,i.class],style:i.style},s)),{}}}),GU=H("div",{class:"pt-5"},null,-1),NU=H("div",{class:"pt-5"},null,-1),VU=Bt({__name:"AppAccountLogin",emits:["mode","login"],setup(i,{emit:t}){const s=Ws(),{dismissModal:c}=$s(),{displayToast:C}=Ya(),S=it({fields:[{cols:12,format:Oe.INPUT,key:"dni",type:"text",label:"Rut",val:"",validateOn:"lazy blur",rules:[Gt.required,Gt.dni],hint:"Sin puntos y con guión"},{cols:12,format:Oe.INPUT,key:"password",type:"password",label:"Contraseña",hideCharacters:!0,val:"",rules:[Gt.required,Gt.minLength4]}],extraBtn:{cols:6,label:"Cancelar",actionFn:async()=>{S.value.submit.loading||c()}},submit:{cols:6,label:"iniciar sesión",loading:!1,disabled:!1,actionFn:async d=>{S.value.submit.loading=!0;const{data:g,error:r}=await s.request("POST","/auth/login",{body:{...d,role:WT.STUDENT},noUnusedProps:!0});g&&(t("login",g),S.value.submit.loading=!1),r&&(C(r,"error"),S.value.submit.loading=!1)}}}),l=()=>{S.value.submit.loading||t("mode","recovery")},T=()=>{S.value.submit.loading||t("mode","create")},e=({key:d,prop:g,val:r})=>{const a=S.value.fields.find(h=>h.key===d);a&&(a[g]=r)};return ce(async()=>{await Cf()}),(d,g)=>(Q(),Rt(Ra,null,{default:Dt(()=>[ot(Ef,{class:"bg-primary"},{default:Dt(()=>[Ot(" Iniciar Sesión ")]),_:1}),ot(Aa,null,{default:Dt(()=>[GU,ot(Sf,{config:S.value,onUpdate:e}
6426,null,8,["config"]),H("p",{class:"text-primary cursor-pointer text-center",style:{"font-size":"0.8rem"},onClick:l}," Recuperar Contraseña "),H("p",{class:"text-center mt-3 text-primary cursor-pointer",onClick:T}," ¿No tienes cuenta? Crea una aquà "),NU]),_:1})]),_:1}))}}),zU={class:"d-flex justify-space-between align-center"},YU=H("span",null,"Recuperar contraseña",-1),XU={key:0,class:"pa-4"},UU={key:0,class:"pa-4"},WU=Bt({__name:"AppAccountRecovery",setup(i){const{dismissModal:t,dismissAndCb:s}=$s(),c=it(1);return(C,S)=>(Q(),Rt(Ra,null,{default:Dt(()=>[ot(Ef,{class:"bg-primary"},{default:Dt(()=>[H("div",zU,[YU,ot(te,{icon:"fas fa-times",onClick:ct(t)},null,8,["onClick"])])]),_:1}),ot(Aa,null,{default:Dt(()=>[ot(QT,{modelValue:c.value,"onUpdate:modelValue":S[0]||(S[0]=l=>c.value=l),"fixed-tabs":"",color:"primary"},{default:Dt(()=>[ot(Op,{value:1},{default:Dt(()=>[Ot(" Solicitar Código ")]),_:1}),ot(Op,{value:2},{default:Dt(()=>[Ot(" Tengo mi Código ")]),_:1})]),_:1},8,["modelValue"]),ot(qT,{modelValue:c.value,"onUpdate:modelValue":S[2]||(S[2]=l=>c.value=l)},{default:Dt(()=>[ot(Lp,{value:1},{default:Dt(()=>
6426[c.value===1?(Q(),et("div",XU,[ot(_T,{mode:"user",onCode:S[1]||(S[1]=l=>c.value=2)})])):ft("",!0)]),_:1}),ot(Lp,{value:2},{default:Dt(()=>[c.value===2?(Q(),et("div",UU,[ot(tS,{mode:"user",cb:ct(s)},null,8,["cb"])])):ft("",!0)]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1}))}}),HU=Bt({__name:"AppAccountCreate",emits:["create","cancel"],setup(i,{emit:t}){const s=Ws(),{natives:c,genders:C}=Jc(),{displayToast:S}=Ya(),l=it({fields:[{cols:12,format:Oe.INPUT,key:"dni",type:"text",label:"Rut",val:"",validateOn:"lazy blur",rules:[Gt.required,Gt.dni],hint:"Sin puntos y con guión"},{cols:6,format:Oe.INPUT,key:"name",type:"text",label:"Nombre",rules:[Gt.required],val:""},{cols:6,format:Oe.INPUT,key:"lastname",type:"text",label:"Apellido",rules:[Gt.required],val:""},{cols:12,format:Oe.INPUT,key:"password",type:"password",label:"Contraseña",hide:!0,val:"",rules:[T=>Gt.optional(T,Gt.minLength8)]},{cols:12,format:Oe.INPUT,key:"email",type:"email",label:"Email",val:"",validateOn:"lazy blur",rules:[T=>Gt.optional(T,Gt.email),T=>Gt.optional(T,Gt.emailUnique)]},{cols:6,format:Oe.INPUT,key:"birthdate",type:"text",label:"Fecha de Nacim
6426iento",val:"",rules:[T=>Gt.optional(T,Gt.date),T=>Gt.optional(T,Gt.noFutureDate)],hint:"Formato DD-MM-YYYY"},{cols:6,format:Oe.INPUT,key:"phoneNumber",type:"phone",label:"Teléfono",val:"",validateOn:"lazy blur",rules:[T=>Gt.optional(T,Gt.phone),T=>Gt.optional(T,Gt.phoneUnique)],hint:"Formato +56XXXXXXXXX"},{cols:6,format:Oe.SELECT,key:"gender",label:"Género",val:null,clearable:!0,rules:[T=>Gt.optional(T,Gt.select)],items:C},{cols:6,format:Oe.SELECT,key:"native",label:"Pueblo originario",val:null,clearable:!0,items:[...c.value],rules:[T=>Gt.optional(T,Gt.select)]},{cols:12,format:Oe.INPUT,key:"code",type:"text",label:"Código de invitación",rules:[Gt.required,Gt.maxLength6,Gt.minLength6],val:""}],extraBtn:{cols:6,label:"Cancelar",block:!0,actionFn:()=>{t("cancel")}},submit:{cols:6,label:"Guardar",block:!0,loading:!1,disabled:!1,actionFn:async T=>{try{l.value.submit.loading=!0,T.birthDate&&(T.birthdate=Nx.parse(T.birthdate,"YYYY-MM-DD"));const{data:e,error:d}=await s.request("POST","/auth/create-user",{body:T,auth:!0});e&&t("create",e),d&&S(d,"error")}catch{S("Error creando cuenta","error")}finally{l.value.submit.loading=!1}}}});return(T,e)=>(Q(),Rt(Ra,null,{default:Dt(()=>[ot(Ef,{class:"bg-primary"},{default:Dt(()=>[Ot(" Crear Cuenta ")]),_:1}),ot(Aa,null,{default:Dt(()=>[ot(Sf,{config:l.value,onUpdate:e[0]||(e[0]=({val:d})=>l.value.fields[3].hideCharacters=d)},null,8,["config"])]),_:1})]),_:1}))}}),TT=Bt({__name:"AppAccount",setup(i){const{setToken:t}=HT(),{updateAccountDataFromRaw:s,setAccountData:c}=os(),{checkCharacterSelection:C}=Gr(),{modalState:S,dismissModal:l}=$s(),T=it("login"),e=g=>{T.value=g},d=async g=>{l(),c(g.account.id,`${g.account.name} ${g.account.lastname}`,g.account.email||""),s(g.account),t(g.accessToken),await C(),await Cf()};return ti(S,g=>{g&&(T.value="login")}),(g,r)=>(Q(),Rt(Yx,{modelValue:ct(S),"onUpdate:modelValue":r[3]||(r[3]=a=>Vx(S)?S.value=a:null),width:"500px",persistent:""},{default:Dt(()=>[T.value==="login"?(Q(),Rt(VU,{key:0,onMode:e,onLogin:r[0]||(r[0]=a=>d(a))})):T.value==="create"?(Q(),Rt(HU,{key:1,onCancel:r[1]||(r[1]=a=>T.value="login"),onCreate:r[2]||(r[2]=a=>d(a))})):T.value==="recovery"?(Q(),Rt(WU,{key:2})):ft("",!0)]),_:1},8,["modelValue"]))}}),$U=H("input",null,null,-1),jU=Bt({__name:"AppUserDataDisplay",setup(i){const{userDataModalHandler:t,scene:s}=$s(),{getInstitutionById:c,getNativeById:C,getGenderById:S}=Jc(),{accountData:l,setAccountName:T,updateAccountDataFromRaw:e,accountId:d}=os(),g=()=>t(!1),r=(P,b,E)=>{P.value.statuses.push({label:b,isActive:E})},a=(P,b,E)=>{P.value.items.push({cols:12,label:b,text:E})},h=it({key:"account-data",statuses:[],items:[]}),n=()=>{h.value.statuses=[],h.value.items=[],r(h,l.value.hasEmailValidated?"Email Validado":"Email NO Validado",l.value.hasEmailValidated),a(h,"Nombre",l.value.name),a(h,"Apellido",l.value.lastname),a(h,"Email",l.value.email),a(h,"Rut",l.value.dni);const P=S(l.value.gender);a(h,"Género",P),a(h,"Fecha Nacimiento",l.value.birthDate);const b=c(l.value.institution);a(h,"Institución",b);const E=C(l.value.native);a(h,"Nativo",E)};ce(()=>{n()});const o=it("data"),f=Ws(),{natives:u,institutions:v,genders:m}=Jc(),{displayToast:p}=Ya(),x=it({fields:[{cols:6,format:Oe.INPUT,key:"dni",type:"text",label:"Rut",val:"",validateOn:"lazy blur",rules:[Gt.required,Gt.dni,P=>Gt.dniUnique(P,d)],hint:"Sin puntos y con guión"},{cols:6,format:Oe.INPUT,key:"name",type:"text",label:"Nombre",rules:[Gt.required],val:""},{cols:6,format:Oe.INPUT,key:"lastname",type:"text",label:"Apellido",rules:[Gt.required],val:""},{cols:6,format:Oe.INPUT,key:"password",type:"password",label:"Contraseña",hide:!0,val:"",rules:[P=>Gt.optional(P,Gt.minLength8)]},{cols:6,format:Oe.INPUT,key:"birthDate",type:"text",label:"Fecha de Nacim
6426iento",val:"",rules:[Gt.required,Gt.date,Gt.noFutureDate],hint:"Formato DD-MM-YYYY"},{cols:6,format:Oe.INPUT,key:"email",type:"email",label:"Email",val:"",validateOn:"lazy blur",rules:[Gt.required,Gt.email,P=>Gt.emailUnique(P,d)]},{cols:6,format:Oe.INPUT,key:"phoneNumber",type:"phone",label:"Teléfono",val:"",validateOn:"lazy blur",rules:[Gt.required,Gt.phone,P=>Gt.phoneUnique(P,d)],hint:"Formato +56XXXXXXXXX"},{cols:6,format:Oe.SELECT,key:"gender",label:"Género",val:null,clearable:!0,rules:[Gt.required],items:m},{cols:6,format:Oe.SELECT,key:"native",label:"Pueblo originario",val:null,clearable:!0,items:[...u.value],rules:[Gt.required]},{cols:6,format:Oe.SELECT,key:"institution",label:"Institución",val:null,clearable:!0,rules:[Gt.required],items:[...v.value]}],extraBtn:{cols:6,label:"Cancelar",block:!0,actionFn:()=>{o.value="data"}},submit:{cols:6,label:"Guardar",block:!0,loading:!1,disabled:!1,actionFn:async P=>{try{x.value.submit.loading=!0,P.birthDate&&(P.birthDate=Nx.parse(P.birthDate,"DD-MM-YYYY"));const{data:b}=await f.request("PATCH","/auth/me",{body:P,auth:!0});b&&(p("Datos guardados","success"),T(`${b.payload.name} ${b.payload.lastname}`),e(b.payload),n(),o.value="data")}catch{p("Error actualizando datos","error")}finally{x.value.submit.loading=!1}}}}),y=()=>{x.value.fields.forEach(P=>{P.val=l.value[P.key]})};return ti(o,async P=>{P==="edit"&&y(),P==="data"&&n()}),(P,b)=>o.value==="data"?(Q(),Rt(Ra,{key:0},{default:Dt(()=>[ot(Aa,null,{default:Dt(()=>[ot(iS,{config:h.value,"requires-validation":!1,onValidateEmail:b[0]||(b[0]=E=>o.value="validate-email")},null,8,["config"])]),_:1}),ot(eS,null,{default:Dt(()=>[ot(Fh,null,{default:Dt(()=>[ot(Qi,null,{default:Dt(()=>[ot(Qc,{color:"primary",variant:"outlined",block:"",onClick:g},{default:Dt(()=>[Ot(" Cerrar ")]),_:1})]),_:1}),ot(Qi,null,{default:Dt(()=>[ot(Qc,{color:"primary",variant:"flat",block:"",onClick:b[1]||(b[1]=E=>o.value="edit")},{default:Dt(()=>[Ot(" Actualizar ")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})):o.value==="edit"?(Q(),Rt(Ra,{key:1},{default:Dt(()=>[ot(Aa,null,{default:Dt(()=>[ot(Sf,{config:x.value,onUpdate:b[2]||(b[2]=({val:E})=>x.value.fields[3].hideCharacters=E)},null,8,["config"]),$U]),_:1})]),_:1})):o.value==="validate-email"?(Q(),Rt(Ra,{key:2},{default:Dt(()=>[ot(Aa,null,{default:Dt(()=>[ot(sS,{onCancel:b[3]||(b[3]=E=>o.value="data")})]),_:1})]),_:1})):ft("",!0)}}),ST=Bt({__name:"AppUserData",setup(i){const{modalUserDataState:t}=$s();return(s,c)=>(Q(),Rt(Yx,{modelValue:ct(t),"onUpdate:modelValue":c[0]||(c[0]=C=>Vx(t)?t.value=C:null),width:"500px",persistent:""},{default:Dt(()=>[ot(jU)]),_:1},8,["modelValue"]))}}),ET="/assets/imgs/game-one/destacador-1.png",PT="/assets/imgs/game-one/destacador-2.png",KU={class:"game-one-bg"},ZU=Tf('<div class="bg-sheet bg-tl" data-v-6898d542></div><div class="bg-sheet bg-tr" data-v-6898d542></div><div class="bg-sheet bg-bl" data-v-6898d542></div><div class="bg-sheet bg-br" data-v-6898d542></div><div class="bg-cc" data-v-6898d542></div><div class="bg-tc" data-v-6898d542></div><div class="bg-bc" data-v-6898d542></div><div class="bg-lc" data-v-6898d542></div><div class="bg-rc" data-v-6898d542></div>',9),JU=Bt({__name:"GameBgSheet",setup(i){const t=it([{icon:"/assets/imgs/game-one/bg-icons/44.png",x:0,y:0},{icon:"/assets/imgs/game-one/bg-icons/75.png",x:0,y:0},{icon:"/assets/imgs/game-one/bg-icons/79.png",x:0,y:0},{icon:"/assets/imgs/game-one/bg-icons/1114.png",x:0,y:0},{icon:"/assets/imgs/game-one/bg-icons/104.png",x:0,y:0},{icon:"/assets/imgs/game-one/bg-icons/105.png",x:0,y:0},{icon:"/assets/imgs/game-one/bg-icons/106.png",x:0,y:0},{icon:"/assets/imgs/game-one/bg-icons/107.png",x:0,y:0},{icon:"/assets/imgs/game-one/bg-icons/118.png",x:0,y:0},{icon:"/assets/imgs/game-one/bg-icons/214.png",x:0,y:0},{icon:"/assets/imgs/game-one/bg-icons/215.png",x:0,y:0},{icon:"/assets/imgs/game-one/bg-icons/314.png",x:0,y:0},{icon:"/assets/imgs/game-one/bg-icons/315.png",x:0,y:0},{icon:"/assets/imgs/game-one/bg-icons/711.png",x:0,y:0},{icon:"/assets/imgs/game-one/bg-icons/811.png",x:0,y:0}]);function s(){return Math.floor(Math.random()*(80-10+1))+10}return ce(()=>{t.value.forEach(c=>{c.x=s(),c.y=s()})}),(c,C)=>
6426(Q(),et("div",KU,[ZU,(Q(!0),et(Xt,null,rs(t.value,(S,l)=>(Q(),et("div",{key:"icon-"+l,class:"bg-icon",style:ue({left:`${S.x}%`,top:`${S.y}%`,backgroundImage:`url(${S.icon})`})},null,4))),128))]))}});const jr=kt(JU,[["__scopeId","data-v-6898d542"]]),QU=Tf('<div class="bg-sheet bg-tl" data-v-6f15f878></div><div class="bg-sheet bg-tr" data-v-6f15f878></div><div class="bg-sheet bg-bl" data-v-6f15f878></div><div class="bg-sheet bg-br" data-v-6f15f878></div><div class="bg-cc" data-v-6f15f878></div><div class="bg-tc" data-v-6f15f878></div><div class="bg-bc" data-v-6f15f878></div><div class="bg-lc" data-v-6f15f878></div><div class="bg-rc" data-v-6f15f878></div>',9),qU={key:0,class:"bg-l"},_U={key:1,class:"bg-r"},tW={class:"font-pixel font-weight-bold slot-container",style:{"font-size":"19px","line-height":"17px"}},eW=Bt({__name:"GameBgDialog",props:{height:{},width:{},mode:{}},setup(i){return(t,s)=>(Q(),et("div",{class:"game-bg-dialog",style:ue({height:`${t.height}px`,width:`${t.width}px`})},[QU,t.mode==="left"?(Q(),et("div",qU)):ft("",!0),t.mode==="right"?(Q(),et("div",_U)):ft("",!0),H("div",tW,[zx(t.$slots,"default",{},void 0,!0)])],4))}});const Yh=kt(eW,[["__scopeId","data-v-6f15f878"]]),iW="/assets/imgs/game-one/watch.png",sW="/assets/imgs/game-one/level.png",yp=i=>(fe("data-v-3eb1a9de"),i=i(),ve(),i),nW={class:"d-flex justify-center"},rW=yp(()=>H("img",{src:iW},null,-1)),aW={class:"d-inline-block px-4 font-pixel font-weight-bold",style:{"font-size":"20px"}},oW={class:"relative"},lW=yp(()=>H("img",{src:sW},null,-1)),hW={class:"font-pixel font-weight-bold level-text",style:{"font-size":"20px"}},uW=yp(()=>H("div",{class:"text-center font-pixel font-weight-bold",style:{"font-size":"20px","margin-top":"-10px"}},null,-1)),dW=Bt({__name:"GameMetadata",props:{level:{},mode:{},limit:{}},emits:["stop"],setup(i,{emit:t}){const s=i,c=it(0),C=it(0),S=it(null),l=wt(()=>{const g=Math.floor(c.value/60),r=c.value%60;return`${g<10?"0"+g:g}:${r<10?"0"+r:r}`}),T=()=>{c.value+=s.mode==="timer"?1:-1},e=g=>{S.value=setInterval(g,1e3),s.mode==="timer"?(c.value=0,C.value=s.limit):(c.value=s.limit*60,C.value=0)},d=()=>{clearInterval(S.value),S.value=null};return ti(c,g=>{g===C.value&&(d(),t("stop"))}),ce(()=>{e(T)}),Hs(()=>{d()}),(g,r)=>(Q(),et(Xt,null,[H("div",nW,[rW,H("span",aW,Lt(l.value),1),H("span",oW,[lW,H("span",hW,Lt(g.level+1),1)])]),uW],64))}});const Kr=kt(dW,[["__scopeId","data-v-3eb1a9de"]]),cW={class:"d-flex justify-center"},fW=["onClick"],vW=["src"],pW={class:"d-flex justify-center"},mW=["onClick"],gW=["src"],xW=Bt({__name:"GameSelectables",props:{options:{},userCanAnswer:{type:Boolean}},emits:["selected"],setup(i,{emit:t}){const s=i,c=wt(()=>({a:s.options.slice(0,5),b:s.options.slice(5,10)})),C=S=>{s.userCanAnswer&&(ut.click&&ut.click(),t("selected",S))};return(S,l)=>(Q(),et(Xt,null,[H("div",cW,[(Q(!0),et(Xt,null,rs(c.value.a,T=>(Q(),et("div",{key:T.id,class:"selectable-option",onClick:e=>C(T.id)},[H("img",{src:`/assets/icons/${T.value}.png`},null,8,vW)],8,fW))),128))]),H("div",pW,[(Q(!0),et(Xt,null,rs(c.value.b,T=>(Q(),et("div",{key:T.id,class:"selectable-option",onClick:e=>C(T.id)},[H("img",{src:`/assets/icons/${T.value}.png`},null,8,gW)],8,mW))),128))])],64))}});const bT=kt(xW,[["__scopeId","data-v-0c20211c"]]),yW={class:"font-pixel"},CW=Bt({__name:"GameBtn",props:{label:{}},setup(i){return(t,s)=>(Q(),et("div",yW,[H("p",null,Lt(t.label),1)]))}});const Yn=kt(CW,[["__scopeId","data-v-1e8c6b7d"]]),TW=["src"],SW=Bt({__name:"GamePlayerSelections",props:{options:{},selection:{},defaults:{},qty:{},extraAnswerSlot:{}},emits:["check"],setup(i,{emit:t}){const s=i,c=wt(()=>{const C=s.extraAnswerSlot??1,S=s.defaults?s.qty:s.qty+C;let l=new Array(S).fill({id:"",value:"Q"});return s.defaults?s.defaults.forEach((T,e)=>{const d=s.options.find(g=>g.id===T);l[e]=d??{id:"",value:"Q"}}):s.selection.forEach((T,e)=>{const d=s.options.find(g=>g.id===T);l[e]=d??{id:"",value:"Q"}}),l.slice(0,S)});return ti(c,C=>{C.every(S=>S.id!=="")&&(console.log("CHECK"),t("check",C.map(S=>S.id)))}),(C,S)=>(Q(!0),et(Xt,null,rs(c.value,(l,T)=>(Q(),et("span",{key:"opt"+T,class:"option-selected"},[H("span",null,[H("img",{src:`/assets/icons/${l.value}.png`},null,8,TW)])]))),128))}});
6426const xf=kt(SW,[["__scopeId","data-v-3b546712"]]),EW="/assets/imgs/derrota.png",PW="/assets/imgs/victoria.png";const bW={},hl=i=>(fe("data-v-eb8dac42"),i=i(),ve(),i),MW=hl(()=>H("p",null," Fijate bien en el mensaje de tu contrincante; ",-1)),wW=hl(()=>H("p",null," Debes repetir su mensaje y después añadir un nuevo elemento al mensaje. ",-1)),AW=hl(()=>H("p",null," Mediante este ciclo, el mensaje seguirá aumentando hasta completar los 5 niveles ",-1)),RW=hl(()=>H("p",null," No hay lÃmite de tiempo. ",-1)),OW=hl(()=>H("p",null," ¡Tu puedes! ",-1));function LW(i,t){return Q(),et(Xt,null,[MW,wW,AW,RW,OW],64)}const FW=kt(bW,[["render",LW],["__scopeId","data-v-eb8dac42"]]);const IW={},ju=i=>(fe("data-v-37b7cf59"),i=i(),ve(),i),DW=ju(()=>H("p",null," Presta atención y memoriza el mensaje de tu contrincante. ",-1)),BW=ju(()=>H("p",null," Luego debes repetir los elementos que aparecieron en el mismo orden, mediante este ciclo el mensaje seguirá aumentando hasta completar los 5 niveles ",-1)),kW=ju(()=>H("p",null," Debes superar los 5 niveles antes que se acabe el tiempo disponible. ",-1)),GW=ju(()=>H("p",null," ¡Tu puedes! ",-1));function NW(i,t){return Q(),et(Xt,null,[DW,BW,kW,GW],64)}const VW=kt(IW,[["render",NW],["__scopeId","data-v-37b7cf59"]]);const zW={},Ja=i=>(fe("data-v-577cd6dc"),i=i(),ve(),i),YW=Ja(()=>H("p",null," El juego consiste en tener la mayor cantidad de puntos entre el total de todos los nodos en juego. ",-1)),XW=Ja(()=>H("p",null," Los nodos aumentaran sus puntos a medida que avance el tiempo y ganará el jugador que controle la mayor cantidad de puntos al acabar el tiempo. ",-1)),UW=Ja(()=>H("p",null," Al hacer click en una conexión con un nodo neutral o de tu oponente, usarás los puntos de tus nodos para reducir los puntos del nodo que quieras tomar, por lo que debes evaluar bien si prefieres esperar para ir aumentando los puntos de tus nodos o reducir tus puntos para tomar más nodos y ganar el nodo. ",-1)),WW=Ja(()=>H("p",null," Cuando un nodo llega a 0 puntos, quedará bajo el control del jugador con mayor suma de puntajes en la cadena. ",-1)),HW=Ja(()=>H("p",null," Debes superar los 3 niveles. ",-1)),$W=Ja(()=>H("p",null," ¡Comenzamos! ",-1));function jW(i,t){return Q(),et(Xt,null,[YW,Ot(),XW,Ot(),UW,Ot(),WW,Ot(),HW,Ot(),$W],64)}const KW=kt(zW,[["render",jW],["__scopeId","data-v-577cd6dc"]]);const ZW={},Ku=i=>(fe("data-v-fd6a70e0"),i=i(),ve(),i),JW=Ku(()=>H("p",null," Debes juntar 3 o más cuadrados del mismo color en una lÃnea horizontal o vertical para que desaparezcan. ",-1)),QW=Ku(()=>H("p",null," Pero ten ojo, los cuadros verdes aumentarán tu barra, mientras los rojos aumentarán la barra de tu oponente (la roja). ",-1)),qW=Ku(()=>H("p",null," Para poder ganar, tu barra verde debe ser superior a la roja. ",-1)),_W=Ku(()=>H("p",null," La barra roja ira aumentando progresivamente con el tiempo, ¡No te quedes atrás! ",-1));function tH(i,t){return Q(),et(Xt,null,[JW,QW,qW,_W],64)}const eH=kt(ZW,[["render",tH],["__scopeId","data-v-fd6a70e0"]]);const iH={},Qa=i=>(fe("data-v-ef2ae9c8"),i=i(),ve(),i),sH=Qa(()=>H("p",null," Encuentra y memoriza donde están todos los cuadrados verdes. ",-1)),nH=Qa(()=>H("p",null," Mientras más avanzas en los niveles, más cuadrados verdes aparecerán. ",-1)),rH=Qa(()=>H("p",null," Para ganar debes indicar presionando donde se encuentran los cuadrados verdes y superar los 5 niveles. ",-1)),aH=Qa(()=>H("p",null," Pero cuidado, ¡Si presionas 3 cuadrados rojos perderás! ",-1)),oH=Qa(()=>H("p",null," Además el tiempo y movimientos son limitados. ",-1)),lH=Qa(()=>H("p",null," ¡Vamos, tu puedes! ",-1));function hH(i,t){return Q(),et(Xt,null,[sH,nH,rH,aH,oH,lH],64)}const uH=kt(iH,[["render",hH],["__scopeId","data-v-ef2ae9c8"]]),dH=i=>(fe("data-v-87e1c811"),i=i(),ve(),i),cH={class:"font-pixel center-container"},fH={class:"center-text-container"},vH={key:0,src:EW,class:"d-block mx-auto",style:{"max-width":"200px"}},pH={key:1},mH=dH(()=>H("img",{src:PW,class:"d-block mx-auto",style:{"max-width":"200px"}},null,-1)),gH={key:0},xH={key:1},yH={key:2,class:"text-center"},CH={key:3,class:"instruction-container"}
6426,TH={key:0,class:"btn-container"},SH={key:1,class:"btn-container"},EH={key:2,class:"btn-container"},PH=Bt({__name:"GameInnerModal",props:{mode:{},level:{},winMode:{},destroyed:{}},emits:["restart","exit","win","close"],setup(i,{emit:t}){const s=()=>{ut.click&&ut.click(),console.log("RESTART"),t("restart")},c=()=>{ut.click&&ut.click(),console.log("EXIT"),t("exit")},C=()=>{ut.click&&ut.click(),console.log("WIN !"),t("win")},S=()=>{ut.click&&ut.click(),console.log("CLOSE"),t("close")};return(l,T)=>(Q(),et("div",cH,[H("div",fH,[l.mode==="lose"?(Q(),et("img",vH)):ft("",!0),l.mode==="lose"?(Q(),et("span",pH,"¡Oh! has perdido")):l.mode==="win"?(Q(),et(Xt,{key:2},[mH,l.winMode==="next"?(Q(),et("span",gH,"¡Muy Bien!, puedes avanzar al siguiente nivel")):(Q(),et("span",xH,"¡Felicidades!, has ganado")),l.destroyed?(Q(),et("div",yH,[H("span",null,"Y destruiste "+Lt(l.destroyed)+" cuadros en este nivel",1)])):ft("",!0)],64)):l.mode==="instruction"?(Q(),et("div",CH,[l.level===1?(Q(),Rt(FW,{key:0})):l.level===2?(Q(),Rt(VW,{key:1})):l.level===3?(Q(),Rt(KW,{key:2})):l.level===4?(Q(),Rt(eH,{key:3})):l.level===5?(Q(),Rt(uH,{key:4})):ft("",!0)])):ft("",!0)]),l.mode==="lose"?(Q(),et("div",TH,[ot(Yn,{label:"Reiniciar Juego",onClick:s}),ot(Yn,{label:"Salir",onClick:c})])):l.mode==="win"?(Q(),et("div",SH,[ot(Yn,{label:"Continuar",onClick:C})])):l.mode==="instruction"?(Q(),et("div",EH,[ot(Yn,{label:"Cerrar",onClick:S})])):ft("",!0)]))}});const ul=kt(PH,[["__scopeId","data-v-87e1c811"]]),bH={class:"control-container"},MH={class:"title font-pixel"},wH={class:"icons-container"},AH=Bt({__name:"GameControls",props:{title:{}},emits:["reset","audio","instruction","close"],setup(i,{emit:t}){const s=wt(()=>!!{}.VITE_GAME_DEBUG),c=C=>{ut.click&&ut.click(),t(C)};return(C,S)=>(Q(),et("div",bH,[H("div",MH,Lt(C.title),1),H("div",wH,[H("div",{class:"icon-container icon-4",onClick:S[0]||(S[0]=l=>c("reset"))},[ot(te,{icon:"fas fa-rotate-right",size:"xs"})]),H("div",{class:"icon-container icon-3",onClick:S[1]||(S[1]=l=>c("instruction"))},[ot(te,{icon:"fas fa-question",size:"xs"})]),ft("",!0),s.value?(Q(),et("div",{key:1,class:"icon-container icon-1",onClick:S[3]||(S[3]=l=>c("close"))},[ot(te,{icon:"fas fa-times",size:"xs"})])):ft("",!0)])]))}});const dl=kt(AH,[["__scopeId","data-v-dd426f6a"]]),RH=["src"],xs=Bt({__name:"AppGameHalfBody",props:{className:{},char:{},custom:{},mood:{}},setup(i){const t=i,{playerHalf:s,playerHalfRopa:c}=Te(),C=wt(()=>{let S="/assets/halfbody/black.png";switch(t.char){case"sub_directora":S="/assets/halfbody/sub_directora.png";break;case"maton_1":S="/assets/halfbody/maton_1.png";break;case"maton_3":S="/assets/halfbody/maton_3.png";break;case"maton_2":S="/assets/halfbody/maton_2.png";break;case"director":S="/assets/halfbody/director.png";break;case"lino":S="/assets/halfbody/lino.png";break;case"soccer_player_5":S="/assets/halfbody/soccer_player_5.png";break;case"cancha":S="/assets/halfbody/soccer_player_5.png";break;case"soccer_player_7":S="/assets/halfbody/soccer_player_7.png";break;case"soccer_player_6":S="/assets/halfbody/soccer_player_6.png";break;case"inspector":S="/assets/halfbody/inspector.png";break;case"profesor_1":S="/assets/halfbody/profesor_1.png";break;case"alan":S="/assets/halfbody/alan.png";break;case"ariel":S="/assets/halfbody/ariel.png";break;case"profe_vero":S="/assets/halfbody/profe_vero.png";break;case"xime":S="/assets/halfbody/xime.png";break;case"nora":S="/assets/halfbody/nora.png";break;case"leo":S=`/assets/halfbody/${t.mood==="crying"?"leo-crying":"leo"}.png`;break;case"teo":S=`/assets/halfbody/${t.mood==="crying"?"teo-crying":"teo"}.png`;break;case"andy":S=`/assets/halfbody/${t.mood==="crying"?"andy-crying":"andy"}.png`;break;case"mia":S="/assets/halfbody/mia.png";break;case"ale":S="/assets/halfbody/ale.png";break;case"mile":S="/assets/halfbody/mile.png";break;case"nico":S="/assets/halfbody/nico.png";break;case"mati":S="/assets/halfbody/mati.png";break;case"dani":S="/assets/halfbody/dani.png";break;case"jose":S="/assets/halfbody/jose.png";break;case"cris":S="/assets/halfbody/cris.png";break;case"gonzalo":S="/assets/halfbody/cris.png";break;case"chini":S="/assets/halfbody/chini.png";break;case"alex":S="/assets/halfbody/alex.png";break;case"tere":S="/assets/halfbody/tere.png";break;case"josefina":S="/assets/halfbody/josefina.png";break;case"estudiante_h_1":S="/assets/halfbody/estudiante_h_1.png";break;case"estudiante_h_5":S="/assets/halfbody/estudiante_h_5.png";break;case"estudiante_h_6":S="/assets/halfbody/estudiante_h_1.png";break;case"estudiante_h_10":S="/assets/halfbody/estudiante_h_5.png";break;case"player":S=s.value.img;break;case"player_ropa":S=c.value.img;break;
6426case"custom":t.custom&&(S=t.custom);break}return S});return(S,l)=>(Q(),et("img",{class:Ct(S.className),src:C.value},null,10,RH))}}),MT=i=>(fe("data-v-0f2b77f3"),i=i(),ve(),i),OH={class:"game-area"},LH={class:"game-enemy"},FH={key:0},IH={class:"relative"},DH=["src"],BH=MT(()=>H("img",{class:"destacador-1",src:ET},null,-1)),kH={class:"game-player"},GH={class:"relative"},NH=MT(()=>H("img",{class:"destacador-2",src:PT},null,-1)),VH={key:0},zH={key:0,class:"game-metadata"},YH={class:"game-selectable"},XH={key:1,class:"game-btns-container"},Ox=2e3,UH=500,WH=8,HH=Bt({__name:"AppGameRmOne",setup(i){const{closeGame:t}=js(),{loadGameEnemyFn:s}=Te(),c=()=>{T.value=!1},C=wt(()=>o.value*100),S=it(!1),l=it("lose"),T=it(!1),e=it("lose"),d=it(!1),g=R=>new Promise(L=>setTimeout(L,R)),r=R=>{const L=Math.floor(Math.random()*R.length);return R[L]},a=it({img:""}),h=it({enemy:"",player:""}),n=[{qty:2,level:1},{qty:4,level:2},{qty:6,level:3},{qty:8,level:4},{qty:10,level:5}],o=it(0),f=wt(()=>n[o.value]),u=[{id:"A",value:"A"},{id:"B",value:"B"},{id:"C",value:"C"},{id:"D",value:"D"},{id:"E",value:"E"},{id:"F",value:"F"},{id:"G",value:"G"},{id:"H",value:"H"},{id:"I",value:"I"},{id:"J",value:"J"}],v=it([]),m=it([]),p=it(!1),x=wt(()=>p.value?m.value:new Array(m.value.length).fill("Q")),y=R=>{v.value.push(R)},P=it(!1),b=async()=>{P.value=!0,o.value++;const R=[...v.value,r(u).value];v.value=[],m.value=new Array(R.length).fill("Q");let L=0;p.value=!0;for(const O of R)await g(UH),m.value[L]=O,L++;P.value=!1},E=async R=>{const[L,...O]=R.reverse(),I=O.join(""),D=[...m.value].reverse().join("");
6426if(I===D){if(ut.win&&ut.win(),f.value.level===WH){e.value="win",l.value="win",T.value=!0;return}await b(),await g(Ox-C.value),p.value=!1}else ut.lose&&ut.lose(),e.value="lose",l.value="lose",T.value=!0},M=async()=>{ut.click&&ut.click(),S.value=!0,p.value=!0,await g(Ox),p.value=!1},w=()=>{if(P.value)return;T.value=!1,S.value=!1,o.value=0,v.value=[],m.value=[];const R=r(u).value;let L=r(u).value;R===L&&(L=r(u).value),R===L&&(L=r(u).value),R===L&&(L=r(u).value),m.value.push(R,L)};w();const A=()=>{e.value="instruction",T.value=!0};return ce(()=>{const{img:R,msg:L,rsp:O}=s.value();a.value.img=R,h.value.enemy=L,h.value.player=O,A()}),(R,L)=>(Q(),et(Xt,null,[ot(jr),T.value?(Q(),Rt(ul,{key:0,level:1,mode:e.value,onRestart:w,onClose:c,onExit:L[0]||(L[0]=O=>ct(t)(l.value)),onWin:L[1]||(L[1]=O=>ct(t)(l.value))},null,8,["mode"])):ft("",!0),ot(dl,{title:"Dialogar",onReset:w,onInstruction:A,onClose:L[2]||(L[2]=O=>ct(t)("win"))}),H("div",OH,[H("section",LH,[ot(Yh,{height:"180",mode:"right"},{default:Dt(()=>[S.value?(Q(),Rt(xf,{key:1,qty:f.value.qty,options:u,defaults:x.value},null,8,["qty","defaults"])):(Q(),et("p",FH,Lt(h.value.enemy),1))]),_:1}),H("div",IH,[H("img",{class:"enemy",src:a.value.img},null,8,DH),BH])]),H("section",kH,[H("div",GH,[ot(xs,{char:"player","class-name":"player"}),NH]),ot(Yh,{height:"180",mode:"left"},{default:Dt(()=>[S.value?(Q(),Rt(xf,{key:1,qty:f.value.qty,options:u,selection:v.value,onCheck:E},null,8,["qty","selection"])):(Q(),et("p",VH,Lt(h.value.player),1))]),_:1})]),S.value?(Q(),et("section",zH,[ot(Kr,{level:o.value,mode:"timer",limit:0},null,8,["level"]),H("div",YH,[ot(bT,{options:u,"user-can-answer":d.value,onSelected:y},null,8,["user-can-answer"])])])):(Q(),et("section",XH,[ot(Yn,{label:"Iniciar Juego",onClick:M})]))])],64))}});const $H=kt(HH,[["__scopeId","data-v-0f2b77f3"]]),wT=i=>(fe("data-v-59dc8a09"),i=i(),ve(),i),jH={class:"game-enemy"},KH={class:"relative"},ZH=["src"],JH=wT(()=>H("img",{class:"destacador-1",src:ET},null,-1)),QH={class:"game-player"},qH={class:"relative"},_H=wT(()=>H("img",{class:"destacador-2",src:PT},null,-1)),t$={class:"game-btns-container"},e$=Bt({__name:"GameIntro",props:{label:{}},emits:["start"],setup(i){const{loadGameEnemyFn:t}=Te(),s=it({img:""}),c=it({enemy:"",player:""});return ce(()=>{const{img:C,msg:S,rsp:l}=t.value();s.value.img=C,c.value.enemy=S,c.value.player=l}),(C,S)=>(Q(),et(Xt,null,[H("section",jH,[ot(Yh,{height:"180",mode:"right"},{default:Dt(()=>[H("p",null,Lt(c.value.enemy),1)]),_:1}),H("div",KH,[H("img",{class:"enemy",src:s.value.img},null,8,ZH),JH])]),H("section",QH,[H("div",qH,[ot(xs,{char:"player","class-name":"player"}),_H]),ot(Yh,{height:"180",mode:"left"},{default:Dt(()=>[H("p",null,Lt(c.value.player),1)]),_:1})]),H("section",t$,[ot(Yn,{label:C.label||"Iniciar Juego",onClick:S[0]||(S[0]=l=>C.$emit("start"))},null,8,["label"])])],64))}});const Zu=kt(e$,[["__scopeId","data-v-59dc8a09"]]),i$={class:"game-area"},s$={key:1,class:"game-area-active"},n$={class:"display-option-container"},r$={class:"display-option"},a$=["src"],o$={key:1},l$={class:"time-icon-container"},h$={class:"game-metadata my-4"},u$={class:"text-center mt-4"},d$={class:"game-selectable mt-4"},Eh=300,c$=2,f$=Bt({__name:"AppGameRmTwo",setup(i){const{closeGame:t}=js(),s=()=>{S.value=!1},c=it(!1),C=it("lose"),S=it(!1),l=it("lose"),T=it(0),e=wt(()=>n[T.value]),d=it(!1),g=it(!1),r=it(0),a=A=>new Promise(R=>setTimeout(R,A)),h=()=>{const A=u.value.length?[...o.filter(L=>L.id!==u.value[u.value.length-1])]:[...o],R=Math.floor(Math.random()*A.length);return A[R]},n=[{qty:3,level:1},{qty:4,level:2},{qty:5,level:3},{qty:6,level:4},{qty:7,level:5}],o=[{id:"A",value:"A"},{id:"B",value:"B"},{id:"C",value:"C"},{id:"D",value:"D"},{id:"E",value:"E"},{id:"F",value:"F"},{id:"G",value:"G"},{id:"H",value:"H"},{id:"I",value:"I"},{id:"J",value:"J"}],f=wt(()=>{const A="time-icon icon-1";return{icon1:A+(r.value>=1?" time-icon-color":" time-icon-border"),icon2:A+(r.value>=2?" time-icon-color":" time-icon-border"),icon3:A+(r.value>=3?" time-icon-color":" time-icon-border")}}),u=it([]),v=it([]),m=wt(()=>u.value.length===0?"":u.value[u.value.length-1]),p=()=>{l.value="instruction",S.value=!0},x=async()=>{v.value=[];const{qty:A}=n[T.value];await a(1e3);for(let R=0;R<A;R++){const L=h();u.value.push(L.id),await a(Eh),r.value+=1,await a(Eh),r.value+=1,await a(Eh),r.value+=1,await a(Eh),r.value=0}u.value.push(""),g.value=!0},y=A=>{v.value.push(A)},P=async()=>{ut.click&&ut.click(),T.value=0,c.value=!0,u.value=[],v.value=[],await x()},b=()=>{d.value||(S.value=!1,c.value=!1,T.value=0)},E=async()=>{ut.win&&ut.win(),d.value=!0,g.value=!1,T.value+=1,u.value=[],v.value=[],await x(),d.value=!1},M=async()=>{const A=u.value.join(""),R=v.value.join("");if(A===R){if(e.value.level===n.length){l.value="win",C.value="win",S.value=!0;return}g.value=!1,await a(1500),await E()}else g.value=!1,await a(1500),ut.lose&&ut.lose(),l.value="lose",C.value="lose",S.value=!0},w=()=>{l.value="lose",C.value="lose",S.value=!0};return ce(()=>{p()}),(A,R)=>
6426(Q(),et(Xt,null,[ot(jr),S.value?(Q(),Rt(ul,{key:0,level:2,mode:l.value,onRestart:b,onClose:s,onExit:R[0]||(R[0]=L=>ct(t)(C.value)),onWin:R[1]||(R[1]=L=>ct(t)(C.value))},null,8,["mode"])):ft("",!0),ot(dl,{title:"Repetir",onReset:b,onInstruction:p,onClose:R[2]||(R[2]=L=>ct(t)("win"))}),H("div",i$,[c.value?(Q(),et("section",s$,[H("div",n$,[H("span",r$,[m.value?(Q(),et("img",{key:0,src:`/assets/icons/${m.value}.png`},null,8,a$)):(Q(),et("span",o$,Lt(m.value),1))])]),H("div",l$,[H("span",{class:Ct(f.value.icon1)},null,2),H("span",{class:Ct(f.value.icon2)},null,2),H("span",{class:Ct(f.value.icon3)},null,2)]),H("div",h$,[ot(Kr,{level:T.value,mode:"counter",limit:c$,onStop:w},null,8,["level"]),H("div",u$,[ot(xf,{qty:e.value.qty,options:o,selection:v.value,"extra-answer-slot":0,onCheck:M},null,8,["qty","selection"])]),H("div",d$,[ot(bT,{options:o,"user-can-answer":g.value,onSelected:y},null,8,["user-can-answer"])])])])):(Q(),Rt(Zu,{key:0,label:T.value===0?"Iniciar Juego":"Siguiente Nivel",onStart:P},null,8,["label"]))])],64))}});const v$=kt(f$,[["__scopeId","data-v-8a1c23ae"]]),p$=Bt({__name:"GridLine",props:{type:{},i:{},owner:{},isClickable:{type:Boolean},attacker:{},points:{},playerPoints:{},enemyPoints:{},limit:{},canInc:{},incOn:{}},emits:["owner"],setup(i,{emit:t}){const s=i,c=wt(()=>{let S="";switch(s.type){case"horizontal":S="line-horizontal";break;case"vertical":S="line-horizontal rotate-90";break;case"diagonal-a":S="line-horizontal rotate-diagonal-a";break;case"diagonal-b":S="line-horizontal rotate-diagonal-b";break;case"diagonal-c":S="line-horizontal rotate-diagonal-c";break;case"diagonal-d":S="line-horizontal rotate-diagonal-d";break;default:S="line-horizontal"}return s.isClickable&&(S+=" is-clickable"),s.owner==="player"?S+=" player is-active":s.owner==="enemy"?S+=" enemy is-active":S+=" neutral",S}),C=()=>{s.isClickable&&t("owner",s.owner)};return(S,l)=>(Q(),et("section",null,[H("div",{class:Ct(c.value),onClick:C},null,2)]))}});const Gi=kt(p$,[["__scopeId","data-v-e870e160"]]),m$={class:"circle-score"},g$=Bt({__name:"GridItem",props:{intervalTime:{},points:{},owner:{},i:{},isClickable:{type:Boolean},attacker:{},playerPoints:{},enemyPoints:{},limit:{},canInc:{},incOn:{}},setup(i){return(t,s)=>(Q(),et(Xt,null,[H("div",{class:Ct({"circle font-pixel":!0,[t.owner]:!0,"border-active":!0})},null,2),H("span",m$,Lt(Math.floor(t.points)),1)],64))}});const gi=kt(g$,[["__scopeId","data-v-6dca4edc"]]),x$={class:"bar-container"},y$={key:1,class:"empty-trophy"},C$={key:3,class:"empty-trophy"},T$=Bt({__name:"GamePercentBar",props:{player:{},enemy:{},neutral:{}},setup(i){return(t,s)=>(Q(),et("div",x$,[t.player>t.enemy&&t.player>t.neutral?(Q(),Rt(te,{key:0,icon:"fas fa-trophy",size:"xs",class:"mr-2 text-green"})):(Q(),et("div",y$)),H("div",{class:"percentage-bar player-bar",style:ue(`width: ${t.player}%`)},null,4),H("div",{class:"percentage-bar neutral-bar",style:ue(`width: ${t.neutral}%`)},null,4),H("div",{class:"percentage-bar enemy-bar",style:ue(`width: ${t.enemy}%`)},null,4),t.enemy>t.player&&t.enemy>t.neutral?(Q(),Rt(te,{key:2,icon:"fas fa-trophy",size:"xs",class:"ml-2 text-red"})):(Q(),et("div",C$))]))}});const Ju=kt(T$,[["__scopeId","data-v-4005b45e"]]),Cp=()=>{const i=T=>{const e=Math.floor(Math.random()*T.length);return T[e]},t=(T,e,d)=>{const g=d.value[T],r=e>2?2:e;g.points+r<=g.limit?g.owner==="neutral"?g.canInc===g.incOn?(g.points+=r,g.canInc=0):g.canInc++:g.points+=r:g.points+r>g.limit&&(g.points=g.limit)},s=(T,e,d)=>{const g=d.value[T];g.points-=e,g.points<0&&(g.points=0)};return{getRandomNumber:i,inc:t,dec:s,checkSoloNodes:(T,e,d)=>{T.forEach(g=>{const r=e.value[g];r.owner==="neutral"&&!d.value.player.includes(r.i)&&!d.value.enemy.includes(r.i)&&t(g,1,e),r.owner==="player"&&!d.value.player.includes(r.i)&&t(g,1,e),r.owner==="enemy"&&!d.value.enemy.includes(r.i)&&t(g,1,e)})},checkNodeStatus:(T,e,d,g)=>{let r=0,a=0,h=0;g.value[T].forEach(n=>{if(g.value.onDispute.includes(n))return;const o=d.value[e[n]];o.owner===T?(r++,o.points>0&&a++):o.owner==="neutral"&&h++}),g.value[T].forEach(n=>{if(g.value.onDispute.includes(n))return;const o=e[n],f=d.value[o];h?(f.owner===T?s(o,h,d):f.owner==="neutral"&&a&&s(o,a,d),f.owner==="neutral"&&f.points<1&&(f.owner=T)):r===g.value[T].length&&t(o,1,d)})},checkNodesOnDispute:(T,e,d,g,r)=>{let a=0,h=0;if(e.length===0)return;const n=new Set([...d]),o=new Set([...g]);e.forEach(f=>{n.delete(f),o.delete(f)}
6426),Array.from(n).forEach(f=>{const u=T[f],v=r.value[u];s(u,1,r),v.points>0&&a++}),Array.from(o).forEach(f=>{const u=T[f],v=r.value[u];s(u,1,r),v.points>0&&h++}),e.forEach(f=>{const u=T[f],v=r.value[u];v.owner==="neutral"?(v.points-=h+h,v.playerPoints+=a,v.enemyPoints+=h,v.points<1&&(v.owner=v.playerPoints>v.enemyPoints?"player":"enemy",v.points=0,v.playerPoints=0,v.enemyPoints=0)):(v.points+=v.owner==="player"?a-h:h-a,v.points<1&&(v.points=0,v.owner=v.owner==="player"?"enemy":"player"))})},checkRivalryLimits:(T,e)=>{let d=0,g=0;T.forEach(r=>{const a=e.value[r];a.owner==="player"?d++:a.owner==="enemy"&&g++}),T.forEach(r=>{const a=e.value[r];a.owner==="player"?(a.limit=100+10*d,a.points>a.limit&&(a.points=a.limit)):a.owner==="enemy"?(a.limit=100+10*g,a.points>a.limit&&(a.points=a.limit)):a.owner==="neutral"&&(a.limit=100,a.points>a.limit&&(a.points=a.limit))})}}},rr=i=>(fe("data-v-12c29e5f"),i=i(),ve(),i),S$={class:"grid-layout grid-4"},E$=rr(()=>H("div",null,null,-1)),P$=rr(()=>H("div",null,null,-1)),b$=rr(()=>H("div",null,null,-1)),M$=rr(()=>H("div",null,null,-1)),w$=rr(()=>H("div",null,null,-1)),A$=rr(()=>H("div",null,null,-1)),R$=rr(()=>H("div",null,null,-1)),O$=rr(()=>H("div",null,null,-1)),L$=1,F$=Bt({__name:"GridLevel1",props:{isPlaying:{type:Boolean}},emits:["stop"],setup(i,{emit:t}){const s=i,{getRandomNumber:c,checkSoloNodes:C,checkNodesOnDispute:S,checkNodeStatus:l,checkRivalryLimits:T}=Cp(),e=it(500),d=it({player:{i:0,points:50,owner:"player",playerPoints:50,enemyPoints:0,isClickable:!1,attacker:"player",incOn:1,canInc:0,limit:100},connector1:{i:1,points:0,owner:"neutral",playerPoints:0,enemyPoints:0,isClickable:!1,attacker:"neutral",incOn:1,canInc:0,limit:0},neutral1:{i:1,points:10,owner:"neutral",playerPoints:0,enemyPoints:0,isClickable:!1,attacker:"neutral",incOn:1,canInc:0,limit:100},connector2:{i:2,points:0,owner:"neutral",playerPoints:0,enemyPoints:0,isClickable:!1,attacker:"none",incOn:1,canInc:0,limit:0},neutral2:{i:2,points:10,owner:"neutral",playerPoints:0,enemyPoints:0,isClickable:!1,attacker:"neutral",incOn:1,canInc:0,limit:100},connector3:{i:3,points:0,owner:"neutral",playerPoints:0,enemyPoints:0,isClickable:!1,attacker:"none",incOn:1,canInc:0,limit:0},enemy:{i:3,points:50,owner:"enemy",playerPoints:0,enemyPoints:50,isClickable:!1,attacker:"enemy",incOn:1,canInc:0,limit:100}}),g=wt(()=>{const p=new Set([]),x=new Set([]),y=new Set([]);return d.value.connector1.owner==="player"&&(p.add(0),p.add(1)),d.value.connector2.owner==="player"&&(p.add(1),p.add(2)),d.value.connector3.owner==="player"&&(p.add(2),p.add(3)),d.value.connector1.owner==="enemy"&&(x.add(0),x.add(1)),d.value.connector2.owner==="enemy"&&(x.add(1),x.add(2)),d.value.connector3.owner==="enemy"&&(x.add(2),x.add(3)),Array.from({length:10},(b,E)=>E+1).forEach(b=>{p.has(b)&&x.has(b)&&y.add(b)}),{player:[...p],enemy:[...x],onDispute:[...y]}}),r=(p,x)=>{ut.click&&ut.click();let y="neutral";switch(x){case"player":y="neutral";break;case"neutral":y="player";break;case"enemy":y="enemy";break}const P=d.value.connector1,b=d.value.connector2,E=d.value.connector3;p===1?P.owner=y:p===2?b.owner=y:p===3&&(E.owner=y)},a=it(200),h=()=>{a.value=c([65,80,90]),d.value.neutral1.incOn=c([2,2,3]),d.value.neutral2.incOn=c([1,1,2]);const p=[15,16,17,18,19];d.value.neutral1.points=c(p),d.value.neutral2.points=c(p)},n=()=>{const p=d.value.enemy,x=d.value.neutral2,y=d.value.connector3,P=d.value.neutral1,b=d.value.connector2;p.points===a.value&&x.owner==="neutral"&&(y.owner="enemy"),x.owner==="enemy"&&b.owner==="neutral"&&P.owner=="neutral"&&x.points>P.points&&p.points>50&&(b.owner="enemy"),P.owner==="player"&&b.owner==="enemy"&&(b.owner="neutral"),p.owner==="enemy"&&x.owner==="enemy"&&P.owner!=="enemy"&&p.points<=10&&x.points<=10&&b.owner==="enemy"&&(b.owner="neutral"),x.owner==="player"&&p.owner==="enemy"&&b.owner==="enemy"&&(b.owner="neutral"),p.owner==="enemy"&&y.owner==="enemy"&&x.owner==="player"&&P.owner==="player"&&(y.owner="neutral")},o=()=>{const p=d.value.player,x=d.value.enemy,y=d.value.neutral1,P=d.value.neutral2;p.owner==="player"&&y.owner!=="player"?d.value.connector1.isClickable=!0:d.value.connector1.isClickable=!1,y.owner==="player"&&P.owner!=="player"?d.value.connector2.isClickable=!0:d.value.connector2.isClickable=!1,P.owner==="player"&&x.owner!=="player"?d.value.connector3.isClickable=!0:d.value.connector3.isClickable=!1},f=wt(()=>{let p=0,x=0,y=0;["player","neutral1","neutral2","enemy"].forEach(E=>{const M=d.value[E];M.owner==="player"?p+=M.points:M.owner==="enemy"?x+=M.points:y+=M.points});const b=p+x+y;return{player:Math.round(p/b*100),enemy:Math.round(x/b*100),neutral:Math.round(y/b*100)}}),u=it(null),v=()=>{if(!s.isPlaying)return;const p=["player","neutral1","neutral2","enemy"];o(),C(p,d,g),n(),l("player",p,d,g),l("enemy",p,d,g),S(p,g.value.onDispute,g.value.player,g.value.enemy,d),T(p,d)},m=()=>{f.value.player>=f.value.enemy?t("stop","win"):t("stop","lose")};return ce(()=>{u.value=setInterval(v,e.value),h()}),Hs(()=>{clearInterval(u.value),u.value=null}),(p,x)=>
6426(Q(),et(Xt,null,[H("div",S$,[H("div",null,[ot(gi,Ce(d.value.player,{"interval-time":e.value}),null,16,["interval-time"])]),H("div",null,[ot(Gi,Ce(d.value.connector1,{onOwner:x[0]||(x[0]=y=>r(1,y))}),null,16)]),H("div",null,[ot(gi,Ce(d.value.neutral1,{"interval-time":e.value}),null,16,["interval-time"])]),E$,P$,b$,M$,H("div",null,[ot(Gi,Ce(d.value.connector2,{type:"vertical",onOwner:x[1]||(x[1]=y=>r(2,y))}),null,16)]),w$,A$,R$,O$,H("div",null,[ot(gi,Or(Lr(d.value.neutral2)),null,16)]),H("div",null,[ot(Gi,Or(Lr(d.value.connector3)),null,16)]),H("div",null,[ot(gi,Or(Lr(d.value.enemy)),null,16)])]),ot(Ju,Or(Lr(f.value)),null,16),ot(Kr,{level:0,mode:"counter",limit:L$,onStop:m})],64))}});const I$=kt(F$,[["__scopeId","data-v-12c29e5f"]]),qa=i=>(fe("data-v-53756749"),i=i(),ve(),i),D$={class:"grid-layout grid-5"},B$=qa(()=>H("div",null,null,-1)),k$=qa(()=>H("div",null,null,-1)),G$=qa(()=>H("div",null,null,-1)),N$=qa(()=>H("div",null,null,-1)),V$=qa(()=>H("div",null,null,-1)),z$=qa(()=>H("div",null,null,-1)),Y$=1.5,X$=Bt({__name:"GridLevel2",props:{isPlaying:{type:Boolean}},emits:["stop"],setup(i,{emit:t}){const s=i,{getRandomNumber:c,checkSoloNodes:C,checkNodesOnDispute:S,checkNodeStatus:l,checkRivalryLimits:T}=Cp(),e=it(500),d=it({player:{i:0,points:50,owner:"player",playerPoints:50,enemyPoints:0,isClickable:!1,attacker:"player",incOn:1,canInc:0,limit:100},connector1:{i:1,points:0,owner:"neutral",playerPoints:0,enemyPoints:0,isClickable:!1,attacker:"neutral",incOn:1,canInc:0,limit:0},neutral1:{i:1,points:10,owner:"neutral",playerPoints:0,enemyPoints:0,isClickable:!1,attacker:"neutral",incOn:1,canInc:0,limit:100},connector2:{i:2,points:0,owner:"neutral",playerPoints:0,enemyPoints:0,isClickable:!1,attacker:"none",incOn:1,canInc:0,limit:0},neutral2:{i:2,points:10,owner:"neutral",playerPoints:0,enemyPoints:0,isClickable:!1,attacker:"neutral",incOn:1,canInc:0,limit:100},connector3:{i:3,points:0,owner:"neutral",playerPoints:0,enemyPoints:0,isClickable:!1,attacker:"none",incOn:1,canInc:0,limit:0},neutral3:{i:3,points:10,owner:"neutral",playerPoints:0,enemyPoints:0,isClickable:!1,attacker:"neutral",incOn:1,canInc:0,limit:100},connector4:{i:4,points:0,owner:"neutral",playerPoints:0,enemyPoints:0,isClickable:!1,attacker:"none",incOn:1,canInc:0,limit:0},enemy:{i:4,points:50,owner:"enemy",playerPoints:0,enemyPoints:50,isClickable:!1,attacker:"enemy",incOn:1,canInc:0,limit:100}}),g=(b,E)=>{ut.click&&ut.click();let M="neutral";switch(E){case"player":M="neutral";break;case"neutral":M="player";break;case"enemy":M="enemy";break}const w=d.value.connector1,A=d.value.connector2,R=d.value.connector3,L=d.value.connector4;b===1?w.owner=M:b===2?A.owner=M:b===3?R.owner=M:b===4&&(L.owner=M)},r=wt(()=>{const b=new Set([]),E=new Set([]),M=new Set([]);return d.value.connector1.owner==="player"&&(b.add(0),b.add(1)),d.value.connector2.owner==="player"&&(b.add(1),b.add(2)),d.value.connector3.owner==="player"&&(b.add(2),b.add(3)),d.value.connector4.owner==="player"&&(b.add(3),b.add(4)),d.value.connector1.owner==="enemy"&&(E.add(0),E.add(1)),d.value.connector2.owner==="enemy"&&(E.add(1),E.add(2)),d.value.connector3.owner==="enemy"&&(E.add(2),E.add(3)),d.value.connector4.owner==="enemy"&&(E.add(3),E.add(4)),Array.from({length:10},(A,R)=>R+1).forEach(A=>{b.has(A)&&E.has(A)&&M.add(A)}),{player:[...b],enemy:[...E],onDispute:[...M]}}),a=()=>{const b=d.value.player,E=d.value.enemy,M=d.value.neutral1,w=d.value.neutral2,A=d.value.neutral3;b.owner==="player"&&M.owner!=="player"?d.value.connector1.isClickable=!0:d.value.connector1.isClickable=!1,M.owner==="player"&&w.owner!=="player"?d.value.connector2.isClickable=!0:d.value.connector2.isClickable=!1,w.owner==="player"&&A.owner!=="player"?d.value.connector3.isClickable=!0:d.value.connector3.isClickable=!1,A.owner==="player"&&E.owner!=="player"?d.value.connector4.isClickable=!0:d.value.connector4.isClickable=!1},h=()=>{const b=d.value.enemy,E=d.value.neutral1,M=d.value.neutral2,w=d.value.neutral3,A=d.value.connector2,R=d.value.connector3,L=d.value.connector4;b.points===p.value&&w.owner==="neutral"&&(L.owner="enemy"),w.owner==="enemy"&&M.owner==="neutral"&&b.points+w.points>M.points&&w.points>=30&&(R.owner="enemy"),M.owner==="enemy"&&E.owner==="neutral"&&(A.owner="enemy")},n=()=>{const b=d.value.enemy,E=d.value.neutral1,M=d.value.neutral2,w=d.value.neutral3,A=d.value.connector2,R=d.value.connector3,L=d.value.connector4;b.points===p.value&&w.owner==="neutral"&&(L.owner="enemy"),w.owner==="enemy"&&M.owner==="neutral"&&w.points>M.points&&w.points>30&&(R.owner="enemy"),M.owner==="enemy"&&E.owner==="neutral"&&(A.owner="enemy")},o=it(null),f=()=>{const E=c([1,2]);return console.log("enemy opt",E),{1:h,2:n}[E]},u=()=>{d.value.enemy,d.value.neutral1;const b=d.value.neutral2,E=d.value.neutral3,M=d.value.connector2,w=d.value.connector3,A=d.value.connector4;b.owner==="player"&&w.owner==="enemy"&&(w.owner="neutral"),E.owner==="player"&&A.owner==="enemy"&&(A.owner="neutral"),b.owner==="player"&&M.owner==="enemy"&&(M.owner="neutral")},v=it(null),m=()=>{if(!s.isPlaying)return;const b=["player","neutral1","neutral2","neutral3","enemy"];a(),C(b,d,r),o.value&&o.value(),u(),l("player",b,d,r),l("enemy",b,d,r),S(b,r.value.onDispute,r.value.player,r.value.enemy,d),T(b,d)},p=it(90),x=()=>{p.value=c([60,65,70]),d.value.neutral1.incOn=c([2,2,3,3]),d.value.neutral2.incOn=c([1,2,2,3]),d.value.neutral3.incOn=c([1,1,2,2]);const b=[21,22,23,24,25,26,27,28,29];d.value.neutral1.points=c(b),d.value.neutral2.points=c(b),d.value.neutral3.points=c(b)},y=wt(()=>{let b=0,E=0,M=0;["player","neutral1","neutral2","neutral3","enemy"].forEach(R=>{const L=d.value[R];L.owner==="player"?b+=L.points:L.owner==="enemy"?E+=L.points:M+=L.points});const A=b+E+M;return{player:Math.round(b/A*100),enemy:Math.round(E/A*100),neutral:Math.round(M/A*100)}}),P=()=>{y.value.player>=y.value.enemy?t("stop","win"):t("stop","lose")};return ce(()=>{o.value=f(),v.value=setInterval(m,e.value),x()}),Hs(()=>{clearInterval(v.value),v.value=null}),(b,E)=>
6426(Q(),et(Xt,null,[H("div",D$,[H("div",null,[ot(gi,Ce(d.value.player,{"interval-time":e.value}),null,16,["interval-time"])]),B$,k$,H("div",null,[ot(Gi,Ce({type:"diagonal-b"},d.value.connector3,{onOwner:E[0]||(E[0]=M=>g(3,M))}),null,16)]),H("div",null,[ot(gi,Ce(d.value.neutral3,{"interval-time":e.value}),null,16,["interval-time"])]),H("div",null,[ot(Gi,Ce({type:"vertical"},d.value.connector1,{onOwner:E[1]||(E[1]=M=>g(1,M))}),null,16)]),G$,H("div",null,[ot(gi,Ce(d.value.neutral2,{"interval-time":e.value}),null,16,["interval-time"])]),N$,H("div",null,[ot(Gi,Ce({type:"vertical"},d.value.connector4,{onOwner:E[2]||(E[2]=M=>g(4,M))}),null,16)]),H("div",null,[ot(gi,Ce(d.value.neutral1,{"interval-time":e.value}),null,16,["interval-time"])]),H("div",null,[ot(Gi,Ce({type:"diagonal-c"},d.value.connector2,{onOwner:E[3]||(E[3]=M=>g(2,M))}),null,16)]),V$,z$,H("div",null,[ot(gi,Ce(d.value.enemy,{"interval-time":e.value}),null,16,["interval-time"])])]),ot(Ju,Or(Lr(y.value)),null,16),ot(Kr,{level:0,mode:"counter",limit:Y$,onStop:P})],64))}});const U$=kt(X$,[["__scopeId","data-v-53756749"]]),Tp=i=>(fe("data-v-efeae043"),i=i(),ve(),i),W$={class:"grid-layout grid-6"},H$=Tp(()=>H("div",null,null,-1)),$$=Tp(()=>H("div",null,null,-1)),j$=Tp(()=>H("div",null,null,-1)),K$=2,Z$=Bt({__name:"GridLevel3",props:{isPlaying:{type:Boolean}},emits:["stop"],setup(i,{emit:t}){const s=i,{getRandomNumber:c,checkSoloNodes:C,checkNodesOnDispute:S,checkNodeStatus:l,checkRivalryLimits:T}=Cp(),e=it(500),d=it({player:{i:0,points:50,owner:"player",playerPoints:50,enemyPoints:0,isClickable:!1,attacker:"player",incOn:1,canInc:0,limit:100},connector1:{i:1,points:0,owner:"neutral",playerPoints:0,enemyPoints:0,isClickable:!1,attacker:"neutral",incOn:1,canInc:0,limit:0},neutral1:{i:1,points:10,owner:"neutral",playerPoints:0,enemyPoints:0,isClickable:!1,attacker:"neutral",incOn:1,canInc:0,limit:100},connector2:{i:2,points:0,owner:"neutral",playerPoints:0,enemyPoints:0,isClickable:!1,attacker:"none",incOn:1,canInc:0,limit:0},neutral2:{i:2,points:10,owner:"neutral",playerPoints:0,enemyPoints:0,isClickable:!1,attacker:"neutral",incOn:1,canInc:0,limit:100},connector3:{i:3,points:0,owner:"neutral",playerPoints:0,enemyPoints:0,isClickable:!1,attacker:"none",incOn:1,canInc:0,limit:0},neutral3:{i:3,points:10,owner:"neutral",playerPoints:0,enemyPoints:0,isClickable:!1,attacker:"neutral",incOn:1,canInc:0,limit:100},connector4:{i:4,points:0,owner:"neutral",playerPoints:0,enemyPoints:0,isClickable:!1,attacker:"none",incOn:1,canInc:0,limit:0},neutral4:{i:4,points:10,owner:"neutral",playerPoints:0,enemyPoints:0,isClickable:!1,attacker:"neutral",incOn:1,canInc:0,limit:100},connector5:{i:5,points:0,owner:"neutral",playerPoints:0,enemyPoints:0,isClickable:!1,attacker:"none",incOn:1,canInc:0,limit:0},connector6:{i:6,points:0,owner:"neutral",playerPoints:0,enemyPoints:0,isClickable:!1,attacker:"none",incOn:1,canInc:0,limit:0},enemy:{i:5,points:50,owner:"enemy",playerPoints:0,enemyPoints:50,isClickable:!1,attacker:"enemy",incOn:1,canInc:0,limit:100}}),g=wt(()=>{const y=new Set([]),P=new Set([]),b=new Set([]);return d.value.connector1.owner==="player"&&(y.add(0),y.add(1)),d.value.connector2.owner==="player"&&(y.add(0),y.add(2)),d.value.connector3.owner==="player"&&(y.add(1),y.add(3)),d.value.connector4.owner==="player"&&(y.add(2),y.add(4)),d.value.connector5.owner==="player"&&(y.add(3),y.add(5)),d.value.connector6.owner==="player"&&(y.add(4),y.add(5)),d.value.connector1.owner==="enemy"&&(P.add(0),P.add(1)),d.value.connector2.owner==="enemy"&&(P.add(0),P.add(2)),d.value.connector3.owner==="enemy"&&(P.add(1),P.add(3)),d.value.connector4.owner==="enemy"&&(P.add(2),P.add(4)),d.value.connector5.owner==="enemy"&&(P.add(3),P.add(5)),d.value.connector6.owner==="enemy"&&(P.add(4),P.add(5)),Array.from({length:10},(M,w)=>w+1).forEach(M=>{y.has(M)&&P.has(M)&&b.add(M)}),{player:[...y],enemy:[...P],onDispute:[...b]}}),r=()=>{const y=d.value.player,P=d.value.enemy,b=d.value.neutral1,E=d.value.neutral2,M=d.value.neutral3,w=d.value.neutral4;y.owner==="player"&&b.owner!=="player"?d.value.connector1.isClickable=!0:d.value.connector1.isClickable=!1,y.owner==="player"&&E.owner!=="player"?d.value.connector2.isClickable=!0:d.value.connector2.isClickable=!1,b.owner==="player"&&M.owner!=="player"?d.value.connector3.isClickable=!0:d.value.connector3.isClickable=!1,E.owner==="player"&&w.owner!=="player"?d.value.connector4.isClickable=!0:d.value.connector4.isClickable=!1,w.owner==="player"&&P.owner!=="player"?d.value.connector6.isClickable=!0:d.value.connector6.isClickable=!1,M.owner==="player"&&P.owner!=="player"?d.value.connector5.isClickable=!0:d.value.connector5.isClickable=!1},a=(y,P)=>{ut.click&&ut.click();let b="neutral";switch(P){case"player":b="neutral";break;case"neutral":b="player";break;case"enemy":b="enemy";break}const E=d.value.connector1,M=d.value.connector2,w=d.value.connector3,A=d.value.connector4,R=d.value.connector5,L=d.value.connector6;y===1?E.owner=b:y===2?M.owner=b:y===3?w.owner=b:y===4?A.owner=b:y===5?R.owner=b:y===6&&(L.owner=b)},h=()=>{const y=d.value.player,P=d.value.enemy,b=d.value.neutral1,E=d.value.neutral2,M=d.value.neutral3,w=d.value.neutral4,A=d.value.connector1,R=d.value.connector2,L=d.value.connector3,O=d.value.connector4,I=d.value.connector5,D=d.value.connector6;A.owner==="player"&&D.owner==="neutral"&&I.owner==="neutral"&&(D.owner="enemy"),R.owner==="player"&&D.owner==="neutral"&&I.owner==="neutral"&&(I.owner="enemy"),P.owner==="enemy"&&M.owner==="enemy"&&b.owner==="neutral"&&A.owner==="neutral"&&P.points>50&&M.points>50&&(L.owner="enemy"),P.owner==="enemy"&&w.owner==="enemy"&&E.owner==="neutral"&&P.points>50&&w.points>50&&(D.owner="enemy"),P.owner=="enemy"&&M.owner==="enemy"&&b.owner==="player"&&P.points>50&&M.points>50&&(D.owner="enemy"),(P.owner==="enemy"&&w.owner==="enemy"&&P.points<0||M.points<10)&&(b.owner==="player"&&L.owner==="enemy"&&(L.owner="neutral"),w.owner==="player"&&D.owner==="enemy"&&(D.owner="neutral")),M.owner==="player"&&I.owner==="enemy"&&(I.owner="neutral"),w.owner==="player"&&D.owner==="enemy"&&(D.owner="neutral"),P.owner==="enemy"&&M.owner==="enemy"&&b.owner==="enemy"&&A.owner==="neutral"&&D.owner==="neutral"&&P.points>60&&M.points>60&&b.points>60&&(D.owner="enemy"),P.owner==="enemy"&&P.points===80&&A.owner==="neutral"&&R.owner==="neutral"&&D.owner==="neutral"&&I.owner==="neutral"&&(b.points>w.points&&(D.owner="enemy"),b.points<w.points&&(I.owner="enemy")),P.owner==="enemy"&&w.owner==="enemy"&&b.owner==="neutral"&&E.owner==="player"&&O.owner==="neutral"&&A.owner==="player"&&P.points>60&&w.points>50&&P.points+w.points>y.points+M.points&&(O.owner="enemy"),P.owner==="enemy"&&w.owner==="enemy"&&E.owner==="enemy"&&M.owner==="neutral"&&R.owner==="neutral"&&L.owner==="neutral"&&(O.owner="enemy"),P.owner==="enemy"&&P.points>90&&w.owner==="enemy"&&w.points>90&&E.owner==="enemy"&&E.points>90&&b.owner==="neutral"&&R.owner==="neutral"&&O.owner==="neutral"&&(O.owner="enemy"),P.owner==="enemy"&&P.points>90&&w.owner==="enemy"&&w.points>90&&y.owner==="player"&&b.owner==="player"&&E.owner==="neutral"&&M.owner==="neutral"&&R.owner==="neutral"&&L.owner==="neutral"&&O.owner==="neutral"&&I.owner==="neutral"&&P.points>70&&w.points>70&&(E.points<=M.points&&(O.owner="enemy"),E.points>M.points&&(I.owner="enemy")),P.owner==="enemy"&&w.owner==="enemy"&&b.owner==="enemy"&&E.owner==="neutral"&&M.owner==="neutral"&&P.points>90&&w.points>90&&(E.points<=M.points?O.owner="enemy":I.owner="enemy")},n=it(null),o=()=>{const P=c([1]);return console.log("enemy opt",P),{1:h}[P]},f=it(null),u=()=>{if(!s.isPlaying)return;const y=["player","neutral1","neutral2","neutral3","neutral4","enemy"];
6426r(),C(y,d,g),n.value&&n.value(),l("player",y,d,g),l("enemy",y,d,g),S(y,g.value.onDispute,g.value.player,g.value.enemy,d),T(y,d)},v=it(90),m=()=>{v.value=c([60,62,65,67,70]),d.value.neutral1.incOn=c([1,2,2,3]),d.value.neutral2.incOn=c([1,2,2,3]),d.value.neutral3.incOn=c([1,2,2,3]),d.value.neutral4.incOn=c([1,2,2,3]);const y=[31,32,33,34,35,36,37,38,39,40];d.value.neutral1.points=c(y),d.value.neutral2.points=c(y),d.value.neutral3.points=c(y),d.value.neutral4.points=c(y)},p=wt(()=>{let y=0,P=0,b=0;["player","neutral1","neutral2","neutral3","enemy"].forEach(w=>{const A=d.value[w];A.owner==="player"?y+=A.points:A.owner==="enemy"?P+=A.points:b+=A.points});const M=y+P+b;return{player:Math.round(y/M*100),enemy:Math.round(P/M*100),neutral:Math.round(b/M*100)}}),x=()=>{p.value.player>=p.value.enemy?t("stop","win"):t("stop","lose")};return ce(()=>{n.value=o(),f.value=setInterval(u,e.value),m()}),Hs(()=>{clearInterval(f.value),f.value=null}),(y,P)=>(Q(),et(Xt,null,[H("div",W$,[H("div",null,[ot(gi,Ce(d.value.player,{"interval-time":e.value}),null,16,["interval-time"])]),H("div",null,[ot(Gi,Ce(d.value.connector2,{onOwner:P[0]||(P[0]=b=>a(2,b))}),null,16)]),H("div",null,[ot(gi,Ce(d.value.neutral2,{"interval-time":e.value}),null,16,["interval-time"])]),H("div",null,[ot(Gi,Ce(d.value.connector4,{onOwner:P[1]||(P[1]=b=>a(4,b))}),null,16)]),H("div",null,[ot(gi,Ce(d.value.neutral4,{"interval-time":e.value}),null,16,["interval-time"])]),H("div",null,[ot(Gi,Ce({type:"vertical"},d.value.connector1,{onOwner:P[2]||(P[2]=b=>a(1,b))}),null,16)]),H$,$$,j$,H("div",null,[ot(Gi,Ce({type:"vertical"},d.value.connector6,{onOwner:P[3]||(P[3]=b=>a(6,b))}),null,16)]),H("div",null,[ot(gi,Ce(d.value.neutral1,{"interval-time":e.value}),null,16,["interval-time"])]),H("div",null,[ot(Gi,Ce(d.value.connector3,{onOwner:P[4]||(P[4]=b=>a(3,b))}),null,16)]),H("div",null,[ot(gi,Ce(d.value.neutral3,{"interval-time":e.value}),null,16,["interval-time"])]),H("div",null,[ot(Gi,Ce(d.value.connector5,{onOwner:P[5]||(P[5]=b=>a(5,b))}),null,16)]),H("div",null,[ot(gi,Ce(d.value.enemy,{"interval-time":e.value}),null,16,["interval-time"])])]),ot(Ju,Or(Lr(p.value)),null,16),ot(Kr,{level:0,mode:"counter",limit:K$,onStop:x})],64))}});const J$=kt(Z$,[["__scopeId","data-v-efeae043"]]),Q$=Bt({__name:"Game3Layout",props:{level:{},isPlaying:{type:Boolean}},emits:["stop"],setup(i,{emit:t}){const s=c=>{t("stop",c)};return(c,C)=>c.level===1?(Q(),Rt(I$,{key:0,"is-playing":c.isPlaying,onStop:s},null,8,["is-playing"])):c.level===2?(Q(),Rt(U$,{key:1,"is-playing":c.isPlaying,onStop:s},null,8,["is-playing"])):c.level===3?(Q(),Rt(J$,{key:2,"is-playing":c.isPlaying,onStop:s},null,8,["is-playing"])):ft("",!0)}}),q$={class:"game-area"},_$={key:1,class:"game-container"},Lx=2,tj=Bt({__name:"AppGameRmThree",setup(i){const{closeGame:t}=js(),s=()=>{S.value=!1},c=it(!1),C=it("lose"),S=it(!1),l=it("lose"),T=it(0),e=it(!1),d=it(!1),g=it(!0),r=it(0),a=it("next"),h=()=>{l.value="instruction",S.value=!0},n=async()=>{ut.click&&ut.click(),c.value=!0,g.value=!0,e.value=!1},o=()=>{e.value||(S.value=!1,c.value=!1,g.value=!1)},f=async()=>{ut.win&&ut.win(),e.value=!0,d.value=!1,c.value=!1,S.value=!1,T.value>=Lx?(S.value=!1,await t(C.value)):(C.value="win",r.value++,T.value++)},u=v=>{g.value=!1,v==="win"?(l.value="win",C.value="win",a.value=T.value<Lx?"next":"win",S.value=!0):(ut.lose&&ut.lose(),l.value="lose",C.value="lose",S.value=!0)};return ce(()=>{h()}),(v,m)=>(Q(),et(Xt,null,[ot(jr),S.value?(Q(),Rt(ul,{key:0,level:3,mode:l.value,"win-mode":a.value,onRestart:o,onClose:s,onExit:m[0]||(m[0]=p=>ct(t)(C.value)),onWin:f},null,8,["mode","win-mode"])):ft("",!0),ot(dl,{title:"Convencer",onReset:o,onInstruction:h,onClose:m[1]||(m[1]=p=>ct(t)("win"))}),H("div",q$,[c.value?(Q(),et("section",_$,[ot(Q$,{key:"game3LayoutKey",level:T.value+1,"is-playing":g.value,onStop:u},null,8,["level","is-playing"])])):(Q(),Rt(Zu,{key:0,label:T.value===0?"Iniciar Juego":"Siguiente Nivel",onStart:n},null,8,["label"]))])],64))}});const ej=kt(tj,[["__scopeId","data-v-3d0d8071"]]),zc=it(null),Yc=it(null),Xc=it(null),Uc=it(null),AT=()=>({setControls:({left:t,right:s,up:c,down:C})=>{zc.value=t,Yc.value=s,Xc.value=c,Uc.value=C},leftFn:()=>
6426{zc.value&&zc.value()},rightFn:()=>{Yc.value&&Yc.value()},upFn:()=>{Xc.value&&Xc.value()},downFn:()=>{Uc.value&&Uc.value()}}),RT=i=>(fe("data-v-2202e43b"),i=i(),ve(),i),ij={class:"game-grid"},sj={key:0,class:"destroy-counter font-pixel"},nj=RT(()=>H("br",null,null,-1)),rj=RT(()=>H("br",null,null,-1)),aj=Bt({__name:"GameFourGrid",props:{level:{},isPlaying:{type:Boolean},calcGameStatus:{type:Function}},emits:["stop","destroyed"],setup(i,{emit:t}){const s=i,{mdAndUp:c}=kr(),{setControls:C}=AT(),S=it(0);t("destroyed",S.value);const l=wt(()=>s.level+1),T=it(!0),e=it({green:100,red:100}),d=[[0,0],[1,0],[2,0],[3,0],[4,0],[5,0],[6,0],[7,0],[8,0],[9,0],[0,1],[1,1],[2,1],[3,1],[4,1],[5,1],[6,1],[7,1],[8,1],[9,1],[0,2],[1,2],[2,2],[3,2],[4,2],[5,2],[6,2],[7,2],[8,2],[9,2],[0,3],[1,3],[2,3],[3,3],[4,3],[5,3],[6,3],[7,3],[8,3],[9,3],[0,4],[1,4],[2,4],[3,4],[4,4],[5,4],[6,4],[7,4],[8,4],[9,4],[0,5],[1,5],[2,5],[3,5],[4,5],[5,5],[6,5],[7,5],[8,5],[9,5],[0,6],[1,6],[2,6],[3,6],[4,6],[5,6],[6,6],[7,6],[8,6],[9,6],[0,7],[1,7],[2,7],[3,7],[4,7],[5,7],[6,7],[7,7],[8,7],[9,7],[0,8],[1,8],[2,8],[3,8],[4,8],[5,8],[6,8],[7,8],[8,8],[9,8],[0,9],[1,9],[2,9],[3,9],[4,9],[5,9],[6,9],[7,9],[8,9],[9,9],[0,10],[1,10],[2,10],[3,10],[4,10],[5,10],[6,10],[7,10],[8,10],[9,10],[0,11],[1,11],[2,11],[3,11],[4,11],[5,11],[6,11],[7,11],[8,11],[9,11]],g=["block-blue","block-yellow"],r=it([]),a=()=>{r.value=d.map((k,V)=>({key:`block-${V}`,x:k[0],y:k[1],isEmpty:!0,color:"",isMoving:!1,destroy:!1,forceMove:!1}))},h=(k,V)=>r.value.find(U=>U.x===k&&U.y===V),n=(k,V)=>r.value.findIndex(U=>U.x===k&&U.y===V),o=(k,V,U)=>{k.isEmpty=!1,k.color=V,k.isMoving=U||!1,k.forceMove=!1},f=(k,V,U)=>{const $=n(k,V);$!==-1&&(r.value[$].isEmpty=!1,r.value[$].color=U)},u=(k,V)=>{const U=n(k,V);U!==-1&&(r.value[U].isEmpty=!0,r.value[U].color="",r.value[U].isMoving=!1,r.value[U].destroy=!1,r.value[U].forceMove=!1)},v=()=>{const k=h(4,0),V=h(5,0),U=h(4,1),$=h(5,1);return!(k&&!k.isEmpty||V&&!V.isEmpty||U&&!U.isEmpty||$&&!$.isEmpty)},m=()=>{const k=h(4,0),V=h(5,0),U=h(4,1),$=h(5,1),[K,J,_,tt]=B();k&&o(k,K,!0),V&&o(V,J,!0),U&&o(U,_,!0),$&&o($,tt,!0),ut.blockNew&&ut.blockNew()};a(),m();const p=(k,V)=>{let U=0;k==="left"?U=V.x-1<=0?0:V.x-1:U=V.x+1>=9?9:V.x+1;const $=n(U,V.y);o(r.value[$],V.color,!0),k==="right"&&u(V.x,V.y)},x=(k,V)=>{let U=0;k==="left"?U=V.x-1<=0?0:V.x-1:U=V.x+1>=9?9:V.x+1;const $=n(U,V.y);o(r.value[$],V.color,!0),k==="left"&&u(V.x,V.y)},y=(k,V,U)=>{let $=0,K=U==="one"?11:10;k==="down"&&($=V.y+1>=K?K:V.y+1);const J=n(V.x,$);o(r.value[J],V.color,$<K),k==="down"&&u(V.x,V.y)},P=(k,V)=>{const U=h(k.x-1,k.y),$=h(V.x-1,V.y);return!(U&&$&&(!U.isEmpty||!$.isEmpty))},b=(k,V)=>{const U=h(k.x+1,k.y),$=h(V.x+1,V.y);return!(U&&$&&(!U.isEmpty||!$.isEmpty))},E=(k,V)=>{const U=n(k,V);U!==-1&&(r.value[U].destroy=!0)},M=(k,V)=>{const U=k.filter(J=>J.color===V).map(J=>[J.x,J.y]);[...new Set(U.map(J=>J[0]))].sort((J,_)=>J-_).forEach(J=>{const _=U.filter(st=>st[0]===J).map(st=>st[1]).sort((st,ht)=>st-ht),tt=Rp(_).filter(st=>st.length>=3).flat();tt.forEach(st=>{E(J,st)}),tt.length&&(V==="block-green"&&(e.value.green+=tt.length),V==="block-red"&&(e.value.red+=tt.length),ut.destroyBlocks&&ut.destroyBlocks(),S.value+=tt.length)}),[...new Set(U.map(J=>J[1]))].sort((J,_)=>J-_).forEach(J=>{const _=U.filter(st=>st[1]===J).map(st=>st[0]).sort((st,ht)=>st-ht),tt=Rp(_).filter(st=>st.length>=3).flat();tt.forEach(st=>{E(st,J)}),tt.length&&(V==="block-green"&&(e.value.green+=tt.length),V==="block-red"&&(e.value.red+=tt.length),ut.destroyBlocks&&ut.destroyBlocks(),S.value+=tt.length)}),t("destroyed",S.value)},w=()=>{const k=r.value.filter(U=>!U.isMoving&&!U.isEmpty);[...g,"block-green","block-red"].forEach(U=>{M(k,U)})},A=()=>{r.value.filter(V=>V.destroy).forEach(V=>{u(V.x,V.y)}),r.value.forEach(V=>{V.destroy=!1})},R=()=>{w(),A();const k=[10,9,8,7,6,5,4,3,2,1,0];let V=!1;return r.value.forEach(U=>{U.forceMove=!1}),k.forEach(U=>{const $=r.value.filter(K=>K.x===U&&!K.isEmpty&&!K.isMoving);$.length&&$.forEach(K=>{const J=h(K.x,K.y+1);J&&J.isEmpty&&(r.value.filter(tt=>tt.x===K.x&&tt.y<=K.y).forEach(tt=>{!tt.isMoving&&!tt.isEmpty&&(tt.forceMove=!0)}),V=!0)})}),V},L=async()=>{const k=r.value.filter(V=>V.forceMove).sort((V,U)=>U.y-V.y);for(const V of k){const U=h(V.x,V.y+1);U&&o(U,V.color,!1),u(V.x,V.y)}return R()},O=k=>{if(!T.value)return;const V=r.value.filter(_=>_.isMoving);if(!V.length)return;const[U,$,K,J]=V;if(U.x>0&&k==="left"||$.x<9&&k==="right")if(k==="left"){if(!P(U,K))return;p(k,U),x(k,$),p(k,K),x(k,J),ut.moveBlock&&ut.moveBlock()}else{if(!b($,J))return;ut.moveBlock&&ut.moveBlock(),x(k,$),p(k,U),x(k,J),p(k,K)}},I=()=>{const k=r.value.filter(K=>K.isMoving);if(!k.length)return;if(k.some(K=>K.y===11))return!1;let V=!0;const U=Math.max(...k.map(K=>K.y));return k.filter(K=>
6426K.y===U).forEach(K=>{const J=h(K.x,K.y+1);J&&!J.isEmpty&&(V=!1)}),V},D=async k=>{if(!T.value)return;const V=r.value.filter(K=>K.isMoving),U=v(),$=I();if(!(!V.length&&!U))if(j(),$){const[K,J,_,tt]=V;ut.moveBlockDown&&ut.moveBlockDown(),y(k,_,"one"),y(k,tt,"one"),y(k,K,"two"),y(k,J,"two"),W()}else{r.value.forEach(J=>{J.isMoving&&(J.isMoving=!1)}),T.value=!1,w(),A();let K=R();for(;K;)K=await L();v()?(m(),W()):(F(),t("stop")),T.value=!0}};function B(){const k=g.slice(0,l.value+1),V=[];if(l.value===1){V.push("block-green");const U=Mi([...k,"block-green"]);V.push(U);const $=Mi(k);V.push($);const K=Mi([...k,"block-red"]);V.push(K)}else if(l.value===2){V.push("block-green");const U=Mi(k);V.push(U);const $=Mi(k);V.push($);const K=Mi([...k,"block-red"]);V.push(K)}else if(l.value===3){const U=Mi([...k,"block-green","block-green"]);V.push(U);const $=Mi([...k,"block-green","block-green"]);V.push($);const K=Mi([...k,"block-red","block-red","block-green","block-green"]);V.push(K);const J=Mi([...k,"block-red","block-red","block-red","block-green"]);V.push(J)}return Uh([...V])}const z=()=>{if(!T.value)return;const k=r.value.filter(ht=>ht.isMoving);if(!k.length)return;const[V,U,$,K]=k,J={...V},_={...U},tt={...$},st={...K};f(V.x,V.y,tt.color),f(U.x,U.y,J.color),f($.x,$.y,st.color),f(K.x,K.y,_.color),ut.rotateBlock&&ut.rotateBlock()},X=it(null),W=()=>{if(!s.isPlaying){clearInterval(X.value);return}const k=1200-l.value*150;X.value=setInterval(()=>{D("down")},k)},j=()=>{clearInterval(X.value),X.value=null};W();const N=it(null);(()=>{N.value=setInterval(()=>{e.value.red+=.1,e.value.red=+e.value.red.toFixed(1),s.calcGameStatus(e.value.green,e.value.red)},1e3)})();const F=()=>{clearInterval(N.value),N.value=null},G=k=>{switch(k.key){case"ArrowLeft":O("left");break;case"ArrowRight":O("right");break;case"ArrowDown":D("down");break;case"ArrowUp":z();break}};return ti(()=>s.isPlaying,k=>{k||(console.log("STOPPED 4"),j(),F())}),ce(()=>{window.addEventListener("keyup",G)}),Hs(()=>{clearInterval(X.value),window.removeEventListener("keyup",G),clearInterval(N.value)}),C({left:()=>O("left"),right:()=>O("right"),up:()=>z(),down:()=>D("down")}),(k,V)=>(Q(),et(Xt,null,[H("div",ij,[ct(c)?(Q(),et("p",sj,[Ot(Lt(S.value)+" ",1),nj,Ot(" Bloques "),rj,Ot(" Destruidos ")])):ft("",!0),(Q(!0),et(Xt,null,rs(r.value,U=>(Q(),et("div",{key:U.key,class:Ct(["grid-item",U.isEmpty?"empty-block":U.color])},null,2))),128))]),H("div",{tabindex:"0",onKeyup:G},null,32),ot(Ju,{player:e.value.green,enemy:e.value.red,neutral:0},null,8,["player","enemy"])],64))}});const oj=kt(aj,[["__scopeId","data-v-2202e43b"]]),OT=i=>(fe("data-v-ad6bd835"),i=i(),ve(),i),lj={class:"control-grid"},hj=OT(()=>H("div",{class:"control-block"},null,-1)),uj=OT(()=>H("div",{class:"control-block"},null,-1)),dj=Bt({__name:"GameFourControls",props:{isPlaying:{type:Boolean}},setup(i){const t=i,{leftFn:s,rightFn:c,upFn:C,downFn:S}=AT(),l=T=>{if(t.isPlaying)switch(T){case"left":s();break;case"right":c();break;case"up":C();break;case"down":S();break}};return(T,e)=>(Q(),et("div",lj,[hj,H("div",{class:"control-block control-up",onClick:e[0]||(e[0]=d=>l("up"))}),uj,H("div",{class:"control-block control-left",onClick:e[1]||(e[1]=d=>l("left"))}),H("div",{class:"control-block control-down",onClick:e[2]||(e[2]=d=>l("down"))}),H("div",{class:"control-block control-right",onClick:e[3]||(e[3]=d=>l("right"))})]))}});const cj=kt(dj,[["__scopeId","data-v-ad6bd835"]]),fj={class:"game-area"},vj={key:1,class:"game-area-active"},pj={key:1,class:"game-metadata"},mj={key:2,class:"game-btns-container"},gj=2,Fx=2,xj=Bt({__name:"AppGameRmFour",setup(i){const{closeGame:t}=js(),{loadGameEnemyFn:s}=Te(),c=it(0),C=it(!1),S=it("lose"),l=it(!1),T=it("lose"),e=it(!1),d=it(!1),g=it("next"),r=it(!0),a=it(!0),h=()=>{l.value=!1},n=it({img:""}),o=it({enemy:"",player:""}),f=it(0),u=()=>{T.value="instruction",l.value=!0},v=()=>{ut.click&&ut.click(),C.value=!0,r.value=!0,a.value=!1},m=()=>{e.value||(l.value=!1,C.value=!1,f.value=0,a.value=!0)},p=async()=>{ut.win&&ut.win(),e.value=!0,d.value=!1,f.value>=Fx?(l.value=!1,await t(S.value)):(S.value="win",f.value+=1,r.value=!0,C.value=!1,l.value=!1),e.value=!1};ce(()=>{const{img:P,msg:b,rsp:E}=s.value();n.value.img=P,o.value.enemy=b,o.value.player=E,u()});const x=(P,b)=>{P>=b?S.value="win":S.value="lose"},y=()=>{r.value=!1,S.value==="win"?(T.value="win",S.value="win",g.value=f.value<Fx?"next":"win",l.value=!0):(ut.lose&&ut.lose(),T.value="lose",S.value="lose",l.value=!0)};return(P,b)=>
6426(Q(),et(Xt,null,[ot(jr),l.value?(Q(),Rt(ul,{key:0,level:4,mode:T.value,"win-mode":g.value,destroyed:c.value,onRestart:m,onClose:h,onExit:b[0]||(b[0]=E=>ct(t)(S.value)),onWin:p},null,8,["mode","win-mode","destroyed"])):ft("",!0),ot(dl,{title:"Bloques",onReset:m,onInstruction:u,onClose:b[1]||(b[1]=E=>ct(t)("win"))}),H("div",fj,[C.value?(Q(),et("section",vj,[ot(oj,{level:f.value,"calc-game-status":x,"is-playing":r.value,onStop:y,onDestroyed:b[2]||(b[2]=E=>c.value=E)},null,8,["level","is-playing"])])):(Q(),Rt(Zu,{key:0,onStart:v}))]),C.value?(Q(),et("section",pj,[ot(Kr,{level:f.value,mode:"counter",limit:gj,onStop:y},null,8,["level"]),ot(cj,{"is-playing":r.value},null,8,["is-playing"])])):(Q(),et("section",mj,[ot(Yn,{label:f.value===0&&a.value?"Iniciar Juego":"Siguiente Nivel",onClick:v},null,8,["label"])]))],64))}});const yj=kt(xj,[["__scopeId","data-v-39fdf8bc"]]),Cj=i=>(fe("data-v-3fb2ce63"),i=i(),ve(),i),Tj={class:"game-grid"},Sj=["onClick"],Ej={class:"d-flex align-center justify-center mt-4"},Pj={class:"font-pixel mr-10",style:{"font-size":"1.3rem"}},bj=Cj(()=>H("div",{class:"grid-item-mini block-green"},null,-1)),Mj={class:"font-pixel mr-5 ml-1",style:{"font-size":"1.3rem"}},wj=Bt({__name:"GameFiveGrid",props:{level:{},isPlaying:{type:Boolean}},emits:["stop"],setup(i,{emit:t}){const s=i,c=wt(()=>s.level+1),C=it({green:0,red:0}),S=it({green:0,red:0}),l=it(0),T=[[0,0],[1,0],[2,0],[3,0],[4,0],[5,0],[6,0],[7,0],[8,0],[9,0],[0,1],[1,1],[2,1],[3,1],[4,1],[5,1],[6,1],[7,1],[8,1],[9,1],[0,2],[1,2],[2,2],[3,2],[4,2],[5,2],[6,2],[7,2],[8,2],[9,2],[0,3],[1,3],[2,3],[3,3],[4,3],[5,3],[6,3],[7,3],[8,3],[9,3],[0,4],[1,4],[2,4],[3,4],[4,4],[5,4],[6,4],[7,4],[8,4],[9,4],[0,5],[1,5],[2,5],[3,5],[4,5],[5,5],[6,5],[7,5],[8,5],[9,5],[0,6],[1,6],[2,6],[3,6],[4,6],[5,6],[6,6],[7,6],[8,6],[9,6],[0,7],[1,7],[2,7],[3,7],[4,7],[5,7],[6,7],[7,7],[8,7],[9,7],[0,8],[1,8],[2,8],[3,8],[4,8],[5,8],[6,8],[7,8],[8,8],[9,8],[0,9],[1,9],[2,9],[3,9],[4,9],[5,9],[6,9],[7,9],[8,9],[9,9]],e=["block-blue","block-yellow","block-purple","block-orange","block-sky","block-pink"],d=it([]),g=()=>{const f=Uh(e).slice(0,e.length-(4-c.value));d.value=T.map((u,v)=>({key:`block-${v}`,x:u[0],y:u[1],isHidden:!0,color:Mi(f)}))},r=()=>{let f=0,u=0;switch(c.value){case 1:l.value=10,f=3,u=5;break;case 2:l.value=12,f=5,u=5;break;case 3:l.value=14,f=6,u=5;break;case 4:l.value=18,f=7,u=6;break;case 5:l.value=18,f=8,u=8;break}C.value.green=f,C.value.red=u;const v=Math.max(f,u);for(let m=0;m<v;m++){if(m<f){const p=d.value.filter(y=>y.color!=="block-green"&&y.color!=="block-red"),x=Mi(p);x.color="block-green"}if(m<u){const p=d.value.filter(y=>y.color!=="block-green"&&y.color!=="block-red"),x=Mi(p);x.color="block-red"}}},a=async f=>{for(const u of d.value)ut.turn&&ut.turn(),u.isHidden=f,await new Promise(v=>setTimeout(v,10))},h=async()=>{let f=1e3;switch(c.value){case 1:f=3500;break;case 2:f=3500;break;case 3:f=3e3;break;case 4:f=3e3;break;case 5:f=3e3;break}g(),r(),await a(!1),await new Promise(u=>setTimeout(u,f)),await a(!0),n.value=!0},n=it(!1),o=async f=>{if(!(!f.isHidden||!n.value)){if(f.isHidden=!1,l.value-=1,f.color==="block-green"?(S.value.green+=1,ut.right&&ut.right()):f.color==="block-red"?(ut.wrong&&ut.wrong(),S.value.red+=1):ut.neutral&&ut.neutral(),S.value.green===C.value.green){n.value=!1,t("stop","win");return}else if(S.value.red===3){n.value=!1,t("stop","lose");return}l.value<=0&&(n.value=!1,t("stop","lose"))}};return ce(async()=>{await h()}),(f,u)=>(Q(),et(Xt,null,[H("div",Tj,[(Q(!0),et(Xt,null,rs(d.value,v=>(Q(),et("div",{key:v.key,class:Ct(["grid-item",v.isHidden?"hidden-block":v.color]),onClick:m=>o(v)},null,10,Sj))),128))]),H("div",Ej,[H("div",Pj," MOVIMIENTOS: "+Lt(l.value),1),bj,H("div",Mj,Lt(S.value.green)+"/"+Lt(C.value.green),1),H("div",{class:Ct(["grid-item-mini mr-1",S.value.red>=1?"block-red":"hidden-block"])},null,2),H("div",{class:Ct(["grid-item-mini mr-1",S.value.red>=2?"block-red":"hidden-block"])},null,2),H("div",{class:Ct(["grid-item-mini mr-1",S.value.red>=3?"block-red":"hidden-block"])},null,2)])],64))}});const Aj=kt(wj,[["__scopeId","data-v-3fb2ce63"]]),Rj={class:"game-area"},Oj={key:1,class:"game-area-active"},Lj={key:1,class:"game-metadata"},Fj={key:2,class:"game-btns-container"},Ix=4,Ij=1.5,Dj=Bt({__name:"AppGameRmFive",setup(i){const{closeGame:t}=js(),{loadGameEnemyFn:s}=Te(),c=it(!1),C=it("lose"),S=it(!1),l=it("lose"),T=it(!1),e=it(!1),d=it("next"),g=it(!0),r=it(!0),a=()=>{S.value=!1},h=it({img:""}),n=it({enemy:"",player:""}),o=it(0),f=()=>{l.value="instruction",S.value=!0},u=()=>{ut.click&&ut.click(),c.value=!0,r.value=!1},v=()=>{T.value||(S.value=!1,c.value=!1,o.value=0,r.value=!0,g.value=!0)},m=async()=>{ut.win&&ut.win(),T.value=!0,e.value=!1,o.value>=Ix?(S.value=!1,await t(C.value)):(C.value="win",o.value+=1,g.value=!0,c.value=!1,S.value=!1),T.value=!1},p=async x=>
6426{console.log("STOP",g.value,x),g.value&&(await new Promise(y=>setTimeout(y,1500)),g.value=!1,x==="win"?(l.value="win",C.value="win",d.value=o.value<Ix?"next":"win",S.value=!0):(ut.lose&&ut.lose(),l.value="lose",C.value="lose",S.value=!0))};return ce(()=>{const{img:x,msg:y,rsp:P}=s.value();h.value.img=x,n.value.enemy=y,n.value.player=P,f()}),(x,y)=>(Q(),et(Xt,null,[ot(jr),S.value?(Q(),Rt(ul,{key:0,level:5,mode:l.value,"win-mode":d.value,onRestart:v,onClose:a,onExit:y[0]||(y[0]=P=>ct(t)(C.value)),onWin:m},null,8,["mode","win-mode"])):ft("",!0),ot(dl,{title:"Búsqueda",onReset:v,onInstruction:f,onClose:y[1]||(y[1]=P=>ct(t)("win"))}),H("div",Rj,[c.value?(Q(),et("section",Oj,[ot(Aj,{level:o.value,"is-playing":g.value,onStop:p},null,8,["level","is-playing"])])):(Q(),Rt(Zu,{key:0,onStart:u}))]),c.value?(Q(),et("section",Lj,[ot(Kr,{level:o.value,mode:"counter",limit:Ij,onStop:y[2]||(y[2]=P=>p("lose"))},null,8,["level"])])):(Q(),et("section",Fj,[ot(Yn,{label:o.value===0&&r.value?"Iniciar Juego":"Siguiente Nivel",onClick:u},null,8,["label"])]))],64))}});const Bj=kt(Dj,[["__scopeId","data-v-47848de7"]]),kj={class:"backdrop-game"},Gj={class:"game-rm-container"},Nj=Bt({__name:"AppGameRmModal",setup(i){const{gameType:t}=js();return(s,c)=>(Q(),et("div",kj,[H("div",Gj,[ct(t)===1?(Q(),Rt($H,{key:0})):ft("",!0),ct(t)===2?(Q(),Rt(v$,{key:1})):ft("",!0),ct(t)===3?(Q(),Rt(ej,{key:2})):ft("",!0),ct(t)===4?(Q(),Rt(yj,{key:3})):ft("",!0),ct(t)===5?(Q(),Rt(Bj,{key:4})):ft("",!0)])]))}});const Vj=kt(Nj,[["__scopeId","data-v-9e47c06f"]]);const zj={},Yj={class:"backdrop-game"},Xj={class:"game-rm-container"};function Uj(i,t){return Q(),et("div",Yj,[H("div",Xj,[zx(i.$slots,"default",{},void 0,!0)])])}const Wj=kt(zj,[["render",Uj],["__scopeId","data-v-7779e155"]]),ar=i=>(fe("data-v-64b2ccae"),i=i(),ve(),i),Hj={class:"cont"},$j={class:"d-flex flex-column"},jj={class:"selector-text"},Kj={class:"d-flex justify-center"},Zj=ar(()=>H("div",{class:"font-pixel"},[H("p",{style:{"font-size":"1.5rem","line-height":"1.4rem"},class:"mb-2"}," Un nuevo comienzo "),H("p",{style:{"font-size":"1.2rem","line-height":"1.1rem"}}," ¿Estás liste para ir al nuevo colegio?, tendremos mucho que hacer, amistades que conocer, pero antes... ¡necesitamos un poco de estilo!. ")],-1)),Jj=ar(()=>H("p",{class:"font-pixel title-select text-center py-2"}," 1.Configura tu personaje ",-1)),Qj={class:"uniforme-selector"},qj={class:"bloque-selector-base bloque-selector"},_j={class:"uniforme-selector"},tK=ar(()=>H("span",{class:"font-pixel text-item-selector"},"Cabello",-1)),eK={class:"text-item-selector font-pixel"},iK={class:"uniforme-selector"},sK=ar(()=>H("span",{class:"font-pixel text-item-selector"},"Piel",-1)),nK={class:"text-item-selector font-pixel"},rK={class:"uniforme-selector"},aK=ar(()=>H("span",{class:"font-pixel text-item-selector"},"Rostro",-1)),oK={class:"text-item-selector font-pixel"},lK={class:"uniforme-selector"},hK=ar(()=>H("span",{class:"font-pixel text-item-selector"},"Ropa 1",-1)),uK={class:"text-item-selector font-pixel"},dK={class:"uniforme-selector"},cK=ar(()=>H("span",{class:"font-pixel text-item-selector"},"Ropa 2",-1)),fK={class:"text-item-selector font-pixel"},vK=ar(()=>H("p",{clasS:"font-pixel title-select text-center py-2"}," 2.Selecciona tu uniforme ",-1)),pK={class:"uniforme-selector"},mK={key:0,class:"font-pixel text-center"},gK=Bt({__name:"AppGameRmCharSelection",setup(i){const{getConfigState:t,setConfigState:s,imageSampleBuilder:c,loadPlayerHalfBodies:C}=Te(),{saveStatus:S}=Gr(),l=it(-1),T=it(-1),e=it(-1),d=it(-1),g=it(-1),r=it(-1),a=it(1),h=it(!1),n=async A=>{d.value=A,await b(),await E()},o=async A=>{T.value=A,await b(),await E()},f=async A=>{e.value=A,await b(),await E()},u=async A=>{g.value=A,await b(),await E()},v=async A=>{r.value=A,await b(),await E()},m=async A=>{l.value=A,await b(),await E()},p=it(null),x=async()=>{if(h.value=!1,l.value===-1||T.value===-1||e.value===-1||g.value===-1||r.value===-1){h.value=!0,w(),p.value=setTimeout(()=>{h.value=!1},3e3);return}s({uniforme:l.value,hair:T.value,skin:e.value,glasses:d.value,clothes1:g.value,clothes2:r.value,stage:a.value}),await S()},y=it({uniformado:"",calle:"",uniforme1:"",uniforme2:"",uniforme3:"",uniforme4:""}),P=it(""),b=async()=>{const A={uniforme:l.value,hair:T.value,skin:e.value,glasses:d.value,ropa1:g.value,ropa2:r.value},{uniformado:R,calle:L,uniforme1:O,uniforme2:I,uniforme3:D,uniforme4:B}=await c(A);y.value={uniformado:"background-image: url("+R+")",calle:"background-image: url("+L+")",uniforme1:"background-image: url("+O+")",uniforme2:"background-image: url("+I+")",uniforme3:"background-image: url("+D+")",uniforme4:"background-image: url("+B+")"}},E=async()=>{const A={uniforme:l.value===-1?1:l.value,hair:T.value===-1?1:T.value,skin:e.value===-1?1:e.value,glasses:d.value===-1?1:d.value,ropa1:g.value===-1?1:g.value,ropa2:r.value===-1?1:r.value},{player_ropa:R}=await C(A);P.value=R},M=it(!1);ce(async()=>{const A=t();l.value=A.uniforme,T.value=A.hair,e.value=A.skin,d.value=A.glasses,g.value=A.clothes1,r.value=A.clothes2,a.value=A.stage,await b(),await E(),M.value=!0});const w=()=>{p.value&&(clearTimeout(p.value),p.value=null)};return Hs(()=>{w()}),(A,R)=>(Q(),Rt(Wj,null,{default:Dt(()=>[ot(jr),H("section",Hj,[H("section",$j,[H("div",jj,[H("div",Kj,[M.value?(Q(),Rt(xs,{key:0,char:"custom",custom:P.value,"class-name":"char-img"},null,8,["custom"])):ft("",!0)]),Zj])]),Jj,H("div",Qj,[H("span",qj,[H("span",{style:ue(y.value.calle),class:"img-sample"},null,4)])]),H("div",_j,[tK,H("span",{class:Ct({"item-selector":!0,"selector-1":T.value!==1,"selector-1-selected":T.value===1}),onClick:R[0]||(R[0]=L=>o(1))},null,2),H("span",{class:Ct({"item-selector":!0,"selector-2":T.value!==2,"selector-2-selected":T.value===2}),onClick:R[1]||(R[1]=L=>o(2))},null,2),H("span",{class:Ct({"item-selector":!0,"selector-3":T.value!==3,"selector-3-selected":T.value===3}),onClick:R[2]||(R[2]=L=>o(3))},null,2),H("span",{class:Ct({"item-selector":!0,"selector-4":T.value!==4,"selector-4-selected":T.value===4}),onClick:R[3]||(R[3]=L=>o(4))},null,2),H("span",eK,Lt(T.value===-1?"---":"OK"),1)]),H("div",iK,[sK,H("span",{class:Ct({"item-selector":!0,"selector-1":e.value!==1,"selector-1-selected":e.value===1}),onClick:R[4]||(R[4]=L=>f(1))},null,2),H("span",{class:Ct({"item-selector":!0,"selector-2":e.value!==2,"selector-2-selected":e.value===2}),onClick:R[5]||(R[5]=L=>f(2))},null,2),H("span",{class:Ct({"item-selector":!0,"selector-3":e.value!==3,"selector-3-selected":e.value===3}),onClick:R[6]||(R[6]=L=>f(3))},null,2),H("span",{class:Ct({"item-selector":!0,"selector-4":e.value!==4,"selector-4-selected":e.value===4}),onClick:R[7]||(R[7]=L=>f(4))},null,2),H("span",nK,Lt(e.value===-1?"---":"OK"),1)]),H("div",rK,[aK,H("span",{class:Ct({"item-selector":!0,"selector-1":d.value!==1,"selector-1-selected":d.value===1}),onClick:R[8]||(R[8]=L=>n(1))},null,2),H("span",{class:Ct({"item-selector":!0,"selector-2":d.value!==2,"selector-2-selected":d.value===2}),onClick:R[9]||(R[9]=L=>n(2))},null,2),H("span",{class:Ct({"item-selector":!0,"selector-3":d.value!==3,"selector-3-selected":d.value===3}),onClick:R[10]||(R[10]=L=>n(3))},null,2),H("span",{class:Ct({"item-selector":!0,"selector-4":d.value!==4,"selector-4-selected":d.value===4}),onClick:R[11]||(R[11]=L=>n(4))},null,2),H("span",oK,Lt(g.value===-1?"---":"OK"),1)]),H("div",lK,[hK,H("span",{class:Ct({"item-selector":!0,"selector-1":g.value!==1,"selector-1-selected":g.value===1}),onClick:R[12]||(R[12]=L=>u(1))},null,2),H("span",{class:Ct({"item-selector":!0,"selector-2":g.value!==2,"selector-2-selected":g.value===2}),onClick:R[13]||(R[13]=L=>u(2))},null,2),H("span",{class:Ct({"item-selector":!0,"selector-3":g.value!==3,"selector-3-selected":g.value===3}),onClick:R[14]||(R[14]=L=>u(3))},null,2),H("span",{class:Ct({"item-selector":!0,"selector-4":g.value!==4,"selector-4-selected":g.value===4}),onClick:R[15]||(R[15]=L=>u(4))}
6426,null,2),H("span",uK,Lt(g.value===-1?"---":"OK"),1)]),H("div",dK,[cK,H("span",{class:Ct({"item-selector":!0,"selector-1":r.value!==1,"selector-1-selected":r.value===1}),onClick:R[16]||(R[16]=L=>v(1))},null,2),H("span",{class:Ct({"item-selector":!0,"selector-2":r.value!==2,"selector-2-selected":r.value===2}),onClick:R[17]||(R[17]=L=>v(2))},null,2),H("span",{class:Ct({"item-selector":!0,"selector-3":r.value!==3,"selector-3-selected":r.value===3}),onClick:R[18]||(R[18]=L=>v(3))},null,2),H("span",{class:Ct({"item-selector":!0,"selector-4":r.value!==4,"selector-4-selected":r.value===4}),onClick:R[19]||(R[19]=L=>v(4))},null,2),H("span",fK,Lt(r.value===-1?"---":"OK"),1)]),vK,H("div",pK,[H("span",{class:Ct({"bloque-selector-base":!0,"bloque-selector":l.value!==1,"bloque-selector-selected":l.value===1}),onClick:R[20]||(R[20]=L=>m(1))},[H("span",{style:ue(y.value.uniforme1),class:"img-sample"},null,4)],2),H("span",{class:Ct({"bloque-selector-base":!0,"bloque-selector":l.value!==2,"bloque-selector-selected":l.value===2}),onClick:R[21]||(R[21]=L=>m(2))},[H("span",{style:ue(y.value.uniforme2),class:"img-sample"},null,4)],2),H("span",{class:Ct({"bloque-selector-base":!0,"bloque-selector":l.value!==3,"bloque-selector-selected":l.value===3}),onClick:R[22]||(R[22]=L=>m(3))},[H("span",{style:ue(y.value.uniforme3),class:"img-sample"},null,4)],2),H("span",{class:Ct({"bloque-selector-base":!0,"bloque-selector":l.value!==4,"bloque-selector-selected":l.value===4}),onClick:R[23]||(R[23]=L=>m(4))},[H("span",{style:ue(y.value.uniforme4),class:"img-sample"},null,4)],2)]),H("div",{class:"font-pixel continue-btn",onClick:x}," Continuar "),h.value?(Q(),et("p",mK," Debes seleccionar todas las opciones para continuar ")):ft("",!0)])]),_:1}))}});const xK=kt(gK,[["__scopeId","data-v-64b2ccae"]]),yK="/assets/imgs/logo_rm_solo.png",Qu="/assets/check-ok.png",CK="/assets/check-empty.png",TK="/assets/end.png",Dx=200,SK=800,EK=.1,PK=.3,Bx=.5,bK=.5,MK=12,wK=800,AK=1600,RK=150,OK=3500,LK=["#FFC700","#FF0000","#2E3191","#41BBC7"];var Sp={props:{particleCount:{type:Number,default:RK},particleSize:{type:Number,default:MK},duration:{type:Number,default:OK},colors:{type:Array,default:LK},force:{type:Number,default:bK},stageHeight:{type:Number,default:wK},stageWidth:{type:Number,default:AK},shouldDestroyAfterDone:{type:Boolean,default:!0}},setup(i){const t=it(!0),s=(m,p)=>{v(m,{degree:p})},c=wt(()=>S(i.particleCount,i.colors));$T(()=>{i.particleCount>300&&console.log("[VUE-CONFETTI-EXPLOSION] That's a lot of confetti, you sure about that? A lesser number like 200 will still give off the party vibes while still not bricking the device ð")});const C=wt(()=>u(i.particleCount,i.duration,i.colors,i.particleSize,i.force,i.stageHeight,i.stageWidth));ce(async()=>{await l(i.duration),i.shouldDestroyAfterDone&&(t.value=!1)});const S=(m,p)=>{const x=360/m;return Array.from({length:m},(y,P)=>({color:p[P%p.length],degree:P*x}))},l=m=>new Promise(p=>setTimeout(p,m));function T(m){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return Math.round((m+Number.EPSILON)*10**p)/10**p}function e(m,p){if(m===p)return!0;if(m==null||p==null||m.length!==p.length)return!1;for(let x=0;x<m.length;x++)if(m[x]!==p[x])return!1;return!0}const d=(m,p,x,y,P)=>(m-p)*(P-y)/(x-p)+y,g=(m,p)=>{const x=m+p;return x>360?x-360:x},r=()=>Math.random()>.5,a=[0,0,1],h=[[1,1,0],[1,0,1],[0,1,1],[1,0,0],[0,1,0],a],n=m=>!e(h[m],a)&&r(),o=m=>typeof m>"u",f=m=>{console.error(m)};function u(m,p,x,y,P,b,E){const M=Number.isSafeInteger;return!o(m)&&M(m)&&m<0?(f("particleCount must be a positive integer"),!1):!o(p)&&M(p)&&p<0?(f("duration must be a positive integer"),!1):!o(x)&&!Array.isArray(x)?(f("colors must be an array of strings"),!1):!o(y)&&M(y)&&y<0?(f("particleSize must be a positive integer"),!1):!o(P)&&M(P)&&(P<0||P>1)?(f("force must be a positive integer and should be within 0 and 1"),!1):!o(b)&&typeof b=="number"&&M(b)&&b<0?(f("floorHeight must be a positive integer"),!1):!o(E)&&typeof E=="number"&&M(E)&&E<0?(f("floorWidth must be a positive integer"),!1):!0}function v(m,p){let{degree:x}=p;const y=d(Math.abs(g(x,90)-180),0,180,-i.stageWidth/2,i.stageWidth/2),P=Math.random()*(SK-Dx)+Dx,b=Math.round(Math.random()*(h.length-1)),E=i.duration-Math.round(Math.random()*1e3),M=Math.random()<EK,w=n(b),A=M?T(Math.random()*PK,2):0,R=A*-1,L=A,O=T(Math.abs(d(Math.abs(g(x,90)-180),0,180,-1,1)),4),I=T(Math.random()*Bx,4),D=T(Math.random()*i.force*(r()?1:-1),4),B=Bx,z=T(Math.max(d(Math.abs(x-180),0,180,i.force,-i.force),0),4),X=(W,j)=>m==null?void 0:m.style.setProperty(W,j+"");X("--x-landing-point",`${y}px`),X("--duration-chaos",`${E}ms`),X("--x1",`${A}`),X("--x2",`${R}`),X("--x3",`${L}`),X("--x4",`${O}`),X("--y1",`${I}`),X("--y2",`${D}`),X("--y3",`${B}`),X("--y4",`${z}`),X("--width",`${w?i.particleSize:Math.round(Math.random()*4)+i.particleSize/2}px`),X("--height",(w?i.particleSize:Math.round(Math.random()*2)+i.particleSize)+"px"),X("--rotation",`${h[b].join()}`),X("--rotation-duration",`${P}ms`),X("--border-radius",`${w?"50%":"0"}`)}return{isVisible:t,isValid:C,stageHeight:i.stageHeight,particles:c,setItemRef:s}}};function FK(i,t,s,c,C,S){return c.isVisible&&c.isValid?(Q(),et("div",{key:0,class:"confetti-container",style:ue(`--floor-height: ${c.stageHeight}px;`)}
6426,[(Q(!0),et(Xt,null,rs(c.particles,l=>{let{color:T,degree:e}=l;return Q(),et("div",{key:e,class:"particle",ref:d=>c.setItemRef(d,e)},[H("div",{style:ue(`--bgcolor: ${T};`)},null,4)],512)}),128))],4)):ft("",!0)}function IK(i,t){t===void 0&&(t={});var s=t.insertAt;if(!(!i||typeof document>"u")){var c=document.head||document.getElementsByTagName("head")[0],C=document.createElement("style");C.type="text/css",s==="top"&&c.firstChild?c.insertBefore(C,c.firstChild):c.appendChild(C),C.styleSheet?C.styleSheet.cssText=i:C.appendChild(document.createTextNode(i))}}var DK=` 6427@keyframes y-axis-4ff796ae { 6428to { 6429 transform: translate3d(0, var(--floor-height), 0); 6430} 6431} 6432@keyframes x-axis-4ff796ae { 6433to { 6434 transform: translate3d(var(--x-landing-point), 0, 0); 6435} 6436} 6437@keyframes rotation-4ff796ae { 6438to { 6439 transform: rotate3d(var(--rotation), 360deg); 6440} 6441} 6442.confetti-container[data-v-4ff796ae] { 6443 width: 0; 6444 height: 0; 6445 overflow: visible; 6446 position: relative; 6447 transform: translate3d(var(--x, 0), var(--y, 0), 0); 6448 z-index: 1200; 6449} 6450.confetti-container > .particle[data-v-4ff796ae] { 6451 animation: x-axis-4ff796ae var(--duration-chaos) forwards cubic-bezier(var(--x1), var(--x2), var(--x3), var(--x4)); 6452} 6453.confetti-container > .particle div[data-v-4ff796ae] { 6454 position: absolute; 6455 top: 0; 6456 left: 0; 6457 animation: y-axis-4ff796ae var(--duration-chaos) forwards cubic-bezier(var(--y1), var(--y2), var(--y3), var(--y4)); 6458 width: var(--width); 6459 height: var(--height); 6460} 6461.confetti-container > .particle div[data-v-4ff796ae]:before { 6462 display: block; 6463 height: 100%; 6464 width: 100%; 6465 content: ""; 6466 background-color: var(--bgcolor); 6467 animation: rotation-4ff796ae var(--rotation-duration) infinite linear; 6468 border-radius: var(--border-radius); 6469} 6470`;IK(DK);Sp.render=FK;Sp.__scopeId="data-v-4ff796ae";var yf=(()=>{const i=Sp;return i.install=t=>{t.component("ConfettiExplosion",i)},i})();const ae=i=>(fe("data-v-496990cb"),i=i(),ve(),i),BK={class:"brand-game"},kK=ae(()=>H("img",{src:yK},null,-1)),GK=[kK],NK={key:0,class:"finisher-container font-pixel"},VK={key:0,src:Qu},zK={key:1,src:CK},YK={key:1,class:"epilogo-container font-pixel d-flex flex-column"},XK={key:1,class:"epilogo-box"},UK={key:0},WK=ae(()=>H("br",null,null,-1)),HK=ae(()=>H("br",null,null,-1)),$K={key:1},jK=ae(()=>H("br",null,null,-1)),KK=ae(()=>H("br",null,null,-1)),ZK={key:2},JK=ae(()=>H("br",null,null,-1)),QK=ae(()=>H("br",null,null,-1)),qK={key:3},_K=ae(()=>H("br",null,null,-1)),tZ=ae(()=>H("br",null,null,-1)),eZ={key:0},iZ=ae(()=>H("br",null,null,-1)),sZ=ae(()=>H("br",null,null,-1)),nZ={key:1},rZ=ae(()=>H("br",null,null,-1)),aZ=ae(()=>H("br",null,null,-1)),oZ=ae(()=>H("br",null,null,-1)),lZ=ae(()=>H("br",null,null,-1)),hZ={key:2},uZ=ae(()=>H("br",null,null,-1)),dZ=ae(()=>H("br",null,null,-1)),cZ={key:0},fZ=ae(()=>H("br",null,null,-1)),vZ=ae(()=>H("br",null,null,-1)),pZ={key:1},mZ=ae(()=>H("br",null,null,-1)),gZ=ae(()=>H("br",null,null,-1)),xZ={key:2},yZ={class:"d-flex justify-center"},CZ=ae(()=>H("img",{src:TK},null,-1)),TZ={class:"text-center",style:{"font-size":"1.2rem"}},SZ=ae(()=>H("br",null,null,-1)),EZ={class:"percent-personality"},PZ=ae(()=>H("br",null,null,-1)),bZ={class:"percent-personality"},MZ=ae(()=>H("br",null,null,-1)),wZ={class:"percent-personality"},AZ=ae(()=>H("br",null,null,-1)),RZ={class:"percent-personality"},OZ=ae(()=>H("br",null,null,-1)),LZ=ae(()=>H("hr",{class:"mb-3"},null,-1)),FZ=ae(()=>H("span",{style:{"font-size":"25px"}},"Objetos Encontrados",-1)),IZ={class:"d-flex align-center justify-center"},DZ={key:0,src:Qu,class:"mr-1"},BZ={class:"d-flex align-center justify-center"},kZ={key:0,src:Qu,class:"mr-1"},GZ={class:"d-flex align-center justify-center"},NZ={key:0,src:Qu,class:"mr-1"},VZ=Bt({__name:"AppGameFinisherScene",setup(i){const{playerConfig:t,getActualStage:s}=Te(),{iconCtrl:c,optionsCtrl:C,questStatus:S,epilogo:l,nextStageFn:T,epilogoCtrl:e,showDetailedOption:d}=Xi(),{showRmMap:g}=fn(),r=Ws(),{logout:a,scene:h}=os(),n=wt(()=>t.value.stage),o=wt(()=>l.value[n.value.toString()]),f=()=>{ut.click&&ut.click();const{stage:R}=s();d(!0,R),console.log("show",R)},u=()=>{ut.click&&ut.click(),g()},v=it(!1),m=it(!1);ti(e,async R=>{R&&(v.value=!1,await Qe(.5),await Cf(),v.value=!0)});const p=it({stage1:0,stage2:0,stage3:0}),x=it(!1),y=it({delegativo:0,mediador:0,resolutivo:0,indiferente:0}),P=it(null),b=async()=>{re&&re.bg(),re&&re.game(),ut.end&&ut.end(),p.value.stage1=0,p.value.stage2=0,p.value.stage3=0,x.value=!0,m.value=!0,P.value=setInterval(()=>{m.value=!1,setTimeout(()=>{m.value=!0},10)},12e3),await w();const{data:R}=await r.request("GET",`/user/progresss/${M.value}?game=RM`,{auth:!0});if(R){for(let D=0;D<R.stats.delegativo;D++)await Qe(.02),y.value.delegativo++;for(let D=0;D<R.stats.mediador;D++)await Qe(.02),y.value.mediador++;for(let D=0;D<R.stats.resolutivo;D++)await Qe(.02),y.value.resolutivo++;for(let D=0;D<R.stats.indiferente;D++)await Qe(.02),y.value.indiferente++;await Qe(1),E.value=!0}const L=Hx(),O=$x(),I=jx();console.log(L,O,I);for(let D=0;D<L;D++)await Qe(.2),p.value.stage1++;for(let D=0;D<O;D++)await Qe(.2),p.value.stage2++;for(let D=0;D<I;D++)await Qe(.2),p.value.stage3++},E=it(!1),M=it(""),w=async()=>{var L;const{data:R}=await r.request("GET","/auth/me",{auth:!0});R&&((L=R==null?void 0:R.payload)==null?void 0:L.role)==="USER"&&(M.value=R.payload.id)},A=()=>(v.value=!1,m.value=!1,clearInterval(P.value),P.value=null,re&&re.end(),a().then(()=>{window.location.href="/game"}));return(R,L)=>
6470(Q(),et(Xt,null,[td(H("div",{class:"action-container quest-container quest-icon",onClick:f},null,512),[[ed,ct(c)]]),td(H("div",{class:"action-container location-container location-icon",onClick:u},null,512),[[ed,ct(c)]]),td(H("div",BK,GK,512),[[ed,ct(c)]]),ct(C)?(Q(),et("div",NK,[(Q(!0),et(Xt,null,rs(ct(S),(O,I)=>(Q(),et("div",{key:`quest-${I}}`,class:"item-cont"},[O.status?(Q(),et("img",VK)):(Q(),et("img",zK)),H("span",null,Lt(O.name),1)]))),128))])):ft("",!0),ct(e)?(Q(),et("div",YK,[v.value?(Q(),Rt(ct(yf),{key:0,"particle-count":200,"particle-size":10,duration:15e3,style:{"z-index":"99999999"}})):ft("",!0),x.value?(Q(),et("div",xZ,[H("div",yZ,[m.value?(Q(),Rt(ct(yf),{key:0,"particle-count":200,"particle-size":10,duration:15e3,style:{"z-index":"99999999"}})):ft("",!0)]),CZ,H("div",TZ,[Ot(" Has completado todas las etapas del juego y es momento de conocer tu evaluación final. "),SZ,Ot(" Debido a las decisiones que has tomado, podemos definir que tu personalidad es: "),ot(Fh,{style:{width:"400px",margin:"0 auto"}},{default:Dt(()=>[ot(Qi,null,{default:Dt(()=>[H("span",EZ,Lt(y.value.delegativo)+"%",1),PZ,Ot(" DELEGATIVO")]),_:1}),ot(Qi,null,{default:Dt(()=>[H("span",bZ,Lt(y.value.mediador)+"%",1),MZ,Ot(" MEDIADOR")]),_:1}),ot(Qi,null,{default:Dt(()=>[H("span",wZ,Lt(y.value.resolutivo)+"%",1),Ot(),AZ,Ot(" RESOLUTIVO")]),_:1}),ot(Qi,null,{default:Dt(()=>[H("span",RZ,Lt(y.value.indiferente)+"%",1),OZ,Ot(" INDIFERENTE")]),_:1})]),_:1}),Ot(" Tu personalidad es una mezcla de las 4 personalidades, pero comúnmente una de ellas es la que más se destaca. "),ot(Fh,{style:{width:"400px",margin:"0 auto"}},{default:Dt(()=>[ot(Qi,{cols:"12",style:{"margin-bottom":"-25px"}},{default:Dt(()=>[LZ,FZ]),_:1}),ot(Qi,null,{default:Dt(()=>[H("span",IZ,[p.value.stage1===6?(Q(),et("img",DZ)):ft("",!0),Ot("Etapa 1")]),Ot(" "+Lt(p.value.stage1)+" de 6 ",1)]),_:1}),ot(Qi,null,{default:Dt(()=>[H("span",BZ,[p.value.stage2===6?(Q(),et("img",kZ)):ft("",!0),Ot("Etapa 2")]),Ot(" "+Lt(p.value.stage2)+" de 6 ",1)]),_:1}),ot(Qi,null,{default:Dt(()=>[H("span",GZ,[p.value.stage3===6?(Q(),et("img",NZ)):ft("",!0),Ot("Etapa 3")]),Ot(" "+Lt(p.value.stage3)+" de 6 ",1)]),_:1})]),_:1}),E.value?(Q(),et("div",{key:0,class:"epilogo-btn",onClick:A}," FINALIZAR JUEGO ")):ft("",!0)])])):(Q(),et("div",XK,[n.value===1?(Q(),et(Xt,{key:0},[o.value===1?(Q(),et("p",UK,[Ot(" El tiempo transcurre de manera tranquila para ti. Cada cierto tiempo te enteras de movimientos entre estudiantes y docentes. Muchas veces oyes hablar de lo entretenido que será el dÃa de ropa de calle. Otras veces de lo importante de la identidad. "),WK,HK,Ot(" Un buen dÃa oyes el anuncio: âViernes dÃa con ropa de calleâ. ")])):o.value===2?(Q(),et("p",$K,[Ot(" A pesar de la mala recepción inicial de las autoridades, finalmente lograron convencerles de lo importante de contar con un dÃa de ropa de calle. Les estudiantes se sumaron paulatinamente al movimiento y ya no hubo forma de negarse. "),jK,KK,Ot(" Llegó el momento de dar el anuncio: âViernes dÃa con ropa de calleâ. ")])):o.value===3?(Q(),et("p",ZK,[Ot(" La subdirectora claramente no está de acuerdo con los cambios, pero el apoyo que logró el movimiento fue difÃcil de negar. Cada estudiante hizo su parte logrando más apoyos en la comunidad. Hasta el nuevo director estuvo de acuerdo. "),JK,QK,Ot(" Llegó el momento de dar el anuncio: âViernes dÃa con ropa de calleâ. ")])):o.value===4?(Q(),et("p",qK,[Ot(" Todo salió a la perfección, el movimiento tuvo suficiente apoyo entre estudiantes, profes e incluso el director, como para que la subdirectora no haya tenido más alternativa que sumarse. "),_K,tZ,Ot(" Llegó el momento de dar el anuncio: âViernes dÃa con ropa de calleâ. ")])):ft("",!0)],64)):ft("",!0),n.value===2?(Q(),et(Xt,{key:1},[o.value===1?(Q(),et("p",eZ,[Ot(" Te mantienes lejos de los problemas. Supiste que Chini y MÃa reunieron a un grupo bastante grande de estudiantes y presentaron un proyecto al director y después de eso hubo muchas reuniones más. "),iZ,sZ,Ot(" Finalmente te enteras de las noticias: El liceo ha determinado que hombres y mujeres pueden elegir qué prendas del uniforme usar y ya no habrá más diferencia en qué actividades pueden hacer. ")])):o.value===2?(Q(),et("p",nZ,[Ot(" Después de hablar con el director, comenzaron una campaña para sensibilizar y lograr apoyos de los y las estudiantes en su idea de flexibilizar el uniforme. "),rZ,aZ,Ot(" Hubo muchas reuniones entre los diferentes estamentos, muchas personas no estaban de acuerdo, ¡pero lograron el objetivo! "),oZ,lZ,Ot(" Desde ahora hombre y mujeres del colegi
6470o pueden elegir qué prendas del uniforme usar, además todos tienen igual acceso a las actividades y estará sancionado que los profesores hagan diferencias entre niños y niñas. ")])):o.value===3?(Q(),et("p",hZ,[Ot(" Después de recorrer el liceo conversando con diferentes grupos, escuchando diferentes visiones y tomando acuerdos comunes, desarrollaron un proyecto que presentaron a las autoridades del Liceo. Fueron necesarias muchas reuniones y asambleas, pero finalmente se cumplió el cometido: "),uZ,dZ,Ot(" Desde ahora hombre y mujeres del colegio pueden elegir qué prendas del uniforme usar, además todos tienen igual acceso a las actividades y estará sancionado que los profesores hagan diferencias entre niños y niñas. ")])):ft("",!0)],64)):ft("",!0),n.value===3?(Q(),et(Xt,{key:2},[o.value===1?(Q(),et("p",cZ,[Ot(" El dÃa del liceo fue un éxito, con actividades inclusivas donde todes les estudiantes pudieron expresarse y ¡celebrar la diversidad! "),fZ,vZ,Ot(" Tiempo después, todo el trabajo de participación activa de les estudiantes en las polÃticas de inclusión del liceo se materializaron en una secretarÃa de género, con participación triestamental, donde estudiantes, trabajadores y autoridades se reúnen para generar acciones que validen todas las expresiones de la comunidad del liceo. ")])):ft("",!0),o.value===2?(Q(),et("p",pZ,[Ot(" Después de hablar con las autoridades se hizo una campaña para involucrar a más estudiantes en la organización. El dÃa del liceo fue un éxito, con actividades inclusivas donde todes les estudiantes pudieron expresarse y ¡celebrar la diversidad! "),mZ,gZ,Ot(" Tiempo después, todo el trabajo de participación activa de les estudiantes en las polÃticas de inclusión del liceo se materializaron en una secretarÃa de género, con participación triestamental, donde estudiantes, trabajadores y autoridades se reúnen para generar acciones que validen todas las expresiones de la comunidad del liceo. ")])):ft("",!0)],64)):ft("",!0),n.value===3?(Q(),et("div",{key:3,class:"epilogo-btn",onClick:b}," FINALIZAR JUEGO ")):(Q(),et("div",{key:4,class:"epilogo-btn",onClick:L[0]||(L[0]=(...O)=>ct(T)&&ct(T)(...O))}," IR A LA SIGUIENTE ETAPA "))]))])):ft("",!0)],64))}});const zZ=kt(VZ,[["__scopeId","data-v-496990cb"]]),YZ={class:"msg-cont font-pixel"},XZ=Bt({__name:"AppGameLoaderCtrl",setup(i){const t=["...Limpiando las pizarras","...Intentando sacar la pelota del techo","...Sacando los chicles debajo de la mesa","...Revisando en los objetos perdidos","...Leyendo el libro de anotaciones","...Buscando la llave de porterÃa","...Ordenando el gimnasio"],s=it(""),c=()=>t[Math.floor(Math.random()*t.length)],C=it(null);return ce(()=>{s.value=c(),C.value=setInterval(()=>{s.value=c()},1500)}),Hs(()=>{clearInterval(C.value)}),(S,l)=>(Q(),et("div",YZ,Lt(s.value),1))}});const UZ=kt(XZ,[["__scopeId","data-v-1b5adb1e"]]),WZ="/assets/map.png",HZ="/assets/cursors.png",$Z="/assets/quest.png",jZ="/assets/location.png",KZ={class:"scene-container"},ZZ={class:"text-center font-pixel stage-title"},JZ={key:0},QZ={key:1},qZ={key:2},_Z=Bt({__name:"AppGameSceneInfo",emits:["start"],setup(i){const{stageNumber:t}=Te(),s=wt(()=>t.value);return(c,C)=>(Q(),et("div",KZ,[H("div",{class:Ct(["scene-info scene-1",s.value===1?"":"stage-off"])},null,2),H("div",{class:Ct(["scene-info scene-2",s.value===2?"":"stage-off"])},null,2),H("div",{class:Ct(["scene-info scene-3",s.value===3?"":"stage-off"])},null,2),H("div",ZZ,[s.value===1?(Q(),et("span",JZ," Etapa 1: Diversidad ")):ft("",!0),s.value===2?(Q(),et("span",QZ," Etapa 2: Respeto ")):ft("",!0),s.value===3?(Q(),et("span",qZ," Etapa 3: Convivencia ")):ft("",!0)]),H("div",{class:"action-quest-btn font-pixel act-btn text-center select-none",onClick:C[0]||(C[0]=S=>c.$emit("start"))},Lt("<< Iniciar Etapa >>"))]))}});const tJ=kt(_Z,[["__scopeId","data-v-fa8370c8"]]),cl="/assets/full-check.png",fl="/assets/empty-check.png",vl=i=>(fe("data-v-54543068"),i=i(),ve(),i),eJ=vl(()=>H("small",null,"MISIÃN PRINCIPAL",-1)),iJ={key:0,src:cl,class:"check-img"},sJ={key:1,src:fl,class:"check-img"},nJ=vl(()=>H("small",null,"MISIÃN SECUNDARIA 1",-1)),rJ={key:0,src:cl,class:"check-img"},aJ={key:1,src:fl,class:"check-img"},oJ=vl(()=>H("small",null,"MISIÃN SECUNDARIA 2",-1)),lJ={key:0,src:cl,class:"check-img"},hJ={key:1,src:fl,class:"check-img"},uJ={key:0},dJ=vl(()=>H("small",null,"MISIÃN SECUNDARIA 3",-1)),cJ={key:0,src:cl,class:"check-img"},fJ={key:1,src:fl,class:"check-img"},vJ=vl(()=>H("small",null,"MISIÃN EXTRA",-1)),pJ={key:0,src:cl,class:"check-img"},mJ={key:1,src:fl,class:"check-img"},gJ={key:1,class:"pt-4"},bi="Misión Completada",xJ=Bt({__name:"AppGameQuestOptions",setup(i){const{questStatus:t,showEpilogo:s}=Xi(),{hideRmDialog:c}=fn(),{stageNumber:C}=Te(),S=it({principal:"",secon1:"",secon2:"",secon3:"",extra:"0"}),l=(r,a,h)=>{if(a==="principal"&&r===1)switch(h){case"off":S.value.principal="Habla con Cris afuera del colegi
6470o";break;case"started0":S.value.principal="Habla con Dani en la entrada a la biblioteca";break;case"started0-b":S.value.principal="Habla con Mati en la entrada a la biblioteca";break;case"started1":S.value.principal="Habla con Mati en la entrada a la biblioteca";break;case"started2":S.value.principal="Habla con Dani en la entrada a la biblioteca";break;case"started3":S.value.principal="Habla con la Subdirectora en la entrada al colegio";break;case"started3b":S.value.principal="Habla con Dani en la entrada a la biblioteca";break;case"started4":S.value.principal="Habla con el Director en la entrada al colegio";break;case"started5":S.value.principal="Habla con los estudiantes en las gradas";break;case"started6":S.value.principal="Habla con Dani en la entrada a la biblioteca";break;case"started7":S.value.principal="Habla con el Director en la entrada al colegio";break;case"started8":S.value.principal="Habla con el Director en la entrada al colegio";break;case"finished":S.value.principal=bi;break}if(a==="leo")switch(h){case"off":S.value.secon1="Habla con Leo camino a la cancha";break;case"started1":S.value.secon1="Habla con el Director en la entrada al colegio";break;case"finished":S.value.secon1=bi;break}if(a==="teo")switch(h){case"off":S.value.secon2="Habla con Teo al lado de la enfermerÃa";break;case"started1":S.value.secon2="Habla con los estudiantes en las gradas";break;case"finished":S.value.secon2=bi;break}if(r===1&&(S.value.secon3=""),a==="alan")switch(h){case"off":S.value.secon3="Habla con Alan y Tere frente a la Biblioteca";break;case"started1":S.value.secon3="Habla con la Subdirectora en la oficina del director o frente a la cancha";break;case"finished":S.value.secon3=bi;break}if(a==="ale")switch(h){case"off":S.value.secon1="Habla con Ale a un lado del gimnasio";break;case"started1":S.value.secon1="Habla con el Inspector en la entrada al colegio";break;case"started2":S.value.secon1="Habla con los que juegan a la pelota frente a la cancha";break;case"finished":S.value.secon1=bi;break}if(a==="profe")switch(h){case"off":S.value.secon2="Habla con Alex y Josefina frente las salas de 3º";break;case"started1":S.value.secon2="Habla con el Profesor en una de las salas de 2º";break;case"started2":S.value.secon2="Habla con el Director en su oficina";break;case"started3":S.value.secon2="Habla con el Profesor y los estudiantes en una de las salas de 2º";break;case"finished":S.value.secon2=bi;break}if(r===2&&a==="principal")switch(h){case"off":S.value.principal="Habla con Cris afuera de los baños";break;case"started1":S.value.principal="Habla con Chini frente a la cancha";break;case"started2":S.value.principal="Habla con Nico afuera de los baños";break;case"started3":S.value.principal="Habla con el Director en su oficina";break;case"started4":S.value.principal="Habla con los que juegan a la pelota en la cancha";break;case"started5":S.value.principal="Habla con los que juegan a la pelota en la cancha";break;case"started6":S.value.principal="Habla con Cris afuera de los baños";break;case"started7":S.value.principal="Habla con la Subdirectora frente a la cancha";break;case"started8":S.value.principal="Habla con Chini frente a la cancha";break;case"started9":S.value.principal="Habla con el Director en su oficina";break;case"started10":S.value.principal="Habla con los que juegan a la pelota en la cancha";break;case"finished":S.value.principal=bi;break}if(r===3&&a==="principal")switch(h){case"off":S.value.principal="habla con cris cerca de la entrada";break;case"started1":S.value.principal="Habla con Mati frente al gimnasio";break;case"started2":S.value.principal="Habla con Jose frente al gimnasio";break;case"started3":S.value.principal="Habla con Dani frente al gimnasio";break;case"started4":S.value.principal="Habla con Jose frente al gimnasio";break;case"started5":S.value.principal="Habla con la Subdirectora en la entrada";break;case"started6":S.value.principal="Habla con la Profesora Verónica en las salas de primero";break;case"started7":S.value.principal="Habla con los compañeres en las gradas";break;case"started8":S.value.principal="Habla con Jose frente al gimnasio";break;case"started9":S.value.principal="Habla con la Subdirectora en la entrada";break;case"started10":S.value.principal="Habla con la Profesora Verónica en las salas de primero";break;case"started11":S.value.principal="Habla con los compañeres en las gradas";break;case"started12":S.value.principal="habla con Cris cerca de la entrada";break;case"started13":S.value.principal="Habla con Jose frente al gimnasio";break;case"started14":S.value.principal="Habla con el Director en su oficina";break;case"started15":S.value.principal="Habla con los compañeres en las gradas";break;case"finished":S.value.principal=bi;break}if(a==="bullying")switch(h){case"off":S.value.secon1="Habla con Andy en los baños";break;case"started1":S.value.secon1="Habla con el Inspector en la entrada";break;case"started2":S.value.secon1="Habla con las abusivas frente al baño";break;case"finished":S.value.secon1=bi;break}if(a==="discriminacion")switch(h){case"off":S.value.secon2="Ayuda a las chicas en las gradas";break;case"finished":S.value.secon2=bi;break}a==="item"&&(S.value.extra=h)},T=wt(()=>t.value.filter(r=>r.name!=="Misión Extra").every(r=>r.status)),e=wt(()=>C.value);ce(()=>{Un(e.value).forEach(a=>{l(e.value,a.key,a.step)})});const d=()=>{ut.click&&ut.click(),s(!0)},g=()=>{ut.click&&ut.click(),c()};return(r,a)=>(Q(),et("section",null,[H("div",null," Misiones de la Etapa "+Lt(ct(C)),1),H("div",null,[eJ,H("p",null,[S.value.principal===bi?(Q(),et("img",iJ)):(Q(),et("img",sJ)),Ot(" "+Lt(S.value.principal),1)])]),H("div",null,[nJ,H("p",null,[S.value.secon1===bi?(Q(),et("img",rJ)):(Q(),et("img",aJ)),Ot(" "+Lt(S.value.secon1),1)])]),H("div",null,[oJ,H("p",null,[S.value.secon2===bi?(Q(),et("img",lJ)):(Q(),et("img",hJ)),Ot(" "+Lt(S.value.secon2),1)])]),S.value.secon3?(Q(),et("div",uJ,[dJ,H("p",null,[S.value.secon3===bi?(Q(),et("img",cJ)):(Q(),et("img",fJ)),Ot(" "+Lt(S.value.secon3),1)])])):ft("",!0),H("div",null,[vJ,H("p",null,[S.value.extra==="6"?(Q(),et("img",pJ)):(Q(),et("img",mJ)),Ot(" Haz encontrado "+Lt(S.value.extra)+" de 6 elementos de estudio perdidos en el liceo ",1)])]),H("div",{class:"action-quest-btn",onClick:g},Lt("<< Cerrar Menú >>")),T.value?(Q(),et("div",gJ," ¡Muy bien!, Ya has cumplido con todas las misiones en esta etapa, estás listo para ir a la continuar con la historia. ")):ft("",!0),T.value?(Q(),et("div",{key:2,class:"action-quest-btn",onClick:d}," Terminar Etapa ")):ft("",!0)]))}});const Wc=kt(xJ,[["__scopeId","data-v-54543068"]]),Ge=i=>(fe("data-v-f7c475eb"),i=i(),ve(),i),yJ={key:0,class:"backdrop"},CJ={class:"dialog-container"},TJ={key:0,class:"zindex99 font-pixel dialog-data-container px-4"},SJ=Ge(()=>H("p",{class:"text-center font-pixel mb-3",style:{"font-size":"1.5rem"}}," Mi Colegio ",-1)),EJ=Ge(()=>H("img",{src:WZ,class:"d-inline-block mb-4",style:{"max-width":"100%"}},null,-1)),PJ={key:1,class:"zindex99 font-pixel"},bJ={key:0,class:"d-flex justify-center"},MJ={key:0,class:"d-flex justify-center"},wJ={key:0,class:"d-flex justify-center"},AJ={key:2,class:"zindex99"},RJ={key:0,class:"d-flex justify-center"},OJ={key:1},LJ=Ge(()=>H("p",{class:"pb-2"}," Bienvenido/a a DECIDE ACTUAR, este es juego de decisiones, donde alrededor de tu colegi
6470o te toparás con muchas situaciones que te harán tomar decisiones. ",-1)),FJ=Ge(()=>H("div",{class:"pt-4"},null,-1)),IJ={key:2},DJ=Ge(()=>H("p",null," Tus decisiones son muy importantes, pues nos permitirán establecer tu personalidad frente a los casos de violencia de todo tipo, asà que piensa muy bien antes de responder. ",-1)),BJ=Ge(()=>H("div",{class:"pt-4"},null,-1)),kJ={key:3},GJ=Ge(()=>H("p",{class:"pb-2"}," Es tu primer dÃa en el colegio, es una lata tener que usar uniforme, pero bueno, es lo que hay. ",-1)),NJ=Ge(()=>H("p",null," Lo mejor será conversar con los compañeres e intentar hacer nuevas amistades. ",-1)),VJ=Ge(()=>H("div",{class:"pt-4"},null,-1)),zJ={key:4},YJ=Ge(()=>H("div",null,null,-1)),XJ=Ge(()=>H("div",{class:"d-flex justify-center"},[H("img",{src:HZ})],-1)),UJ=Ge(()=>H("div",{class:"pt-4"},null,-1)),WJ={key:5},HJ=Ge(()=>H("div",null,null,-1)),$J=Ge(()=>H("img",{src:$Z,class:"d-inline-block my-2"},null,-1)),jJ=Ge(()=>H("div",null,null,-1)),KJ=Ge(()=>H("div",null,null,-1)),ZJ=Ge(()=>H("img",{src:jZ,class:"d-inline-block my-2"},null,-1)),JJ=Ge(()=>H("div",{class:"pt-4"},null,-1)),QJ={key:6},qJ=Ge(()=>H("div",{class:"pt-4"},null,-1)),_J={key:0,class:"d-flex justify-center"},tQ={key:1},eQ=Ge(()=>H("div",{class:"pt-4"},null,-1)),iQ={key:0,class:"d-flex justify-center"},sQ={key:1},nQ=Ge(()=>H("div",{class:"pt-4"},null,-1)),rQ={key:0,class:"d-flex justify-center"},aQ={class:"pa-2 d-flex flex-column justify-space-between",style:{"min-height":"180px"}},oQ={class:"mb-1"},lQ={key:0,class:"pt-4"},hQ={key:1,class:"pt-4"},uQ=["tabindex","onClick","onMouseover"],dQ={key:1,class:"d-flex justify-center"},cQ=Bt({__name:"AppRmDialog",setup(i){const{show:t,dialogData:s,dialogMode:c,hideRmDialog:C}=fn(),{smAndDown:S}=kr(),l=wt(()=>({player:S.value?"single-col":"player-col",nonPlayer:S.value?"single-col":"non-player-col"})),T=wt(()=>s.value.portrait.split("_").reverse().slice(1).reverse().join("_")),e=wt(()=>T.value==="player"),d=it(""),g=it(!1);ti(s,async m=>{if(m){d.value="",g.value=!1;const p=m.text.split("");for(let x=0;x<p.length;x++)d.value+=p[x],await new Promise(y=>setTimeout(y,12));d.value.length===m.text.length&&(await new Promise(x=>setTimeout(x,500)),g.value=!0)}});const r=m=>{ut.click&&ut.click(),m()},a=it(1),h=()=>{ut.click&&ut.click(),a.value++},n=m=>{ut.click&&ut.click(),a.value=1,C();let p="";switch(m){case 1:p="instructions1";break;case 2:p="instructions2";break;case 3:p="instructions3";break}localStorage.setItem(p,Wh)},o=()=>{ut.click&&ut.click(),C()},f=it(-1),u=m=>{f.value=m},v=m=>{if(!(!t.value||!g.value))if(m.key==="ArrowUp"){if(f.value===-1)return;f.value=f.value===0?s.value.actions.length-1:f.value-1}else m.key==="ArrowDown"?f.value=f.value===s.value.actions.length-1?0:f.value+1:m.key===" "&&f.value!==-1&&r(s.value.actions[f.value].cb)};return ce(()=>{f.value=-1}),ti(s,m=>{m&&(f.value=-1)}),Hs(()=>{window.removeEventListener("keydown",v)}),ti(t,m=>{m===!1?window.removeEventListener("keydown",v):window.addEventListener("keydown",v)}),(m,p)=>ct(t)?(Q(),et("div",yJ,[H("div",CJ,[ot(jr),ct(c)==="map"?(Q(),et("div",TJ,[SJ,EJ,H("div",{class:Ct(["action-quest-btn",f.value===0?"action-quest-btn-hover":""]),onMouseover:p[0]||(p[0]=x=>u(0)),onClick:o},Lt("<< Cerrar Mapa >")+"> ",34)])):ft("",!0),["options1","options2","options3"].includes(ct(c))?(Q(),et("div",PJ,[ct(c)==="options1"?(Q(),et("div",{key:0,class:Ct(["dialog-data-container font-pixel mx-3",l.value.player])},[ct(S)?ft("",!0):(Q(),et("div",bJ,[ot(xs,{char:"player_ropa","class-name":"char-img"})])),ot(Wc)],2)):ft("",!0),ct(c)==="options2"?(Q(),et("div",{key:1,class:Ct(["dialog-data-container font-pixel mx-3",l.value.player])},[ct(S)?ft("",!0):(Q(),et("div",MJ,[ot(xs,{char:"player_ropa","class-name":"char-img"})])),ot(Wc)],2)):ft("",!0),ct(c)==="options3"?(Q(),et("div",{key:2,class:Ct(["dialog-data-container font-pixel mx-3",l.value.player])},[ct(S)?ft("",!0):(Q(),et("div",wJ,[ot(xs,{char:"player_ropa","class-name":"char-img"})])),ot(Wc)],2)):ft("",!0)])):ft("",!0),a.value===1&&["instructions1","instructions2","instructions3"].includes(ct(c))?(Q(),et("div",AJ,[ot(tJ,{onStart:h})])):ft("",!0),["instructions1"].includes(ct(c))&&[2,3,4,5,6,7].includes(a.value)?(Q(),et("div",{key:3,class:Ct(["dialog-data-container font-pixel mx-3",l.value.player])},[ct(S)?ft("",!0):(Q(),et("div",RJ,[ot(xs,{char:"player_ropa","class-name":"char-img"}
6470)])),a.value===2?(Q(),et("div",OJ,[LJ,FJ,H("div",{class:Ct(["action-quest-btn",f.value===0?"action-quest-btn-hover":""]),onClick:h,onMouseover:p[1]||(p[1]=x=>u(0))},Lt("<< Siguiente >")+"> ",34)])):ft("",!0),a.value===3?(Q(),et("div",IJ,[DJ,BJ,H("div",{class:Ct(["action-quest-btn",f.value===0?"action-quest-btn-hover":""]),onClick:h,onMouseover:p[2]||(p[2]=x=>u(0))},Lt("<< Siguiente >")+"> ",34)])):ft("",!0),a.value===4?(Q(),et("div",kJ,[GJ,NJ,VJ,H("div",{class:Ct(["action-quest-btn",f.value===0?"action-quest-btn-hover":""]),onClick:h,onMouseover:p[3]||(p[3]=x=>u(0))},Lt("<< Siguiente >")+"> ",34)])):ft("",!0),a.value===5?(Q(),et("div",zJ,[Ot(" Para moverte por el colegio, usa las flechas del teclado o presionando sobre la pantalla en la dirección que quieras ir. "),YJ,XJ,UJ,H("div",{class:Ct(["action-quest-btn",f.value===0?"action-quest-btn-hover":""]),onClick:h,onMouseover:p[4]||(p[4]=x=>u(0))},Lt("<< Siguiente >")+"> ",34)])):ft("",!0),a.value===6?(Q(),et("div",WJ,[Ot(" Si no sabes que hacer, siempre puedes ver el estado de misiones. "),HJ,$J,jJ,Ot(" Y también puedes ver el mapa del colegio, asà nunca te perderás. "),KJ,ZJ,JJ,H("div",{class:Ct(["action-quest-btn",f.value===0?"action-quest-btn-hover":""]),onClick:h,onMouseover:p[5]||(p[5]=x=>u(0))},Lt("<< Siguiente >")+"> ",34)])):ft("",!0),a.value===7?(Q(),et("div",QJ,[Ot(" Y si quieres poner a prueba tus habilidades en los juegos, siempre puedes hablar con Ariel en la entrada, ¡Le encanta jugar!. "),qJ,H("div",{class:Ct(["action-quest-btn",f.value===0?"action-quest-btn-hover":""]),onClick:p[6]||(p[6]=x=>n(1)),onMouseover:p[7]||(p[7]=x=>u(0))},Lt("<< Ir al colegio >")+"> ",34)])):ft("",!0)],2)):ft("",!0),["instructions2"].includes(ct(c))&&[2].includes(a.value)?(Q(),et("div",{key:4,class:Ct(["dialog-data-container font-pixel mx-3",l.value.player])},[ct(S)?ft("",!0):(Q(),et("div",_J,[ot(xs,{char:"player_ropa","class-name":"char-img"})])),a.value===2?(Q(),et("div",tQ,[Ot(" Algo se avanzó con el dÃa sin uniforme, ¿Habrá algo más que moleste a les estudiantes?... creo que será bueno seguir conversando con ellos, quizás pueda ser de ayuda. "),eQ,H("div",{class:Ct(["action-quest-btn",f.value===0?"action-quest-btn-hover":""]),onClick:p[8]||(p[8]=x=>n(2)),onMouseover:p[9]||(p[9]=x=>u(0))},Lt("<< Ir al colegio >")+"> ",34)])):ft("",!0)],2)):ft("",!0),["instructions3"].includes(ct(c))&&[2].includes(a.value)?(Q(),et("div",{key:5,class:Ct(["dialog-data-container font-pixel mx-3",l.value.player])},[ct(S)?ft("",!0):(Q(),et("div",iQ,[ot(xs,{char:"player_ropa","class-name":"char-img"})])),a.value===2?(Q(),et("div",sQ,[Ot(" El dìa sin uniforme es una realidad, pero aún asà queda mucha desigualdad en el liceo, serÃa bueno conversar con mis amigos para cruzar ideas... demás se nos ocurre como mejorar el liceo. "),nQ,H("div",{class:Ct(["action-quest-btn",f.value===0?"action-quest-btn-hover":""]),onClick:p[10]||(p[10]=x=>n(3)),onMouseover:p[11]||(p[11]=x=>u(0))},Lt("<< Ir al colegio >")+"> ",34)])):ft("",!0)],2)):ft("",!0),ct(c)==="dialog"?(Q(),et("div",{key:6,class:Ct(["dialog-data-container font-pixel mx-3",e.value?l.value.player:l.value.nonPlayer])},[e.value&&!ct(S)?(Q(),et("div",rQ,[ot(xs,{char:"player","class-name":"char-img"})])):ft("",!0),H("div",aQ,[H("div",null,[H("div",oQ,Lt(ct(s).charName)+": ",1),Ot(" "+Lt(d.value),1)]),ct(s).actions.length===1&&g.value?(Q(),et("div",lQ,[H("div",{class:Ct(["action-quest-btn",f.value===0?"action-quest-btn-hover":""]),tabindex:0,onClick:p[12]||(p[12]=x=>r(ct(s).actions[0].cb)),onMouseover:p[13]||(p[13]=x=>u(0))},Lt(ct(s).actions[0].text),35)])):g.value?(Q(),et("div",hQ,[(Q(!0),et(Xt,null,rs(ct(s).actions,(x,y)=>(Q(),et("div",{key:`action-${y}`,class:Ct(["action-quest-btn",y===f.value?"action-quest-btn-hover":""]),tabindex:y,onClick:P=>r(x.cb),onMouseover:P=>u(y)},Lt(x.text),43,uQ))),128))])):ft("",!0)]),!e.value&&!ct(S)?(Q(),et("div",dQ,[ot(xs,{char:T.value,mood:ct(s).mood,"class-name":"char-img"},null,8,["char","mood"])])):ft("",!0)],2)):ft("",!0)])])):ft("",!0)}});const fQ=kt(cQ,[["__scopeId","data-v-f7c475eb"]]),vQ=i=>(fe("data-v-c11f4629"),i=i(),ve(),i),pQ=vQ(()=>H("div",{id:"game"},null,-1)),mQ=Bt({__name:"AppGameRm",setup(i){const{loaderModalCtrl:t}=Xi(),s=Ws();Ya();const{setAccountId:c,setAccountName:C,updateAccountDataFromRaw:S,logout:l,accountData:T}
6470=os(),{showGameModal:e}=js(),{selectModalCtrl:d}=Gr(),g=async()=>{var h;const{data:r,error:a}=await s.request("GET","/auth/me",{auth:!0});r&&(((h=r==null?void 0:r.payload)==null?void 0:h.role)==="USER"?(c(r.payload.id),C(`${r.payload.name} ${r.payload.lastname}`),S(r.payload)):(await l(),window.location.href="/")),a&&await l()};return ce(async()=>{await g(),console.log("LOAD !!!!"),DU()}),(r,a)=>(Q(),et(Xt,null,[pQ,ot(TT),ot(ST),ct(d)?(Q(),Rt(xK,{key:0})):ft("",!0),ct(e)?(Q(),Rt(Vj,{key:1})):ft("",!0),ot(zZ),ct(t)?(Q(),Rt(UZ,{key:2})):ft("",!0),ot(fQ)],64))}});const gQ=kt(mQ,[["__scopeId","data-v-c11f4629"]]),Ep="/assets/imgs/logo-juego.png",Mt={text:"<<Siguiente>>",dispatch:"next-dialog"},Pp={text:"<<Siguiente>>",dispatch:"next-scene"},xQ={text:"<<Siguiente>>",dispatch:"next-chapter"},yQ={1:{location:"entrada",character:"jose",emotion:"emocion",text:"¡Hey! QuerÃa mostrarte algunos cambios que le hicieron al colegio desde el año pasado. Es mi deber mostrarte los nuevos lugares del colegio. Acá van:",menu:[{order:1,...Mt}]},2:{location:"entrada",character:"jose",emotion:"serio",text:"Ya conoces la entrada.",menu:[{order:1,...Mt}]},3:{location:"patio",character:"jose",emotion:"serio",text:"Y obviamente el patio.",menu:[{order:1,...Mt}]},4:{location:"cancha",character:"jose",emotion:"neutro",text:"La cancha.",menu:[{order:1,...Mt}]},5:{location:"sala_1",character:"jose",emotion:"neutro",text:"Las salas de clases.",menu:[{order:1,...Mt}]},6:{location:"biblioteca",character:"jose",emotion:"preocupacion",text:"La biblioteca, no tan grande como a algunos les gustarÃa...",menu:[{order:1,...Mt}]},7:{location:"taller",character:"jose",emotion:"preocupacion",text:"El taller de oficios.",menu:[{order:1,...Mt}]},8:{location:"banos",character:"jose",emotion:"neutro",text:"Los baños.",menu:[{order:1,...Mt}]},9:{location:"auditorio",character:"jose",emotion:"neutro",text:"Este es el auditorio.",menu:[{order:1,...Mt}]},10:{location:"direccion",character:"jose",emotion:"preocupacion",text:"La dirección, mejor no tocar nada aquÃ.",menu:[{order:1,...Mt}]},11:{location:"enfermeria",character:"jose",emotion:"preocupacion",text:"Y no podÃa faltar, la enfermerÃa.",menu:[{order:1,...Mt}]},12:{location:"entrada",character:"jose",emotion:"neutro",text:"Bueno, la mayor parte del año la pasamos acá, pero a veces tú sabes que nos gusta ir a espacios fuera del colegio⦠pero esos los verás a tu debido tiempo.",menu:[{order:1,...Mt}]},13:{location:"entrada",character:"narrador",emotion:"oculto",text:"Antes de clases te toca un recreo, ¡asà que vamos al patio!",menu:[{order:1,...Pp}]}},CQ={0:{location:"patio",character:"narrador",emotion:"oculto",text:"Nico y tú están conversando en el primer recreo en una banca del colegio.",menu:[{order:1,...Mt}]},1:{location:"patio",character:"nico",emotion:"neutro",text:"Oye, te tengo que contar algo.",menu:[{order:1,...Mt}]},2:{location:"patio",character:"player",emotion:"neutro",text:"¡¿Qué pasó?!",menu:[{order:1,...Mt}]},3:{location:"patio",character:"nico",emotion:"neutro",text:"¿Te acordái que hace unas semanas te conté que habÃa estado súper pegado al LOL?",menu:[{order:1,text:"¡SÃ, me acuerdo! ¿Qué pasó?",dispatch:"next-dialog"},{order:2,text:"La verdad ni me acuerdo, pero cuéntame.",dispatch:"next-dialog"}]},4:{location:"patio",character:"nico",emotion:"tristeza",text:"Ya, lo que pasa es que no solamente me estaba quedando despierto por el juego⦠de hecho, es por una persona.",menu:[{order:1,...Mt}]},5:{location:"patio",character:"player",emotion:"emocion",text:"¡¿Quéeeeee?! Cuéntame todo, amo el chisme.",menu:[{order:1,...Mt}]},6:{location:"patio",character:"nico",emotion:"tristeza",text:"Se llama Magdalena. El único tema es que siempre estamos online con más personas, entonces me cuesta hablar con ella en privado, y parece que me gusta.",menu:[{order:1,...Mt}]},7:{location:"patio",character:"player",emotion:"neutro",text:"¿Parece o te gusta de verdad?",menu:[{order:1,...Mt}]},8:{location:"patio",character:"nico",emotion:"alegria",text:"Jajaja. ¿Cómo le hago para hablar con ella y no quedar en ridÃculo?",menu:[{order:1,text:"Yo creo que es algo solo de juego, Nico. Muchas veces nos confundimos con amigos porque pasamos mucho tiempo juntos. Trata de no jugar tanto con ella y se va a ir pasando.",dispatch:"next-dialog",goTo:{ruta:"4",step:"9"},cb:()=>vt(1,"q-1-1","MAULE",2)},{order:2,text:"Mmmm, complicado⦠pero creo que lo mejor es que le escribas directamente y le expliques lo que pasaâ¦",dispatch:"next-dialog",goTo:{ruta:"4",step:"10"},cb:()=>vt(1,"q-1-1","MAULE",3)},{order:3,text:"Invitala a jugar en grupo, y cuando llegue ese momento actuarás como que nadie más que ustedes dos llegaron y asà tendrás una cita con ella.",dispatch:"next-dialog",goTo:{ruta:"4",step:"11"},cb:()=>vt(1,"q-1-1","MAULE",1)}]},9:{location:"patio",character:"nico",emotion:"tristeza",text:"Creo que tienes razón, dejaré de hacerme ilusiones y seguiré con mis cosas no másâ¦",menu:[{order:1,text:"<<Siguiente>>",dispatch:"next-dialog",goTo:{ruta:"4",step:"12"}}]},10:{location:"patio",character:"nico",emotion:"alegria",text:"Eso mismo estaba pensando. Estoy aburrido de no ser valiente, asà que le diré las cosas tal cual. ¡Gracias!",menu:[{order:1,text:"<<Siguiente>>",dispatch:"next-dialog",goTo:{ruta:"4",step:"12"}}]},11:{location:"patio",character:"nico",emotion:"tristeza",text:"Eso suena muy complicado y siento que me voy a confundir, creo que buscaré a otra persona que me ayude, pero muchas gracias de todas formas.",menu:[{order:1,text:"<<Siguiente>>",dispatch:"next-dialog",goTo:{ruta:"4",step:"12"}}]},12:{location:"patio",character:"narrador",forceCharacterImage:"player",emotion:"oculto",text:"¡El dÃa ya se acaba, solo te queda una clase en el taller de oficios, te haz reencontrado con muchos amigos hoy!",menu:[{order:1,...Pp}]}},TQ={1:{location:"taller",character:"narrador",emotion:"oculto",text:"HabÃas dejado olvidado el cargador de tu celular ayer en la tarde en el taller de oficios, por lo que, apenas llegas al liceo te diriges a buscarlo.",menu:[{order:1,...Mt}]},2:{location:"taller",character:"player",emotion:"preocupacion",text:"De seguro que acá se me quedó el cargador, fue el último lugar donde lo usé.",menu:[{order:1,...Mt}]},3:{location:"taller",character:"narrador",emotion:"oculto",text:"Al acercarte al taller de oficios oyes dos voces que provienen de un costado del taller, por lo que te acercas para escuchar mejor.",menu:[{order:1,...Mt}]},4:{location:"taller",character:"agustina",emotion:"enojo",text:"Oye si no voy a pasarte el celular, ya te lo dije muchas veces.",menu:[{order:1,...Mt}]},5:{location:"taller",character:"gaspar",emotion:"furia",text:"¡¿Pero dime por qué no me quieres pasar el celular, acaso no confÃas en mÃ?!",menu:[{order:1,...Mt}]},6:{location:"taller",character:"agustina",emotion:"enojo",text:"Ya po, no te pongai pesa
6470do. Obvio que confÃo en ti, pero entiende.",menu:[{order:1,...Mt}]},7:{location:"taller",character:"gaspar",emotion:"enojo",text:"Esta es la última vez que te lo pido, es una prueba de tu confianza. Pásame tu celular.",menu:[{order:1,...Mt}]},8:{location:"taller",character:"agustina",emotion:"enojo",text:"Qué venÃâ a darme ordenes, te dije que no. ¡¡Ya suéltame!!",menu:[{order:1,...Mt}]},9:{location:"taller",character:"gaspar",emotion:"enojo",text:"Ya no soporto esta actitud Agustina (le quita el celular), ¿qué tienes qué es tan importante?",menu:[{order:1,...Mt}]},10:{location:"taller",character:"agustina",emotion:"tristeza",text:"Qué te importa...",menu:[{order:1,...Mt}]},11:{location:"taller",character:"player",emotion:"preocupacion",text:"No puedo quedarme aquà y escuchar esto, ¿qué es lo que deberÃa hacer?",menu:[{order:1,text:"Ir a buscar al encargado de convivencia y pedirle ayuda para manejar la situación.",dispatch:"next-dialog",goTo:{ruta:"5",step:"21"},cb:()=>vt(1,"q-1-2","MAULE",2)},{order:2,text:"No haces nada, pero grabas un video y lo mandas a la página de confesiones del liceo. Vuelves después a buscar el cargador desentendiéndose de la situación.",dispatch:"next-dialog",goTo:{ruta:"5",step:"12"},cb:()=>vt(1,"q-1-2","MAULE",1)},{order:3,text:"Intervenir directamente y detener a Gaspar.",dispatch:"next-dialog",goTo:{ruta:"5",step:"13"},cb:()=>vt(1,"q-1-2","MAULE",3)}]},12:{location:"taller",character:"player",emotion:"neutro",text:"(Saca su celular) Menos mal me queda un poco de baterÃa, esto va a tener muchos likes en la página de confesiones.",menu:[{order:1,text:"<<Siguiente>>",dispatch:"next-dialog",goTo:{ruta:"5",step:"28"}}]},13:{location:"taller",character:"player",emotion:"preocupacion",text:"¿Qué está pasando aquÃ? ¿Agustina estai bien? ¿Por qué estás llorando? Gaspar, no creo que sea la mejor manera tu reacción, estás siendo violento y se nota que Agustina no quiere pasarte el celular.",menu:[{order:1,...Mt}]},14:{location:"taller",character:"agustina",emotion:"tristeza",text:"No pasa nada, estábamos conversando. De seguro escuchaste mal.",menu:[{order:1,...Mt}]},15:{location:"taller",character:"gaspar",emotion:"enojo",text:"Oye mejor ándate, no quieres meterte en problemas.",menu:[{order:1,...Mt}]},16:{location:"taller",character:"player",emotion:"preocupacion",text:"¿Agustina, seguro estás bien?",menu:[{order:1,...Mt}]},17:{location:"taller",character:"agustina",emotion:"tristeza",text:"No te metas, es nuestra forma de querernos.",menu:[{order:1,...Mt}]},18:{location:"taller",character:"gaspar",emotion:"enojo",text:"SÃ, ya la escuchaste, mejor no te metas.",menu:[{order:1,...Mt}]},19:{location:"taller",character:"player",emotion:"enojo",text:"Lo que hacen se llama RED FLAGS, pero no haré nada, sólo venÃa a buscar mi cargador. ",menu:[{order:1,text:"<<Retirarse del lugar y seguir>>",dispatch:"next-dialog"}]},20:{location:"taller",character:"narrador",forceCharacterImage:"player",emotion:"oculto",text:"Te alejas, pero aún asà te sientes incómodo con lo que acabas de observar, y después de caminar y reflexionar te dices que la situación no puede seguir asÃ. Por lo que decides hacer algo:",menu:[{order:1,text:"Organizarme con mis compañeros y hacer una intervención artÃstica de prevención para que no ocurran más estas situaciones. Hacer como una feria o una actuación teatral en los recreos.",dispatch:"next-dialog",goTo:{ruta:"5",step:"28"},cb:()=>vt(1,"q-1-3","MAULE",2)},{order:2,text:"Qué convivencia escolar haga un taller de violencia en el pololeo. Ustedes son los únicos responsables en el establecimiento para frenar esto.",dispatch:"next-dialog",goTo:{ruta:"5",step:"28"},cb:()=>vt(1,"q-1-3","MAULE",1)},{order:3,text:"Me gustarÃa que nos juntáramos un dÃa a organizarnos junto a otros compañeros, entre usted como profesor y nosotros como estudiantes.",dispatch:"next-dialog",goTo:{ruta:"5",step:"28"},cb:()=>vt(1,"q-1-3","MAULE",3)}]},21:{location:"taller",character:"narrador",emotion:"oculto",text:"Sales del taller en búsqueda de Manuel, el encargado de convivencia escolar para decirle lo que has visto.",menu:[{order:1,...Mt}]}
6470,22:{location:"auditorio",character:"player",emotion:"preocupacion",text:"En la sala de oficios encontré a Agustina y Gaspar peleando, creo que es necesario intervenir porque Gaspar estaba teniendo conductas violentas y escuché llorar a Agustina.",menu:[{order:1,...Mt}]},23:{location:"auditorio",character:"convivencia",emotion:"preocupacion",text:"Si claro, ire ahora mismo al taller de oficios, gracias por avisarme.",menu:[{order:1,...Mt}]},24:{location:"taller",character:"player",emotion:"preocupacion",text:"¡Hola! ¿Qué pasó? ¿Están bien?",menu:[{order:1,...Mt}]},25:{location:"taller",character:"convivencia",emotion:"neutro",text:"Ya se retiraron, habrá que estar atento a que no se repita, cualquier cosa no dudes en avisarme",menu:[{order:1,...Mt}]},26:{location:"taller",character:"player",emotion:"preocupacion",text:"Profesor, no es sólo Agustina y Gaspar, sino que muchas parejas han estado tratándose de manera similar. ¿Cree que podemos hacer algo en el colegio para detener esta situación?",menu:[{order:1,...Mt}]},27:{location:"taller",character:"convivencia",emotion:"neutro",text:"No he estado tan pendiente de las peleas que ocurren entre las parejas, y creo que hay muchas cosas que se pueden hacer. ¿Qué te gustarÃa hacer a ti?",menu:[{order:1,text:"Organizarme con mis compañeros y hacer una intervención artÃstica de prevención para que no ocurran más estas situaciones. Hacer como una feria o una actuación teatral en los recreos.",dispatch:"next-dialog",goTo:{ruta:"5",step:"28"},cb:()=>vt(1,"q-1-4","MAULE",2)},{order:2,text:"Qué convivencia escolar haga un taller de violencia en el pololeo. Los profesores son los responsables en el establecimiento y pueden frenar esto.",dispatch:"next-dialog",goTo:{ruta:"5",step:"28"},cb:()=>vt(1,"q-1-4","MAULE",1)},{order:3,text:"Me gustarÃa que nos juntáramos un dÃa a organizarnos junto a otros compañeros, entre profesores y estudiantes podemos buscar soluciones.",dispatch:"next-dialog",goTo:{ruta:"5",step:"28"},cb:()=>vt(1,"q-1-4","MAULE",3)}]},28:{location:"biblioteca",character:"narrador",emotion:"oculto",text:"Vas a la biblioteca a buscar información sobre violencia en el pololeo, en base a lo ocurrido entre Agustina y Gaspar. Al estar revisando libros, ves que unos estudiantes tratan mal a la bibliotecaria y ella no puede decir nada, quedándose callada.",menu:[{order:1,...Mt}]},29:{location:"biblioteca",character:"custom",emotion:"oculto",forceCharacterName:"Estudiante",text:"¿Cómo que no puede prestarme este libro? ¡Lo necesito! ¡Ineficiente!",menu:[{order:1,...Mt}]},30:{location:"biblioteca",character:"custom",emotion:"oculto",forceCharacterName:"Otro Estudiante",text:"Siempre lo mismo con usted, no sé para qué tienen gente tan incompetente trabajando acá.",menu:[{order:1,...Mt}]},31:{location:"biblioteca",character:"custom",emotion:"oculto",forceCharacterName:"Otro Estudiante",text:"Mi papá se va a enterar de esto.",menu:[{order:1,...Mt}]},32:{location:"biblioteca",character:"player",emotion:"preocupacion",text:"Señorita Valentina, ¿está bien?",menu:[{order:1,...Mt}]},33:{location:"biblioteca",character:"valentina",emotion:"tristeza",text:"SÃ, no te preocupes.",menu:[{order:1,...Mt}]},34:{location:"biblioteca",character:"player",emotion:"preocupacion",text:"¿Siempre la tratan asÃ?",menu:[{order:1,...Mt}]},35:{location:"biblioteca",character:"valentina",emotion:"tristeza",text:"SÃ, y no son solo ellosâ¦",menu:[{order:1,...Mt}]},36:{location:"biblioteca",character:"player",emotion:"preocupacion",text:"¿Qué? Pero, ¿por qué?",menu:[{order:1,...Mt}]},37:{location:"biblioteca",character:"valentina",emotion:"neutro",text:"Esos niños deben un libro hace cuatro meses, por eso no les podÃa prestar más, pero no entienden.",menu:[{order:1,...Mt}]},38:{location:"biblioteca",character:"player",emotion:"neutro",text:"¿Y usted no se siente capaz de responderles?",menu:[{order:1,...Mt}]},39:{location:"biblioteca",character:"valentina",emotion:"tristeza",text:"He tratado, pero igual soy tÃmida y me cuesta poner lÃmites.",menu:[{order:1,...Mt}]},40:{location:"biblioteca",character:"player",emotion:"neutro",text:"La entiendo, es difÃcil poner lÃmites, pero no imposible.",menu:[{order:1,...Mt}]},41:{location:"biblioteca",character:"valentina",emotion:"tristeza",text:"¿Tienes algún consejo para aprender a poner lÃmites?",menu:[{order:1,...Mt}]},42:{location:"biblioteca",character:"player",emotion:"neutro",text:"Déjeme verâ¦",menu:[{order:1,text:"Algo que me ha servido mucho es explicar primero qué me molesta y por qué, antes de reaccionar de forma enojada. Por ejemplo, podrÃas decirles: Chiquillos, me molesta mucho que me traten mal, porque estoy haciendo mi trabajo y no me merezco ese trato. Ahora, si no entienden, puedes decirles que elevarás este caso a tu jefatura.",dispatch:"next-dialog",goTo:{ruta:"5",step:"43"},cb:()=>vt(1,"q-1-5","MAULE",3)},{order:2,text:"Creo que debes ponerte al mismo nivel que ellos, para que entiendan que eres de armas tomar. Si ellos se ponen violentos, respóndeles de forma pesada para que se asusten y no los vuelvan a hacer.",dis
6470patch:"next-dialog",goTo:{ruta:"5",step:"44"},cb:()=>vt(1,"q-1-5","MAULE",1)},{order:3,text:"La verdad no tengo una fórmula correcta, pero creo que podrÃamos pedirle ayuda al profesor jefe de esos niños para que nos ayude a controlarlos.",dispatch:"next-dialog",goTo:{ruta:"5",step:"45"},cb:()=>vt(1,"q-1-5","MAULE",2)}]},43:{location:"biblioteca",character:"valentina",emotion:"alegria",text:"Suena difÃcil, pero creo que es el camino correcto. De verdad me ayudas mucho con tus palabras, ¡voy a intentarlo!",menu:[{order:1,text:"<<Siguiente>>",dispatch:"next-dialog",goTo:{ruta:"5",step:"46"}}]},44:{location:"biblioteca",character:"valentina",emotion:"preocupacion",text:"Mmmm, eso suena aterrador, yo no soy ese tipo de persona. Creo que eso traerÃa más problemas con ellosâ¦",menu:[{order:1,text:"<<Siguiente>>",dispatch:"next-dialog",goTo:{ruta:"5",step:"46"}}]},45:{location:"biblioteca",character:"valentina",emotion:"neutro",text:"No quiero ser una carga para alguien más, pero igual suena una buena idea. Voy a pensarlo.",menu:[{order:1,text:"<<Siguiente>>",dispatch:"next-dialog",goTo:{ruta:"5",step:"46"}}]},46:{location:"biblioteca",character:"valentina",emotion:"neutro",text:"Muchas gracias por tu ayuda, de verdad lo aprecio. ¿Necesitas ayuda con un libro especÃfico?",menu:[{order:1,...Mt}]},47:{location:"biblioteca",character:"player",emotion:"neutro",text:"Estoy buscando algo sobre violencia de género o violencia en el pololeo.",menu:[{order:1,...Mt}]},48:{location:"biblioteca",character:"valentina",emotion:"alegria",text:"Tengo el libro indicado para ti... pero debes ayudarme a buscarlo.",menu:[{order:1,text:"<<Siguiente>>",dispatch:"next-game",goToGame:{key:"book"}}]}},SQ={1:{location:"entrada",character:"narrador",emotion:"oculto",text:"Te retiras del colegio con tus amigos, pero al salir ves al portero un poco preocupado. Te acercas a hablarle mientras le dices a tus amigos que avancen sin ti por un rato.",menu:[{order:1,...Mt}]},2:{location:"entrada",character:"player",emotion:"neutro",text:"¡Hola, tÃo! ¿Todo bien?",menu:[{order:1,...Mt}]},3:{location:"entrada",character:"portero",emotion:"preocupacion",text:"Hola, mijito. Acá estamos, pues, ¿usted está bien?",menu:[{order:1,...Mt}]},4:{location:"entrada",character:"player",emotion:"neutro",text:"SÃ, sÃ, todo bien. Lo veo medio preocupado.",menu:[{order:1,...Mt}]},5:{location:"entrada",character:"portero",emotion:"preocupacion",text:"Chuta, la verdad es que hay algo que me tiene medio raro y no he sabido con quién hablarloâ¦",menu:[{order:1,...Mt}]},6:{location:"entrada",character:"player",emotion:"emocion",text:"¡Cuénteme!",menu:[{order:1,...Mt}]},7:{location:"entrada",character:"portero",emotion:"tristeza",text:"Lo que pasa es que tengo un tema con mi hijo, con Pablo.",menu:[{order:1,text:"¡Sé perfectamente quién es!",dispatch:"next-dialog"},{order:2,text:"Ehhh, la verdad no recuerdo.",dispatch:"next-dialog"}]},8:{location:"entrada",character:"portero",emotion:"neutro",text:"Bueno, la cosa, es que el otro dÃa cuando fui a comprar unas cosas al supermercado lo vi desde lejos en la plaza⦠y estaba besándose con alguien.",menu:[{order:1,...Mt}]},9:{location:"entrada",character:"player",emotion:"preocupacion",text:"¿Y eso es un problema?",menu:[{order:1,...Mt}]},10:{location:"entrada",character:"portero",emotion:"neutro",text:"No, no, es solo que era un hombre.",menu:[{order:1,text:"Qué difÃcil situaciónâ¦",dispatch:"next-dialog"},{order:2,text:"¿Y eso qué tiene de malo?",dispatch:"next-dialog"}]},11:{location:"entrada",character:"portero",emotion:"preocupacion",text:"No me malinterprete, no quiero que piense que es algo malo, es solo que él nunca me ha contado que es homosexual.",menu:[{order:1,...Mt}]},12:{location:"entrada",character:"player",emotion:"neutro",text:" ¿Y a usted le da miedo preguntarle?",menu:[{order:1,...Mt}]},13:{location:"entrada",character:"portero",emotion:"tristeza",text:"Más o menos, es que no quiero que sienta que estoy invadiendo su mundo. Usted que es joven, ¿me puede ayudar?",menu:[{order:1,text:"Una buena idea serÃa esperar a que él quiera contarte, quizás aún no sea el momento de hablarlo y por algo no le ha dicho a usted. Sea paciente. ",dispatch:"next-dialog",goTo:{ruta:"7",step:"14"},cb:()=>vt(1,"q-1-6","MAULE",2)},{order:2,text:"Creo que lo mejor es ser honesto, contarle que lo vio, pero aclararle que va a respetar su proceso y que usted le entregará todo el apoyo necesario en eso. No hay para qué ocultar lo que vio.",dispatch:"next-dialog",goTo:{ruta:"7",step:"15"},cb:()=>vt(1,"q-1-6","MAULE",3)},{order:3,text:"DeberÃa confrontarlo, pues la honestidad es clave y es algo negativo que los hijos no le cuenten a sus padres lo que hacen. Hágase respetar.",dispatch:"next-dialog",goTo:{ruta:"7",step:"16"},cb:()=>vt(1,"q-1-6","MAULE",1)}]},14:{location:"entrada",character:"portero",emotion:"preocupacion",text:"Igual tiene un punto, pero aún me da miedo pensar que necesita apoyo mÃo y no sabe cómo pedÃrmelo.",menu:[{order:1,text:"<<Siguiente>>",dispatch:"next-dialog",goTo:{ruta:"7",step:"17"}}]},15:{location:"entrada",character:"portero",emotion:"emocion",text:"Suena como la mejor opción⦠Me armaré de valor.",menu:[{order:1,text:"<<Siguiente>>",dispatch:"next-dialog",goTo:{ruta:"7",step:"17"}}]},16:{location:"entrada",character:"portero",emotion:"tristeza",text:"Creo que Pablito reaccionarÃa mal si hago eso. Pensaré otra cosa.",menu:[{order:1,text:"<<Siguiente>>",dispatch:"next-dialog",goTo:{ruta:"7",step:"17"}}]},17:{location:"entrada",character:"player",emotion:"neutro",text:"Y trate de no preguntarle si es gay, pues no porque se haya besado con un hombre significa que lo es. Puede ser bisexual, o estar conociéndose recién, quién sabe...",menu:[{order:1,...Mt}]},18:{location:"entrada",character:"portero",emotion:"alegria",text:"Tiene razón. Gracias, voy a pensar bien todo esto y le cuento otro dÃa.",menu:[{order:1,...Mt}]},19:{location:"entrada",character:"narrador",emotion:"oculto",text:"Te has dado cuenta de que en el liceo
6470suceden muchos casos complejos, llegó el momento de reunirse con tus amigos para conversar.",menu:[{order:1,...Pp}]}},EQ={1:{location:"patio",character:"narrador",emotion:"oculto",text:"Están todos tus amigos juntos en el patio después de clases, tienes ganas de hacer algo ante todas las cosas que has presenciado esta semana.",menu:[{order:1,...Mt}]},2:{location:"patio",character:"player",emotion:"preocupacion",text:"Buena cabros, me he dado cuenta que en el liceo hay muchas situaciones de violencia y conflictos, sobre todo he presenciado muchas situaciones entre parejas, y creo que debemos hacer algo al respecto. ¿Qué opinan?",menu:[{order:1,...Mt}]},3:{location:"patio",character:"jose",emotion:"preocupacion",text:"Tienes tanta razón. ¿Qué podrÃamos hacer al respecto?",menu:[{order:1,...Mt}]},4:{location:"patio",character:"diego",emotion:"emocion",text:"Quizás serÃa buena idea organizar charlas o talleres sobre el respeto y las relaciones sanas.",menu:[{order:1,...Mt}]},5:{location:"patio",character:"martina",emotion:"emocion",text:"Quizás podrÃamos hacer una campaña por redes sociales donde les contemos a nuestros compañeros a quienes pueden acudir si necesitan ayuda.",menu:[{order:1,...Mt}]},6:{location:"patio",character:"ale",emotion:"neutro",text:"Estoy de acuerdo con todas estas ideas.",menu:[{order:1,...Mt}]},7:{location:"patio",character:"nico",emotion:"emocion",text:"Me gusta tanto que sean tan motivados, pero estamos dejando de lado el tema de la discriminación por género, orientación sexual o raza, eso también tiene que estar incluido.",menu:[{order:1,...Mt}]},8:{location:"patio",character:"isidora",emotion:"duda",text:"Creo que todas las ideas están buenas, buenas, pero hay que lograr fortalecer nuestra relación con los adultos de este liceo, ellos también tienen que aportar, ¡la escuela la hacemos todos!",menu:[{order:1,...Mt}]},9:{location:"patio",character:"player",emotion:"duda",text:"Excelentes ideas, pero no sé qué opción serÃa la más viable⦠¿Cuál de estas tres opciones nos podrán ayudar a hacer algo que genere el cambio?",menu:[{order:1,text:"Creo que los adultos de la escuela deberÃan encargarse, total ellos son los que tienen el conocimiento.",dispatch:"next-dialog",goTo:{ruta:"8",step:"10"},cb:()=>vt(1,"q-1-7","MAULE",2)},{order:2,text:"Los estudiantes tenemos voz y voto, creo que tenemos que tomar la iniciativa y hacer una gran campaña.",dispatch:"next-dialog",goTo:{ruta:"8",step:"10"},cb:()=>vt(1,"q-1-7","MAULE",3)},{order:3,text:"Tal vez deberÃamos dejarlo hasta acá, no quiero entrometerme en problemasâ¦",dispatch:"next-dialog",goTo:{ruta:"8",step:"10"},cb:()=>vt(1,"q-1-7","MAULE",1)}]},10:{location:"patio",character:"narrador",emotion:"oculto",text:"El grupo de amigues ha tomado la decisión de abordar el conflicto de la violencia en la escuela y trabajar juntos para crear un entorno más seguro y respetuoso. Su compromiso y determinación son el primer paso hacia un cambio positivo en su liceo.",menu:[{order:1,...xQ}]}},Ns={dialogScene3:yQ,dialogScene4:CQ,dialogScene5:TQ,dialogScene7:SQ,dialogScene8:EQ},at={text:"<<Siguiente>>",dispatch:"next-dialog"},pl={text:"<<Siguiente>>",dispatch:"next-scene"},PQ={1:{location:"patio",character:"narrador",emotion:"oculto",text:"Con tus amigues eligieron alzar la voz frente a las situaciones de violencia del liceo. Pero antes, deben resolver cómo aporta cada uno de ustedes para liderar acciones juntes, ¿podrán hacerlo?",menu:[{order:1,...at}]},2:{location:"completos",character:"narrador",emotion:"oculto",text:"Caminando después de clases a comerse unos completos...",menu:[{order:1,...at}]},3:{location:"completos",character:"player",emotion:"emocion",text:"¡El último que llega tiene que contar un chiste!",menu:[{order:1,...at}]},4:{location:"completos",character:"narrador",emotion:"oculto",text:"Todos corren, pero Ale y Martina llegan último.",menu:[{order:1,...at}]},5:{location:"completos",character:"nico",emotion:"emocion",text:"¡El último que llega es huevo podrido!",menu:[{order:1,...at}]},6:{location:"completos",character:"ale",emotion:"aburrimiento",text:"Los últimos son los primerosâ¦",menu:[{order:1,...at}]},7:{location:"completos",character:"player",emotion:"duda",text:"Nico, ¿sabes? Todos tenemos algo que aportar para prevenir la violencia en el pololeo, cada uno es bueno con algo. PodrÃamos aprovechar eso para nuestra idea, por ejemplo, tú eres seco en el mundo virtualâ¦",menu:[{order:1,...at}]},8:{location:"completos",character:"nico",emotion:"emocion",text:"¡SÃ! Sé todo sobre videojuegos, youtubers y tiktokers. Asà que propongo hacer una campaña por redes sociales, difundiendo afiches, reels, videos y publicaciones.",menu:[{order:1,...at}]},9:{location:"completos",character:"nico",emotion:"emocion",text:"¡Qué buena idea! También, podemos inventar canciones y hacer covers camb
6470iándole la letra para hablar de violencias. Con una canción muy famosa y de ritmo pegajoso hacemos un hit.",menu:[{order:1,...at}]},10:{location:"completos",character:"gaspar",emotion:"emocion",text:"¡Apaño! Y podrÃa presentarse en un evento cuya temática sea la violencia en el pololeo.",menu:[{order:1,...at}]},11:{location:"completos",character:"isidora",emotion:"emocion",text:"Junto a sus ideas, también podemos hacer una corrida familiar por la no violencia, nos tomamos las calles de la cuadra y asà incluimos a las familias.",menu:[{order:1,...at}]},12:{location:"completos",character:"player",emotion:"neutro",text:"¡Yo también tengo una idea! Hacer una obra teatral y presentarla en los recreos⦠Pero, lo primero es lo primero, ordenémonos y veamos qué opciones tenemos.",menu:[{order:1,...at}]},13:{location:"completos",character:"custom",emotion:"oculto",forceCharacterName:"Amigues",text:"¡SÃ, nos parece!",menu:[{order:1,...at}]},14:{location:"completos",character:"player",emotion:"neutro",text:"Entonces tenemos tres opciones, yo creo que...",menu:[{order:1,text:"Cada uno de ustedes se encarga de desarrollar su idea, y luego nos podemos ir ayudando.",dispatch:"next-dialog",goTo:{ruta:"1",step:"16"},cb:()=>vt(2,"q-2-1","MAULE",2)},{order:2,text:"Yo me encargaré de todo y les pido ayuda si necesito, un lÃder puede hacer todo solo.",dispatch:"next-dialog",goTo:{ruta:"1",step:"15"},cb:()=>vt(2,"q-2-1","MAULE",1)},{order:3,text:"DeberÃamos hacer equipos según nuestras cualidades, considerando todas las ideas, y transformarlas en juegos y actividades educativas.",dispatch:"next-dialog",goTo:{ruta:"1",step:"20"},cb:()=>vt(2,"q-2-1","MAULE",3)}]},15:{location:"completos",character:"diego",emotion:"aburrimiento",text:"Bueno, como quieras, lo qué es yo, mejor me voy a casa a cocinar unas galletas, mañana les traigo para que prueben mi nueva receta ¡qué tengan buena tarde!",menu:[{order:1,text:"<<Siguiente>>",dispatch:"next-dialog",goTo:{ruta:"1",step:"26"}}]},16:{location:"completos",character:"nico",emotion:"alegria",text:"¡Me gusta! Asà podré encargarme de todo lo del mundo virtual.",menu:[{order:1,...at}]},17:{location:"completos",character:"martina",emotion:"tristeza",text:"Yo no tengo una idea concreta, no se como ayudar ahora, asà que veré si participo.",menu:[{order:1,...at}]},18:{location:"completos",character:"nico",emotion:"neutro",text:"No poâ Martina, podemos trabajar en duplas. Yo te puedo ir enseñando cosas, además, siempre puedes entregar otra perspectiva. Y asà con cualquiera de nosotros.",menu:[{order:1,...at}]},19:{location:"completos",character:"martina",emotion:"neutro",text:"Entonces, de ser asÃ, podrÃamos hacer duplas de trabajo asà todos nos ayudamos con todo.",menu:[{order:1,text:"<<Siguiente>>",dispatch:"next-dialog",goTo:{ruta:"1",step:"26"}}]},20:{location:"completos",character:"agustina",emotion:"neutro",text:"Creo qué es una buena idea, asà podemos hacer un plan y luego buscar aliados estratégicos que nos apoyen.",menu:[{order:1,...at}]},21:{location:"completos",character:"gaspar",emotion:"alegria",text:"SÃ, podemos pedirle colaboración a personas que trabajan acá en el Liceo, porque la violencia en el pololeo la detenemos todos y todas.",menu:[{order:1,...at}]},22:{location:"completos",character:"ale",emotion:"alegria",text:"Podemos hacer que participen las tÃas del aseo, los profes, directivos, las manipuladoras y todos los cursos, ¡también nuestras familias!",menu:[{order:1,...at}]},23:{location:"completos",character:"player",emotion:"emocion",text:"Entonces haremos equipos, y cada equipo presentará una propuesta de actividad, asà tendremos un plan de trabajo en contra de la violencia en el pololeo. ¡Qué emoción!",menu:[{order:1,...at}]},24:{location:"completos",character:"agustina",emotion:"neutro",text:"Con Gaspar tenemos una idea, somos buenos haciendo dramatizaciones, asà que la pregunta de rigor, ¿quieres hacer un equipo conmigo y Gaspar?",menu:[{order:1,...at}]},25:{location:"completos",character:"player",emotion:"neutro",text:"La verdad, nunca he hecho una obra frente a muchas personas, pero si canto en la ducha⦠¡Asà que acepto ser equipo con ustedes! Total, qué diferencia puede haber entre una cosa y la otraâ¦",menu:[{order:1,...at}]},26:{location:"completos",character:"narrador",emotion:"oculto",text:"Se viene una nueva aventura, vas a tener que crear una dramatización con Agustina y Gaspar. Tus demás amigues están armando sus grupos, quedaron de conversar mañana sobre las propuestas de ideasâ¦",menu:[{order:1,...pl}]}},bQ={1:{location:"sala_1",character:"narrador",emotion:"oculto",text:"Un nuevo dÃa de clases y se han definido los equipos de trabajo.",menu:[{order:1,...at}]},2:{location:"sala_1",character:"narrador",emotion:"oculto",text:"El equipo tocata, conformado por Nico, José y Ale.",menu:[{order:1,...at}]},3:{location:"sala_1",character:"jose",emotion:"neutro",text:"Ya, chiquilles, ¡manos a la obra! hay que organizar bien el tema de la tocata para que ser la propuesta ganad
6470ora.",menu:[{order:1,...at}]},4:{location:"sala_1",character:"nico",emotion:"emocion",text:"SÃ, totalmente, ojalá sea con bandas de punk.",menu:[{order:1,...at}]},5:{location:"sala_1",character:"ale",emotion:"preocupacion",text:"¿No creen que serÃan mejor bandas de rock?",menu:[{order:1,...at}]},6:{location:"sala_1",character:"jose",emotion:"emocion",text:"¡O quizás de rap latino!",menu:[{order:1,...at}]},7:{location:"sala_1",character:"nico",emotion:"preocupacion",text:"Estoy empezando a dudarâ¦",menu:[{order:1,...at}]},8:{location:"sala_1",character:"ale",emotion:"preocupacion",text:"¿Qué pasó?",menu:[{order:1,...at}]},9:{location:"sala_1",character:"nico",emotion:"tristeza",text:"Quizás nuestros gustos musicales no sean tan populares o del gusto de todos.",menu:[{order:1,...at}]},10:{location:"sala_1",character:"jose",emotion:"neutro",text:"Puede ser⦠pero debemos decidir ahora. Y también, pensar en un nombre. Yo habÃa pensado en âCombatiendo a la violenciaâ.",menu:[{order:1,...at}]},11:{location:"sala_1",character:"nico",emotion:"aburrimiento",text:"¡Qué nombre más aburrido! Yo habÃa pensado en âTocata estudiantil por la no violencia de género en colegiosâ.",menu:[{order:1,...at}]},12:{location:"sala_1",character:"ale",emotion:"neutro",text:"Y le dices a José que su nombre es aburrido⦠A mà me gusta âTokata antiviolentaâ.",menu:[{order:1,...at}]},13:{location:"sala_1",character:"nico",emotion:"tristeza",text:"Mmm...",menu:[{order:1,...at}]},14:{location:"sala_1",character:"jose",emotion:"neutro",text:"Ehhh, ya. Decidamos entonces el nombre y qué estilo de música vamos a tocar. Ale, lo dejo en tus manos, eres la persona más objetiva de les 3.",menu:[{order:1,...at}]},15:{location:"sala_1",character:"narrador",emotion:"oculto",text:"¿Qué deberÃa escoger Ale?",menu:[{order:1,text:"Combatiendo la violencia.",dispatch:"next-dialog",goTo:{ruta:"2",step:"16"}},{order:2,text:"Tocata estudiantil por la no violencia de género en colegios.",dispatch:"next-dialog",goTo:{ruta:"2",step:"16"}},{order:3,text:"Tokata antiviolenta.",dispatch:"next-dialog",goTo:{ruta:"2",step:"16"}}]},16:{location:"sala_1",character:"ale",emotion:"neutro",text:"Ya, decidà ese nombre. Pero que Nico escoja la música, no quiero tomar todas las decisiones yo.",menu:[{order:1,...at}]},17:{location:"sala_1",character:"narrador",emotion:"oculto",text:"¿Qué deberÃa escoger Nico?",menu:[{order:1,text:"Punk",dispatch:"next-dialog",goTo:{ruta:"2",step:"18"}},{order:2,text:"Rock",dispatch:"next-dialog",goTo:{ruta:"2",step:"18"}},{order:3,text:"Rap",dispatch:"next-dialog",goTo:{ruta:"2",step:"18"}}]},18:{location:"sala_1",character:"nico",emotion:"neutro",text:"Listo, que sea este.",menu:[{order:1,...at}]},19:{location:"sala_1",character:"nico",emotion:"neutro",text:"Ya, tenemos más o menos una maqueta, sigamos pensando temas logÃsticosâ¦",menu:[{order:1,...at}]},20:{location:"sala_1",character:"narrador",emotion:"oculto",text:"El equipo encargado de la obra de teatro, conformado por Agustina, Gaspar y tú.",menu:[{order:1,...at}]},21:{location:"sala_1",character:"player",emotion:"alegria",text:"Ya⦠tenemos que ponernos manos a la obra, literalmente jajaja.",menu:[{order:1,...at}]},22:{location:"sala_1",character:"agustina",emotion:"aburrimiento",text:"Si vas a empezar con tus chistes fomes, prefiero participar en otro proyecto.",menu:[{order:1,...at}]},23:{location:"sala_1",character:"gaspar",emotion:"neutro",text:"Agustina, no seas pesada.",menu:[{order:1,...at}]},24:{location:"sala_1",character:"player",emotion:"alegria",text:"No te preocupes, es verdad...",menu:[{order:1,...at}]},25:{location:"sala_1",character:"agustina",emotion:"neutro",text:"Bueno, yo tengo una idea perfecta para la obra.",menu:[{order:1,...at}]},26:{location:"sala_1",character:"gaspar",emotion:"neutro",text:"Cuéntanos, osita.",menu:[{order:1,...at}]},27:{location:"sala_1",character:"agustina",emotion:"neutro",text:"Osito, pienso en una obra con temática adolescente, donde esté la embarrada en el colegio⦠Todos y todas admiran a la pareja popular hasta que llega una chica nueva. Esta chica intenta quitarle el novio a la chica popular y desata un triángulo amoroso que deriva en muchos conflictos.",menu:[{order:1,...at}]},28:{location:"sala_1",character:"player",emotion:"aburrimiento",text:" ",menu:[{order:1,text:"Me suena conocida esa historia de los popularesâ¦",dispatch:"next-dialog",goTo:{ruta:"2",step:"29"}},{order:2,text:"TÃpico de pelÃculas adolescentes.",dispatch:"next-dialog",goTo:{ruta:"2",step:"29"}}]},29:{location:"sala_1",character:"gaspar",emotion:"neutro",text:"Pues sÃ, suena bien conocida. A mà se me ocurrÃa una historia mágica y fantasiosa, con dragones, caballeros y princesas. Y que pudiésemos sacar una moraleja del conflicto.",menu:[{order:1,...at}]},30:{location:"sala_1",character:"agustina",emotion:"neutro",text:"Y dices que lo mÃo es repetidoâ¦",menu:[{order:1,...at}]},31:{location:"sala_1",character:"player",emotion:"neutro",text:"Ya, no peleen. Ambos tienen ideas buenas, pero con defectos. No podemos hacer algo parecido a una pelÃcula adolescente, va a ser poco interesante. Tampoco algo tan fantasioso, va a llamar la atención sin lograr el objetivo.",menu:[{order:1,...at}]},32:{location:"sala_1",character:"agustina",emotion:"neutro",text:"Entonces, ¿qué propones?",menu:[{order:1,...at}]},33:{location:"sala_1",character:"agustina",emotion:"neutro",text:"IlumÃnanos con tu sabidurÃaâ¦",menu:[{order:1,...at}]},34:{location:"sala_1",character:"player",emotion:"neutro",text:" ",menu:[{order:1,text:"PodrÃamos hacer algo más realista, como propone Agustina, pero con algunos toques fantásticos o mágicos que no alteren mucho la realidad.",dispatch:"next-dialog",goTo:{ruta:"2",step:"35"},cb:()=>vt(2,"q-2-2","MAULE",2)},{order:2,text:"Me parece hacer algo más fantástico con toques de realismo, asà nadie se siente ofendido al ver la obra.",dispatch:"next-dialog",goTo:{ruta:"2",step:"35"},cb:()=>vt(2,"q-2-2","MAULE",2)},{order:3,text:"Creo que un equilibrio entre ambas, es decir, mitad realista y mitad mágica.",dispatch:"next-dialog",goTo:{ruta:"2",step:"35"},cb:()=>vt(2,"q-2-2","MAULE",3)}]},35:{location:"sala_1",character:"agustina",emotion:"neutro",text:"Mmmm, supongo que tienes razón.",menu:[{order:1,...at}]},36:{location:"sala_1",character:"gaspar",emotion:"neutro",text:"No hay casoâ¦",menu:[{order:1,...at}]},37:{location:"sala_1",character:"player",emotion:"neutro",text:"Déjenme escribir una sinopsis para presentarla al resto, a ver cómo nos va.",menu:[{order:1,...at}]},38:{location:"sala_1",character:"narrador",emotion:"oculto",text:"Y por último, Diego, Isidora y Martina encargados de realizar una jornada deportiva.",menu:[{order:1,...at}]},39:{location:"sala_1",character:"diego",emotion:"neutro",text:"Ya equipo, es nuestra misión hacer una propuesta deportiva tan buena que nadie se atreva a cuestionarla.",menu:[{order:1,...at}]},40:{location:"sala_1",character:"isidora",emotion:"neutro",text:"¿Y a ti quién te nombró lÃder?",menu:[{order:1,...at}]},41:{location:"sala_1",character:"martina",emotion:"neutro",text:"Es verdad, la lÃder soy yo.",menu:[{order:1,...at}]},42:{location:"sala_1",character:"isidora",emotion:"neutro",text:"Ehhh, pensé que era yo.",menu:[{order:1,...at}]},43:{location:"sala_1",character:"diego",emotion:"neutro",text:"¿Ven? No pueden decidirse, debo ser yo.",menu:[{order:1,...at}]},44:{location:"sala_1",character:"isidora",emotion:"neutro",text:"Hagámoslo al azar.",menu:[{order:1,...at}]},45:{location:"sala_1",character:"narrador",emotion:"oculto",text:"Les tres amigues lanzan un dado, resultando como lÃder Isidora.",menu:[{order:1,...at}]},46:{location:"sala_1",character:"isidora",emotion:"alegria",text:"¡JA! Les dije.",menu:[{order:1,...at}]},47:{location:"sala_1",character:"martina",emotion:"neutro",text:"Ya, ya, ¿puedes pensar en la propuesta?",menu:[{order:1,...at}]},48:{location:"sala_1",character:"diego",emotion:"neutro",text:"Y también qué deportes vamos a hacer en esta jornada deportiva, recuerda que debe ser para prevenir la violencia de género.",menu:[{order:1,...at}]},49:{location:"sala_1",character:"martina",emotion:"neutro",text:"Y debes pensar un nombre, y un dÃa.",menu:[{order:1,...at}]},50:{location:"sala_1",character:"diego",emotion:"neutro",text:"Y la comida y la música.",menu:[{order:1,...at}]},51:{location:"sala_1",character:"isidora",emotion:"neutro",text:"¡PAREN! Déjenme pensarâ¦Primero los deportes de ese dÃa, debiesen ser al menos tresâ¦",menu:[{order:1,text:"Atletismo, pesas y salto largo.",dispatch:"next-dialog",goTo:{ruta:"2",step:"52"},saveReplace:{chapter:"2",scene:"2",step:"52",replace:"atletismo, pesas y salto largo"}},{order:2,text:"Fútbol, básquetbol y voleibol.",dispatch:"next-dialog",goTo:{ruta:"2",step:"52"},saveReplace:{chapter:"2",scene:"2",step:"52",replace:"fútbol, básquetbol y voleibol"}},{order:3,text:"Gimnasia artÃstica, danza y zumba.",dispatch:"next-dialog",goTo:{ruta:"2",step:"52"},saveReplace:{chapter:"2",scene:"2",step:"52",replace:"gimnasia artÃstica, danza y zumba"}}]},52:{location:"sala_1",character:"isidora",emotion:"neutro",text:"Ya, los deportes serán <replace>. Ahora, el nombre.",replaceId:{chapter:"2",scene:"2",step:"52"},menu:[{order:1,text:"DÃa de conciencia por la no violencia de género.",dispatch:"next-dialog",goTo:{ruta:"2",step:"53"},saveReplace:{chapter:"2",scene:"2",step:"53",replace:"DÃa de conciencia por la no violencia de género"}},{order:2,text:"Sudando por un colegio sin violencia de género.",dispatch:"next-dialog",goTo:{ruta:"2",step:"53"},saveReplace:{chapter:"2",scene:"2",step:"53",replace:"Sudando por un colegio sin violencia de género"}},{order:3,text:"DÃa del Deporte por la No Violencia de Género.",dispatch:"next-dialog",goTo:{ruta:"2",step:"53"},saveReplace:{chapter:"2",scene:"2",step:"53",replace:"DÃa del Deporte por la No Violencia de Género"}}]},53:{location:"sala_1",character:"isidora",emotion:"neutro",text:"El nombre será <replace>. Por último, la comida y música.",replaceId:{chapter:"2",scene:"2",step:"53"},menu:[{order:1,text:"Completos y reggaetón.",dispatch:"next-dialog",goTo:{ruta:"2",step:"54"},saveReplace:{chapter:"2",scene:"2",step:"54",replace:"Completos y reggaetón"}},{order:2,text:"Churrascas y rock.",dispatch:"next-dialog",goTo:{ruta:"2",step:"54"},saveReplace:{chapter:"2",scene:"2",step:"54",replace:"Churrascas y rock"}},{order:3,text:"Pizzas y pop.",dispatch:"next-dialog",goTo:{ruta:"2",step:"54"},saveReplace:{chapter:"2",scene:"2",step:"54",replace:"Pizzas y pop"}}]},54:{location:"sala_1",character:"isidora",emotion:"neutro",text:"Sobre la comida y música, serán <replace>. Eso es todo.",replaceId:{chapter:"2",scene:"2",step:"54"},menu:[{order:1,...at}]},55:{location:"sala_1",character:"diego",emotion:"alegria",text:"Wow, qué gran lÃder eres.",menu:[{order:1,...at}]},56:{location:"sala_1",character:"martina",emotion:"alegria",text:"Y pe
6470nsar que dudé de ti por un segundo.",menu:[{order:1,...at}]},57:{location:"sala_1",character:"isidora",emotion:"alegria",text:"No les creo su arrepentimiento, jajaja. Ya, vamos a mostrar la propuesta al resto.",menu:[{order:1,...pl}]}},MQ={1:{location:"patio",character:"narrador",emotion:"oculto",text:"Con tus amigues se juntan a presentar sus ideas en el recreo⦠Todas están super geniales, tanto que fue difÃcil hacer una votación por la idea ganadora.",menu:[{order:1,...at}]},2:{location:"patio",character:"player",emotion:"preocupacion",text:"Me parece que con tres votaciones ya es suficiente, pasemos a un mecanismo más serio para decidir.",menu:[{order:1,...at}]},3:{location:"patio",character:"player",emotion:"preocupacion",text:" ",menu:[{order:1,text:"Jugar al cachipún, con tres vidas. No se vale usar varita mágica, sólo piedra, papel y tijera.",dispatch:"next-dialog",goTo:{ruta:"2",step:"4"}},{order:2,text:"Escribir las tres ideas en papeles y colocarlos en el gorro de José, y al azar sacamos la idea que será la ganadora. ",dispatch:"next-dialog",goTo:{ruta:"2",step:"4"}},{order:3,text:"Jugar a la Matita, asà jugamos hasta disputar al equipo ganador. ",dispatch:"next-dialog",goTo:{ruta:"2",step:"4"}}]},4:{location:"patio",character:"player",emotion:"emocion",text:"¡Salió la obra de teatro!",menu:[{order:1,...at}]},5:{location:"patio",character:"martina",emotion:"tristeza",text:"Me hubiese gustado ganar, porque tan buena para la actuación no soy, pero cuenten conmigo.",menu:[{order:1,...at}]},6:{location:"patio",character:"nico",emotion:"alegria",text:"¡SÃ! Yo me encargo de la difusión , para que sea vista por todos los estudiantes del liceo, profesores, auxiliares y hasta los padres puedan venir a verla.",menu:[{order:1,...at}]},7:{location:"patio",character:"isidora",emotion:"emocion",text:"¡Que genial! Yo puedo actuar y ver cosas de escenografÃa.",menu:[{order:1,...at}]},8:{location:"patio",character:"jose",emotion:"emocion",text:"Yo haré la música para la obra, he estado haciendo unas pistas y, ¿qué mejor momento para mostrarlas que ahora?",menu:[{order:1,...at}]},9:{location:"patio",character:"player",emotion:"preocupacion",text:"Qué bacán, entonces hacemos una obra de teatro. Tengo una idea, podemos desarrollar la obra asÃ:",menu:[{order:1,text:"La obra se abordará con situaciones reales que se observan en el liceo, como la violencia en el pololeo.",dispatch:"next-dialog",goTo:{ruta:"3",step:"10"},cb:()=>vt(2,"q-2-3","MAULE",3)},{order:2,text:"La obra se realizará con actos de violencia exagerados en niveles, donde el nivel más alto es la muerte.",dispatch:"next-dialog",goTo:{ruta:"3",step:"10"},cb:()=>vt(2,"q-2-3","MAULE",1)},{order:3,text:"La obra tendrá escenas donde la protagonista, una estudiante tÃmida, tiene miedo de decir que le están haciendo bulliyng.",dispatch:"next-dialog",goTo:{ruta:"3",step:"10"},cb:()=>vt(2,"q-2-3","MAULE",2)}]},10:{location:"patio",character:"narrador",emotion:"oculto",text:"Tomas una decición, pero tus amigues no están de tu lado, están un poco indecisos. Juegan nuevamente para llegar a la respuesta ganad
6470ora.",menu:[{order:1,text:"Jugar al cachipún, con tres vidas. No se vale usar varita mágica, solo piedra, papel y tijera.",dispatch:"next-dialog",goTo:{ruta:"3",step:"11"}},{order:2,text:"Escribir las tres ideas en papeles y colocarlos en el gorro de José, y al azar sacamos la idea que será la ganadora. ",dispatch:"next-dialog",goTo:{ruta:"3",step:"11"}},{order:3,text:"Jugar a la Matita, asà jugamos hasta disputar al equipo ganador.",dispatch:"next-dialog",goTo:{ruta:"3",step:"11"}}]},11:{location:"patio",character:"narrador",emotion:"oculto",text:"Juegan y gana la opción de realizar la obra se abordará con situaciones reales que se observan en el liceo, como la violencia en el pololeo. La obra tendrá dos personajes principales, ellos son pareja. Durante la obra se van dando distintos actos de violencia y al final culmina con una reflexión.",menu:[{order:1,...at}]},12:{location:"patio",character:"isidora",emotion:"alegria",text:"Se dice que la realidad supera la ficción, me parece buena idea buscar casos reales.",menu:[{order:1,...at}]},13:{location:"patio",character:"diego",emotion:"preocupacion",text:"¿Qué onda Isi?",menu:[{order:1,...at}]},14:{location:"patio",character:"isidora",emotion:"neutro",text:"Sólo es un dicho, no te lo vayas a tomar personal.",menu:[{order:1,...at}]},15:{location:"patio",character:"player",emotion:"neutro",text:"Ya pero para que no sean casos acuáticos, podemos agregar exageración y comedia, teniendo cuidado de no minimizar el mensaje.",menu:[{order:1,...at}]},16:{location:"patio",character:"nico",emotion:"alegria",text:"Jajaja, ¡dijiste acuático!",menu:[{order:1,...at}]},17:{location:"patio",character:"player",emotion:"alegria",text:"Aún asà entendieron⦠¡¡Manos a la obra equipo acuático!!",menu:[{order:1,...at}]},18:{location:"patio",character:"jose",emotion:"emocion",text:"De tanto escuchar manos a la obra podrÃa ser nuestro grito de inicio, para la motivación.",menu:[{order:1,...at}]},19:{location:"patio",character:"player",emotion:"alegria",text:"El ingenio y decir chistes fomes es lo que nos caracteriza.",menu:[{order:1,...at}]},20:{location:"patio",character:"narrador",emotion:"oculto",text:"Todes se rÃen y comienzan el trabajo en equipo, se dividieron los papeles, hicieron la escenografÃa y Ale se encargó de la Música. Todes ayudaron con un granito de arena, para construir la obra.",menu:[{order:1,...pl}]}},wQ={1:{location:"patio",character:"player",emotion:"neutro",text:"Ya equipo, hay que ver que todo esté bien con el guión.",menu:[{order:1,...at}]},2:{location:"patio",character:"nico",emotion:"neutro",text:"Hablemos con la profe Claudia de lenguaje, debe cachar caleta de obras de teatro.",menu:[{order:1,...at}]},3:{location:"patio",character:"martina",emotion:"neutro",text:"Lo mismo iba a sugerir, es la única que se me ocurre.",menu:[{order:1,...at}]},4:{location:"patio",character:"player",emotion:"neutro",text:"Ya, pero no podemos ir todos. ¿Les parece si me acompañan Ale y Diego?",menu:[{order:1,...at}]},5:{location:"patio",character:"gaspar",emotion:"neutro",text:" Bueno, âlÃderâ...",menu:[{order:1,...at}]},6:{location:"sala_1",character:"narrador",emotion:"oculto",text:"En un momento, vas con tus amigues a ver a la profesora Claudia a su sala en el colegioâ¦.",menu:[{order:1,...at}]},7:{location:"sala_1",character:"profe_claudia",emotion:"alegria",text:"¡Hola, queridos! ¿Cómo están?",menu:[{order:1,...at}]},8:{location:"sala_1",character:"ale",emotion:"neutro",text:"Hola profe, tanto tiempo...",menu:[{order:1,...at}]},9:{location:"sala_1",character:"diego",emotion:"alegria",text:"SÃ, no es como si nos hubiéramos visto hace unas horas en clases.",menu:[{order:1,...at}]},10:{location:"sala_1",character:"profe_claudia",emotion:"neutro",text:"¿Ocurre algo?",menu:[{order:1,...at}]},11:{location:"sala_1",character:"player",emotion:"neutro",text:"SÃ, profesora, lo que sucede es que escribimos una obra de teatro para el colegio, y querÃamos saber si puede revisarla para ver que esté todo bien.",menu:[{order:1,...at}]},12:{location:"sala_1",character:"profe_claudia",emotion:"neutro",text:"Me encantarÃa, saben que amo el teatro, pero, ¿sabe la dirección de esto?",menu:[{order:1,...at}]},13:{location:"sala_1",character:"ale",emotion:"neutro",text:"Nop, y tampoco queremos que se enteren.",menu:[{order:1,...at}]},14:{location:"sala_1",character:"diego",emotion:"neutro",text:"Digamos que es⦠algo sorpresa.",menu:[{order:1,...at}]},15:{location:"sala_1",character:"profe_claudia",emotion:"preocupacion",text:"¿Y qué pasa si se enteran que leà esto y me echan del colegi
6470o? ¡Voy a quedar en la ruina!",menu:[{order:1,...at}]},16:{location:"sala_1",character:"ale",emotion:"neutro",text:"Y⦠¿por qué se enterarÃan?",menu:[{order:1,...at}]},17:{location:"sala_1",character:"player",emotion:"neutro",text:"Es verdad, su secreto está a salvo con nosotres.",menu:[{order:1,...at}]},18:{location:"sala_1",character:"profe_claudia",emotion:"preocupacion",text:"No lo sé, parece muy peligroso y no sé si quiero perder mi trabajo.",menu:[{order:1,...at}]},19:{location:"sala_1",character:"diego",emotion:"neutro",text:"(te susurra) Convéncela⦠es nuestra única esperanza.",menu:[{order:1,...at}]},20:{location:"sala_1",character:"player",emotion:"neutro",text:" ",menu:[{order:1,text:"Profe, por favor, no tenemos a nadie más y a usted no deberÃa importarle si pierde su trabajo o no, mientras sea por ayudar una buena causa. Hágalo por nosotres.",dispatch:"next-dialog",goTo:{ruta:"4",step:"21"},cb:()=>vt(2,"q-2-4","MAULE",1)},{order:2,text:"Profesora, su ayuda es vital. Creo que cuando los profesores muestran interés en los proyectos de los alumnos, eso nos motiva a esforzarnos más. Además, nos hace sentir que nuestro trabajo es valioso y relevante.",dispatch:"next-dialog",goTo:{ruta:"4",step:"21"},cb:()=>vt(2,"q-2-4","MAULE",3)},{order:3,text:"Profe, en un futuro creo que podemos concertar una reunión para presentar el proyecto de manera sólida a Dirección, pero ahora necesitamos urgencia.",dispatch:"next-dialog",goTo:{ruta:"4",step:"21"},cb:()=>vt(2,"q-2-4","MAULE",2)}]},21:{location:"sala_1",character:"profe_claudia",emotion:"preocupacion",text:"Para serle honesta, su respuesta no me convence, pero he estado pensando últimamente que debo dejar de tener miedoâ¦",menu:[{order:1,...at}]},22:{location:"sala_1",character:"diego",emotion:"alegria",text:"¡Eso, profesora, usted puede!",menu:[{order:1,...at}]},23:{location:"sala_1",character:"profe_claudia",emotion:"alegria",text:"Ya, déjenme echarle una revisada.",menu:[{order:1,...pl}]}},AQ={1:{location:"patio",character:"narrador",emotion:"oculto",text:"Te vuelves a reunir con tus amigues en el patio para continuar con los preparativos.",menu:[{order:1,...at}]},2:{location:"patio",character:"player",emotion:"alegria",text:"La profe va a revisar la obra y creo sólo nos faltarÃa la revisión de la escenografÃa.",menu:[{order:1,...at}]},3:{location:"patio",character:"ale",emotion:"preocupacion",text:"En esto sà que no puedo ayudarte.",menu:[{order:1,...at}]},4:{location:"patio",character:"diego",emotion:"preocupacion",text:"Yo menos.",menu:[{order:1,...at}]},5:{location:"patio",character:"martina",emotion:"neutro",text:"Yo sé de construcción por mi formación mecánica amateur⦠Recuerdo hablar con el profe Juan Pablo sobre materiales, quizás podrÃamos preguntarle a él.",menu:[{order:1,...at}]},6:{location:"patio",character:"player",emotion:"neutro",text:"Ok, vamos con el profe. ¿Me pueden acompañar Martina e Isidora?",menu:[{order:1,...at}]},7:{location:"patio",character:"isidora",emotion:"tristeza",text:"¿Por qué yo?",menu:[{order:1,...at}]},8:{location:"patio",character:"player",emotion:"neutro",text:"Tu afición por los deportes me hace pensar que puedes analizar bien cómo usar el espacio.",menu:[{order:1,...at}]},9:{location:"patio",character:"isidora",emotion:"alegria",text:"Ya lo sabÃa, solo querÃa escucharte decirlo, jajaja",menu:[{order:1,...at}]},10:{location:"patio",character:"narrador",emotion:"oculto",text:"Y asà te diriges al gimnasio del colegio con tus dos amigas.",menu:[{order:1,...at}]},11:{location:"cancha",character:"profe_jp",emotion:"neutro",text:"Hola estudiantes.",menu:[{order:1,...at}]},12:{location:"cancha",character:"martina",emotion:"alegria",text:"¡Hola profe! ¿Cómo está?",menu:[{order:1,...at}]},13:{location:"cancha",character:"profe_jp",emotion:"alegria",text:"Bien, gracias. Algo me dice que no vienen con buenas intenciones⦠jajaja",menu:[{order:1,...at}]},14:{location:"cancha",character:"isidora",emotion:"alegria",text:"¡Ay, profe! No sea pesado. Queremos pedirle ayuda con algo.",menu:[{order:1,...at}]},15:{location:"cancha",character:"player",emotion:"neutro",text:"Algo que no le tomará mucho tiempo, pero que creemos que sólo usted puede hacer.",menu:[{order:1,...at}]},16:{location:"cancha",character:"profe_jp",emotion:"neutro",text:"A ver, cuéntenme.",menu:[{order:1,...at}]},17:{location:"cancha",character:"player",emotion:"neutro",text:"Lo que sucede es que hicimos una obra de teatro, y querÃamos preguntarle si puede revisar si nuestra escenografÃa es segura.",menu:[{order:1,...at}]},18:{location:"cancha",character:"martina",emotion:"neutro",text:"Y como yo recordaba que una vez usted y yo hablamos mucho rato sobre construcción, se me ocurrió que sabe.",menu:[{order:1,...at}]},19:{location:"cancha",character:"isidora",emotion:"neutro",text:"Y no puede negarse, porque es un tema importante.",menu:[{order:1,...at}]},20:{location:"cancha",character:"profe_jp",emotion:"alegria",text:"Si me lo ponen de esa forma, ¿cómo negarme?",menu:[{order:1,...at}]},21:{location:"cancha",character:"player",emotion:"neutro",text:"¿En serio nos va a ayudar?",menu:[{order:1,...at}]}
6470,22:{location:"cancha",character:"profe_jp",emotion:"neutro",text:"Por supuesto, pero no sin antes ponerlos a pruebaâ¦",menu:[{order:1,...at}]},23:{location:"cancha",character:"martina",emotion:"neutro",text:"Ya sabÃa que esto no serÃa fácilâ¦",menu:[{order:1,...at}]},24:{location:"cancha",character:"isidora",emotion:"neutro",text:"¿Y qué debemos hacer?",menu:[{order:1,...at}]},25:{location:"cancha",character:"profe_jp",emotion:"neutro",text:"Deben responder bien las siguientes preguntas.",menu:[{order:1,...at}]},26:{location:"cancha",character:"martina",emotion:"neutro",text:"Tres, ¿listos?",menu:[{order:1,...at}]},27:{location:"cancha",character:"isidora",emotion:"neutro",text:"Acá vamosâ¦",menu:[{order:1,...at}]},28:{location:"cancha",character:"profe_jp",emotion:"neutro",text:"¿Cuál de los siguientes deportes NO se juega con una pelota?",menu:[{order:1,text:"Golf",dispatch:"next-dialog",goTo:{ruta:"5",step:"29"}},{order:2,text:"Cricket",dispatch:"next-dialog",goTo:{ruta:"5",step:"29"}},{order:3,text:"Bádminton",dispatch:"next-dialog",goTo:{ruta:"5",step:"30"}}]},29:{location:"cancha",character:"profe_jp",emotion:"neutro",text:"Veo que aún no están listos para mi ayuda, les doy otra oportunidad",menu:[{order:3,text:"<<Siguiente>>",dispatch:"next-dialog",goTo:{ruta:"5",step:"28"}}]},30:{location:"cancha",character:"profe_jp",emotion:"neutro",text:"¿Cuál es el deporte más jugado en Chile?",menu:[{order:1,text:"Fútbol.",dispatch:"next-dialog",goTo:{ruta:"5",step:"32"}},{order:2,text:"Atletismo.",dispatch:"next-dialog",goTo:{ruta:"5",step:"31"}},{order:3,text:"Ajedrez.",dispatch:"next-dialog",goTo:{ruta:"5",step:"31"}}]},31:{location:"cancha",character:"profe_jp",emotion:"neutro",text:"¿En serio?, si esta pregunta esta casi regalada, les doy otra oportunidad.",menu:[{order:3,text:"<<Siguiente>>",dispatch:"next-dialog",goTo:{ruta:"5",step:"30"}}]},32:{location:"cancha",character:"profe_jp",emotion:"neutro",text:"Muy bien, sólo una pregunta más.",menu:[{order:1,...at}]},33:{location:"cancha",character:"profe_jp",emotion:"neutro",text:"¿Qué es un ejercicio tipo âcardiovascularâ?",menu:[{order:1,text:"Se enfoca en fortalecer músculos.",dispatch:"next-dialog",goTo:{ruta:"5",step:"34"}},{order:2,text:"Busca ejercitar mediante la respiración aeróbica.",dispatch:"next-dialog",goTo:{ruta:"5",step:"35"}},{order:3,text:"Su misión es mejorar la capacidad de levantar objetos.",dispatch:"next-dialog",goTo:{ruta:"5",step:"34"}}]},34:{location:"cancha",character:"profe_jp",emotion:"neutro",text:"Parece que no quieren mi ayuda, mejor piensen bien antes de responder.",menu:[{order:3,text:"<<Siguiente>>",dispatch:"next-dialog",goTo:{ruta:"5",step:"33"}}]},35:{location:"cancha",character:"profe_jp",emotion:"alegria",text:"¡SabÃa que podÃan responderlas correctamente!",menu:[{order:1,...at}]},36:{location:"cancha",character:"martina",emotion:"preocupacion",text:"¿Nos va a ayudar o tenemos que seguir sufriendo?",menu:[{order:1,...at}]},37:{location:"cancha",character:"profe_jp",emotion:"alegria",text:"Ok, vamos a ver esa escenografÃaâ¦",menu:[{order:1,...pl}]}},RQ={1:{location:"patio",character:"narrador",emotion:"oculto",text:"¡Ya ha pasado una semana! La escenografÃa está lista y aprobada, el guión listo y aprobado, sólo les queda ensayar la obra. ",menu:[{order:1,...at}]},2:{location:"patio",character:"player",emotion:"neutro",text:"Entonces a manera general, la obra trata de una pareja de estudiantes que discuten.",menu:[{order:1,...at}]},3:{location:"patio",character:"ale",emotion:"neutro",text:"Complementando, habrá momentos realistas y de ficción.",menu:[{order:1,...at}]},4:{location:"patio",character:"narrador",emotion:"oculto",text:"El grupo se reparte los papeles que cada uno cumplirá en la obra: actores y actrices, director y narrador de escena, encargados de escenografÃa, música y difusión.",menu:[{order:1,...at}]},5:{location:"patio",character:"diego",emotion:"alegria",text:"Gracias por confiar en mà para ser director y narrador de escenas, prometo dar lo mejor.",menu:[{order:1,...at}]},6:{location:"patio",character:"isidora",emotion:"alegria",text:"¡Con Gaspar seremos les protagonistas! Ya tenemos bien ensayado el guión.",menu:[{order:1,...at}]},7:{location:"patio",character:"player",emotion:"alegria",text:"Martina, nos tocó ser encargades de escenografÃa.",menu:[{order:1,...at}]},8:{location:"patio",character:"jose",emotion:"emocion",text:"Y con la Ale ya tenemos listas las pistas y unas canciones muy buenas.",menu:[{order:1,...at}]},9:{location:"patio",character:"nico",emotion:"emocion",text:"Y no menos importante, yo haré los afiches y cuanta cosa sirva para que todo el liceo
6470sepa que les tenemos una sorpresa.",menu:[{order:1,...at}]},10:{location:"patio",character:"diego",emotion:"neutro",text:"Entonces comenzamos con el ensayo general de la obra. Isidora y Gaspar ubÃquense acá en medio del patio.",menu:[{order:1,...at}]},11:{location:"patio",character:"isidora",emotion:"preocupacion",text:"Para que la obra sea una sorpresa mejor ensayemos en un lugar privado.",menu:[{order:1,...at}]},12:{location:"patio",character:"diego",emotion:"neutro",text:"No, creo que en verdad deberÃamos ensayar acá, porque acá realizaremos la obra.",menu:[{order:1,...at}]},13:{location:"patio",character:"gaspar",emotion:"neutro",text:"Director, yo creo que es mejor irnos a la sala del taller de oficios. ",menu:[{order:1,...at}]},14:{location:"patio",character:"diego",emotion:"neutro",text:"¿Sabes qué, Gaspar? Tiene razón. Nos movemos al taller de oficios.",menu:[{order:1,...at}]},15:{location:"taller",character:"narrador",emotion:"oculto",text:"Se mueven desde el patio al taller de oficios, solo ustedes y dos profesores saben que harán la obra. ¡Quieren que el colegio quede verdaderamente sorprendido!",menu:[{order:1,...at}]},16:{location:"taller",character:"diego",emotion:"neutro",text:"Muy bien, el ensayo les salió genial.",menu:[{order:1,...at}]},17:{location:"taller",character:"player",emotion:"neutro",text:"Ahora hablemos de la ropa que traeremos ese dÃa.",menu:[{order:1,...at}]},18:{location:"taller",character:"player",emotion:"neutro",text:" ",menu:[{order:1,text:"Venir con ropa de colegio, asà nuestros compañeres se sienten identificados con lo que estamos actuando.",dispatch:"next-dialog",goTo:{ruta:"6",step:"23"},cb:()=>vt(2,"q-2-5","MAULE",3)},{order:2,text:"Venir con ropa totalmente negra, como sÃmbolo de que es un tema serio.",dispatch:"next-dialog",goTo:{ruta:"6",step:"19"},cb:()=>vt(2,"q-2-5","MAULE",1)},{order:3,text:"Venir con ropa urbana, para demostrar que no solo en el colegio ocurre la violencia en el pololeo.",dispatch:"next-dialog",goTo:{ruta:"6",step:"21"},cb:()=>vt(2,"q-2-5","MAULE",2)}]},19:{location:"taller",character:"diego",emotion:"tristeza",text:"Yo no tengo ropa negra y no se si pueda conseguirme algo para ese dÃa.",menu:[{order:1,...at}]},20:{location:"taller",character:"player",emotion:"neutro",text:"Ok, no pongamos todo en riesgo por detalles, veamos que hacemos",menu:[{order:1,text:"<<Siguiente>>",dispatch:"next-dialog",goTo:{ruta:"6",step:"18"}}]},21:{location:"taller",character:"isidora",emotion:"preocupacion",text:"pero la idea es que sea la violencia en el ambiente escolar, ¿no?",menu:[{order:1,...at}]},22:{location:"taller",character:"player",emotion:"neutro",text:"Si, tienes razón, se pueden malentender el tema, veamos...",menu:[{order:1,text:"<<Siguiente>>",dispatch:"next-dialog",goTo:{ruta:"6",step:"18"}}]},23:{location:"taller",character:"player",emotion:"alegria",text:"Todes votamos y por primera vez estamos casi todes de acuerdo, vendremos con ropa de colegio asà es más cómodo.",menu:[{order:1,...at}]},24:{location:"taller",character:"isidora",emotion:"neutro",text:"Pero para que recuerden la obra, al final les entregamos unos mensajitos. Papeles que tengan frases contra la violencia en el pololeo.",menu:[{order:1,...at}]},25:{location:"taller",character:"diego",emotion:"neutro",text:"Isidora yo creo que no quieres hacer eso, si ya tenemos hartas cosas que hacer, mejor enfóquense en ensayar.",menu:[{order:1,...at}]},26:{location:"taller",character:"isidora",emotion:"enojo",text:"Oye, Diego, ya van dos veces que interpelas lo que digo, ¡me está molestando! Yo también puedo proponer cosas aunque no sea la Directora.",menu:[{order:1,...at}]},27:{location:"taller",character:"diego",emotion:"preocupacion",text:"Isi, tú no te das cuenta pero muchas veces tus ideas no aportan, te lo digo porque te quiero...",menu:[{order:1,...at}]},28:{location:"taller",character:"ale",emotion:"enojo",text:"Te pasaste de pesado, tu actitud podrÃa estar dentro de la obra.",menu:[{order:1,...at}]},29:{location:"taller",character:"diego",emotion:"enojo",text:"Pero Isidora, por tu culpa se enojan conmigo. Mejor dejemos el ensayo hasta acá, nos vemos mañana.",menu:[{order:1,...at}]},30:{location:"taller",character:"isidora",emotion:"tristeza",text:"Pongamos la actitud de Diego como parte de la obra.",menu:[{order:1,...at}]},31:{location:"taller",character:"nico",emotion:"preocupacion",text:"Diego has sonado un poco intolerante, y justo es la violencia entre las parejas lo que nos preocupa. Mejor descansemos.",menu:[{order:1,...at}]},32:{location:"taller",character:"player",emotion:"neutro",text:"A mi me parece que deberÃamos:",menu:[{order:1,text:"Dejar esto hasta acá y descansar pero mañana retomamos para hacer luego la obra. Estoy muy emocionade. ",dispatch:"next-dialog",goTo:{ruta:"6",step:"33"},cb:()=>vt(2,"q-2-6","MAULE",2)},{order:2,text:"Posponer el ensayo por unos dÃas, hasta que Diego e Isidora conversen.",dispatch:"next-dialog",goTo:{ruta:"6",step:"33"},cb:()=>vt(2,"q-2-6","MAULE",3)},{order:3,text:"Dejar esto hasta acá y mañana retomar a la misma hora en el mismo lugar pero para que conversemos sobre la violencia en el pololeo y pod
6470amos a ayudar a nuestros amigues.",dispatch:"next-dialog",goTo:{ruta:"6",step:"33"},cb:()=>vt(2,"q-2-6","MAULE",1)}]},33:{location:"taller",character:"narrador",emotion:"oculto",text:"El ensayo terminó con un final tenso, el equipo se dió cuenta de cómo se trataban Diego e Isidora, y quizás eso sea solo la punta de un iceberg. Antes de seguir con la obra es necesario ir manos a la obra, pero con la vida real.",menu:[{order:1,...at}]},34:{location:"taller",character:"narrador",emotion:"oculto",text:"La pausa te permitirá ayudar en las tareas de difusión.",menu:[{order:1,text:"<<Siguiente>>",dispatch:"next-game",goToGame:{key:"difusion"}}]}},_i={dialogScene1:PQ,dialogScene2:bQ,dialogScene3:MQ,dialogScene4:wQ,dialogScene5:AQ,dialogScene6:RQ},pt={text:"<<Siguiente>>",dispatch:"next-dialog"},bp={text:"<<Siguiente>>",dispatch:"next-scene"},OQ={1:{location:"mall",character:"narrador",emotion:"oculto",text:"Es tarde y piensas en la situación del ensayo, es paradójico hacer una obra de teatro sobre la violencia en el pololeo cuando tus amigues tienen una relación que no es sana.",menu:[{order:1,...pt}]},2:{location:"mall",character:"player",emotion:"preocupacion",text:"¡Ya sé que haré! Conversaré con Nico sobre lo que pasó hoy.",menu:[{order:1,...pt}]},3:{location:"mall",character:"narrador",emotion:"oculto",text:"Te metes a tu red social favorita para conversar con Nico y le planteas tu preocupación.",menu:[{order:1,...pt}]},4:{location:"mall",character:"player",emotion:"chatpreocupacion",text:"Nicooooo⦠¡no puedo parar de pensar en hoy! Ãbamos tan bien con el ensayo de la obra.",menu:[{order:1,...pt}]},5:{location:"mall",character:"nico",emotion:"chatneutro",text:"Yo la verdad no le di tantas vueltas al asunto, pero podemos conversar si quieres.",menu:[{order:1,...pt}]},6:{location:"mall",character:"player",emotion:"chattristeza",text:"Me parece extraño que queramos prevenir la violencia en el pololeo y suceda esto.",menu:[{order:1,...pt}]},7:{location:"mall",character:"nico",emotion:"chatpreocupacion",text:"No lo habÃa pensado asÃ, ¿te gustarÃa hacer algo al respecto?",menu:[{order:1,...pt}]},8:{location:"mall",character:"player",emotion:"chatduda",text:" ",menu:[{order:1,text:" SÃ, hablar con Isidora para decirle que no se altere, que no le de color.",dispatch:"next-dialog",goTo:{ruta:"1",step:"9"},cb:()=>vt(3,"q-3-1","MAULE",2)},{order:2,text:"Hablar con Diego, y saber si es consciente de lo que está haciendo. Tengo la sensación de que lo tiene normalizado.",dispatch:"next-dialog",goTo:{ruta:"1",step:"9"},cb:()=>vt(3,"q-3-1","MAULE",3)},{order:3,text:"Subir memes como indirectas, para que se den cuenta de que ellos tienen que resolver su problema.",dispatch:"next-dialog",goTo:{ruta:"1",step:"9"},cb:()=>vt(3,"q-3-1","MAULE",1)}]},9:{location:"mall",character:"nico",emotion:"chatneutro",text:"La verdad es que cualquier opción que elijas es mejor que no hacer nada.",menu:[{order:1,...pt}]},10:{location:"mall",character:"player",emotion:"chatemocion",text:"¡¡¡Ya, deséame suerte!!!",menu:[{order:1,...pt}]},11:{location:"mall",character:"narrador",emotion:"oculto",text:"Decidiste hablar con Diego y comentarle tu preocupación.",menu:[{order:1,...pt}]},12:{location:"mall",character:"player",emotion:"chatpreocupacion",text:"Hola Diego, ¿cómo estás? Estuve pensando en el ensayo de la tarde y querÃa decirte lo siguienteâ¦",menu:[{order:1,text:"No me pareció que Isidora se tomara a pecho tus palabras, es normal que las parejas no estén de acuerdo siempre. Exageró un poquito, ¿no crees?",dispatch:"next-dialog",goTo:{ruta:"1",step:"13"},cb:()=>vt(3,"q-3-2","MAULE",2)},{order:2,text:"Me quedé con que el conflicto que tuvieron con Isidora es un tipo de violencia en el pololeo, creo que las relaciones sanas tienen que basarse en el respeto mutuo.",dispatch:"next-dialog",goTo:{ruta:"1",step:"13"},cb:()=>vt(3,"q-3-2","MAULE",3)},{order:3,text:"A veces pienso que la Isidora es muy sensible, casi llora porque no pensaste igual a ella.",dispatch:"next-dialog",goTo:{ruta:"1",step:"13"},cb:()=>vt(3,"q-3-2","MAULE",1)}]},13:{location:"mall",character:"diego",emotion:"chatpreocupacion",text:"La verdad es que yo también quedé pensativo, ¿crees que deberÃa hacer algo frente a esta situación?",menu:[{order:1,text:"Déjalo asÃ, a veces lo mejor es dejar que el tiempo pase.",dispatch:"next-dialog",goTo:{ruta:"1",step:"14"},cb:()=>vt(3,"q-3-3","MAULE",2)},{order:2,text:"Termina con Isidora, ya vendrán nuevos amores.",dispatch:"next-dialog",goTo:{ruta:"1",step:"14"},cb:()=>vt(3,"q-3-3","MAULE",1)},{order:3,text:"Lo importante no es la pelea, sino que puedan solucionarlo. DeberÃas conversar con ella, asà saber que le incomodó.",dispatch:"next-dialog",goTo:{ruta:"1",step:"14"},cb:()=>vt(3,"q-3-3","MAULE",3)}]},14:{location:"mall",character:"diego",emotion:"chatneutro",text:"Tomaré tu consejo, haré lo que pueda la verdad. Muchas gracias por preocuparte, iré a cocinar para dejar de pensar un rato.",menu:[{order:1,...pt}]},15:{location:"mall",character:"narrador",emotion:"oculto",text:"Sigues preocupado, pero ya es hora de dormir. Esta semana es esencial para practicar la obra y para buscar una solución a este conflicto. ¡Un problema puede ser una oportunidad!",menu:[{order:1,...bp}]}},LQ={1:{location:"sala_1",character:"narrador",emotion:"oculto",text:"Ya es un nuevo dÃa, la obra esta más cerca y los nervios se hacen notar.",menu:[{order:1,...pt}]},2:{location:"sala_1",character:"narrador",emotion:"oculto",text:"Le piden ayuda a la profe Denisse (matemáticas) y a Daniela (auxiliar) para que las y los ayuden a recopilar objetos y materiales para la escenografÃa de la obra.",menu:[{order:1,...pt}]},3:{location:"sala_1",character:"gaspar",emotion:"emocion",text:"¡Chiques, tengo una idea! Pidamos ayuda a la Profe Denisse, ella es buena onda, puede ayudarnos a recopilar objetos, elementos y materiales para la escenografÃa de la obra.",menu:[{order:1,...pt}]},4:{location:"sala_1",character:"agustina",emotion:"preocupacion",text:"Buena idea, pero la profe Denisse no sabe de la obra, tendrÃamos que contarle.",menu:[{order:1,...pt}]},5:{location:"sala_1",character:"ale",emotion:"neutro",text:"Mmm sÃ, es cierto, pero yo creo que nos apoyarÃa.",menu:[{order:1,...pt}]},6:{location:"sala_1",character:"diego",emotion:"emocion",text:"Contémosle, mientras más apoyo tengamos, ¡mejor!",menu:[{order:1,...pt}]},7:{location:"sala_1",character:"martina",emotion:"emocion",text:"¡Apoyo la idea! Pero incluyamos a la auxiliar Daniela que siempre nos apaña en todo.",menu:[{order:1,...pt}]},8:{location:"sala_1",character:"isidora",emotion:"neutro",text:"Vamos a hablar con ellas entonces y les explicamos lo que queremos hacer.",menu:[{order:1,...pt}]},9:{location:"sala_1",character:"narrador",emotion:"oculto",text:"El grupo va donde la profe Denisse.",menu:[{order:1,...pt}]},10:{location:"sala_3",character:"player",emotion:"neutro",text:"Hola profe Denisse, queremos pedirle un favor.",menu:[{order:1,...pt}]},11:{location:"sala_3",character:"profe_denisse",emotion:"neutro",text:"Hola, dime.",menu:[{order:1,...pt}]},12:{location:"sala_3",character:"player",emotion:"neutro",text:"Estamos creando una obra de teatro para presentarla en el Colegio. Es sobre violencia en el pololeo, estamos en el proceso final y necesitamos recolectar elementos para la escenografÃa. Entonces pensamos en usted y en la Auxiliar Daniela para que nos ayuden.",menu:[{order:1,...pt}]},13:{location:"sala_3",character:"profe_denisse",emotion:"neutro",text:"Por mi no hay problema, si quieres podemos ir ahora a hablar con la auxiliar Daniela.",menu:[{order:1,...pt}]},14:{location:"sala_3",character:"player",emotion:"neutro",text:"BuenÃsima idea, le pediré a Ale que también nos acompañe.",menu:[{order:1,...pt}]},15:{location:"sala_1",character:"narrador",emotion:"oculto",text:"Tú, Ale y la profe Denisse van a hablar con la auxiliar.",menu:[{order:1,...pt}]},16:{location:"enfermeria",character:"ale",emotion:"neutro",text:"Hola Dani, vinimos a hablar contigo. Necesitamos tu ayuda. Para hacerla corta, te contamos altiro de qué se trataâ¦",menu:[{order:1,...pt}]},17:{location:"enfermeria",character:"daniela",emotion:"aburrimiento",text:"Ya, cuéntenme...",menu:[{order:1,...pt}]},18:{location:"enfermeria",character:"ale",emotion:"neutro",text:"Hicimos una obra de teatro de prevención en violencia de género, estamos en la etapa final y necesitamos recolectar elementos para la escenografÃa. Ya le pedimos ayuda a la Profe Denisse, pero también pensamos en ti.",menu:[{order:1,...pt}]},19:{location:"enfermeria",character:"daniela",emotion:"emocion",text:"¡Ah ya entiendo, cuenten conmigo!",menu:[{order:1,...pt}]},20:{location:"enfermeria",character:"ale",emotion:"alegria",text:"¡Muchas gracias, Dani!",menu:[{order:1,...pt}]},21:{location:"enfermeria",character:"daniela",emotion:"neutro",text:"Sin embargo, primero deben ayudarme a encontrar los objetos en esta desordenada salaâ¦",menu:[{order:1,text:"<<Siguiente>>",dispatch:"next-game",goToGame:{key:"escenografia"}}]}},FQ={1:{location:"churrascas",character:"narrador",emotion:"oculto",text:"Es jueves. Hoy y mañana son los últimos dÃas de ensayos. ¡La obra se presenta el dÃa Lunes! Se juntan con tus amigues más temprano de lo habitual para comprar churrascas a unas cuadras del colegi
6470o.",menu:[{order:1,...pt}]},2:{location:"churrascas",character:"player",emotion:"alegria",text:"Hola, buen dÃa. Quiero comprar una churrasca con tomate, por favor.",menu:[{order:1,...pt}]},3:{location:"churrascas",character:"ale",emotion:"neutro",text:"Yo quiero una con queso por favor. Están calentitas y ¡¡el queso se derrite!!",menu:[{order:1,...pt}]},4:{location:"churrascas",character:"nico",emotion:"neutro",text:"Yo no quiero nada hoy, traje mucho desayuno desde casa.",menu:[{order:1,...pt}]},5:{location:"churrascas",character:"player",emotion:"preocupacion",text:"Atención, sepan que nos juntamos por las churrascas y para que conversemos sobre la obra.",menu:[{order:1,...pt}]},6:{location:"churrascas",character:"martina",emotion:"alegria",text:"Disculpeeeeeeeen, no me pararon dos micros. En fin, yo también quiero churrasca y hablar de la obra.",menu:[{order:1,...pt}]},7:{location:"churrascas",character:"nico",emotion:"alegria",text:"Jajaja si claro, la micro no paró.",menu:[{order:1,...pt}]},8:{location:"churrascas",character:"ale",emotion:"alegria",text:"Siempre andas corriendo.",menu:[{order:1,...pt}]},9:{location:"churrascas",character:"nico",emotion:"alegria",text:"Y casi siempre llegas un poco atrasada.",menu:[{order:1,...pt}]},10:{location:"churrascas",character:"martina",emotion:"alegria",text:"Me da una churrasca con queso igual, gracias.",menu:[{order:1,...pt}]},11:{location:"churrascas",character:"player",emotion:"preocupacion",text:"Ahora que todes tenemos comida, les cuento, ayer me preocupé y conversé con Diego.",menu:[{order:1,...pt}]},12:{location:"churrascas",character:"nico",emotion:"preocupacion",text:"Yo también, y creo que hay que apoyar a Isidora y Diego. La verdad no sé si entendà lo que pasó entre ellos. Me preocupa lo que pudo haber pasado en el transcurso de ayer y hoy.",menu:[{order:1,...pt}]},13:{location:"churrascas",character:"ale",emotion:"preocupacion",text:"Se imaginan se bajan de la obra. ¡No podrÃamos presentarla el lunes!",menu:[{order:1,...pt}]},14:{location:"churrascas",character:"player",emotion:"preocupacion",text:"A mi se me ocurre lo siguiente:",menu:[{order:1,text:"Diego deberÃa asumir otro papel y ajustamos el guion para salir adelante. Tenemos que asegurar el éxito de la obra.",dispatch:"next-dialog",goTo:{ruta:"3",step:"15"},cb:()=>vt(3,"q-3-4","MAULE",2)},{order:2,text:"Creo que si no son capaces de resolver, deberÃan irse de la obra. Yo creo que a todos nos cansa lidiar con su situación personal.",dispatch:"next-dialog",goTo:{ruta:"3",step:"15"},cb:()=>vt(3,"q-3-4","MAULE",1)},{order:3,text:"Podemos reunirnos todes en el primer recreo, asà consideramos lo que ellos sienten, y todos los puntos de vistas antes de tomar una decisión.",dispatch:"next-dialog",goTo:{ruta:"3",step:"15"},cb:()=>vt(3,"q-3-4","MAULE",3)}]},15:{location:"churrascas",character:"martina",emotion:"preocupacion",text:"No tomemos la decisión apresurada y discutámoslo en el liceo en el primer recreo. Ahora a mantener la calma y abordar juntes el problema.",menu:[{order:1,...pt}]},16:{location:"churrascas",character:"narrador",emotion:"oculto",text:"Caminan al liceo, rumbo a clase de matemáticas, con las ganas de resolver este problema antes de que sea demasiado tarde para la presentación de la obra.",menu:[{order:1,...pt}]},17:{location:"sala_3",character:"ale",emotion:"neutro",text:"Hola chiques. Hola Gaspar, Isidora, Martina, Jose, Ale, Diego y nombre protagonista. Queremos saber cómo están.",menu:[{order:1,...pt}]},18:{location:"sala_3",character:"isidora",emotion:"preocupacion",text:"¿Dijiste queremos? Tengo la impresión de que esta junta estaba planeada de antes eh...",menu:[{order:1,...pt}]},19:{location:"sala_3",character:"gaspar",emotion:"emocion",text:"Yo estoy muy muy emocionado, me tengo aprendidas las lÃneas del guion de memoria.",menu:[{order:1,...pt}]},20:{location:"sala_3",character:"isidora",emotion:"neutro",text:"Yo no tanto, no tuve una muy buena tarde ayer.",menu:[{order:1,...pt}]},21:{location:"sala_3",character:"diego",emotion:"tristeza",text:"Yo tampoco tuve buena tarde, pero a pesar de eso cociné harto, ¿quieren unas galletas?",menu:[{order:1,...pt}]}
6470,22:{location:"sala_3",character:"player",emotion:"preocupacion",text:" ",menu:[{order:1,text:"Diego, qué buena que cocines, pero hay un problema y hay que resolverlo ¿Te parece si discutimos qué otro papel tendrás en la obra?",dispatch:"next-dialog",goTo:{ruta:"3",step:"23"},cb:()=>vt(3,"q-3-5","MAULE",2)},{order:2,text:"Isidora y Diego, sinceramente nos han dado muchos problemas, mejor renuncien y asà hacemos la obra sin problema.",dispatch:"next-dialog",goTo:{ruta:"3",step:"23"},cb:()=>vt(3,"q-3-5","MAULE",1)},{order:3,text:"Pensamos en qué hacer con su pelea y la obra, pero Diego e Isidora, ¿les parece que veamos en conjunto cómo resolver esto de mejor manera?",dispatch:"next-dialog",goTo:{ruta:"3",step:"23"},cb:()=>vt(3,"q-3-5","MAULE",3)}]},23:{location:"sala_3",character:"diego",emotion:"preocupacion",text:"Yo igual estuve pensando harto, y primero que todo pido disculpas a Isidora... Yo ayudaré con otras cosas, no quiero seguir siendo director. Asà Isidora puede estar más cómoda.",menu:[{order:1,...pt}]},24:{location:"sala_3",character:"isidora",emotion:"neutro",text:"Gracias Diego. La verdad es que decidimos darnos un tiempo, pero eso no afectará en nuestra gran misión.",menu:[{order:1,...pt}]},25:{location:"sala_3",character:"diego",emotion:"emocion",text:"SÃ, estoy trabajando con este conflicto⦠Un problema, una oportunidad.",menu:[{order:1,...pt}]},26:{location:"sala_3",character:"player",emotion:"neutro",text:"¿En serio creen que lo harÃa bien?",menu:[{order:1,...pt}]},27:{location:"sala_3",character:"ale",emotion:"alegria",text:"Las cosas que preguntas, si tu nos has hecho reflexionar a todes sobre la violencia en el pololeo.",menu:[{order:1,...pt}]},28:{location:"sala_3",character:"martina",emotion:"alegria",text:"A pesar de que todos contribuimos, has sabido tomar nuestros intereses para construir esta obra.",menu:[{order:1,...pt}]},29:{location:"sala_3",character:"gaspar",emotion:"alegria",text:"Me sumo a todas las palabras. Entonces, la pregunta de rigor, ¿te gustarÃa ser el director de la obra?",menu:[{order:1,...pt}]},30:{location:"sala_3",character:"player",emotion:"emocion",text:" ",menu:[{order:1,text:"Voy a pensarlo, pero si acepto, espero no fallarles, daré lo mejor de mà para ser el director de sus sueños.",dispatch:"next-dialog",goTo:{ruta:"3",step:"31"},cb:()=>vt(3,"q-3-6","MAULE",2)},{order:2,text:"A pesar de que no sé qué hacer muy bien, acepto solo si me ayudan en el camino.",dispatch:"next-dialog",goTo:{ruta:"3",step:"31"},cb:()=>vt(3,"q-3-6","MAULE",3)},{order:3,text:"No sé si es la mejor idea, yo prefiero quedarme al margen.",dispatch:"next-dialog",goTo:{ruta:"3",step:"31"},cb:()=>vt(3,"q-3-6","MAULE",1)}]},31:{location:"sala_3",character:"nico",emotion:"neutro",text:"Piénsalo y nos cuentas en la tarde. DeberÃamos entrar a clases.",menu:[{order:1,...pt}]},32:{location:"sala_3",character:"narrador",emotion:"oculto",text:"Tu equipo ha quedado muy contento, decidiste tomar el papel de director, y Diego se ha quedado en la escenografÃa. El lunes ya presentan la obra.",menu:[{order:1,...bp}]}},IQ={1:{location:"auditorio",character:"narrador",emotion:"oculto",text:"Todos y todas deciden retomar el ensayo, pero esta vez con mejor disposición y energÃa para lograr el objetivo que es estrenar pronto la obra. Se dirigen a ensayar en el auditorio ya que es un espacio amplio y cómodo para poder moverse..",menu:[{order:1,...pt}]},2:{location:"auditorio",character:"player",emotion:"emocion",text:"Ya, ¡manos a la obra!",menu:[{order:1,...pt}]},3:{location:"auditorio",character:"isidora",emotion:"neutro",text:"No podemos partir aún, falta Diego.",menu:[{order:1,...pt}]},4:{location:"auditorio",character:"ale",emotion:"preocupacion",text:"¿Y dónde está Diego?",menu:[{order:1,...pt}]},5:{location:"auditorio",character:"isidora",emotion:"neutro",text:"Fue a comprar y viene...",menu:[{order:1,...pt}]},6:{location:"auditorio",character:"martina",emotion:"neutro",text:"Pero empecemos a ensayar por mientras, cuando llegue se suma.",menu:[{order:1,...pt}]},7:{location:"auditorio",character:"isidora",emotion:"neutro",text:"¡Ya, bueno!",menu:[{order:1,...pt}]},8:{location:"auditorio",character:"narrador",emotion:"oculto",text:"Comienzan a ensayar y de pronto aparece la Inspectora en el auditorio.",menu:[{order:1,...pt}]},9:{location:"auditorio",character:"inspectora",emotion:"enojo",text:"¡Hey! ¿Qué están haciendo aquÃ?",menu:[{order:1,...pt}]},10:{location:"auditorio",character:"jose",emotion:"preocupacion",text:"Inspectora, estamos ensayando una obra de teatro.",menu:[{order:1,...pt}]},11:{location:"auditorio",character:"inspectora",emotion:"neutro",text:"¿Es para la clase de lenguaje?",menu:[{order:1,...pt}]},12:{location:"auditorio",character:"jose",emotion:"preocupacion",text:"Mmmm no, en realidad es un proyecto aparte de la clase. Es una sorpresa que estamos preparando para el colegi
6470o.",menu:[{order:1,...pt}]},13:{location:"auditorio",character:"inspectora",emotion:"enojo",text:"¿Y a quién le pidieron permiso para ensayar acá?",menu:[{order:1,...pt}]},14:{location:"auditorio",character:"isidora",emotion:"tristeza",text:"Pero Inspe, era una sorpresa, si pedÃamos permiso todos se iban a enterar.",menu:[{order:1,...pt}]},15:{location:"auditorio",character:"inspectora",emotion:"furia",text:"Me parece que deberÃan haberle comentado esto al director. Tendré que hacerlo yoâ¦",menu:[{order:1,...pt}]},16:{location:"auditorio",character:"isidora",emotion:"enojo",text:"Me parece que deberÃan haberle comentado esto al director. Tendré que hacerlo yoâ¦",menu:[{order:1,...pt}]},17:{location:"auditorio",character:"inspectora",emotion:"furia",text:"A ver niñita, ¿a quién vienes a tratar de pesada como dices tú? Anda bajando el tonito y empieza por respetar a tus mayores, aquà tu eres una estudiante y yo la adulta. No voy a aceptar estos malos tratos.",menu:[{order:1,...pt}]},18:{location:"auditorio",character:"narrador",emotion:"oculto",text:"¿Cómo se resuelve el conflicto?",menu:[{order:1,text:"Le piden disculpa a la Inspectora y deciden ir a hablar con el director para contarle sobre la obra.",dispatch:"next-dialog",goTo:{ruta:"4",step:"19"},cb:()=>vt(3,"q-3-7","MAULE",1)},{order:2,text:"Se enfrentan a la Inspectora y le dicen que su actitud es adultocéntrica.",dispatch:"next-dialog",goTo:{ruta:"4",step:"22"},cb:()=>vt(3,"q-3-7","MAULE",2)},{order:3,text:"Deciden contarle del proyecto a la Inspectora para que los deje ensayar.",dispatch:"next-dialog",goTo:{ruta:"4",step:"25"},cb:()=>vt(3,"q-3-7","MAULE",3)}]},19:{location:"auditorio",character:"player",emotion:"tristeza",text:"Disculpe Inspectora, no era nuestra intención molestar.",menu:[{order:1,...pt}]},20:{location:"auditorio",character:"isidora",emotion:"tristeza",text:"Discúlpenos, le iremos a decir al director inmediatamente.",menu:[{order:1,...pt}]},21:{location:"auditorio",character:"inspectora",emotion:"enojo",text:"No, ya córtenla. Cuéntenme aquà mismo de qué trata esto.",menu:[{order:1,text:"<<Siguiente>>",dispatch:"next-dialog",goTo:{ruta:"4",step:"28"}}]},22:{location:"auditorio",character:"player",emotion:"tristeza",text:"Como siempre los adultos arruinándolo todo, sin entender",menu:[{order:1,...pt}]},23:{location:"auditorio",character:"isidora",emotion:"enojo",text:"Por qué tiene que ser asÃ! Siempre los adultos son tan poco empáticos con los jóvenes, creen que tienen el control...",menu:[{order:1,...pt}]},24:{location:"auditorio",character:"inspectora",emotion:"preocupacion",text:"¿Qué le pasa, estudiante? No es necesario alterarse, conversémoslo con calma.",menu:[{order:1,text:"<<Siguiente>>",dispatch:"next-dialog",goTo:{ruta:"4",step:"28"}}]},25:{location:"auditorio",character:"player",emotion:"preocupacion",text:"Disculpe Inspectora, déjenos explicarle nuestra idea.",menu:[{order:1,...pt}]},26:{location:"auditorio",character:"isidora",emotion:"preocupacion",text:"Inspectora, creo que fuimos poco empáticos. Déjeme contarle por qué estamos haciendo la obra, por favor.",menu:[{order:1,...pt}]},27:{location:"auditorio",character:"inspectora",emotion:"enojo",text:"A ver⦠Les daré una oportunidad.",menu:[{order:1,text:"<<Siguiente>>",dispatch:"next-dialog",goTo:{ruta:"4",step:"28"}}]},28:{location:"auditorio",character:"narrador",emotion:"oculto",text:"Y asÃ, logran explicar la situación a la Inspectora, quien finalmente les permite ensayar en el auditorio. La obra está cada vez más cerca de estrenarse.",menu:[{order:1,...bp}]}},DQ={1:{location:"patio",character:"narrador",emotion:"oculto",text:"Es el dÃa de la obra, con tus amigues ya tienen todo listo y preparado para realizarla. Están todes en el patio principal.",menu:[{order:1,...pt}]},2:{location:"patio",character:"player",emotion:"emocion",text:"¡¡AHH, QUE EMOCIÃN ES HOY, ES HOY!!",menu:[{order:1,...pt}]},3:{location:"patio",character:"nico",emotion:"emocion",text:"Ha sido toda una travesÃa llegar a este momento.",menu:[{order:1,...pt}]},4:{location:"patio",character:"martina",emotion:"emocion",text:"Entonces repasemos el plan, paso uno: apenas toquen el timbre del segundo recreo, comienza la obra.",menu:[{order:1,...pt}]},5:{location:"patio",character:"ale",emotion:"emocion",text:"Paso dos: yo estaré antes en la radio del colegi
6470o para colocar la pista en los parlantes.",menu:[{order:1,...pt}]},6:{location:"patio",character:"gaspar",emotion:"emocion",text:"Paso tres: Isidora aparece desde el fondo del patio y comienza a hablar en voz alta.",menu:[{order:1,...pt}]},7:{location:"patio",character:"isidora",emotion:"alegria",text:"Tengo un poco de nervios ehh...",menu:[{order:1,...pt}]},8:{location:"patio",character:"diego",emotion:"alegria",text:"Paso cuatro: sale Gaspar y nosotros con la escenografÃa detrás de Gaspar, y comienza la obra.",menu:[{order:1,...pt}]},9:{location:"auditorio2",character:"narrador",emotion:"oculto",text:'El dÃa de la obra llegó. El auditorio del colegio está repleto de estudiantes, profesores y directivos. Una atmósfera de expectación llena el aire mientras todos esperan el inicio del evento. En el escenario, se erige un telón con el lema "LÃderes por la no Violencia"',menu:[{order:1,...pt}]},10:{location:"auditorio2",character:"narrador",emotion:"oculto",text:"Los murmullos disminuyen cuando la luz del escenario se enciende, revelando a los estudiantes y sus expresiones serias.",menu:[{order:1,...pt}]},11:{location:"auditorio2",character:"narrador",emotion:"oculto",isObra:!0,text:"Los estudiantes comienzan su representación teatral, una poderosa obra que aborda las diferentes formas de violencia de género: desde el acoso callejero hasta la violencia doméstica..",menu:[{order:1,...pt}]},12:{location:"auditorio2",character:"narrador",emotion:"oculto",isObra:!0,text:"Los espectadores están completamente absorbidos por la actuación, algunos incluso conteniendo el aliento ante las escenas más impactantes. Los profesores y directivos observan con orgullo, conscientes del esfuerzo y la dedicación que los estudiantes han invertido en esta obra.",menu:[{order:1,...pt}]},13:{location:"auditorio2",character:"narrador",emotion:"oculto",applause:!0,text:"Al finalizar la obra, el aplauso estalla en el salón de actos, resonando en las paredes, mezclandose con las ovaciones.",menu:[{order:1,...pt}]},14:{location:"auditorio2",character:"player",emotion:"emocion",applause:!1,text:"Muchas gracias a todos, me emociona mucho este buen recibimiento, pero querÃa mencionarles lo siguiente...",menu:[{order:1,text:"Todo lo que vieron fue gracias a mÃ, y estoy muy orgulloso de todo el trabajo que logré hacer para que ustedes pudieron ver la obra.",dispatch:"next-dialog",goTo:{ruta:"5",step:"15"},cb:()=>vt(3,"q-3-8","MAULE",1)},{order:2,text:"Nada de esto hubiese sido posible sin el equipo con quienes creamos esta obra, pensando todo desde cero, la música, escenografÃa y el guión.",dispatch:"next-dialog",goTo:{ruta:"5",step:"15"},cb:()=>vt(3,"q-3-8","MAULE",2)},{order:3,text:"Agradecemos a todos quienes participaron para hacer esto posible, incluso tuvimos ayuda de profesores y auxiliares.",dispatch:"next-dialog",goTo:{ruta:"5",step:"15"},cb:()=>vt(3,"q-3-8","MAULE",3)}]},15:{location:"auditorio2",character:"director",emotion:"furia",text:"Este tipo de intervenciones no pueden volver a repetirse, menos sin mi conocimiento y autorización. Este liceo es reconocido por ser intachable.",menu:[{order:1,...pt}]},16:{location:"auditorio2",character:"inspectora",emotion:"neutro",text:"Si bien estoy de acuerdo con el director por la autorización, quiero felicitarles por hacer esto posible.",menu:[{order:1,...pt}]},17:{location:"auditorio2",character:"gaspar",emotion:"preocupacion",text:"El fin de esta obra era poder concientizar sobre la violencia en el pololeo, quizás muchas veces ustedes no se dan cuenta, pero pasa mucho entre nuestros compañeros y con nosotros mismos que hacemos la obra.",menu:[{order:1,...pt}]},18:{location:"auditorio2",character:"player",emotion:"emocion",text:"Asà es, por eso querÃamos mostrar esta obra a toda la comunidad educativa,asà que:",menu:[{order:1,text:"Queremos repetir la obra e invitar a los auxiliares y docentes, es muy importante considerar a todas las personas del liceo.",dispatch:"next-dialog",goTo:{ruta:"5",step:"19"}},{order:2,text:"Queremos presentar la obra en colegios cercanos para poder prevenir la violencia en el pololeo, y que sea una presentación abierta a toda la comunidad.",dispatch:"next-dialog",goTo:{ruta:"5",step:"19"}},{order:3,text:"Queremos presentar la obra en un espacio donde estén auxiliares, docentes y nuestros padres.",dispatch:"next-dialog",goTo:{ruta:"5",step:"19"}}]},19:{location:"auditorio2",character:"portero",emotion:"alegria",text:"Qué buenas ideas tienen, creo que es importante trabajar con esto y lograrlo.",menu:[{order:1,...pt}]},20:{location:"auditorio2",character:"director",emotion:"neutro",text:"Agradezco que me consulten, si hay docentes que los apoyen, yo les autorizo a hacer nuevamente la presentación.",menu:[{order:1,...pt}]},21:{location:"auditorio2",character:"player",emotion:"alegria",text:"YUJUUU, PODREMOS AVANZAR EN DETENER LA VIOLENCIA EN EL POLOLEO.",menu:[{order:1,...pt}]}
vendor: 40,315 bytes, lines 6470-6488
6470,22:{location:"auditorio2",character:"narrador",emotion:"oculto",text:"Y asà termina la obra, con un gran éxito y la posibilidad de seguir presentándola en distintos espacios para concientizar sobre la violencia en el pololeo. Tú y tus amigues han logrado un gran cambio en la comunidad educativa, y han demostrado que juntos pueden lograr grandes cosas.",menu:[{order:1,...pt}]},23:{location:"patio2",character:"narrador",emotion:"oculto",text:"2 semanas después, se celebró el dÃa del estudiante en el colegio, y nuestros protagonistas pudieron observar el impacto de su trabajo y unas palabras muy especialesâ¦",menu:[{order:1,...pt}]},24:{location:"patio2",character:"narrador",emotion:"oculto",text:"La alegrÃa de los estudiantes llena de color todo el colegio.",menu:[{order:1,...pt}]},25:{location:"patio2",character:"narrador",emotion:"oculto",text:"Los profesores y directivos se unen a la celebración, felicitando a los estudiantes por su trabajo y dedicación.",menu:[{order:1,...pt}]},26:{location:"patio2",character:"narrador",emotion:"oculto",text:"Y los otros funcionarios no se quedan atrás, también se suman a la celebración.",menu:[{order:1,...pt}]},27:{location:"patio2",character:"narrador",emotion:"oculto",text:"Asà estudiantes, profesores, directivos y funcionarios se han unido en un espÃritu de comunidad, celebrando el importante papel que desempeñaron los estudiantes en la vida del colegio y en la sociedad en general.",menu:[{order:1,...pt}]},28:{location:"patio2",character:"narrador",emotion:"oculto",text:"De pronto, el director sube al escenario, con lágrimas en los ojos y una sonrisa de admiración. Comienza un discurso:",menu:[{order:1,...pt}]},29:{location:"patio2",character:"director",emotion:"emocion",text:"Quiero agradecer sinceramente a cada uno de los estudiantes que han participado en la increÃble obra de teatro que vimos el otro dÃa. Vuestra dedicación y compromiso con la prevención de la violencia de género son verdaderamente inspiradores.",menu:[{order:1,...pt}]},30:{location:"patio2",character:"narrador",emotion:"oculto",text:"Los estudiantes se miran unos a otros, humildes pero radiantes de satisfacción.",menu:[{order:1,...pt}]},31:{location:"patio2",character:"director",emotion:"emocion",text:"Recordad que cada uno de nosotros tiene el poder de hacer una diferencia en el mundo, y hoy ustedes lo han demostrado brillantemente. Gracias por recordarnos que juntos podemos construir un futuro más justo y equitativo. Detengamos la violencia en el pololeo entre todes.",menu:[{order:1,...pt}]},32:{location:"patio2",character:"ale",emotion:"emocion",text:"¡Dijo todes!",menu:[{order:1,...pt}]},33:{location:"patio2",character:"isidora",emotion:"alegria",text:"Hicimos un buen trabajo después de todo.",menu:[{order:1,...pt}]},34:{location:"patio2",character:"player",emotion:"alegria",text:"SÃ, supongo que realmente lo hicimos bien.",menu:[{order:1,...pt}]},35:{location:"patio2",character:"narrador",emotion:"oculto",text:"FIN - GRACIAS POR JUGAR",menu:[]}},Vs={dialogScene1:OQ,dialogScene2:LQ,dialogScene3:FQ,dialogScene4:IQ,dialogScene5:DQ};var mi={};/*! 6471 * howler.js v2.2.4 6472 * howlerjs.com 6473 * 6474 * (c) 2013-2020, James Simpson of GoldFire Studios 6475 * goldfirestudios.com 6476 * 6477 * MIT License 6478 */(function(i){(function(){var t=function(){this.init()};t.prototype={init:function(){var r=this||s;return r._counter=1e3,r._html5AudioPool=[],r.html5PoolSize=10,r._codecs={},r._howls=[],r._muted=!1,r._volume=1,r._canPlayEvent="canplaythrough",r._navigator=typeof window<"u"&&window.navigator?window.navigator:null,r.masterGain=null,r.noAudio=!1,r.usingWebAudio=!0,r.autoSuspend=!0,r.ctx=null,r.autoUnlock=!0,r._setup(),r},volume:function(r){var a=this||s;if(r=parseFloat(r),a.ctx||g(),typeof r<"u"&&r>=0&&r<=1){if(a._volume=r,a._muted)return a;a.usingWebAudio&&a.masterGain.gain.setValueAtTime(r,s.ctx.currentTime);for(var h=0;h<a._howls.length;h++)if(!a._howls[h]._webAudio)for(var n=a._howls[h]._getSoundIds(),o=0;o<n.length;o++){var f=a._howls[h]._soundById(n[o]);f&&f._node&&(f._node.volume=f._volume*r)}return a}return a._volume},mute:function(r){var a=this||s;a.ctx||g(),a._muted=r,a.usingWebAudio&&a.masterGain.gain.setValueAtTime(r?0:a._volume,s.ctx.currentTime);for(var h=0;h<a._howls.length;h++)if(!a._howls[h]._webAudio)for(var n=a._howls[h]._getSoundIds(),o=0;o<n.length;o++){var f=a._howls[h]._soundById(n[o]);f&&f._node&&(f._node.muted=r?!0:f._muted)}return a},stop:function(){for(var r=this||s,a=0;a<r._howls.length;a++)r._howls[a].stop();return r},unload:function(){for(var r=this||s,a=r._howls.length-1;a>=0;a--)r._howls[a].unload();return r.usingWebAudio&&r.ctx&&typeof r.ctx.close<"u"&&(r.ctx.close(),r.ctx=null,g()),r},codecs:function(r){return(this||s)._codecs[r.replace(/^x-/,"")]},_setup:function(){var r=this||s;if(r.state=r.ctx&&r.ctx.state||"suspended",r._autoSuspend(),!r.usingWebAudio)if(typeof Audio<"u")try{var a=new Audio;typeof a.oncanplaythrough>"u"&&(r._canPlayEvent="canplay")}catch{r.noAudio=!0}else r.noAudio=!0;try{var a=new Audio;a.muted&&(r.noAudio=!0)}catch{}return r.noAudio||r._setupCodecs(),r},_setupCodecs:function(){var r=this||s,a=null;try{a=typeof Audio<"u"?new Audio:null}catch{return r}if(!a||typeof a.canPlayType!="function")return r;var h=a.canPlayType("audio/mpeg;").replace(/^no$/,""),n=r._navigator?r._navigator.userAgent:"",o=n.match(/OPR\/(\d+)/g),f=o&&parseInt(o[0].split("/")[1],10)<33,u=n.indexOf("Safari")!==-1&&n.indexOf("Chrome")===-1,v=n.match(/Version\/(.*?) /),m=u&&v&&parseInt(v[1],10)<15;return r._codecs={mp3:!!(!f&&(h||a.canPlayType("audio/mp3;").replace(/^no$/,""))),mpeg:!!h,opus:!!a.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(a.canPlayType('audio/wav; codecs="1"')||a.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!a.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!a.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(a.canPlayType("audio/x-m4b;")||a.canPlayType("audio/m4b;")||a.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(a.canPlayType("audio/x-mp4;")||a.canPlayType("audio/mp4;")||a.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!!(!m&&a.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!!(!m&&a.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!a.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(a.canPlayType("audio/x-flac;")||a.canPlayType("audio/flac;")).replace(/^no$/,"")},r},_unlockAudio:function(){var r=this||s;if(!(r._audioUnlocked||!r.ctx)){r._audioUnlocked=!1,r.autoUnlock=!1,!r._mobileUnloaded&&r.ctx.sampleRate!==44100&&(r._mobileUnloaded=!0,r.unload()),r._scratchBuffer=r.ctx.createBuffer(1,1,22050);var a=function(h){for(;r._html5AudioPool.length<r.html5PoolSize;)try{var n=new Audio;n._unlocked=!0,r._releaseHtml5Audio(n)}catch{r.noAudio=!0;break}for(var o=0;o<r._howls.length;o++)if(!r._howls[o]._webAudio)for(var f=r._howls[o]._getSoundIds(),u=0;u<f.length;u++){var v=r._howls[o]._soundById(f[u]);v&&v._node&&!v._node._unlocked&&(v._node._unlocked=!0,v._node.load())}r._autoResume();var m=r.ctx.createBufferSource();m.buffer=r._scratchBuffer,m.connect(r.ctx.destination),typeof m.start>"u"?m.noteOn(0):m.start(0),typeof r.ctx.resume=="function"&&r.ctx.resume(),m.onended=function(){m.disconnect(0),r._audioUnlocked=!0,document.removeEventListener("touchstart",a,!0),document.removeEventListener("touchend",a,!0),document.removeEventListener("click",a,!0),document.removeEventListener("keydown",a,!0);for(var p=0;p<r._howls.length;p++)r._howls[p]._emit("unlock")}};return document.addEventListener("touchstart",a,!0),document.addEventListener("touchend",a,!0),document.addEventListener("click",a,!0),document.addEventListener("keydown",a,!0),r}},_obtainHtml5Audio:function(){var r=this||s;if(r._html5AudioPool.length)return r._html5AudioPool.pop();var a=new Audio().play();return a&&typeof Promise<"u"&&(a instanceof Promise||typeof a.then=="function")&&a.catch(function(){console.warn("HTML5 Audio pool exhausted, returning potentially locked audio object.")}),new Audio},_releaseHtml5Audio:function(r){var a=this||s;return r._unlocked&&a._html5AudioPool.push(r),a},_autoSuspend:function(){var r=this;if(!(!r.autoSuspend||!r.ctx||typeof r.ctx.suspend>"u"||!s.usingWebAudio)){for(var a=0;a<r._howls.length;a++)if(r._howls[a]._webAudio){for(var h=0;h<r._howls[a]._sounds.length;h++)if(!r._howls[a]._sounds[h]._paused)return r}return r._suspendTimer&&clearTimeout(r._suspendTimer),r._suspendTimer=setTimeout(function(){if(r.autoSuspend){r._suspendTimer=null,r.state="suspending";var n=function(){r.state="suspended",r._resumeAfterSuspend&&(delete r._resumeAfterSuspend,r._autoResume())};r.ctx.suspend().then(n,n)}},3e4),r}},_autoResume:function(){var r=this;if(!(!r.ctx||typeof r.ctx.resume>"u"||!s.usingWebAudio))return r.state==="running"&&r.ctx.state!=="interrupted"&&r._suspendTimer?(clearTimeout(r._suspendTimer),r._suspendTimer=null):r.state==="suspended"||r.state==="running"&&r.ctx.state==="interrupted"?(r.ctx.resume().then(function(){r.state="running";for(var a=0;a<r._howls.length;a++)r._howls[a]._emit("resume")}),r._suspendTimer&&(clearTimeout(r._suspendTimer),r._suspendTimer=null)):r.state==="suspending"&&(r._resumeAfterSuspend=!0),r}};var s=new t,c=function(r){var a=this;if(!r.src||r.src.length===0){console.error("An array of source files must be passed with any new Howl.");return}a.init(r)};c.prototype={init:function(r){var a=this;return s.ctx||g(),a._autoplay=r.autoplay||!1,a._format=typeof r.format!="string"?r.format:[r.format],a._html5=r.html5||!1,a._muted=r.mute||!1,a._loop=r.loop||!1,a._pool=r.pool||5,a._preload=typeof r.preload=="boolean"||r.preload==="metadata"?r.preload:!0,a._rate=r.rate||1,a._sprite=r.sprite||{},a._src=typeof r.src!="string"?r.src:[r.src],a._volume=r.volume!==void 0?r.volume:1,a._xhr={method:r.xhr&&r.xhr.method?r.xhr.method:"GET",headers:r.xhr&&r.xhr.headers?r.xhr.headers:null,withCredentials:r.xhr&&r.xhr.withCredentials?r.xhr.withCredentials:!1},a._duration=0,a._state="unloaded",a._sounds=[],a._endTimers={},a._queue=[],a._playLock=!1,a._onend=r.onend?[{fn:r.onend}]:[],a._onfade=r.onfade?[{fn:r.onfade}]:[],a._onload=r.onload?[{fn:r.onload}]:[],a._onloaderror=r.onloaderror?[{fn:r.onloaderror}]:[],a._onplayerror=r.onplayerror?[{fn:r.onplayerror}]:[],a._onpause=r.onpause?[{fn:r.onpause}]:[],a._onplay=r.onplay?[{fn:r.onplay}]:[],a._onstop=r.onstop?[{fn:r.onstop}]:[],a._onmute=r.onmute?[{fn:r.onmute}]:[],a._onvolume=r.onvolume?[{fn:r.onvolume}]:[],a._onrate=r.onrate?[{fn:r.onrate}]:[],a._onseek=r.onseek?[{fn:r.onseek}]:[],a._onunlock=r.onunlock?[{fn:r.onunlock}]:[],a._onresume=[],a._webAudio=s.usingWebAudio&&!a._html5,typeof s.ctx<"u"&&s.ctx&&s.autoUnlock&&s._unlockAudio(),s._howls.push(a),a._autoplay&&a._queue.push({event:"play",action:function(){a.play()}}),a._preload&&a._preload!=="none"&&a.load(),a},load:function(){var r=this,a=null;if(s.noAudio){r._emit("loaderror",null,"No audio support.");return}typeof r._src=="string"&&(r._src=[r._src]);for(var h=0;h<r._src.length;h++){var n,o;if(r._format&&r._format[h])n=r._format[h];else{if(o=r._src[h],typeof o!="string"){r._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}n=/^data:audio\/([^;,]+);/i.exec(o),n||(n=/\.([^.]+)$/.exec(o.split("?",1)[0])),n&&(n=n[1].toLowerCase())}if(n||console.warn('No file extension was found. Consider using the "format" property or specify an extension.'),n&&s.codecs(n)){a=r._src[h];break}}if(!a){r._emit("loaderror",null,"No codec support for selected audio sources.");return}return r._src=a,r._state="loading",window.location.protocol==="https:"&&a.slice(0,5)==="http:"&&(r._html5=!0,r._webAudio=!1),new C(r),r._webAudio&&l(r),r},play:function(r,a){var h=this,n=null;if(typeof r=="number")n=r,r=null;else{if(typeof r=="string"&&h._state==="loaded"&&!h._sprite[r])return null;if(typeof r>"u"&&(r="__default",!h._playLock)){for(var o=0,f=0;f<h._sounds.length;f++)h._sounds[f]._paused&&!h._sounds[f]._ended&&(o++,n=h._sounds[f]._id);o===1?r=null:n=null}}var u=n?h._soundById(n):h._inactiveSound();if(!u)return null;if(n&&!r&&(r=u._sprite||"__default"),h._state!=="loaded"){u._sprite=r,u._ended=!1;var v=u._id;return h._queue.push({event:"play",action:function(){h.play(v)}}),v}if(n&&!u._paused)return a||h._loadQueue("play"),u._id;h._webAudio&&s._autoResume();var m=Math.max(0,u._seek>0?u._seek:h._sprite[r][0]/1e3),p=Math.max(0,(h._sprite[r][0]+h._sprite[r][1])/1e3-m),x=p*1e3/Math.abs(u._rate),y=h._sprite[r][0]/1e3,P=(h._sprite[r][0]+h._sprite[r][1])/1e3;u._sprite=r,u._ended=!1;var b=function(){u._paused=!1,u._seek=m,u._start=y,u._stop=P,u._loop=!!(u._loop||h._sprite[r][2])};if(m>=P){h._ended(u);return}var E=u._node;if(h._webAudio){var M=function(){h._playLock=!1,b(),h._refreshBuffer(u);var L=u._muted||h._muted?0:u._volume;E.gain.setValueAtTime(L,s.ctx.currentTime),u._playStart=s.ctx.currentTime,typeof E.bufferSource.start>"u"?u._loop?E.bufferSource.noteGrainOn(0,m,86400):E.bufferSource.noteGrainOn(0,m,p):u._loop?E.bufferSource.start(0,m,86400):E.bufferSource.start(0,m,p),x!==1/0&&(h._endTimers[u._id]=setTimeout(h._ended.bind(h,u),x)),a||setTimeout(function(){h._emit("play",u._id),h._loadQueue()},0)};s.state==="running"&&s.ctx.state!=="interrupted"?M():(h._playLock=!0,h.once("resume",M),h._clearTimer(u._id))}else{var w=function(){E.currentTime=m,E.muted=u._muted||h._muted||s._muted||E.muted,E.volume=u._volume*s.volume(),E.playbackRate=u._rate;try{var L=E.play();if(L&&typeof Promise<"u"&&(L instanceof Promise||typeof L.then=="function")?(h._playLock=!0,b(),L.then(function(){h._playLock=!1,E._unlocked=!0,a?h._loadQueue():h._emit("play",u._id)}).catch(function(){h._playLock=!1,h._emit("playerror",u._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),u._ended=!0,u._paused=!0})):a||(h._playLock=!1,b(),h._emit("play",u._id)),E.playbackRate=u._rate,E.paused){h._emit("playerror",u._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");return}r!=="__default"||u._loop?h._endTimers[u._id]=setTimeout(h._ended.bind(h,u),x):(h._endTimers[u._id]=function(){h._ended(u),E.removeEventListener("ended",h._endTimers[u._id],!1)},E.addEventListener("ended",h._endTimers[u._id],!1))}catch(O){h._emit("playerror",u._id,O)}};E.src==="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"&&(E.src=h._src,E.load());var A=window&&window.ejecta||!E.readyState&&s._navigator.isCocoonJS;if(E.readyState>=3||A)w();else{h._playLock=!0,h._state="loading";var R=function(){h._state="loaded",w(),E.removeEventListener(s._canPlayEvent,R,!1)};E.addEventListener(s._canPlayEvent,R,!1),h._clearTimer(u._id)}}return u._id},pause:function(r){var a=this;if(a._state!=="loaded"||a._playLock)return a._queue.push({event:"pause",action:function(){a.pause(r)}}),a;for(var h=a._getSoundIds(r),n=0;n<h.length;n++){a._clearTimer(h[n]);var o=a._soundById(h[n]);if(o&&!o._paused&&(o._seek=a.seek(h[n]),o._rateSeek=0,o._paused=!0,a._stopFade(h[n]),o._node))if(a._webAudio){if(!o._node.bufferSource)continue;typeof o._node.bufferSource.stop>"u"?o._node.bufferSource.noteOff(0):o._node.bufferSource.stop(0),a._cleanBuffer(o._node)}else(!isNaN(o._node.duration)||o._node.duration===1/0)&&o._node.pause();arguments[1]||a._emit("pause",o?o._id:null)}return a},stop:function(r,a){var h=this;if(h._state!=="loaded"||h._playLock)return h._queue.push({event:"stop",action:function(){h.stop(r)}}),h;for(var n=h._getSoundIds(r),o=0;o<n.length;o++){h._clearTimer(n[o]);var f=h._soundById(n[o]);f&&(f._seek=f._start||0,f._rateSeek=0,f._paused=!0,f._ended=!0,h._stopFade(n[o]),f._node&&(h._webAudio?f._node.bufferSource&&(typeof f._node.bufferSource.stop>"u"?f._node.bufferSource.noteOff(0):f._node.bufferSource.stop(0),h._cleanBuffer(f._node)):(!isNaN(f._node.duration)||f._node.duration===1/0)&&(f._node.currentTime=f._start||0,f._node.pause(),f._node.duration===1/0&&h._clearSound(f._node))),a||h._emit("stop",f._id))}return h},mute:function(r,a){var h=this;if(h._state!=="loaded"||h._playLock)return h._queue.push({event:"mute",action:function(){h.mute(r,a)}}),h;if(typeof a>"u")if(typeof r=="boolean")h._muted=r;else return h._muted;for(var n=h._getSoundIds(a),o=0;o<n.length;o++){var f=h._soundById(n[o]);f&&(f._muted=r,f._interval&&h._stopFade(f._id),h._webAudio&&f._node?f._node.gain.setValueAtTime(r?0:f._volume,s.ctx.currentTime):f._node&&(f._node.muted=s._muted?!0:r),h._emit("mute",f._id))}return h},volume:function(){var r=this,a=arguments,h,n;if(a.length===0)return r._volume;if(a.length===1||a.length===2&&typeof a[1]>"u"){var o=r._getSoundIds(),f=o.indexOf(a[0]);f>=0?n=parseInt(a[0],10):h=parseFloat(a[0])}else a.length>=2&&(h=parseFloat(a[0]),n=parseInt(a[1],10));var u;if(typeof h<"u"&&h>=0&&h<=1){if(r._state!=="loaded"||r._playLock)return r._queue.push({event:"volume",action:function(){r.volume.apply(r,a)}}),r;typeof n>"u"&&(r._volume=h),n=r._getSoundIds(n);for(var v=0;v<n.length;v++)u=r._soundById(n[v]),u&&(u._volume=h,a[2]||r._stopFade(n[v]),r._webAudio&&u._node&&!u._muted?u._node.gain.setValueAtTime(h,s.ctx.currentTime):u._node&&!u._muted&&(u._node.volume=h*s.volume()),r._emit("volume",u._id))}else return u=n?r._soundById(n):r._sounds[0],u?u._volume:0;return r},fade:function(r,a,h,n){var o=this;if(o._state!=="loaded"||o._playLock)return o._queue.push({event:"fade",action:function(){o.fade(r,a,h,n)}}),o;r=Math.min(Math.max(0,parseFloat(r)),1),a=Math.min(Math.max(0,parseFloat(a)),1),h=parseFloat(h),o.volume(r,n);for(var f=o._getSoundIds(n),u=0;u<f.length;u++){var v=o._soundById(f[u]);if(v){if(n||o._stopFade(f[u]),o._webAudio&&!v._muted){var m=s.ctx.currentTime,p=m+h/1e3;v._volume=r,v._node.gain.setValueAtTime(r,m),v._node.gain.linearRampToValueAtTime(a,p)}o._startFadeInterval(v,r,a,h,f[u],typeof n>"u")}}return o},_startFadeInterval:function(r,a,h,n,o,f){var u=this,v=a,m=h-a,p=Math.abs(m/.01),x=Math.max(4,p>0?n/p:n),y=Date.now();r._fadeTo=h,r._interval=setInterval(function(){var P=(Date.now()-y)/n;y=Date.now(),v+=m*P,v=Math.round(v*100)/100,m<0?v=Math.max(h,v):v=Math.min(h,v),u._webAudio?r._volume=v:u.volume(v,r._id,!0),f&&(u._volume=v),(h<a&&v<=h||h>a&&v>=h)&&(clearInterval(r._interval),r._interval=null,r._fadeTo=null,u.volume(h,r._id),u._emit("fade",r._id))},x)},_stopFade:function(r){var a=this,h=a._soundById(r);return h&&h._interval&&(a._webAudio&&h._node.gain.cancelScheduledValues(s.ctx.currentTime),clearInterval(h._interval),h._interval=null,a.volume(h._fadeTo,r),h._fadeTo=null,a._emit("fade",r)),a},loop:function(){var r=this,a=arguments,h,n,o;if(a.length===0)return r._loop;if(a.length===1)if(typeof a[0]=="boolean")h=a[0],r._loop=h;else return o=r._soundById(parseInt(a[0],10)),o?o._loop:!1;else a.length===2&&(h=a[0],n=parseInt(a[1],10));for(var f=r._getSoundIds(n),u=0;u<f.length;u++)o=r._soundById(f[u]),o&&(o._loop=h,r._webAudio&&o._node&&o._node.bufferSource&&(o._node.bufferSource.loop=h,h&&(o._node.bufferSource.loopStart=o._start||0,o._node.bufferSource.loopEnd=o._stop,r.playing(f[u])&&(r.pause(f[u],!0),r.play(f[u],!0)))));return r},rate:function(){var r=this,a=arguments,h,n;if(a.length===0)n=r._sounds[0]._id;else if(a.length===1){var o=r._getSoundIds(),f=o.indexOf(a[0]);f>=0?n=parseInt(a[0],10):h=parseFloat(a[0])}else a.length===2&&(h=parseFloat(a[0]),n=parseInt(a[1],10));var u;if(typeof h=="number"){if(r._state!=="loaded"||r._playLock)return r._queue.push({event:"rate",action:function(){r.rate.apply(r,a)}}),r;typeof n>"u"&&(r._rate=h),n=r._getSoundIds(n);for(var v=0;v<n.length;v++)if(u=r._soundById(n[v]),u){r.playing(n[v])&&(u._rateSeek=r.seek(n[v]),u._playStart=r._webAudio?s.ctx.currentTime:u._playStart),u._rate=h,r._webAudio&&u._node&&u._node.bufferSource?u._node.bufferSource.playbackRate.setValueAtTime(h,s.ctx.currentTime):u._node&&(u._node.playbackRate=h);var m=r.seek(n[v]),p=(r._sprite[u._sprite][0]+r._sprite[u._sprite][1])/1e3-m,x=p*1e3/Math.abs(u._rate);(r._endTimers[n[v]]||!u._paused)&&(r._clearTimer(n[v]),r._endTimers[n[v]]=setTimeout(r._ended.bind(r,u),x)),r._emit("rate",u._id)}}else return u=r._soundById(n),u?u._rate:r._rate;return r},seek:function(){var r=this,a=arguments,h,n;if(a.length===0)r._sounds.length&&(n=r._sounds[0]._id);else if(a.length===1){var o=r._getSoundIds(),f=o.indexOf(a[0]);f>=0?n=parseInt(a[0],10):r._sounds.length&&(n=r._sounds[0]._id,h=parseFloat(a[0]))}else a.length===2&&(h=parseFloat(a[0]),n=parseInt(a[1],10));if(typeof n>"u")return 0;if(typeof h=="number"&&(r._state!=="loaded"||r._playLock))return r._queue.push({event:"seek",action:function(){r.seek.apply(r,a)}}),r;var u=r._soundById(n);if(u)if(typeof h=="number"&&h>=0){var v=r.playing(n);v&&r.pause(n,!0),u._seek=h,u._ended=!1,r._clearTimer(n),!r._webAudio&&u._node&&!isNaN(u._node.duration)&&(u._node.currentTime=h);var m=function(){v&&r.play(n,!0),r._emit("seek",n)};if(v&&!r._webAudio){var p=function(){r._playLock?setTimeout(p,0):m()};setTimeout(p,0)}else m()}else if(r._webAudio){var x=r.playing(n)?s.ctx.currentTime-u._playStart:0,y=u._rateSeek?u._rateSeek-u._seek:0;return u._seek+(y+x*Math.abs(u._rate))}else return u._node.currentTime;return r},playing:function(r){var a=this;if(typeof r=="number"){var h=a._soundById(r);return h?!h._paused:!1}for(var n=0;n<a._sounds.length;n++)if(!a._sounds[n]._paused)return!0;return!1},duration:function(r){var a=this,h=a._duration,n=a._soundById(r);return n&&(h=a._sprite[n._sprite][1]/1e3),h},state:function(){return this._state},unload:function(){for(var r=this,a=r._sounds,h=0;h<a.length;h++)a[h]._paused||r.stop(a[h]._id),r._webAudio||(r._clearSound(a[h]._node),a[h]._node.removeEventListener("error",a[h]._errorFn,!1),a[h]._node.removeEventListener(s._canPlayEvent,a[h]._loadFn,!1),a[h]._node.removeEventListener("ended",a[h]._endFn,!1),s._releaseHtml5Audio(a[h]._node)),delete a[h]._node,r._clearTimer(a[h]._id);var n=s._howls.indexOf(r);n>=0&&s._howls.splice(n,1);var o=!0;for(h=0;h<s._howls.length;h++)if(s._howls[h]._src===r._src||r._src.indexOf(s._howls[h]._src)>=0){o=!1;break}return S&&o&&delete S[r._src],s.noAudio=!1,r._state="unloaded",r._sounds=[],r=null,null},on:function(r,a,h,n){var o=this,f=o["_on"+r];return typeof a=="function"&&f.push(n?{id:h,fn:a,once:n}:{id:h,fn:a}),o},off:function(r,a,h){var n=this,o=n["_on"+r],f=0;if(typeof a=="number"&&(h=a,a=null),a||h)for(f=0;f<o.length;f++){var u=h===o[f].id;if(a===o[f].fn&&u||!a&&u){o.splice(f,1);break}}else if(r)n["_on"+r]=[];else{var v=Object.keys(n);for(f=0;f<v.length;f++)v[f].indexOf("_on")===0&&Array.isArray(n[v[f]])&&(n[v[f]]=[])}return n},once:function(r,a,h){var n=this;return n.on(r,a,h,1),n},_emit:function(r,a,h){for(var n=this,o=n["_on"+r],f=o.length-1;f>=0;f--)(!o[f].id||o[f].id===a||r==="load")&&(setTimeout(function(u){u.call(this,a,h)}.bind(n,o[f].fn),0),o[f].once&&n.off(r,o[f].fn,o[f].id));return n._loadQueue(r),n},_loadQueue:function(r){var a=this;if(a._queue.length>0){var h=a._queue[0];h.event===r&&(a._queue.shift(),a._loadQueue()),r||h.action()}return a},_ended:function(r){var a=this,h=r._sprite;if(!a._webAudio&&r._node&&!r._node.paused&&!r._node.ended&&r._node.currentTime<r._stop)return setTimeout(a._ended.bind(a,r),100),a;var n=!!(r._loop||a._sprite[h][2]);if(a._emit("end",r._id),!a._webAudio&&n&&a.stop(r._id,!0).play(r._id),a._webAudio&&n){a._emit("play",r._id),r._seek=r._start||0,r._rateSeek=0,r._playStart=s.ctx.currentTime;var o=(r._stop-r._start)*1e3/Math.abs(r._rate);a._endTimers[r._id]=setTimeout(a._ended.bind(a,r),o)}return a._webAudio&&!n&&(r._paused=!0,r._ended=!0,r._seek=r._start||0,r._rateSeek=0,a._clearTimer(r._id),a._cleanBuffer(r._node),s._autoSuspend()),!a._webAudio&&!n&&a.stop(r._id,!0),a},_clearTimer:function(r){var a=this;if(a._endTimers[r]){if(typeof a._endTimers[r]!="function")clearTimeout(a._endTimers[r]);else{var h=a._soundById(r);h&&h._node&&h._node.removeEventListener("ended",a._endTimers[r],!1)}delete a._endTimers[r]}return a},_soundById:function(r){for(var a=this,h=0;h<a._sounds.length;h++)if(r===a._sounds[h]._id)return a._sounds[h];return null},_inactiveSound:function(){var r=this;r._drain();for(var a=0;a<r._sounds.length;a++)if(r._sounds[a]._ended)return r._sounds[a].reset();return new C(r)},_drain:function(){var r=this,a=r._pool,h=0,n=0;if(!(r._sounds.length<a)){for(n=0;n<r._sounds.length;n++)r._sounds[n]._ended&&h++;for(n=r._sounds.length-1;n>=0;n--){if(h<=a)return;r._sounds[n]._ended&&(r._webAudio&&r._sounds[n]._node&&r._sounds[n]._node.disconnect(0),r._sounds.splice(n,1),h--)}}},_getSoundIds:function(r){var a=this;if(typeof r>"u"){for(var h=[],n=0;n<a._sounds.length;n++)h.push(a._sounds[n]._id);return h}else return[r]},_refreshBuffer:function(r){var a=this;return r._node.bufferSource=s.ctx.createBufferSource(),r._node.bufferSource.buffer=S[a._src],r._panner?r._node.bufferSource.connect(r._panner):r._node.bufferSource.connect(r._node),r._node.bufferSource.loop=r._loop,r._loop&&(r._node.bufferSource.loopStart=r._start||0,r._node.bufferSource.loopEnd=r._stop||0),r._node.bufferSource.playbackRate.setValueAtTime(r._rate,s.ctx.currentTime),a},_cleanBuffer:function(r){var a=this,h=s._navigator&&s._navigator.vendor.indexOf("Apple")>=0;if(!r.bufferSource)return a;if(s._scratchBuffer&&r.bufferSource&&(r.bufferSource.onended=null,r.bufferSource.disconnect(0),h))try{r.bufferSource.buffer=s._scratchBuffer}catch{}return r.bufferSource=null,a},_clearSound:function(r){var a=/MSIE |Trident\//.test(s._navigator&&s._navigator.userAgent);a||(r.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var C=function(r){this._parent=r,this.init()};C.prototype={init:function(){var r=this,a=r._parent;return r._muted=a._muted,r._loop=a._loop,r._volume=a._volume,r._rate=a._rate,r._seek=0,r._paused=!0,r._ended=!0,r._sprite="__default",r._id=++s._counter,a._sounds.push(r),r.create(),r},create:function(){var r=this,a=r._parent,h=s._muted||r._muted||r._parent._muted?0:r._volume;return a._webAudio?(r._node=typeof s.ctx.createGain>"u"?s.ctx.createGainNode():s.ctx.createGain(),r._node.gain.setValueAtTime(h,s.ctx.currentTime),r._node.paused=!0,r._node.connect(s.masterGain)):s.noAudio||(r._node=s._obtainHtml5Audio(),r._errorFn=r._errorListener.bind(r),r._node.addEventListener("error",r._errorFn,!1),r._loadFn=r._loadListener.bind(r),r._node.addEventListener(s._canPlayEvent,r._loadFn,!1),r._endFn=r._endListener.bind(r),r._node.addEventListener("ended",r._endFn,!1),r._node.src=a._src,r._node.preload=a._preload===!0?"auto":a._preload,r._node.volume=h*s.volume(),r._node.load()),r},reset:function(){var r=this,a=r._parent;return r._muted=a._muted,r._loop=a._loop,r._volume=a._volume,r._rate=a._rate,r._seek=0,r._rateSeek=0,r._paused=!0,r._ended=!0,r._sprite="__default",r._id=++s._counter,r},_errorListener:function(){var r=this;r._parent._emit("loaderror",r._id,r._node.error?r._node.error.code:0),r._node.removeEventListener("error",r._errorFn,!1)},_loadListener:function(){var r=this,a=r._parent;a._duration=Math.ceil(r._node.duration*10)/10,Object.keys(a._sprite).length===0&&(a._sprite={__default:[0,a._duration*1e3]}),a._state!=="loaded"&&(a._state="loaded",a._emit("load"),a._loadQueue()),r._node.removeEventListener(s._canPlayEvent,r._loadFn,!1)},_endListener:function(){var r=this,a=r._parent;a._duration===1/0&&(a._duration=Math.ceil(r._node.duration*10)/10,a._sprite.__default[1]===1/0&&(a._sprite.__default[1]=a._duration*1e3),a._ended(r)),r._node.removeEventListener("ended",r._endFn,!1)}};var S={},l=function(r){var a=r._src;if(S[a]){r._duration=S[a].duration,d(r);return}if(/^data:[^;]+;base64,/.test(a)){for(var h=atob(a.split(",")[1]),n=new Uint8Array(h.length),o=0;o<h.length;++o)n[o]=h.charCodeAt(o);e(n.buffer,r)}else{var f=new XMLHttpRequest;f.open(r._xhr.method,a,!0),f.withCredentials=r._xhr.withCredentials,f.responseType="arraybuffer",r._xhr.headers&&Object.keys(r._xhr.headers).forEach(function(u){f.setRequestHeader(u,r._xhr.headers[u])}),f.onload=function(){var u=(f.status+"")[0];if(u!=="0"&&u!=="2"&&u!=="3"){r._emit("loaderror",null,"Failed loading audio file with status: "+f.status+".");return}e(f.response,r)},f.onerror=function(){r._webAudio&&(r._html5=!0,r._webAudio=!1,r._sounds=[],delete S[a],r.load())},T(f)}},T=function(r){try{r.send()}catch{r.onerror()}},e=function(r,a){var h=function(){a._emit("loaderror",null,"Decoding audio data failed.")},n=function(o){o&&a._sounds.length>0?(S[a._src]=o,d(a,o)):h()};typeof Promise<"u"&&s.ctx.decodeAudioData.length===1?s.ctx.decodeAudioData(r).then(n).catch(h):s.ctx.decodeAudioData(r,n,h)},d=function(r,a){a&&!r._duration&&(r._duration=a.duration),Object.keys(r._sprite).length===0&&(r._sprite={__default:[0,r._duration*1e3]}),r._state!=="loaded"&&(r._state="loaded",r._emit("load"),r._loadQueue())},g=function(){if(s.usingWebAudio){try{typeof AudioContext<"u"?s.ctx=new AudioContext:typeof webkitAudioContext<"u"?s.ctx=new webkitAudioContext:s.usingWebAudio=!1}catch{s.usingWebAudio=!1}s.ctx||(s.usingWebAudio=!1);var r=/iP(hone|od|ad)/.test(s._navigator&&s._navigator.platform),a=s._navigator&&s._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),h=a?parseInt(a[1],10):null;if(r&&h&&h<9){var n=/safari/.test(s._navigator&&s._navigator.userAgent.toLowerCase());s._navigator&&!n&&(s.usingWebAudio=!1)}s.usingWebAudio&&(s.masterGain=typeof s.ctx.createGain>"u"?s.ctx.createGainNode():s.ctx.createGain(),s.masterGain.gain.setValueAtTime(s._muted?0:s._volume,s.ctx.currentTime),s.masterGain.connect(s.ctx.destination)),s._setup()}};i.Howler=s,i.Howl=c,typeof ba<"u"?(ba.HowlerGlobal=t,ba.Howler=s,ba.Howl=c,ba.Sound=C):typeof window<"u"&&(window.HowlerGlobal=t,window.Howler=s,window.Howl=c,window.Sound=C)})();/*! 6479 * Spatial Plugin - Adds support for stereo and 3D audio where Web Audio is supported. 6480 * 6481 * howler.js v2.2.4 6482 * howlerjs.com 6483 * 6484 * (c) 2013-2020, James Simpson of GoldFire Studios 6485 * goldfirestudios.com 6486 * 6487 * MIT License 6488 */(function(){HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(s){var c=this;if(!c.ctx||!c.ctx.listener)return c;for(var C=c._howls.length-1;C>=0;C--)c._howls[C].stereo(s);return c},HowlerGlobal.prototype.pos=function(s,c,C){var S=this;if(!S.ctx||!S.ctx.listener)return S;if(c=typeof c!="number"?S._pos[1]:c,C=typeof C!="number"?S._pos[2]:C,typeof s=="number")S._pos=[s,c,C],typeof S.ctx.listener.positionX<"u"?(S.ctx.listener.positionX.setTargetAtTime(S._pos[0],Howler.ctx.currentTime,.1),S.ctx.listener.positionY.setTargetAtTime(S._pos[1],Howler.ctx.currentTime,.1),S.ctx.listener.positionZ.setTargetAtTime(S._pos[2],Howler.ctx.currentTime,.1)):S.ctx.listener.setPosition(S._pos[0],S._pos[1],S._pos[2]);else return S._pos;return S},HowlerGlobal.prototype.orientation=function(s,c,C,S,l,T){var e=this;if(!e.ctx||!e.ctx.listener)return e;var d=e._orientation;if(c=typeof c!="number"?d[1]:c,C=typeof C!="number"?d[2]:C,S=typeof S!="number"?d[3]:S,l=typeof l!="number"?d[4]:l,T=typeof T!="number"?d[5]:T,typeof s=="number")e._orientation=[s,c,C,S,l,T],typeof e.ctx.listener.forwardX<"u"?(e.ctx.listener.forwardX.setTargetAtTime(s,Howler.ctx.currentTime,.1),e.ctx.listener.forwardY.setTargetAtTime(c,Howler.ctx.currentTime,.1),e.ctx.listener.forwardZ.setTargetAtTime(C,Howler.ctx.currentTime,.1),e.ctx.listener.upX.setTargetAtTime(S,Howler.ctx.currentTime,.1),e.ctx.listener.upY.setTargetAtTime(l,Howler.ctx.currentTime,.1),e.ctx.listener.upZ.setTargetAtTime(T,Howler.ctx.currentTime,.1)):e.ctx.listener.setOrientation(s,c,C,S,l,T);else return d;return e},Howl.prototype.init=function(s){return function(c){var C=this;return C._orientation=c.orientation||[1,0,0],C._stereo=c.stereo||null,C._pos=c.pos||null,C._pannerAttr={coneInnerAngle:typeof c.coneInnerAngle<"u"?c.coneInnerAngle:360,coneOuterAngle:typeof c.coneOuterAngle<"u"?c.coneOuterAngle:360,coneOuterGain:typeof c.coneOuterGain<"u"?c.coneOuterGain:0,distanceModel:typeof c.distanceModel<"u"?c.distanceModel:"inverse",maxDistance:typeof c.maxDistance<"u"?c.maxDistance:1e4,panningModel:typeof c.panningModel<"u"?c.panningModel:"HRTF",refDistance:typeof c.refDistance<"u"?c.refDistance:1,rolloffFactor:typeof c.rolloffFactor<"u"?c.rolloffFactor:1},C._onstereo=c.onstereo?[{fn:c.onstereo}]:[],C._onpos=c.onpos?[{fn:c.onpos}]:[],C._onorientation=c.onorientation?[{fn:c.onorientation}]:[],s.call(this,c)}}(Howl.prototype.init),Howl.prototype.stereo=function(s,c){var C=this;if(!C._webAudio)return C;if(C._state!=="loaded")return C._queue.push({event:"stereo",action:function(){C.stereo(s,c)}}),C;var S=typeof Howler.ctx.createStereoPanner>"u"?"spatial":"stereo";if(typeof c>"u")if(typeof s=="number")C._stereo=s,C._pos=[s,0,0];else return C._stereo;for(var l=C._getSoundIds(c),T=0;T<l.length;T++){var e=C._soundById(l[T]);if(e)if(typeof s=="number")e._stereo=s,e._pos=[s,0,0],e._node&&(e._pannerAttr.panningModel="equalpower",(!e._panner||!e._panner.pan)&&t(e,S),S==="spatial"?typeof e._panner.positionX<"u"?(e._panner.positionX.setValueAtTime(s,Howler.ctx.currentTime),e._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),e._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):e._panner.setPosition(s,0,0):e._panner.pan.setValueAtTime(s,Howler.ctx.currentTime)),C._emit("stereo",e._id);else return e._stereo}return C},Howl.prototype.pos=function(s,c,C,S){var l=this;if(!l._webAudio)return l;if(l._state!=="loaded")return l._queue.push({event:"pos",action:function(){l.pos(s,c,C,S)}}),l;if(c=typeof c!="number"?0:c,C=typeof C!="number"?-.5:C,typeof S>"u")if(typeof s=="number")l._pos=[s,c,C];else return l._pos;for(var T=l._getSoundIds(S),e=0;e<T.length;e++){var d=l._soundById(T[e]);if(d)if(typeof s=="number")d._pos=[s,c,C],d._node&&((!d._panner||d._panner.pan)&&t(d,"spatial"),typeof d._panner.positionX<"u"?(d._panner.positionX.setValueAtTime(s,Howler.ctx.currentTime),d._panner.positionY.setValueAtTime(c,Howler.ctx.currentTime),d._panner.positionZ.setValueAtTime(C,Howler.ctx.currentTime)):d._panner.setPosition(s,c,C)),l._emit("pos",d._id);else return d._pos}return l},Howl.prototype.orientation=function(s,c,C,S){var l=this;if(!l._webAudio)return l;if(l._state!=="loaded")return l._queue.push({event:"orientation",action:function(){l.orientation(s,c,C,S)}}),l;if(c=typeof c!="number"?l._orientation[1]:c,C=typeof C!="number"?l._orientation[2]:C,typeof S>"u")if(typeof s=="number")l._orientation=[s,c,C];else return l._orientation;for(var T=l._getSoundIds(S),e=0;e<T.length;e++){var d=l._soundById(T[e]);if(d)if(typeof s=="number")d._orientation=[s,c,C],d._node&&(d._panner||(d._pos||(d._pos=l._pos||[0,0,-.5]),t(d,"spatial")),typeof d._panner.orientationX<"u"?(d._panner.orientationX.setValueAtTime(s,Howler.ctx.currentTime),d._panner.orientationY.setValueAtTime(c,Howler.ctx.currentTime),d._panner.orientationZ.setValueAtTime(C,Howler.ctx.currentTime)):d._panner.setOrientation(s,c,C)),l._emit("orientation",d._id);else return d._orientation}return l},Howl.prototype.pannerAttr=function(){var s=this,c=arguments,C,S,l;if(!s._webAudio)return s;if(c.length===0)return s._pannerAttr;if(c.length===1)if(typeof c[0]=="object")C=c[0],typeof S>"u"&&(C.pannerAttr||(C.pannerAttr={coneInnerAngle:C.coneInnerAngle,coneOuterAngle:C.coneOuterAngle,coneOuterGain:C.coneOuterGain,distanceModel:C.distanceModel,maxDistance:C.maxDistance,refDistance:C.refDistance,rolloffFactor:C.rolloffFactor,panningModel:C.panningModel}),s._pannerAttr={coneInnerAngle:typeof C.pannerAttr.coneInnerAngle<"u"?C.pannerAttr.coneInnerAngle:s._coneInnerAngle,coneOuterAngle:typeof C.pannerAttr.coneOuterAngle<"u"?C.pannerAttr.coneOuterAngle:s._coneOuterAngle,coneOuterGain:typeof C.pannerAttr.coneOuterGain<"u"?C.pannerAttr.coneOuterGain:s._coneOuterGain,distanceModel:typeof C.pannerAttr.distanceModel<"u"?C.pannerAttr.distanceModel:s._distanceModel,maxDistance:typeof C.pannerAttr.maxDistance<"u"?C.pannerAttr.maxDistance:s._maxDistance,refDistance:typeof C.pannerAttr.refDistance<"u"?C.pannerAttr.refDistance:s._refDistance,rolloffFactor:typeof C.pannerAttr.rolloffFactor<"u"?C.pannerAttr.rolloffFactor:s._rolloffFactor,panningModel:typeof C.pannerAttr.panningModel<"u"?C.pannerAttr.panningModel:s._panningModel});else return l=s._soundById(parseInt(c[0],10)),l?l._pannerAttr:s._pannerAttr;else c.length===2&&(C=c[0],S=parseInt(c[1],10));for(var T=s._getSoundIds(S),e=0;e<T.length;e++)if(l=s._soundById(T[e]),l){var d=l._pannerAttr;d={coneInnerAngle:typeof C.coneInnerAngle<"u"?C.coneInnerAngle:d.coneInnerAngle,coneOuterAngle:typeof C.coneOuterAngle<"u"?C.coneOuterAngle:d.coneOuterAngle,coneOuterGain:typeof C.coneOuterGain<"u"?C.coneOuterGain:d.coneOuterGain,distanceModel:typeof C.distanceModel<"u"?C.distanceModel:d.distanceModel,maxDistance:typeof C.maxDistance<"u"?C.maxDistance:d.maxDistance,refDistance:typeof C.refDistance<"u"?C.refDistance:d.refDistance,rolloffFactor:typeof C.rolloffFactor<"u"?C.rolloffFactor:d.rolloffFactor,panningModel:typeof C.panningModel<"u"?C.panningModel:d.panningModel};var g=l._panner;g||(l._pos||(l._pos=s._pos||[0,0,-.5]),t(l,"spatial"),g=l._panner),g.coneInnerAngle=d.coneInnerAngle,g.coneOuterAngle=d.coneOuterAngle,g.coneOuterGain=d.coneOuterGain,g.distanceModel=d.distanceModel,g.maxDistance=d.maxDistance,g.refDistance=d.refDistance,g.rolloffFactor=d.rolloffFactor,g.panningModel=d.panningModel}return s},Sound.prototype.init=function(s){return function(){var c=this,C=c._parent;c._orientation=C._orientation,c._stereo=C._stereo,c._pos=C._pos,c._pannerAttr=C._pannerAttr,s.call(this),c._stereo?C.stereo(c._stereo):c._pos&&C.pos(c._pos[0],c._pos[1],c._pos[2],c._id)}}(Sound.prototype.init),Sound.prototype.reset=function(s){return function(){var c=this,C=c._parent;return c._orientation=C._orientation,c._stereo=C._stereo,c._pos=C._pos,c._pannerAttr=C._pannerAttr,c._stereo?C.stereo(c._stereo):c._pos?C.pos(c._pos[0],c._pos[1],c._pos[2],c._id):c._panner&&(c._panner.disconnect(0),c._panner=void 0,C._refreshBuffer(c)),s.call(this)}}(Sound.prototype.reset);var t=function(s,c){c=c||"spatial",c==="spatial"?(s._panner=Howler.ctx.createPanner(),s._panner.coneInnerAngle=s._pannerAttr.coneInnerAngle,s._panner.coneOuterAngle=s._pannerAttr.coneOuterAngle,s._panner.coneOuterGain=s._pannerAttr.coneOuterGain,s._panner.distanceModel=s._pannerAttr.distanceModel,s._panner.maxDistance=s._pannerAttr.maxDistance,s._panner.refDistance=s._pannerAttr.refDistance,s._panner.rolloffFactor=s._pannerAttr.rolloffFactor,s._panner.panningModel=s._pannerAttr.panningModel,typeof s._panner.positionX<"u"?(s._panner.positionX.setValueAtTime(s._pos[0],Howler.ctx.currentTime),s._panner.positionY.setValueAtTime(s._pos[1],Howler.ctx.currentTime),s._panner.positionZ.setValueAtTime(s._pos[2],Howler.ctx.currentTime)):s._panner.setPosition(s._pos[0],s._pos[1],s._pos[2]),typeof s._panner.orientationX<"u"?(s._panner.orientationX.setValueAtTime(s._orientation[0],Howler.ctx.currentTime),s._panner.orientationY.setValueAtTime(s._orientation[1],Howler.ctx.currentTime),s._panner.orientationZ.setValueAtTime(s._orientation[2],Howler.ctx.currentTime)):s._panner.setOrientation(s._orientation[0],s._orientation[1],s._orientation[2])):(s._panner=Howler.ctx.createStereoPanner(),s._panner.pan.setValueAtTime(s._stereo,Howler.ctx.currentTime)),s._panner.connect(s._node),s._paused||s._parent.pause(s._id,!0).play(s._id,!0)}})()})(mi);const ni=Xh({click:null,hover:null,music1:null,music2:null,intro:null,win:null,lose:null,quest:null,text:null,action:null,happy:null,selections:null,tension:null,applause:null}),qu=()=>{const i=()=>new Promise(l=>{ni.click=new mi.Howl({src:"/assets/sounds/click.wav"}),ni.hover=new mi.Howl({src:"/assets/sounds/dialogo.wav"}),ni.intro=new mi.Howl({src:"/assets/sounds/maule-music.wav",volume:1.2}),ni.music1=new mi.Howl({src:"/assets/sounds/bg.wav",loop:!0,volume:.8}),ni.music2=new mi.Howl({src:"/assets/sounds/bgm_14.wav",loop:!0,volume:.8}),ni.win=new mi.Howl({src:"/assets/sounds/win.mp3"}),ni.lose=new mi.Howl({src:"/assets/sounds/lose.mp3"}),ni.quest=new mi.Howl({src:"/assets/sounds/quest.mp3"}),ni.text=new mi.Howl({src:"/assets/sounds/text.wav",loop:!0,volume:.6}
6488),ni.action=new mi.Howl({src:"/assets/sounds/chapters/action.mp3",loop:!0,volume:.6}),ni.happy=new mi.Howl({src:"/assets/sounds/chapters/happy.mp3",loop:!0,volume:.6}),ni.selections=new mi.Howl({src:"/assets/sounds/chapters/selections.mp3",loop:!0,volume:.8}),ni.tension=new mi.Howl({src:"/assets/sounds/chapters/tension.mp3",loop:!0,volume:.8}),ni.applause=new mi.Howl({src:"/assets/sounds/applause.wav"}),l()}),t=l=>{ni[l].play()},s=l=>{ni[l].stop()},c=l=>{ni[l].pause()},C=()=>{s("intro"),s("music1"),s("music2"),s("action"),s("happy"),s("selections"),s("tension")};return{initSounds:i,playSound:t,stopSound:s,pauseSound:c,playMusicByChapter:l=>{C();const T=[1],e=[4,6,9,12,15,17],d=[2,7,8,14],g=[5,11,16],r=[3,10,13];T.includes(l)?t("music1"):e.includes(l)?t("action"):d.includes(l)?t("happy"):g.includes(l)?t("selections"):r.includes(l)&&t("tension")},stopChapterMusic:C}},LT={none:"",narrador:"Narrador",portero:"Don Miguel",profe_denisse:"Profesora Denisse",profe_claudia:"Profesora Claudia",profe_jp:"Profesor Juan Pablo",valentina:"Valentina",jose:"José",diego:"Diego",martina:"Martina",ale:"Ale",nico:"Nicolás",isidora:"Isidora",agustina:"Agustina",gaspar:"Gaspar",oscar:"Oscar",inspectora:"Inspectora MarÃa",convivencia:"Manuel",aseo:"Daniela",director:"Don Oscar",player:"Tú",custom:"custom",daniela:"Daniela"},BQ={3:["1","2","3","4","5","6","7","8","9","10","11","13"],4:["0","1","2","3","4","5","6","7","8","9","10","11","12"],5:["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","41","42","43","44","45","46","47","48"],7:["1","2","3","4","5","6","7","8","9","10","12","13","14","15","16","17","18","19"],8:["1","2","3","4","5","6","7","8","9","10"]},kQ={1:["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26"],2:["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57"],3:["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20"],4:["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23"],5:["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37"],6:["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34"]},GQ={1:["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15"],2:["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21"],3:["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32"],4:["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28"],5:["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35"]},FT={1:BQ,2:kQ,3:GQ},NQ={3:Ns.dialogScene3,4:Ns.dialogScene4,5:Ns.dialogScene5,7:Ns.dialogScene7,8:Ns.dialogScene8},VQ={1:_i.dialogScene1,2:_i.dialogScene2,3:_i.dialogScene3,4:_i.dialogScene4,5:_i.dialogScene5,6:_i.dialogScene6},zQ={1:Vs.dialogScene1,2:Vs.dialogScene2,3:Vs.dialogScene3,4:Vs.dialogScene4,5:Vs.dialogScene5},IT={1:NQ,2:VQ,3:zQ},ui=i=>Object.values(i).reduce((t,s)=>(s.emotion==="oculto"||(t=[...new Set([...t,`${s.character}-${s.emotion}`])]),t),[]),YQ=()=>{let i=[];const t=ui(Ns.dialogScene3);i=[...new Set([...i,...t])];const s=ui(Ns.dialogScene4);i=[...new Set([...i,...s])];const c=ui(Ns.dialogScene5);i=[...new Set([...i,...c])];const C=ui(Ns.dialogScene7);i=[...new Set([...i,...C])];const S=ui(Ns.dialogScene8);i=[...new Set([...i,...S])];const l=ui(_i.dialogScene1);i=[...new Set([...i,...l])];const T=ui(_i.dialogScene2);i=[...new Set([...i,...T])];const e=ui(_i.dialogScene3);i=[...new Set([...i,...e])];const d=ui(_i.dialogScene4);i=[...new Set([...i,...d])];const g=ui(_i.dialogScene5);i=[...new Set([...i,...g])];const r=ui(_i.dialogScene6);i=[...new Set([...i,...r])];const a=ui(Vs.dialogScene1);i=[...new Set([...i,...a])];const h=ui(Vs.dialogScene2);i=[...new Set([...i,...h])];const n=ui(Vs.dialogScene3);i=[...new Set([...i,...n])];const o=ui(Vs.dialogScene4);i=[...new Set([...i,...o])];const f=ui(Vs.dialogScene5);return i=[...new Set([...i,...f])],i},Et=it({chapter:"1",scene:"1",step:"1",stepIndex:0,game:"none",data:null}),Ea=it(null),XQ=wt(()=>Et.value.chapter==="1"&&Et.value.scene==="3"?1:Et.value.chapter==="1"&&Et.value.scene==="4"?2:Et.value.chapter==="1"&&Et.value.scene==="5"&&+Et.value.step<=27?3:Et.value.chapter==="1"&&Et.value.scene==="5"&&+Et.value.step>27?4:Et.value.chapter==="1"&&Et.value.scene==="7"?5:Et.value.chapter==="1"&&Et.value.scene==="8"?6:Et.value.chapter==="2"&&Et.value.scene==="1"?7:Et.value.chapter==="2"&&Et.value.scene==="2"?8:Et.value.chapter==="2"&&Et.value.scene==="3"?9:Et.value.chapter==="2"&&Et.value.scene==="4"?10:Et.value.chapter==="2"&&Et.value.scene==="5"?11:Et.value.chapter==="2"&&Et.value.scene==="6"?12:Et.value.chapter==="3"&&Et.value.scene==="1"?13:Et.value.chapter==="3"&&Et.value.scene==="2"?14:Et.value.chapter==="3"&&Et.value.scene==="3"?15:Et.value.chapter==="3"&&Et.value.scene==="4"?16:Et.value.chapter==="3"&&Et.value.scene==="5"?17:1),Fo=it(0),UQ=i=>({book:()=>{Et.value.game="",Et.value.scene="7",Et.value.chapter="1",Et.value.step="1",ln()},difusion:()=>{Et.value.game="",Et.value.scene="1",Et.value.chapter="3",Et.value.step="1",ln()},escenografia:()=>{Et.value.game="",Et.value.scene="3",Et.value.chapter="3",Et.value.step="1",ln()}})[i],kx=it(null),{playSound:WQ,stopSound:HQ}=qu(),ln=()=>{var t,s;Et.value.data=IT[Et.value.chapter][Et.value.scene][Et.value.step];const i=FT[Et.value.chapter][Et.value.scene];Et.value.stepIndex=i.findIndex(c=>c===Et.value.step),(t=Et.value.data)!=null&&t.applause?WQ("applause"):((s=Et.value.data)==null?void 0:s.applause)===!1&&HQ("applause")},za=i=>{const t=S=>{S.chapter&&(Et.value.chapter=S.chapter),S.scene&&(Et.value.scene=S.scene),S.step&&(Et.value.step=S.step),S.game&&(Et.value.game=S.game),ln()},s=S=>{var T,e,d,g,r;const l=(e=(T=Et.value.data)==null?void 0:T.menu)==null?void 0:e.find(a=>a.order===S);if(l)switch(l.dispatch){case"next-dialog":const a=FT[Et.value.chapter][Et.value.scene];let h=a[Et.value.stepIndex+1];if((d=l==null?void 0:l.goTo)!=null&&d.step){const f=a.findIndex(u=>{var v;return u===((v=l==null?void 0:l.goTo)==null?void 0:v.step)});h=a[f]}h&&(Et.value.step=h,Ea.value={...Et.value.data},ln());break;case"next-scene":const n=(+Et.value.scene+1).toString();Et.value.scene=n,Et.value.step="1",Ea.value=null,ln();break;case"next-chapter":const o=(+Et.value.chapter+1).toString();Et.value.chapter=o,Et.value.scene="1",Et.value.step="1",Ea.value=null,ln();break;case"next-game":Et.value.game=(g=l.goToGame)==null?void 0:g.key,kx.value=UQ((r=l.goToGame)==null?void 0:r.key),Ea.value=null;break;case"go-to":l.goTo&&(Et.value.scene=l.goTo.ruta,Et.value.step=l.goTo.step,Ea.value={...Et.value.data},ln());break}},c=S=>{const l=IT[S?(+Et.value.chapter+1).toString():Et.value.chapter],T=Object.values(l),e=[];for(const d of T)for(const g of Object.values(d))e.push({character:g.character,location:g.location,emotion:g.emotion});return e};i&&t(i);const C=localStorage.getItem("textSpeed");return C&&(Fo.value=+C),{actualSection:XQ,setDialog:ln,initState:t,allEmotions:YQ,dialog:wt(()=>Et.value.data),prevDialog:wt(()=>Ea.value),scene:wt(()=>Et.value.scene),menuItemHandler:s,getChapterImageData:c,gameCb:kx,gameSelected:wt(()=>Et.value.game),progress:wt(()=>({chapter:Et.value.chapter,scene:Et.value.scene,step:Et.value.step})),textSpeed:wt(()=>{switch(Fo.value){case 0:return 30;case 1:return 15;case 2:return 5;case 3:return 2;default:return 30}}),speedTextLabel:wt(()=>{switch(Fo.value){case 0:return"x1";case 1:return"x2";case 2:return"x3";case 3:return"x4";default:return"x1"}}),setTextSpeed:()=>{let S=0;switch(Fo.value){case 0:S=1;break;case 1:S=2;break;case 2:S=3;break;case 3:S=0;break}Fo.value=S,localStorage.setItem("textSpeed",S.toString())}}},$Q={class:"typewriter"},jQ=Bt({__name:"AppMauleText",props:{character:{},text:{}},emits:["start","end"],setup(i,{emit:t}){const s=i,{dialog:c,textSpeed:C}=za(),S=it(""),l=it(""),T=it(!0),e=wt(()=>{var d;return s.character==="custom"?(d=c.value)==null?void 0:d.forceCharacterName:LT[s.character]});return ti(S,d=>{t("start"),l.value="",d.split("").forEach((g,r)=>{setTimeout(()=>{l.value+=g,T.value=S.value.length!==l.value.length,T.value||t("end")},C.value*r)})}),ce(()=>{S.value=s.text}),(d,g)=>
6488(Q(),et(Xt,null,[H("p",{class:Ct({"dialog-text mb-2":!0,"text-yellow-lighten-3":e.value==="Narrador"})},Lt(e.value)+": ",3),H("div",$Q,[H("p",{class:Ct({"dialog-text":!0,"teller-text text-yellow-lighten-3":e.value==="Narrador"})},Lt(l.value),3)])],64))}});const KQ=kt(jQ,[["__scopeId","data-v-01966320"]]),ZQ="/assets/maule/ending-0.png",Mp=i=>(fe("data-v-b3a93b7a"),i=i(),ve(),i),JQ={class:"end-box"},QQ=Mp(()=>H("img",{src:ZQ,style:{"max-width":"100%","margin-top":"-150px"}},null,-1)),qQ=Mp(()=>H("p",{class:"text-center mb-2",style:{"font-size":"1.3rem"}}," ¡Felicidades! ",-1)),_Q=Mp(()=>H("p",{class:"mb-3"}," Has concluido el juego y gracias a tus elecciones ahora podremos calcular tu tipo de personalidad ",-1)),tq={class:"text-center d-flex align-center justify-center"},eq={key:0,class:"loader-circle"},iq=Bt({__name:"AppMauleEndText",setup(i){const t=Ws(),{accountId:s,logout:c}=os(),C=it(null),S=["Indiferente","Resolutivo","Mediador","Delegativo"],l=it({type:"",description:""}),T=it(!1);ce(async()=>{C.value=setInterval(()=>{l.value.type=Mi(S)},100),await e()});const e=async()=>{const{data:g}=await t.request("GET",`/user/progresss/${s}?game=MAULE`,{auth:!0});if(g){await Qe(8),clearInterval(C.value);const{personality:r,description:a}=jT(g.stats.personalityScore);l.value={type:r,description:a},T.value=!0}},d=async()=>{await c(),window.location.href="/game"};return(g,r)=>(Q(),et("div",JQ,[ot(ct(yf),{"particle-count":200,"particle-size":10,duration:15e3,style:{"z-index":"99999999"}}),H("div",null,[QQ,qQ,_Q,H("p",tq,[Ot(" Eres de personalidad tipo: "+Lt(l.value.type)+" - "+Lt(l.value.description)+" ",1),T.value?ft("",!0):(Q(),et("span",eq))]),T.value?(Q(),et("div",{key:0,class:"end-game-btn",onClick:d}," TERMINAR JUEGO ")):ft("",!0)])]))}});const sq=kt(iq,[["__scopeId","data-v-b3a93b7a"]]),nq={class:"mb-1",translate:"no"},rq={class:"dialog-box"},aq={key:0,class:"dialog-btns"},oq=["onMouseenter","onClick"],lq={key:1,class:"relative end-container"},hq=Bt({__name:"AppMauleDialogBox",props:{text:{},menu:{},character:{},saveReplacement:{},isLoading:{type:Boolean},end:{type:Boolean}},emits:["next","load-next-chapter","hint"],setup(i,{emit:t}){const s=i,{mdAndUp:c}=kr(),{displayToast:C}=Ya(),{logout:S}=os();KT();const{playSound:l,stopSound:T}=qu(),e=Ws(),{menuItemHandler:d,progress:g,prevDialog:r,dialog:a}=za(),h=it(0),n=it(!1),o=it(!1),f=it([]),u=it(!1),v=async R=>{if(!n.value||!u.value||(w.value=!1,R.dispatch==="next-chapter"&&t("load-next-chapter"),!o.value||s.isLoading))return;const L={progress:{chapter:g.value.chapter,scene:g.value.scene,step:g.value.step}};l("click"),P.value=0;const{error:O}=await e.request("POST","/maule/status",{auth:!0,body:L});if(O){C("Debes volver a iniciar sesión","error"),await Qe(2.5),await S(),window.location.href="/";return}R.cb&&await R.cb(),R.saveReplace&&await s.saveReplacement(R.saveReplace.chapter,R.saveReplace.scene,R.saveReplace.step,R.saveReplace.replace),d(R.order),h.value++,t("next")},m=()=>{u.value=!1,n.value=!1,o.value=!1,f.value=[],l("text")},p=async()=>{T("text"),f.value=[],n.value=!0,o.value=!1,await new Promise(L=>setTimeout(L,100));const R=x([...s.menu]);for(const L of R)await new Promise(O=>setTimeout(O,500)),f.value.push(L),l("hover");o.value=!0,await new Promise(L=>setTimeout(L,f.value.length?450:200)),u.value=!0};function x(R){for(let L=R.length-1;L>0;L--){const O=Math.floor(Math.random()*(L+1));[R[L],R[O]]=[R[O],R[L]]}return R}const y=R=>{l("hover"),P.value=R},P=it(0),b=R=>{!n.value||!u.value||(R.key==="ArrowUp"?(P.value=P.value===0?f.value.length-1:P.value-1,l("hover")):R.key==="ArrowDown"?(P.value=P.value===f.value.length-1?0:P.value+1,l("hover")):(R.key==="Enter"||R.key===" ")&&v(f.value[P.value]))};ce(()=>{window.addEventListener("keydown",b)}),Hs(()=>{window.removeEventListener("keydown",b),T("text")});const E=wt(()=>{var R,L,O;return r?((R=r.value)==null?void 0:R.character)==="custom"?(L=r.value)==null?void 0:L.forceCharacterName:LT[(O=r.value)==null?void 0:O.character]:""}),M=wt(()=>{var R,L;return!!r&&((R=a.value)==null?void 0:R.character)!=="narrador"&&!!((L=r.value)!=null&&L.text)}),w=it(!1),A=()=>{M.value&&(w.value=!w.value)};return(R,L)=>R.end?(Q(),et("div",lq,[ot(sq)])):(Q(),et("div",{key:0,class:"dialog-box-position",style:ue({fontSize:ct(c)?"1.3rem":"1em"})},[ot(Do,{name:"slide-top"},{default:Dt(()=>{var O,I;return[M.value&&w.value?(Q(),et("div",{key:0,class:Ct({"prev-dialog italic":!0,"text-yellow-lighten-3":((O=ct(r))==null?void 0:O.character)==="narrador"})},[H("p",nq,Lt(E.value),1),H("p",null,Lt((I=ct(r))==null?void 0:I.text),1)],2)):ft("",!0)]}),_:1}),H("section",rq,[H("div",{class:Ct({"dialog-cfg-btn dc1":!0,"opacity-10":!M.value,"cursor-pointer":M.value}),onClick:A},[ot(te,{icon:"fas fa-chevron-left"})],2),H("div",{class:"dialog-cfg-btn dc2",onClick:L[0]||(L[0]=O=>R.$emit("hint"))},[ot(te,{icon:"fas fa-question"})]),(Q(),Rt(KQ,{key:h.value,character:R.character,text:R.text,onStart:m,onEnd:p},null,8,["character","text"])),n.value?(Q(),et("div",aq,[ot(ZT,{name:"fast-fade"},{default:Dt(()=>
6488[(Q(!0),et(Xt,null,rs(f.value,(O,I)=>(Q(),et("p",{key:`menu-item-${I}`,class:Ct({"fa-beat":P.value===I}),style:{"--fa-beat-scale":"1.01"},onMouseenter:D=>y(I),onClick:D=>v(O)},Lt(O.text),43,oq))),128))]),_:1})])):ft("",!0)])],4))}});const uq=kt(hq,[["__scopeId","data-v-c7ff613a"]]),Gx=["none","player","custom","narrador",""],dq=["oculto"],Hc=it(!1),Pa=it({none:{neutro:"",enojo:"",tristeza:"",alegria:"",emocion:"",preocupacion:"",aburrimiento:"",furia:"",oculto:"",duda:"",chatneutro:"",chatpreocupacion:"",chatemocion:"",chatduda:"",chattristeza:"",serio:""},player:{neutro:"",enojo:"",tristeza:"",alegria:"",emocion:"",preocupacion:"",aburrimiento:"",furia:"",oculto:"",duda:"",chatneutro:"",chatpreocupacion:"",chatemocion:"",chatduda:"",chattristeza:"",serio:""},narrador:{neutro:"",enojo:"",tristeza:"",alegria:"",emocion:"",preocupacion:"",aburrimiento:"",furia:"",oculto:"",duda:"",chatneutro:"",chatpreocupacion:"",chatemocion:"",chatduda:"",chattristeza:"",serio:""},portero:{neutro:"",enojo:"",tristeza:"",alegria:"",emocion:"",preocupacion:"",aburrimiento:"",furia:"",oculto:"",duda:"",chatneutro:"",chatpreocupacion:"",chatemocion:"",chatduda:"",chattristeza:"",serio:""},profe_claudia:{neutro:"",enojo:"",tristeza:"",alegria:"",emocion:"",preocupacion:"",aburrimiento:"",furia:"",oculto:"",duda:"",chatneutro:"",chatpreocupacion:"",chatemocion:"",chatduda:"",chattristeza:"",serio:""},profe_jp:{neutro:"",enojo:"",tristeza:"",alegria:"",emocion:"",preocupacion:"",aburrimiento:"",furia:"",oculto:"",duda:"",chatneutro:"",chatpreocupacion:"",chatemocion:"",chatduda:"",chattristeza:"",serio:""},profe_denisse:{neutro:"",enojo:"",tristeza:"",alegria:"",emocion:"",preocupacion:"",aburrimiento:"",furia:"",oculto:"",duda:"",chatneutro:"",chatpreocupacion:"",chatemocion:"",chatduda:"",chattristeza:"",serio:""},valentina:{neutro:"",enojo:"",tristeza:"",alegria:"",emocion:"",preocupacion:"",aburrimiento:"",furia:"",oculto:"",duda:"",chatneutro:"",chatpreocupacion:"",chatemocion:"",chatduda:"",chattristeza:"",serio:""},jose:{neutro:"",enojo:"",tristeza:"",alegria:"",emocion:"",preocupacion:"",aburrimiento:"",furia:"",oculto:"",duda:"",chatneutro:"",chatpreocupacion:"",chatemocion:"",chatduda:"",chattristeza:"",serio:""},diego:{neutro:"",enojo:"",tristeza:"",alegria:"",emocion:"",preocupacion:"",aburrimiento:"",furia:"",oculto:"",duda:"",chatneutro:"",chatpreocupacion:"",chatemocion:"",chatduda:"",chattristeza:"",serio:""},martina:{neutro:"",enojo:"",tristeza:"",alegria:"",emocion:"",preocupacion:"",aburrimiento:"",furia:"",oculto:"",duda:"",chatneutro:"",chatpreocupacion:"",chatemocion:"",chatduda:"",chattristeza:"",serio:""},nico:{neutro:"",enojo:"",tristeza:"",alegria:"",emocion:"",preocupacion:"",aburrimiento:"",furia:"",oculto:"",duda:"",chatneutro:"",chatpreocupacion:"",chatemocion:"",chatduda:"",chattristeza:"",serio:""},ale:{neutro:"",enojo:"",tristeza:"",alegria:"",emocion:"",preocupacion:"",aburrimiento:"",furia:"",oculto:"",duda:"",chatneutro:"",chatpreocupacion:"",chatemocion:"",chatduda:"",chattristeza:"",serio:""},isidora:{neutro:"",enojo:"",tristeza:"",alegria:"",emocion:"",preocupacion:"",aburrimiento:"",furia:"",oculto:"",duda:"",chatneutro:"",chatpreocupacion:"",chatemocion:"",chatduda:"",chattristeza:"",serio:""},agustina:{neutro:"",enojo:"",tristeza:"",alegria:"",emocion:"",preocupacion:"",aburrimiento:"",furia:"",oculto:"",duda:"",chatneutro:"",chatpreocupacion:"",chatemocion:"",chatduda:"",chattristeza:"",serio:""},gaspar:{neutro:"",enojo:"",tristeza:"",alegria:"",emocion:"",preocupacion:"",aburrimiento:"",furia:"",oculto:"",duda:"",chatneutro:"",chatpreocupacion:"",chatemocion:"",chatduda:"",chattristeza:"",serio:""},oscar:{neutro:"",enojo:"",tristeza:"",alegria:"",emocion:"",preocupacion:"",aburrimiento:"",furia:"",oculto:"",duda:"",chatneutro:"",chatpreocupacion:"",chatemocion:"",chatduda:"",chattristeza:"",serio:""},inspectora:{neutro:"",enojo:"",tristeza:"",alegria:"",emocion:"",preocupacion:"",aburrimiento:"",furia:"",oculto:"",duda:"",chatneutro:"",chatpreocupacion:"",chatemocion:"",chatduda:"",chattristeza:"",serio:""},convivencia:{neutro:"",enojo:"",tristeza:"",alegria:"",emocion:"",preocupacion:"",aburrimiento:"",furia:"",oculto:"",duda:"",chatneutro:"",chatpreocupacion:"",chatemocion:"",chatduda:"",chattristeza:"",serio:""},director:{neutro:"",enojo:"",tristeza:"",alegria:"",emocion:"",preocupacion:"",aburrimiento:"",furia:"",oculto:"",duda:"",chatneutro:"",chatpreocupacion:"",chatemocion:"",chatduda:"",chattristeza:"",serio:""}
6488,custom:{neutro:"",enojo:"",tristeza:"",alegria:"",emocion:"",preocupacion:"",aburrimiento:"",furia:"",oculto:"",duda:"",chatneutro:"",chatpreocupacion:"",chatemocion:"",chatduda:"",chattristeza:"",serio:""},aseo:{neutro:"",enojo:"",tristeza:"",alegria:"",emocion:"",preocupacion:"",aburrimiento:"",furia:"",oculto:"",duda:"",chatneutro:"",chatpreocupacion:"",chatemocion:"",chatduda:"",chattristeza:"",serio:""},daniela:{neutro:"",enojo:"",tristeza:"",alegria:"",emocion:"",preocupacion:"",aburrimiento:"",furia:"",oculto:"",duda:"",chatneutro:"",chatpreocupacion:"",chatemocion:"",chatduda:"",chattristeza:"",serio:""}}),Ph=it({entrada:"",patio:"",patio2:"",cancha:"",sala_1:"",sala_2:"",sala_3:"",biblioteca:"",taller:"",banos:"",auditorio:"",direccion:"",enfermeria:"",completos:"",churrascas:"",neutro:"",mall:"",skate:"",plaza:"",auditorio2:""}),$c=it({0:"",1:"",2:"",3:"",4:"",5:"",6:"",7:"",8:"",9:""}),jc=it(0),_u=()=>{const i=async l=>{try{Hc.value=!0;const T=[...new Set(l.map(d=>d.location))],e=[...new Set(l.map(d=>`${d.character}-${d.emotion}`))];for(const d of T)Gx.includes(d)||!Ph.value[d]&&(Ph.value[d]=await gl([`/assets/maule/locations/${d}-min.jpg`]));for(const d of e){const[g,r]=d.split("-");!Gx.includes(g)&&!dq.includes(r)&&!Pa.value[g][r]&&(Pa.value[g][r]=await gl([`/assets/maule/characters/${g}/${r}.png`]))}for(const d of e){const[g,r]=d.split("-");g==="player"&&!Pa.value[g][r]&&(Pa.value[g][r]=await gl([`/assets/maule/characters/${g}/${jc.value}/${r}.png`]))}}finally{Hc.value=!1}},t=l=>Ph.value[l]||Ph.value.neutro,s=(l,T)=>Pa.value[l][T]||Pa.value[l].neutro,c=l=>{jc.value=l},C=it(!0),S=async l=>{try{C.value=!0;for(const T in $c.value)$c.value[T]=await gl([`/assets/maule/games/${l}/${T}.png`])}finally{C.value=!1}};return{isLoadingChapterImages:wt(()=>
6488Hc.value),loadChapterImages:i,getLocationImageByKey:t,getCharacterImageByKey:s,setPlayerImageState:c,isLoadingMauleImages:C,loadMauleGameItems:S,mauleGameItems:wt(()=>$c.value),playerImageState:wt(()=>jc.value)}},cq={class:"char-container"},fq=Bt({__name:"AppMauleChars",props:{character:{},emotion:{},prevCharacter:{},isObra:{type:Boolean}},setup(i){const t=i,{mdAndUp:s}=kr(),{getCharacterImageByKey:c}=_u(),C=wt(()=>t.character&&t.emotion?c(t.character,t.emotion):""),S=wt(()=>t.prevCharacter.image&&t.prevCharacter.emotion?c(t.prevCharacter.image,t.prevCharacter.emotion):""),l=it(!1);ti(()=>[t.character,t.emotion],async([e,d],[g,r])=>{e===g&&d!==r&&(l.value=!1,await new Promise(a=>setTimeout(a,200))),l.value=!0});const T=wt(()=>t.prevCharacter.image!==t.character&&t.prevCharacter.emotion!=="oculto"&&t.character!=="narrador"&&(t.prevCharacter.image==="player"||t.character==="player"));return(e,d)=>(Q(),et("div",cq,[ot(Do,{name:"fade"},{default:Dt(()=>[e.character==="player"&&e.emotion!=="oculto"&&l.value?(Q(),et("div",{key:0,class:"image-char image-left",style:ue({backgroundImage:`url(${C.value})`})},null,4)):ft("",!0)]),_:1}),ot(Do,{name:"fade"},{default:Dt(()=>[e.character!=="player"&&e.emotion!=="oculto"&&l.value?(Q(),et("div",{key:0,class:"image-char image-right",style:ue({backgroundImage:`url(${C.value})`})},null,4)):ft("",!0)]),_:1}),ot(Do,{name:"fade"},{default:Dt(()=>[e.isObra?(Q(),et("div",{key:0,class:"obra-img",style:ue({backgroundImage:"url('/assets/maule/characters/obra/obra.png')"})},null,4)):ft("",!0)]),_:1}),ct(s)&&T.value?(Q(),et("div",{key:0,class:Ct({"image-char":!0,"image-right":e.prevCharacter.image!=="player"&&e.prevCharacter.emotion!=="oculto","image-left":e.prevCharacter.image==="player"&&e.prevCharacter.emotion!=="oculto"}),style:ue({backgroundImage:`url(${S.value})`})},null,6)):ft("",!0)]))}});const vq=kt(fq,[["__scopeId","data-v-55cc8476"]]),pq={key:0,class:"menu-backdrop"},mq={class:"menu-container"},gq={class:"close-icon-container"},xq=Bt({__name:"AppMauleMenu",emits:["save-and-exit"],setup(i){const{userDataModalHandler:t}=$s(),{setTextSpeed:s,speedTextLabel:c}=za(),C=it(!1),S=()=>{C.value=!1,t(!0)};return(l,T)=>(Q(),et(Xt,null,[H("div",{class:"menu-btn btn-view",onClick:T[0]||(T[0]=e=>C.value=!0)},[ot(te,{icon:"fas fa-bars"})]),H("div",{class:"speed-btn btn-view",onClick:T[1]||(T[1]=(...e)=>ct(s)&&ct(s)(...e))},[H("span",null,Lt(ct(c)),1),H("div",null,[ct(c)==="x1"?(Q(),Rt(te,{key:0,icon:"fas fa-play",class:"text-black"})):(Q(),Rt(te,{key:1,icon:"fas fa-forward",class:"text-black"}))])]),C.value?(Q(),et("div",pq,[H("div",mq,[H("div",gq,[ot(te,{icon:"fas fa-times",class:"cursor-pointer",onClick:T[2]||(T[2]=e=>C.value=!1)})]),H("ul",null,[H("li",{onClick:S}," MIS DATOS ")]),H("p",{class:"close-btn",onClick:T[3]||(T[3]=e=>l.$emit("save-and-exit"))}," GUARDAR Y SALIR DEL JUEGO ")])])):ft("",!0),ot(ST)],64))}});const yq=kt(xq,[["__scopeId","data-v-7344d1c3"]]),Cq=i=>(fe("data-v-957468a6"),i=i(),ve(),i),Tq={class:"d-flex flex-column h-100 justify-end"},Sq={class:"d-flex flex-column auth-container pa-4 pb-10",style:{"max-width":"350px"}},Eq=Cq(()=>H("img",{src:Ep,style:{"max-width":"100%"}},null,-1)),Pq=Bt({__name:"GameMauleAuth",emits:["start"],setup(i,{emit:t}){const{showModal:s}=$s(),{accountId:c}=os();ti(()=>c,S=>{S&&t("start")});const C=()=>{s(()=>{t("start")})};return(S,l)=>(Q(),et(Xt,null,[H("div",Tq,[H("div",Sq,[Eq,ot(Qc,{type:"submit",block:!1,variant:"flat",color:"primary",onClick:C},{default:Dt(()=>[Ot(" Iniciar Sesión ")]),_:1})])]),ot(TT)],64))}});const bq=kt(Pq,[["__scopeId","data-v-957468a6"]]),Mq="/assets/maule/arrow_left.png",wq="/assets/maule/arrow_right.png",Aq=i=>(fe("data-v-b8f82caa"),i=i(),ve(),i),Rq={class:"player-select-container"},Oq={class:"selection-container"},Lq=Aq(()=>H("div",{class:"select-title font-pixel"}," Selecciona tu personaje ",-1)),Fq=Bt({__name:"GameMaulePlayerSelect",emits:["selected"],setup(i,{emit:t}){const{setPlayerImageState:s}=_u(),c=Ws(),C=it(0),S=wt(()=>C.value-1<0?2:C.value-1),l=wt(()=>C.value+1>=3?0:C.value+1),T=wt(()=>{const r=["/assets/maule/characters/player/0/neutro.png","/assets/maule/characters/player/1/neutro.png","/assets/maule/characters/player/2/neutro.png"];return{prev:{backgroundImage:`url(${r[S.value]})`},current:{backgroundImage:`url(${r[C.value]})`},next:{backgroundImage:`url(${r[l.value]})`}}}),e=()=>{C.value=l.value},d=()=>{C.value=S.value},g=async()=>{await c.request("POST","/maule/status",{auth:!0,body:{character:C.value}}),s(C.value),t("selected")};return(r,a)=>(Q(),et("div",Rq,[H("div",Oq,[Lq,H("div",{class:"player-show",style:ue(T.value.current)},null,4),H("div",{class:"player-show-prev",style:ue(T.value.prev),onClick:d},null,4),H("div",{class:"player-show-next",style:ue(T.value.next),onClick:e},null,4),H("div",{class:"player-select-left"},[H("img",{src:Mq,onClick:d})]),H("div",{class:"player-select-right"},[H("img",{src:wq,onClick:e})]),H("div",{class:"continue-btn font-pixel",onClick:g}," Continuar ")])]))}});const Iq=kt(Fq,[["__scopeId","data-v-b8f82caa"]]),Io=it("stopped"),ki=it(0),Fn=it(null),Kc=Xh({limit:60,initialCount:60}),Dq=()=>{const i=it(60),t=(e=60,d=60)=>{ki.value=e,i.value=d,Kc.initialCount=e,Kc.limit=d},s=()=>{Fn.value||(ki.value=Kc.initialCount,Io.value="started",Fn.value=setInterval(()=>{ki.value-=1},1e3))},c=()=>{!ki.value&&Io.value!=="started"||(Io.value="paused",Fn.value&&clearInterval(Fn.value),Fn.value=null)},C=()=>{Io.value="stopped",Fn.value&&clearInterval(Fn.value),Fn.value=null},S=(e=5)=>{ki.value+e>i.value?ki.value=i.value:ki.value+=e},l=e=>{ki.value-e<=0?ki.value=0:ki.value-=e},T=wt(()=>{const e=Math.floor(ki.value/60),d=ki.value%60;return`${e<10?"0"+e:e}:${d<10?"0"+d:d}`});return{setTimer:t,startTimer:s,pauseTimer:c,stopTimer:C,addTimeToTimer:S,reduceTimeToTimer:l,time:wt(()=>ki.value),timerState:wt(()=>Io.value),timeDisplay:T}},Pe=i=>(fe("data-v-bab67b8b"),i=i(),ve(),i),Bq={class:"game-grid"},kq={key:0,class:"item-list d-flex flex-column difusion-list"},Gq=Pe(()=>H("span",{class:"mb-4"}
6488,"Elementos a encontrar:",-1)),Nq=["src"],Vq=["src"],zq=["src"],Yq=["src"],Xq=["src"],Uq=["src"],Wq=["src"],Hq=["src"],$q=["src"],jq=["src"],Kq={key:1,class:"item-list d-flex flex-column difusion-list"},Zq=Pe(()=>H("span",{class:"mb-4"},"Elementos a encontrar:",-1)),Jq=["src"],Qq=["src"],qq=["src"],_q=["src"],t_=["src"],e_=["src"],i_=["src"],s_=["src"],n_=["src"],r_=["src"],a_={key:2,class:"item-list d-flex flex-column book-list"},o_=Pe(()=>H("span",{class:"mb-4"},"Libros a encontrar:",-1)),l_=["src"],h_=Pe(()=>H("p",null,"En la casa de los Sueños de Carmen Maria Machado",-1)),u_=["src"],d_=Pe(()=>H("p",null,"La Mató por Amor de Viviana Ãvila Alfaro",-1)),c_=["src"],f_=Pe(()=>H("p",null,"El invencible verano de Liliana de Cristina Rivera Garza",-1)),v_=["src"],p_=Pe(()=>H("p",null,"Fragmentos de mi historia: microrrelatos de violencia en el pololeo - Fundación Antonia",-1)),m_=["src"],g_=Pe(()=>H("p",null,"AntologÃa Feminista; Las Tesis",-1)),x_=["src"],y_=Pe(()=>H("p",null,"Relaciones sanas; Lara, Laura - Providell, Lesliee",-1)),C_=["src"],T_=Pe(()=>H("p",null,"La última niebla - MarÃa Luisa Bombal",-1)),S_=["src"],E_=Pe(()=>H("p",null,"Niebla - Miguel de Unamuno",-1)),P_=["src"],b_=Pe(()=>H("p",null,"El túnel - Ernesto Sábato",-1)),M_=["src"],w_=Pe(()=>H("p",null,"De amor no se muere - David Montoya",-1)),A_={key:3,class:"message-container font-pixel"},R_={key:0},O_=Pe(()=>H("p",null,"INICIAR",-1)),L_=Pe(()=>H("span",null,"Ayuda a encontrar las parejas de elementos antes que se acabe el tiempo.",-1)),F_=Pe(()=>H("br",null,null,-1)),I_=Pe(()=>H("span",{class:"text-yellow"},"¿Lograrás conseguir las 3 estrellas?",-1)),D_=Pe(()=>H("br",null,null,-1)),B_=Pe(()=>H("br",null,null,-1)),k_={key:1},G_=Pe(()=>H("p",null,"PAUSA",-1)),N_={key:2},V_={style:{"margin-top":"-30px"}},z_={icon:"d-inline-block mx-2",style:{"font-size":"1.9rem"}},Y_=Pe(()=>H("p",null,"VICTORIA",-1)),X_=Pe(()=>H("br",null,null,-1)),U_={key:3},W_={style:{"margin-top":"-30px"}},H_={class:"d-inline-block mx-2"},$_=Pe(()=>H("p",null,"DERROTA",-1)),j_={class:"time-container font-pixel"},K_={style:{"font-size":"1rem"},class:"mr-2"},Z_={key:0,class:"card card-empty"},J_=["onClick"],Q_=Pe(()=>H("div",{class:"card-face card-face-back"},null,-1)),Zc=150,q_=Bt({__name:"GameMauleGame",props:{bgImage:{}},emits:["next-scene"],setup(i,{emit:t}){const{lgAndUp:s}=kr(),{playSound:c,pauseSound:C}=qu(),{scene:S,gameSelected:l}=za(),{time:T,setTimer:e,startTimer:d,timeDisplay:g,stopTimer:r,pauseTimer:a}=Dq(),{loadMauleGameItems:h,isLoadingMauleImages:n,mauleGameItems:o}=_u(),f=it([]),u=it(!1),v=it(!1),m=it(!1),p=it(!1),x=it(!1),y=wt(()=>f.value.filter(B=>!B.isFaceDown).length),P=wt(()=>f.value.filter(B=>!B.isHidden).map(B=>B.image)),b=wt(()=>T.value>=90?3:T.value>=60?2:T.value>=1?1:0),E=()=>{const B=[{isFaceDown:!0,isHidden:!1,val:"icon0",image:"0"},{isFaceDown:!0,isHidden:!1,val:"icon0",image:"0"},{isFaceDown:!0,isHidden:!1,val:"icon1",image:"1"},{isFaceDown:!0,isHidden:!1,val:"icon1",image:"1"},{isFaceDown:!0,isHidden:!1,val:"icon2",image:"2"},{isFaceDown:!0,isHidden:!1,val:"icon2",image:"2"},{isFaceDown:!0,isHidden:!1,val:"icon3",image:"3"},{isFaceDown:!0,isHidden:!1,val:"icon3",image:"3"},{isFaceDown:!0,isHidden:!1,val:"icon4",image:"4"},{isFaceDown:!0,isHidden:!1,val:"icon4",image:"4"},{isFaceDown:!0,isHidden:!1,val:"icon5",image:"5"},{isFaceDown:!0,isHidden:!1,val:"icon5",image:"5"},{isFaceDown:!0,isHidden:!1,val:"icon6",image:"6"},{isFaceDown:!0,isHidden:!1,val:"icon6",image:"6"},{isFaceDown:!0,isHidden:!1,val:"icon7",image:"7"},{isFaceDown:!0,isHidden:!1,val:"icon7",image:"7"},{isFaceDown:!0,isHidden:!1,val:"icon8",image:"8"},{isFaceDown:!0,isHidden:!1,val:"icon8",image:"8"},{isFaceDown:!0,isHidden:!1,val:"icon9",image:"9"},{isFaceDown:!0,isHidden:!1,val:"icon9",image:"9"}];f.value=Uh([...B])},M=async()=>{const B=f.value.filter(z=>!z.isFaceDown);await Qe(1.3),B[0].val===B[1].val?(c("win"),B[0].isHidden=!0,B[1].isHidden=!0,B[0].isFaceDown=!0,B[1].isFaceDown=!0):(B[0].isFaceDown=!0,B[1].isFaceDown=!0,c("lose"))},w=async B=>{u.value||!v.value||(u.value=!0,y.value<2&&B.isFaceDown&&(c("hover"),B.isFaceDown=!B.isFaceDown),y.value===2&&await M(),await Qe(.5),u.value=!1)},A=()=>{n.value||(c("quest"),E(),e(Zc,Zc),d(),p.value=!1,v.value=!0,m.value=!0,x.value=!1)},R=async()=>
6488{if(I.value!=="win"){c("click"),x.value=!1;for(const B of f.value)B.isFaceDown=!0,B.isHidden=!1;await Qe(.5),A()}},L=()=>{p.value||(c("click"),v.value?(x.value=!0,a(),C("music2"),v.value=!1):(x.value=!1,d(),c("music2"),v.value=!0))};ti(T,B=>{B===0&&(v.value=!1,p.value=!0,r(),x.value=!0)});const O=wt(()=>f.value.every(B=>B.isHidden));ti(O,B=>{B&&(c("quest"),v.value=!1,p.value=!0,r(),x.value=!0)}),ce(()=>{h(S.value),E(),e(Zc),p.value=!1,v.value=!1,m.value=!1,x.value=!0});const I=wt(()=>!m.value&&!v.value&&!p.value?"not-started":!v.value&&!p.value?"pause":p.value&&f.value.every(B=>B.isHidden)?"win":p.value&&f.value.some(B=>!B.isHidden)?"lose":"playing"),D=()=>{t("next-scene")};return(B,z)=>(Q(),et("div",{class:"game-container",style:ue({backgroundImage:`url(${B.bgImage})`})},[H("div",Bq,[ct(l)==="escenografia"&&ct(s)&&!ct(n)?(Q(),et("div",kq,[Gq,H("div",null,[H("img",{src:ct(o)[0],class:Ct({grayscale:P.value.includes("0")})},null,10,Nq)]),H("div",null,[H("img",{src:ct(o)[1],class:Ct({grayscale:P.value.includes("1")})},null,10,Vq)]),H("div",null,[H("img",{src:ct(o)[2],class:Ct({grayscale:P.value.includes("2")})},null,10,zq)]),H("div",null,[H("img",{src:ct(o)[3],class:Ct({grayscale:P.value.includes("3")})},null,10,Yq)]),H("div",null,[H("img",{src:ct(o)[4],class:Ct({grayscale:P.value.includes("4")})},null,10,Xq)]),H("div",null,[H("img",{src:ct(o)[5],class:Ct({grayscale:P.value.includes("5")})},null,10,Uq)]),H("div",null,[H("img",{src:ct(o)[6],class:Ct({grayscale:P.value.includes("6")})},null,10,Wq)]),H("div",null,[H("img",{src:ct(o)[7],class:Ct({grayscale:P.value.includes("7")})},null,10,Hq)]),H("div",null,[H("img",{src:ct(o)[8],class:Ct({grayscale:P.value.includes("8")})},null,10,$q)]),H("div",null,[H("img",{src:ct(o)[9],class:Ct({grayscale:P.value.includes("9")})},null,10,jq)])])):ft("",!0),ct(l)==="difusion"&&ct(s)&&!ct(n)?(Q(),et("div",Kq,[Zq,H("div",null,[H("img",{src:ct(o)[0],class:Ct({grayscale:P.value.includes("0")})},null,10,Jq)]),H("div",null,[H("img",{src:ct(o)[1],class:Ct({grayscale:P.value.includes("1")})},null,10,Qq)]),H("div",null,[H("img",{src:ct(o)[2],class:Ct({grayscale:P.value.includes("2")})},null,10,qq)]),H("div",null,[H("img",{src:ct(o)[3],class:Ct({grayscale:P.value.includes("3")})},null,10,_q)]),H("div",null,[H("img",{src:ct(o)[4],class:Ct({grayscale:P.value.includes("4")})},null,10,t_)]),H("div",null,[H("img",{src:ct(o)[5],class:Ct({grayscale:P.value.includes("5")})},null,10,e_)]),H("div",null,[H("img",{src:ct(o)[6],class:Ct({grayscale:P.value.includes("6")})},null,10,i_)]),H("div",null,[H("img",{src:ct(o)[7],class:Ct({grayscale:P.value.includes("7")})},null,10,s_)]),H("div",null,[H("img",{src:ct(o)[8],class:Ct({grayscale:P.value.includes("8")})},null,10,n_)]),H("div",null,[H("img",{src:ct(o)[9],class:Ct({grayscale:P.value.includes("9")})},null,10,r_)])])):ft("",!0),ct(l)==="book"&&ct(s)&&!ct(n)?(Q(),et("div",a_,[o_,H("div",null,[H("img",{src:ct(o)[0],class:Ct({grayscale:P.value.includes("0")})},null,10,l_),h_]),H("div",null,[H("img",{src:ct(o)[1],class:Ct({grayscale:P.value.includes("1")})},null,10,u_),d_]),H("div",null,[H("img",{src:ct(o)[2],class:Ct({grayscale:P.value.includes("2")})},null,10,c_),f_]),H("div",null,[H("img",{src:ct(o)[3],class:Ct({grayscale:P.value.includes("3")})},null,10,v_),p_]),H("div",null,[H("img",{src:ct(o)[4],class:Ct({grayscale:P.value.includes("4")})},null,10,m_),g_]),H("div",null,[H("img",{src:ct(o)[5],class:Ct({grayscale:P.value.includes("5")})},null,10,x_),y_]),H("div",null,[H("img",{src:ct(o)[6],class:Ct({grayscale:P.value.includes("6")})},null,10,C_),T_]),H("div",null,[H("img",{src:ct(o)[7],class:Ct({grayscale:P.value.includes("7")})},null,10,S_),E_]),H("div",null,[H("img",{src:ct(o)[8],class:Ct({grayscale:P.value.includes("8")})},null,10,P_),b_]),H("div",null,[H("img",{src:ct(o)[9],class:Ct({grayscale:P.value.includes("9")})},null,10,M_),w_])])):ft("",!0),x.value?(Q(),et("div",A_,[I.value==="not-started"?(Q(),et("div",R_,[O_,L_,F_,I_,D_,B_,H("span",{onClick:A},[ct(n)?(Q(),Rt(te,{key:0,icon:"fas fa-gear fa-spin",style:{"font-size":"1rem"}})):ft("",!0),Ot(" INICIAR JUEGO")])])):ft("",!0),I.value==="pause"?(Q(),et("div",k_,[G_,H("span",{onClick:L},"CONTINUAR")])):ft("",!0),I.value==="win"?(Q(),et("div",N_,[H("div",V_,[H("span",null,[b.value>=2?(Q(),Rt(te,{key:0,icon:"fas fa-star",class:"text-yellow-darken-4 fa-flip"})):(Q(),Rt(te,{key:1,class:"far fa-star"}))]),H("span",z_,[b.value>=1?(Q(),Rt(te,{key:0,icon:"fas fa-star",class:"text-yellow-darken-4 fa-spin-pulse"})):(Q(),Rt(te,{key:1,icon:"far fa-star"}))]),H("span",null,[b.value>=3?(Q(),Rt(te,{key:0,icon:"fas fa-star",class:"text-yellow-darken-4 fa-flip"})):(Q(),Rt(te,{key:1,icon:"far fa-star"}))])]),Y_,H("span",{onClick:D},"CONTINUAR"),X_,H("span",{onClick:R},"REINICIAR")])):ft("",!0),I.value==="lose"?(Q(),et("div",U_,[H("div",W_,[H("span",null,[ot(te,{icon:"far fa-star fa-shake"})]),H("span",H_,[ot(te,{icon:"far fa-star fa-shake"})]),H("span",null,[ot(te,{icon:"far fa-star fa-shake"})])]),$_,H("span",{onClick:R},"REINICIAR")])):ft("",!0)])):ft("",!0),H("div",j_,[H("div",K_,[b.value>=1?(Q(),Rt(te,{key:0,icon:"fas fa-star",class:"text-yellow-darken-4 fa-beat"})):ft("",!0),b.value>=2?(Q(),Rt(te,{key:1,icon:"fas fa-star",class:"text-yellow-darken-4 fa-beat"})):ft("",!0),b.value>=3?(Q(),Rt(te,{key:2,icon:"fas fa-star",class:"text-yellow-darken-4 fa-beat"})):ft("",!0),b.value<1?(Q(),Rt(te,{key:3,icon:"far fa-star"})):ft("",!0),b.value<2?(Q(),Rt(te,{key:4,icon:"far fa-star"})):ft("",!0),b.value<3?(Q(),Rt(te,{key:5,icon:"far fa-star"})):ft("",!0)]),H("span",null,Lt(ct(g)),1)]),H("div",{class:"icon-container icon-1",onClick:R},[ot(te,{icon:"fas fa-rotate-right"})]),H("div",{class:"icon-container icon-2",onClick:L},[ot(te,{icon:"fas fa-pause"}
6488)]),(Q(!0),et(Xt,null,rs(f.value,(X,W)=>(Q(),et("div",{key:`card-${W}`},[X.isHidden?(Q(),et("div",Z_)):(Q(),et("div",{key:1,class:Ct({card:!0,"is-flipped":X.isFaceDown}),onClick:j=>w(X)},[Q_,H("div",{class:"card-face card-face-front",style:ue({backgroundImage:`url(${ct(o)[X.image]}), linear-gradient(180deg, rgb(248, 246, 246) 0%, rgb(209, 209, 211) 100%)`})},null,4)],10,J_))]))),128))])],4))}});const __=kt(q_,[["__scopeId","data-v-bab67b8b"]]),ttt=Bt({__name:"AppMauleSection",props:{chapter:{},scene:{},step:{}},setup(i){const t=i,s=wt(()=>{const c={chapter:+t.chapter,scene:+t.scene,step:+t.step};return c.chapter===1&&c.scene===3?"1. Conociendo el colegio":c.chapter===1&&c.scene===4?"2. Amor en los tiempos del gaming":c.chapter===1&&c.scene===5&&c.step<=27?"3. Problemas en el taller":c.chapter===1&&c.scene===5&&c.step>27?"4. Buscar solución en los libros":c.chapter===1&&c.scene===7?"5. Ayuda en la puerta":c.chapter===1&&c.scene===8?"6. Algo debemos hacer, hay mucho por hacer":c.chapter===2&&c.scene===1?'7. "Vengadores" reunidos':c.chapter===2&&c.scene===2?"8. El plan de acción":c.chapter===2&&c.scene===3?"9. ¡Manos a la obra!":c.chapter===2&&c.scene===4?"10. Un mejor guión es necesario":c.chapter===2&&c.scene===5?"11. La puesta en escena es importante":c.chapter===2&&c.scene===6?"12. ¡A ensayar!":c.chapter===3&&c.scene===1?"13. ¡Oh no! la obra peligra, debes hacer algo":c.chapter===3&&c.scene===2?"14. ¡A seguir con los preparativos!":c.chapter===3&&c.scene===3?"15. Necesitamos ¿más decisiones?":c.chapter===3&&c.scene===4?"16. ¡Ayuda, el ensayo principal debe salir bien!":c.chapter===3&&c.scene===5?"17. ¡El gran dÃa ha llegado!":""});return(c,C)=>Lt(s.value)}}),ml=i=>(fe("data-v-606c499e"),i=i(),ve(),i),ett={class:"d-flex justify-center"},itt={key:0,class:"text-bg mt-4"},stt=ml(()=>H("p",null," Estás a punto de comenzar una aventura narrativa, donde tus decisiones nos permitirán definir tu personalidad frente a la violencia de género y en el pololeo. ",-1)),ntt=ml(()=>H("br",null,null,-1)),rtt=ml(()=>H("p",null," Deberás enfrentar situaciones que te permitirán reflexionar sobre tus actitudes y comportamientos, y cómo estos pueden afectar a las personas que te rodean. ",-1)),att=ml(()=>H("br",null,null,-1)),ott=ml(()=>H("p",null," Todo mediante una serie de casos y juegos que te permitirán avanzar en la historia y conocer a los personajes que te acompañarán en esta aventura. ",-1)),ltt=[stt,ntt,rtt,att,ott],htt={class:"mb-2 d-flex justify-space-between align-center"},utt=Bt({__name:"GameMauleIntro",props:{section:{},player:{}},emits:["init"],setup(i){const t=i,{mdAndUp:s}=kr(),c=S=>S+1===t.section?"fas fa-play":t.section<S+1?"fas fa-hourglass-half":"fas fa-check",C=["1. Conociendo el colegio","2. Amor en los tiempos del gaming","3. Problemas en el taller","4. Buscar solución en los libros","5. Ayuda en la puerta","6. Algo debemos hacer, hay mucho por hacer",'7. "Vengadores" reunidos',"8. El plan de acción","9. ¡Manos a la obra!","10. Un mejor guión es necesario","11. La puesta en escena es importante","12. ¡A ensayar!","13. ¡Oh no! la obra peligra, debes hacer algo","14. ¡A seguir con los preparativos!","15. Necesitamos ¿más decisiones?","16. ¡Ayuda, el ensayo principal debe salir bien!","17. ¡El gran dÃa ha llegado!"];return(S,l)=>(Q(),et("div",{class:"bg-intro",style:ue({backgroundImage:"url('/assets/maule/locations/entrada-min.jpg')"})},[ot(kU,null,{default:Dt(()=>[ot(Fh,null,{default:Dt(()=>[ot(Qi,{cols:ct(s)?5:12},{default:Dt(()=>[H("div",ett,[H("img",{src:Ep,style:ue(ct(s)?"max-width: 300px":"max-width: 120px")},null,4)]),ct(s)?(Q(),et("div",itt,ltt)):ft("",!0)]),_:1},8,["cols"]),ot(Qi,{cols:ct(s)?7:12},{default:Dt(()=>[H("div",htt,[H("div",{class:"init-btn",onClick:l[0]||(l[0]=T=>S.$emit("init"))},Lt(S.section===1?"Iniciar":"Continuar")+" Juego ",1),H("div",{class:"char-portrait user-bg",style:ue({backgroundImage:"url(/assets/maule/box/"+S.player+".jpg)"})},null,4)]),(Q(),et(Xt,null,rs(C,(T,e)=>H("div",{key:"section-"+e,class:Ct({"chapter-title":!0,"opacity-item":e+1>S.section}),style:ue(ct(s)?"font-size: 1rem":"font-size: 0.9rem")},[H("div",null,[H("span",null,Lt(T),1)]),ot(te,{icon:c(e),style:{"font-size":"1.2rem"}},null,8,["icon"])],6)),64))]),_:1},8,["cols"])]),_:1})]),_:1})],4))}});const dtt=kt(utt,[["__scopeId","data-v-606c499e"]]),ctt="/assets/maule/bt2.png",ftt="/assets/maule/bt1.png",vtt="/assets/maule/bt3.png",ptt={class:"backdrop"},mtt={class:"hints-container"},gtt=Tf('<div data-v-c4aac7d4><hr class="text-white my-2" data-v-c4aac7d4><p data-v-c4aac7d4>Puedes navegar por las opciones de diálogo con FLECHA ARRIBA y FLECHA ABAJO, pudiendo realizar la selección con ENTER o SPACE </p><hr class="text-white my-2" data-v-c4aac7d4><div class="d-flex align-center mb-2" data-v-c4aac7d4><img src="'+ctt+'" class="mr-2" data-v-c4aac7d4><span data-v-c4aac7d4>Ver menú de la cuenta</span></div><div class="d-flex align-center mb-2" data-v-c4aac7d4><img src="'+ftt+'" class="mr-2" data-v-c4aac7d4><span data-v-c4aac7d4>Controla la velocidad del texto</span></div><div class="d-flex align-center mb-2" data-v-c4aac7d4>
6488<img src="'+vtt+'" class="mr-2" data-v-c4aac7d4><span data-v-c4aac7d4>Ver diálogo anterior</span></div></div>',1),xtt=Bt({__name:"AppMauleHints",emits:["close"],setup(i){return(t,s)=>(Q(),et("div",ptt,[H("div",mtt,[H("div",{class:"close-btn",onClick:s[0]||(s[0]=c=>t.$emit("close"))},[ot(te,{icon:"fas fa-times"})]),gtt])]))}});const ytt=kt(xtt,[["__scopeId","data-v-c4aac7d4"]]),wp=i=>(fe("data-v-9e898db8"),i=i(),ve(),i),Ctt={key:0,class:"loading-loader"},Ttt=wp(()=>H("img",{src:Ep,style:{width:"350px","max-width":"90%","margin-top":"50px"}},null,-1)),Stt=wp(()=>H("div",{class:"d-flex text-center mb-4 align-center bg-white px-3 py-1 rounded"},[H("span",{class:"d-inline-block mr-2 loading-text"}," Cargando "),H("div",{class:"circular-loader"})],-1)),Ett=[Ttt,Stt],Ptt={key:1,class:"game-auth-container"},btt={key:0,class:"inner-image-loader"},Mtt=wp(()=>H("span",null,null,-1)),wtt={key:1,class:"game-area"},Att={key:0,class:"section-title"},Rtt={key:4,class:"intro-backdrop"},Ott={key:2,class:"game-area"},Ltt=Bt({__name:"AppGameMaule",setup(i){const{initSounds:t,playSound:s,stopSound:c,playMusicByChapter:C,stopChapterMusic:S}=qu(),{setAccountId:l,logout:T,setAccountName:e,updateAccountDataFromRaw:d,accountData:g}=os(),r=Ws(),{mdAndUp:a}=kr(),{dialog:h,getChapterImageData:n,gameCb:o,gameSelected:f,initState:u,progress:v,prevDialog:m,actualSection:p}=za({chapter:"1",scene:"3",step:"1"}),{loadChapterImages:x,getLocationImageByKey:y,isLoadingChapterImages:P,setPlayerImageState:b,playerImageState:E}=_u(),{displayToast:M}=Ya(),w=it(!1),A=it(!1),R=it(!1),L=it(!0),O=()=>{L.value=!1,C(p.value)},I=wt(()=>v.value.chapter==="3"&&v.value.scene==="5"&&v.value.step==="34"),D=it(""),B=()=>{var nt;D.value=y(((nt=h.value)==null?void 0:nt.location)||"neutro")},z=it(!1),X=async nt=>{z.value=!0;const gt=n(nt);await x(gt),z.value=!1},W=async()=>{await F(),A.value||(await X(),B(),w.value=!0)},j=()=>{A.value=!1,L.value=!0,W()},N=async()=>{await T(),w.value=!1,S(),s("intro"),L.value=!0},Y=async()=>{var bt;const{data:nt,error:gt}=await r.request("GET","/auth/me",{auth:!0});nt&&(((bt=nt==null?void 0:nt.payload)==null?void 0:bt.role)==="USER"?(l(nt.payload.id),e(`${nt.payload.name} ${nt.payload.lastname}`),d(nt.payload)):await T())},F=async()=>{const{data:nt}=await r.request("GET","/maule/status",{auth:!0});if(nt&&(nt.status.character===-1?A.value=!0:(A.value=!1,b(nt.status.character)),nt.status.chapter&&nt.status.scene&&nt.status.step)){const gt={chapter:nt.status.chapter,scene:nt.status.scene,step:nt.status.step};u(gt)}},G=wt(()=>{var nt;return!!((nt=g.value)!=null&&nt.dni)});ti(G,async nt=>{nt&&await W()}),JT(async()=>{await t(),s("intro");const{data:nt,error:gt}=await r.request("GET","/auth/me",{auth:!0});nt&&(await Y(),nt!=null&&nt.payload.id&&(nt==null?void 0:nt.payload.role)==="USER"&&(l(nt==null?void 0:nt.payload.id),await _(),await W())),gt&&(console.error(gt),w.value=!1,c("music1"),s("intro"),await T())}),Hs(()=>{c("music1"),c("intro")}),ti(f,nt=>{nt&&(R.value=!0)});const{progress:k}=za(),V=async()=>{R.value=!1,o.value();const nt={progress:{chapter:k.value.chapter,scene:k.value.scene,step:k.value.step}};await r.request("POST","/maule/status",{auth:!0,body:nt}),await X(),B()};ti(R,nt=>{nt?(S(),s("music2")):(c("music2"),C(p.value))}),ti(p,nt=>{nt&&!L.value&&C(nt)});const U=it(!1);ce(()=>{U.value=!0});const $=it([]),K=(nt,gt,bt)=>{const Pt=$.value.find(St=>St.chapter===nt&&St.scene===gt&&St.step===bt),dt={52:"esos",53:"ese",54:"eso"};return Pt!=null&&Pt.value?Pt==null?void 0:Pt.value:dt[bt]||"eso"},J=nt=>{$.value=nt},_=async()=>{const{data:nt}=await r.request("GET","/user/replacements",{auth:!0});nt!=null&&nt.replacements&&J(nt.replacements.map(gt=>({chapter:gt.chapter,scene:gt.scene,step:gt.step,value:gt.value,owner:gt.owner})))},tt=async(nt,gt,bt,Pt)=>{const{data:dt,error:St}=await r.request("POST","/user/replacement",{auth:!0,body:{chapter:nt,scene:gt,step:bt,value:Pt}});if(dt!=null&&dt.replacements&&J(dt.replacements.map(Tt=>({chapter:Tt.chapter,scene:Tt.scene,step:Tt.step,value:Tt.value,owner:Tt.owner}))),St){M("Debes volver a iniciar sesión","error"),await Qe(2.5),await T(),window.location.href="/";return}},st=wt(()=>{var gt,bt,Pt,dt,St;let nt=((gt=h.value)==null?void 0:gt.text)||"";if((bt=h.value)!=null&&bt.replaceId){const Tt=K((Pt=h.value)==null?void 0:Pt.replaceId.chapter,(dt=h.value)==null?void 0:dt.replaceId.scene,(St=h.value)==null?void 0:St.replaceId.step);nt=nt.replace("<replace>",Tt)}return{text:nt}}),ht=wt(()=>{var nt,gt;return{image:((nt=m.value)==null?void 0:nt.character)||null,emotion:((gt=m.value)==null?void 0:gt.emotion)||null}}),lt=it(!1);return(nt,gt)=>{var bt,Pt,dt,St,Tt;
6488return Q(),et(Xt,null,[ct(P)?(Q(),et("div",Ctt,Ett)):ft("",!0),!ct(P)&&!w.value&&!G.value?(Q(),et("div",Ptt,[ot(bq,{onStart:W})])):ft("",!0),!ct(P)&&A.value&&G.value?(Q(),Rt(Iq,{key:2,onSelected:j})):ft("",!0),!ct(P)&&w.value&&!A.value&&G.value?(Q(),et("div",{key:3,class:"game-area",style:ue({backgroundImage:`url(${D.value})`})},[z.value?(Q(),et("div",btt,[Mtt,Ot(" Cargando... ")])):ft("",!0),R.value?(Q(),et("div",Ott,[ot(__,{"bg-image":D.value,onNextScene:V},null,8,["bg-image"])])):(Q(),et("div",wtt,[ct(a)&&!I.value?(Q(),et("div",Att,[ot(ttt,Or(Lr(ct(v))),null,16)])):ft("",!0),I.value?ft("",!0):(Q(),Rt(yq,{key:1,onSaveAndExit:N})),I.value?ft("",!0):(Q(),Rt(vq,{key:2,character:((bt=ct(h))==null?void 0:bt.character)||"",emotion:((Pt=ct(h))==null?void 0:Pt.emotion)||"","is-obra":(dt=ct(h))==null?void 0:dt.isObra,"prev-character":ht.value},null,8,["character","emotion","is-obra","prev-character"])),L.value?ft("",!0):(Q(),Rt(uq,{key:3,character:((St=ct(h))==null?void 0:St.character)||"",text:st.value.text,menu:((Tt=ct(h))==null?void 0:Tt.menu)||[],"save-replacement":tt,"is-loading":z.value,end:I.value,onNext:B,onLoadNextChapter:gt[0]||(gt[0]=Vt=>X(!0)),onHint:gt[1]||(gt[1]=Vt=>lt.value=!0)},null,8,["character","text","menu","is-loading","end"])),L.value?(Q(),et("div",Rtt,[ot(dtt,{section:ct(p),player:ct(E),onInit:O},null,8,["section","player"])])):ft("",!0)]))],4)):ft("",!0),ot(Do,{name:"fast-fade"},{default:Dt(()=>[lt.value?(Q(),Rt(ytt,{key:0,onClose:gt[2]||(gt[2]=Vt=>lt.value=!1)})):ft("",!0)]),_:1})],64)}}});const Ftt=kt(Ltt,[["__scopeId","data-v-9e898db8"]]),Itt=i=>(fe("data-v-53ff593a"),i=i(),ve(),i),Dtt=Itt(()=>H("div",{id:"turn",class:"turn-modal"},[H("img",{src:nS})],-1)),Btt=Bt({__name:"AppGameView",setup(i){const t="RM",s=it(!1),c=()=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);return ce(()=>{s.value=!0;const C=document.querySelector("body");c()?C==null||C.classList.add("mobile"):C==null||C.classList.remove("mobile")}),(C,S)=>(Q(),et(Xt,null,[s.value&&ct(t)==="RM"?(Q(),Rt(gQ,{key:0})):ft("",!0),s.value&&ct(t)==="MAULE"?(Q(),Rt(Ftt,{key:1})):ft("",!0),Dtt],64))}});const Xet=kt(Btt,[["__scopeId","data-v-53ff593a"]]);export{Xet as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.