69 lines
1.2 MiB
69 lines
1.2 MiB
(function(){const ut=document.createElement("link").relList;if(ut&&ut.supports&&ut.supports("modulepreload"))return;for(const at of document.querySelectorAll('link[rel="modulepreload"]'))ht(at);new MutationObserver(at=>{for(const mt of at)if(mt.type==="childList")for(const p of mt.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&ht(p)}).observe(document,{childList:!0,subtree:!0});function ot(at){const mt={};return at.integrity&&(mt.integrity=at.integrity),at.referrerPolicy&&(mt.referrerPolicy=at.referrerPolicy),at.crossOrigin==="use-credentials"?mt.credentials="include":at.crossOrigin==="anonymous"?mt.credentials="omit":mt.credentials="same-origin",mt}function ht(at){if(at.ep)return;at.ep=!0;const mt=ot(at);fetch(at.href,mt)}})();function Mt(gt){return gt&>.__esModule&&Object.prototype.hasOwnProperty.call(gt,"default")?gt.default:gt}var Pt={exports:{}},Rt=Pt.exports,At;function Ft(){return At||(At=1,(function(gt,ut){(function(ht,at){gt.exports=at()})(Rt,()=>(()=>{var ot={50792:(p=>{var S=Object.prototype.hasOwnProperty,t="~";function d(){}Object.create&&(d.prototype=Object.create(null),new d().__proto__||(t=!1));function c(e,s,o){this.fn=e,this.context=s,this.once=o||!1}function h(e,s,o,i,a){if(typeof o!="function")throw new TypeError("The listener must be a function");var l=new c(o,i||e,a),f=t?t+s:s;return e._events[f]?e._events[f].fn?e._events[f]=[e._events[f],l]:e._events[f].push(l):(e._events[f]=l,e._eventsCount++),e}function r(e,s){--e._eventsCount===0?e._events=new d:delete e._events[s]}function n(){this._events=new d,this._eventsCount=0}n.prototype.eventNames=function(){var s=[],o,i;if(this._eventsCount===0)return s;for(i in o=this._events)S.call(o,i)&&s.push(t?i.slice(1):i);return Object.getOwnPropertySymbols?s.concat(Object.getOwnPropertySymbols(o)):s},n.prototype.listeners=function(s){var o=t?t+s:s,i=this._events[o];if(!i)return[];if(i.fn)return[i.fn];for(var a=0,l=i.length,f=new Array(l);a<l;a++)f[a]=i[a].fn;return f},n.prototype.listenerCount=function(s){var o=t?t+s:s,i=this._events[o];return i?i.fn?1:i.length:0},n.prototype.emit=function(s,o,i,a,l,f){var u=t?t+s:s;if(!this._events[u])return!1;var v=this._events[u],m=arguments.length,x,g;if(v.fn){switch(v.once&&this.removeListener(s,v.fn,void 0,!0),m){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,o),!0;case 3:return v.fn.call(v.context,o,i),!0;case 4:return v.fn.call(v.context,o,i,a),!0;case 5:return v.fn.call(v.context,o,i,a,l),!0;case 6:return v.fn.call(v.context,o,i,a,l,f),!0}for(g=1,x=new Array(m-1);g<m;g++)x[g-1]=arguments[g];v.fn.apply(v.context,x)}else{var y=v.length,T;for(g=0;g<y;g++)switch(v[g].once&&this.removeListener(s,v[g].fn,void 0,!0),m){case 1:v[g].fn.call(v[g].context);break;case 2:v[g].fn.call(v[g].context,o);break;case 3:v[g].fn.call(v[g].context,o,i);break;case 4:v[g].fn.call(v[g].context,o,i,a);break;default:if(!x)for(T=1,x=new Array(m-1);T<m;T++)x[T-1]=arguments[T];v[g].fn.apply(v[g].context,x)}}return!0},n.prototype.on=function(s,o,i){return h(this,s,o,i,!1)},n.prototype.once=function(s,o,i){return h(this,s,o,i,!0)},n.prototype.removeListener=function(s,o,i,a){var l=t?t+s:s;if(!this._events[l])return this;if(!o)return r(this,l),this;var f=this._events[l];if(f.fn)f.fn===o&&(!a||f.once)&&(!i||f.context===i)&&r(this,l);else{for(var u=0,v=[],m=f.length;u<m;u++)(f[u].fn!==o||a&&!f[u].once||i&&f[u].context!==i)&&v.push(f[u]);v.length?this._events[l]=v.length===1?v[0]:v:r(this,l)}return this},n.prototype.removeAllListeners=function(s){var o;return s?(o=t?t+s:s,this._events[o]&&r(this,o)):(this._events=new d,this._eventsCount=0),this},n.prototype.off=n.prototype.removeListener,n.prototype.addListener=n.prototype.on,n.prefixed=t,n.EventEmitter=n,p.exports=n}),11517:((p,S,t)=>{var d=t(38829),c=function(h,r,n,e){for(var s=h[0],o=1;o<h.length;o++){var i=h[o];d(i,s,r,n,e),s=i}return h};p.exports=c}),80318:((p,S,t)=>{var d=t(66979),c=function(h,r,n,e,s){return d(h,"angle",r,n,e,s)};p.exports=c}),60757:(p=>{var S=function(t,d,c){for(var h=0;h<t.length;h++){var r=t[h];d.call(c,r)}return t};p.exports=S}),69927:(p=>{var S=function(t,d,c){c===void 0&&(c=0);for(var h=c;h<t.length;h++){var r=t[h],n=!0;for(var e in d)r[e]!==d[e]&&(n=!1);if(n)return r}return null};p.exports=S}),32265:(p=>{var S=function(t,d,c){c===void 0&&(c=0);for(var h=t.length-1;h>=c;h--){var r=t[h],n=!0;for(var e in d)r[e]!==d[e]&&(n=!1);if(n)return r}return null};p.exports=S}),94420:((p,S,t)=>{var d=t(11879),c=t(60461),h=t(95540),r=t(29747),n=t(41481),e=new n({sys:{queueDepthSort:r,events:{once:r}}},0,0,1,1).setOrigin(0,0),s=function(o,i){i===void 0&&(i={});var a=i.hasOwnProperty("width"),l=i.hasOwnProperty("height"),f=h(i,"width",-1),u=h(i,"height",-1),v=h(i,"cellWidth",1),m=h(i,"cellHeight",v),x=h(i,"position",c.TOP_LEFT),g=h(i,"x",0),y=h(i,"y",0),T=0,C=0,E=f*v,M=u*m;e.setPosition(g,y),e.setSize(v,m);for(var P=0;P<o.length;P++)if(d(o[P],e,x),a&&f===-1)e.x+=v;else if(l&&u===-1)e.y+=m;else if(l&&!a){if(C+=m,e.y+=m,C===M&&(C=0,T+=v,e.y=y,e.x+=v,T===E))break}else if(T+=v,e.x+=v,T===E&&(T=0,C+=m,e.x=g,e.y+=m,C===M))break;return o};p.exports=s}),41721:((p,S,t)=>{var d=t(66979),c=function(h,r,n,e,s){return d(h,"alpha",r,n,e,s)};p.exports=c}),67285:((p,S,t)=>{var d=t(66979),c=function(h,r,n,e,s){return d(h,"x",r,n,e,s)};p.exports=c}),9074:((p,S,t)=>{var d=t(66979),c=function(h,r,n,e,s,o,i){return n==null&&(n=r),d(h,"x",r,e,o,i),d(h,"y",n,s,o,i)};p.exports=c}),75222:((p,S,t)=>{var d=t(66979),c=function(h,r,n,e,s){return d(h,"y",r,n,e,s)};p.exports=c}),22983:(p=>{var S=function(t,d,c,h){c===void 0&&(c=0),h===void 0&&(h=6.28);for(var r=c,n=(h-c)/t.length,e=d.x,s=d.y,o=d.radius,i=0;i<t.length;i++)t[i].x=e+o*Math.cos(r),t[i].y=s+o*Math.sin(r),r+=n;return t};p.exports=S}),95253:(p=>{var S=function(t,d,c,h){c===void 0&&(c=0),h===void 0&&(h=6.28);for(var r=c,n=(h-c)/t.length,e=d.width/2,s=d.height/2,o=0;o<t.length;o++)t[o].x=d.x+e*Math.cos(r),t[o].y=d.y+s*Math.sin(r),r+=n;return t};p.exports=S}),88505:((p,S,t)=>{var d=t(15258),c=t(26708),h=function(r,n,e){var s;e?s=c(n,e,r.length):s=d(n,r.length);for(var o=0;o<r.length;o++){var i=r[o],a=s[o];i.x=a.x,i.y=a.y}return r};p.exports=h}),41346:((p,S,t)=>{var d=t(14649),c=t(86003),h=t(49498),r=function(n,e,s){s===void 0&&(s=0);var o=d(e,!1,n.length);s>0?c(o,s):s<0&&h(o,Math.abs(s));for(var i=0;i<n.length;i++)n[i].x=o[i].x,n[i].y=o[i].y;return n};p.exports=r}),11575:((p,S,t)=>{var d=t(84993),c=function(h,r,n){var e=d({x1:r.x1,y1:r.y1,x2:r.x2,y2:r.y2},n),s=d({x1:r.x2,y1:r.y2,x2:r.x3,y2:r.y3},n),o=d({x1:r.x3,y1:r.y3,x2:r.x1,y2:r.y1},n);e.pop(),s.pop(),o.pop(),e=e.concat(s,o);for(var i=e.length/h.length,a=0,l=0;l<h.length;l++){var f=h[l],u=e[Math.floor(a)];f.x=u.x,f.y=u.y,a+=i}return h};p.exports=c}),29953:(p=>{var S=function(t,d,c){for(var h=0;h<t.length;h++){var r=t[h];r.anims&&r.anims.play(d,c)}return t};p.exports=S}),66979:(p=>{var S=function(t,d,c,h,r,n){h===void 0&&(h=0),r===void 0&&(r=0),n===void 0&&(n=1);var e,s=0,o=t.length;if(n===1)for(e=r;e<o;e++)t[e][d]+=c+s*h,s++;else for(e=r;e>=0;e--)t[e][d]+=c+s*h,s++;return t};p.exports=S}),43967:(p=>{var S=function(t,d,c,h,r,n){h===void 0&&(h=0),r===void 0&&(r=0),n===void 0&&(n=1);var e,s=0,o=t.length;if(n===1)for(e=r;e<o;e++)t[e][d]=c+s*h,s++;else for(e=r;e>=0;e--)t[e][d]=c+s*h,s++;return t};p.exports=S}),88926:((p,S,t)=>{var d=t(28176),c=function(h,r){for(var n=0;n<h.length;n++)d(r,h[n]);return h};p.exports=c}),33286:((p,S,t)=>{var d=t(24820),c=function(h,r){for(var n=0;n<h.length;n++)d(r,h[n]);return h};p.exports=c}),96e3:((p,S,t)=>{var d=t(65822),c=function(h,r){for(var n=0;n<h.length;n++)d(r,h[n]);return h};p.exports=c}),28789:((p,S,t)=>{var d=t(26597),c=function(h,r){for(var n=0;n<h.length;n++)d(r,h[n]);return h};p.exports=c}),97154:((p,S,t)=>{var d=t(90260),c=function(h,r){for(var n=0;n<h.length;n++)d(r,h[n]);return h};p.exports=c}),20510:((p,S,t)=>{var d=t(66979),c=function(h,r,n,e,s){return d(h,"rotation",r,n,e,s)};p.exports=c}),91051:((p,S,t)=>{var d=t(1163),c=t(20339),h=function(r,n,e){for(var s=n.x,o=n.y,i=0;i<r.length;i++){var a=r[i];d(a,s,o,e,Math.max(1,c(a.x,a.y,s,o)))}return r};p.exports=h}),76332:((p,S,t)=>{var d=t(1163),c=function(h,r,n,e){var s=r.x,o=r.y;if(e===0)return h;for(var i=0;i<h.length;i++)d(h[i],s,o,n,e);return h};p.exports=c}),61619:((p,S,t)=>{var d=t(66979),c=function(h,r,n,e,s){return d(h,"scaleX",r,n,e,s)};p.exports=c}),94868:((p,S,t)=>{var d=t(66979),c=function(h,r,n,e,s,o,i){return n==null&&(n=r),d(h,"scaleX",r,e,o,i),d(h,"scaleY",n,s,o,i)};p.exports=c}),95532:((p,S,t)=>{var d=t(66979),c=function(h,r,n,e,s){return d(h,"scaleY",r,n,e,s)};p.exports=c}),8689:((p,S,t)=>{var d=t(43967),c=function(h,r,n,e,s){return d(h,"alpha",r,n,e,s)};p.exports=c}),2645:((p,S,t)=>{var d=t(43967),c=function(h,r,n,e){return d(h,"blendMode",r,0,n,e)};p.exports=c}),32372:((p,S,t)=>{var d=t(43967),c=function(h,r,n,e,s){return d(h,"depth",r,n,e,s)};p.exports=c}),85373:(p=>{var S=function(t,d,c){for(var h=0;h<t.length;h++)t[h].setInteractive(d,c);return t};p.exports=S}),81583:((p,S,t)=>{var d=t(43967),c=function(h,r,n,e,s,o,i){return n==null&&(n=r),d(h,"originX",r,e,o,i),d(h,"originY",n,s,o,i),h.forEach(function(a){a.updateDisplayOrigin()}),h};p.exports=c}),79939:((p,S,t)=>{var d=t(43967),c=function(h,r,n,e,s){return d(h,"rotation",r,n,e,s)};p.exports=c}),2699:((p,S,t)=>{var d=t(43967),c=function(h,r,n,e,s,o,i){return n==null&&(n=r),d(h,"scaleX",r,e,o,i),d(h,"scaleY",n,s,o,i)};p.exports=c}),98739:((p,S,t)=>{var d=t(43967),c=function(h,r,n,e,s){return d(h,"scaleX",r,n,e,s)};p.exports=c}),98476:((p,S,t)=>{var d=t(43967),c=function(h,r,n,e,s){return d(h,"scaleY",r,n,e,s)};p.exports=c}),6207:((p,S,t)=>{var d=t(43967),c=function(h,r,n,e,s,o,i){return n==null&&(n=r),d(h,"scrollFactorX",r,e,o,i),d(h,"scrollFactorY",n,s,o,i)};p.exports=c}),6607:((p,S,t)=>{var d=t(43967),c=function(h,r,n,e,s){return d(h,"scrollFactorX",r,n,e,s)};p.exports=c}),72248:((p,S,t)=>{var d=t(43967),c=function(h,r,n,e,s){return d(h,"scrollFactorY",r,n,e,s)};p.exports=c}),14036:(p=>{var S=function(t,d,c,h,r){for(var n=0;n<t.length;n++)t[n].setTint(d,c,h,r);return t};p.exports=S}),50159:((p,S,t)=>{var d=t(43967),c=function(h,r,n,e){return d(h,"visible",r,0,n,e)};p.exports=c}),77597:((p,S,t)=>{var d=t(43967),c=function(h,r,n,e,s){return d(h,"x",r,n,e,s)};p.exports=c}),83194:((p,S,t)=>{var d=t(43967),c=function(h,r,n,e,s,o,i){return n==null&&(n=r),d(h,"x",r,e,o,i),d(h,"y",n,s,o,i)};p.exports=c}),67678:((p,S,t)=>{var d=t(43967),c=function(h,r,n,e,s){return d(h,"y",r,n,e,s)};p.exports=c}),35850:((p,S,t)=>{var d=t(26099),c=function(h,r,n,e,s){e===void 0&&(e=0),s===void 0&&(s=new d);var o,i,a=h.length;if(a===1)o=h[0].x,i=h[0].y,h[0].x=r,h[0].y=n;else{var l=1,f=0;e===0&&(f=a-1,l=a-2),o=h[f].x,i=h[f].y,h[f].x=r,h[f].y=n;for(var u=0;u<a;u++)if(!(l>=a||l===-1)){var v=h[l],m=v.x,x=v.y;v.x=o,v.y=i,o=m,i=x,e===0?l--:l++}}return s.x=o,s.y=i,s};p.exports=c}),8628:((p,S,t)=>{var d=t(33680),c=function(h){return d(h)};p.exports=c}),21837:((p,S,t)=>{var d=t(7602),c=function(h,r,n,e,s){s===void 0&&(s=!1);var o=Math.abs(e-n)/h.length,i;if(s)for(i=0;i<h.length;i++)h[i][r]+=d(i*o,n,e);else for(i=0;i<h.length;i++)h[i][r]=d(i*o,n,e);return h};p.exports=c}),21910:((p,S,t)=>{var d=t(54261),c=function(h,r,n,e,s){s===void 0&&(s=!1);var o=Math.abs(e-n)/h.length,i;if(s)for(i=0;i<h.length;i++)h[i][r]+=d(i*o,n,e);else for(i=0;i<h.length;i++)h[i][r]=d(i*o,n,e);return h};p.exports=c}),62054:(p=>{var S=function(t,d,c,h,r){if(r===void 0&&(r=!1),t.length===0)return t;if(t.length===1)return r?t[0][d]+=(h+c)/2:t[0][d]=(h+c)/2,t;var n=Math.abs(h-c)/(t.length-1),e;if(r)for(e=0;e<t.length;e++)t[e][d]+=e*n+c;else for(e=0;e<t.length;e++)t[e][d]=e*n+c;return t};p.exports=S}),79815:(p=>{var S=function(t){for(var d=0;d<t.length;d++)t[d].visible=!t[d].visible;return t};p.exports=S}),39665:((p,S,t)=>{var d=t(15994),c=function(h,r,n){n===void 0&&(n=0);for(var e=0;e<h.length;e++){var s=h[e];s.x=d(s.x,r.left-n,r.right+n),s.y=d(s.y,r.top-n,r.bottom+n)}return h};p.exports=c}),61061:((p,S,t)=>{p.exports={AlignTo:t(11517),Angle:t(80318),Call:t(60757),GetFirst:t(69927),GetLast:t(32265),GridAlign:t(94420),IncAlpha:t(41721),IncX:t(67285),IncXY:t(9074),IncY:t(75222),PlaceOnCircle:t(22983),PlaceOnEllipse:t(95253),PlaceOnLine:t(88505),PlaceOnRectangle:t(41346),PlaceOnTriangle:t(11575),PlayAnimation:t(29953),PropertyValueInc:t(66979),PropertyValueSet:t(43967),RandomCircle:t(88926),RandomEllipse:t(33286),RandomLine:t(96e3),RandomRectangle:t(28789),RandomTriangle:t(97154),Rotate:t(20510),RotateAround:t(91051),RotateAroundDistance:t(76332),ScaleX:t(61619),ScaleXY:t(94868),ScaleY:t(95532),SetAlpha:t(8689),SetBlendMode:t(2645),SetDepth:t(32372),SetHitArea:t(85373),SetOrigin:t(81583),SetRotation:t(79939),SetScale:t(2699),SetScaleX:t(98739),SetScaleY:t(98476),SetScrollFactor:t(6207),SetScrollFactorX:t(6607),SetScrollFactorY:t(72248),SetTint:t(14036),SetVisible:t(50159),SetX:t(77597),SetXY:t(83194),SetY:t(67678),ShiftPosition:t(35850),Shuffle:t(8628),SmootherStep:t(21910),SmoothStep:t(21837),Spread:t(62054),ToggleVisible:t(79815),WrapInRectangle:t(39665)}}),42099:((p,S,t)=>{var d=t(45319),c=t(83419),h=t(74943),r=t(81957),n=t(41138),e=t(35154),s=t(90126),o=new c({initialize:function(a,l,f){this.manager=a,this.key=l,this.type="frame",this.frames=this.getFrames(a.textureManager,e(f,"frames",[]),e(f,"defaultTextureKey",null),e(f,"sortFrames",!0)),this.frameRate=e(f,"frameRate",null),this.duration=e(f,"duration",null),this.msPerFrame,this.skipMissedFrames=e(f,"skipMissedFrames",!0),this.delay=e(f,"delay",0),this.repeat=e(f,"repeat",0),this.repeatDelay=e(f,"repeatDelay",0),this.yoyo=e(f,"yoyo",!1),this.showBeforeDelay=e(f,"showBeforeDelay",!1),this.showOnStart=e(f,"showOnStart",!1),this.hideOnComplete=e(f,"hideOnComplete",!1),this.randomFrame=e(f,"randomFrame",!1),this.paused=!1,this.calculateDuration(this,this.getTotalFrames(),this.duration,this.frameRate),this.manager.on&&(this.manager.on(h.PAUSE_ALL,this.pause,this),this.manager.on(h.RESUME_ALL,this.resume,this))},getTotalFrames:function(){return this.frames.length},calculateDuration:function(i,a,l,f){l===null&&f===null?(i.frameRate=24,i.duration=24/a*1e3):l&&f===null?(i.duration=l,i.frameRate=a/(l/1e3)):(i.frameRate=f,i.duration=a/f*1e3),i.msPerFrame=1e3/i.frameRate},addFrame:function(i){return this.addFrameAt(this.frames.length,i)},addFrameAt:function(i,a){var l=this.getFrames(this.manager.textureManager,a);if(l.length>0){if(i===0)this.frames=l.concat(this.frames);else if(i===this.frames.length)this.frames=this.frames.concat(l);else{var f=this.frames.slice(0,i),u=this.frames.slice(i);this.frames=f.concat(l,u)}this.updateFrameSequence()}return this},checkFrame:function(i){return i>=0&&i<this.frames.length},getFirstTick:function(i){i.accumulator=0,i.nextTick=i.frameRate===i.currentAnim.frameRate&&i.currentFrame.duration||i.msPerFrame},getFrameAt:function(i){return this.frames[i]},getFrames:function(i,a,l,f){f===void 0&&(f=!0);var u=[],v,m,x=1,g,y;if(typeof a=="string"){if(y=a,!i.exists(y))return console.warn('Texture "%s" not found',y),u;var T=i.get(y),C=T.getFrameNames();f&&s(C),a=[],C.forEach(function(F){a.push({key:y,frame:F})})}if(!Array.isArray(a)||a.length===0)return u;for(g=0;g<a.length;g++){var E=a[g],M=e(E,"key",l);if(M){var P=e(E,"frame",0),A=i.getFrame(M,P);if(!A){console.warn('Texture "%s" not found',M);continue}m=new n(M,P,x,A),m.duration=e(E,"duration",0),m.isFirst=!v,v&&(v.nextFrame=m,m.prevFrame=v),u.push(m),v=m,x++}}if(u.length>0){m.isLast=!0,m.nextFrame=u[0],u[0].prevFrame=m;var R=1/(u.length-1);for(g=0;g<u.length;g++)u[g].progress=g*R}return u},getNextTick:function(i){i.accumulator-=i.nextTick,i.nextTick=i.frameRate===i.currentAnim.frameRate&&i.currentFrame.duration||i.msPerFrame},getFrameByProgress:function(i){return i=d(i,0,1),r(i,this.frames,"progress")},nextFrame:function(i){var a=i.currentFrame;a.isLast?i.yoyo?this.handleYoyoFrame(i,!1):i.repeatCounter>0?i.inReverse&&i.forward?i.forward=!1:this.repeatAnimation(i):i.complete():this.updateAndGetNextTick(i,a.nextFrame)},handleYoyoFrame:function(i,a){if(a||(a=!1),i.inReverse===!a&&i.repeatCounter>0){(i.repeatDelay===0||i.pendingRepeat)&&(i.forward=a),this.repeatAnimation(i);return}if(i.inReverse!==a&&i.repeatCounter===0){i.complete();return}i.forward=a;var l=a?i.currentFrame.nextFrame:i.currentFrame.prevFrame;this.updateAndGetNextTick(i,l)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(i){var a=i.currentFrame;a.isFirst?i.yoyo?this.handleYoyoFrame(i,!0):i.repeatCounter>0?i.inReverse&&!i.forward?this.repeatAnimation(i):(i.forward=!0,this.repeatAnimation(i)):i.complete():this.updateAndGetNextTick(i,a.prevFrame)},updateAndGetNextTick:function(i,a){i.setCurrentFrame(a),this.getNextTick(i)},removeFrame:function(i){var a=this.frames.indexOf(i);return a!==-1&&this.removeFrameAt(a),this},removeFrameAt:function(i){return this.frames.splice(i,1),this.updateFrameSequence(),this},repeatAnimation:function(i){if(i._pendingStop===2){if(i._pendingStopValue===0)return i.stop();i._pendingStopValue--}i.repeatDelay>0&&!i.pendingRepeat?(i.pendingRepeat=!0,i.accumulator-=i.nextTick,i.nextTick+=i.repeatDelay):(i.repeatCounter--,i.forward?i.setCurrentFrame(i.currentFrame.nextFrame):i.setCurrentFrame(i.currentFrame.prevFrame),i.isPlaying&&(this.getNextTick(i),i.handleRepeat()))},toJSON:function(){var i={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showBeforeDelay:this.showBeforeDelay,showOnStart:this.showOnStart,randomFrame:this.randomFrame,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(a){i.frames.push(a.toJSON())}),i},updateFrameSequence:function(){for(var i=this.frames.length,a=1/(i-1),l,f=0;f<i;f++)l=this.frames[f],l.index=f+1,l.isFirst=!1,l.isLast=!1,l.progress=f*a,f===0?(l.isFirst=!0,i===1?(l.isLast=!0,l.nextFrame=l,l.prevFrame=l):(l.isLast=!1,l.prevFrame=this.frames[i-1],l.nextFrame=this.frames[f+1])):f===i-1&&i>1?(l.isLast=!0,l.prevFrame=this.frames[i-2],l.nextFrame=this.frames[0]):i>1&&(l.prevFrame=this.frames[f-1],l.nextFrame=this.frames[f+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(h.PAUSE_ALL,this.pause,this),this.manager.off(h.RESUME_ALL,this.resume,this)),this.manager.remove(this.key);for(var i=0;i<this.frames.length;i++)this.frames[i].destroy();this.frames=[],this.manager=null}});p.exports=o}),41138:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r,n,e,s,o){o===void 0&&(o=!1),this.textureKey=r,this.textureFrame=n,this.index=e,this.frame=s,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0,this.isKeyFrame=o},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}});p.exports=c}),60848:((p,S,t)=>{var d=t(42099),c=t(83419),h=t(90330),r=t(50792),n=t(74943),e=t(8443),s=t(95540),o=t(35154),i=t(36383),a=t(20283),l=t(41836),f=new c({Extends:r,initialize:function(v){r.call(this),this.game=v,this.textureManager=null,this.globalTimeScale=1,this.anims=new h,this.mixes=new h,this.paused=!1,this.name="AnimationManager",v.events.once(e.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(e.DESTROY,this.destroy,this)},addMix:function(u,v,m){var x=this.anims,g=this.mixes,y=typeof u=="string"?u:u.key,T=typeof v=="string"?v:v.key;if(x.has(y)&&x.has(T)){var C=g.get(y);C||(C={}),C[T]=m,g.set(y,C)}return this},removeMix:function(u,v){var m=this.mixes,x=typeof u=="string"?u:u.key,g=m.get(x);if(g)if(v){var y=typeof v=="string"?v:v.key;g.hasOwnProperty(y)&&delete g[y]}else v||m.delete(x);return this},getMix:function(u,v){var m=this.mixes,x=typeof u=="string"?u:u.key,g=typeof v=="string"?v:v.key,y=m.get(x);return y&&y.hasOwnProperty(g)?y[g]:0},add:function(u,v){return this.anims.has(u)?(console.warn("Animation key exists: "+u),this):(v.key=u,this.anims.set(u,v),this.emit(n.ADD_ANIMATION,u,v),this)},exists:function(u){return this.anims.has(u)},createFromAseprite:function(u,v,m){var x=[],g=this.game.cache.json.get(u);if(!g)return console.warn("No Aseprite data found for: "+u),x;var y=this,T=o(g,"meta",null),C=o(g,"frames",null);if(T&&C){var E=o(T,"frameTags",[]);E.forEach(function(M){var P=[],A=s(M,"name",null),R=s(M,"from",0),F=s(M,"to",0),w=s(M,"direction","forward");if(A&&(!v||v&&v.indexOf(A)>-1)){for(var I=0,U=R;U<=F;U++){var N=U.toString(),D=C[N];if(D){var B=s(D,"duration",i.MAX_SAFE_INTEGER);P.push({key:u,frame:N,duration:B}),I+=B}}w==="reverse"&&(P=P.reverse());var L={key:A,frames:P,duration:I,yoyo:w==="pingpong"},G;m?m.anims&&(G=m.anims.create(L)):G=y.create(L),G&&x.push(G)}})}return x},create:function(u){var v=u.key,m=!1;return v&&(m=this.get(v),m?console.warn("AnimationManager key already exists: "+v):(m=new d(this,v,u),this.anims.set(v,m),this.emit(n.ADD_ANIMATION,v,m))),m},fromJSON:function(u,v){v===void 0&&(v=!1),v&&this.anims.clear(),typeof u=="string"&&(u=JSON.parse(u));var m=[];if(u.hasOwnProperty("anims")&&Array.isArray(u.anims)){for(var x=0;x<u.anims.length;x++)m.push(this.create(u.anims[x]));u.hasOwnProperty("globalTimeScale")&&(this.globalTimeScale=u.globalTimeScale)}else u.hasOwnProperty("key")&&u.type==="frame"&&m.push(this.create(u));return m},generateFrameNames:function(u,v){var m=o(v,"prefix",""),x=o(v,"start",0),g=o(v,"end",0),y=o(v,"suffix",""),T=o(v,"zeroPad",0),C=o(v,"outputArray",[]),E=o(v,"frames",!1);if(!this.textureManager.exists(u))return console.warn('Texture "%s" not found',u),C;var M=this.textureManager.get(u);if(!M)return C;var P;if(v)for(E||(E=a(x,g)),P=0;P<E.length;P++){var A=m+l(E[P],T,"0",1)+y;M.has(A)?C.push({key:u,frame:A}):console.warn('Frame "%s" not found in texture "%s"',A,u)}else for(E=M.getFrameNames(),P=0;P<E.length;P++)C.push({key:u,frame:E[P]});return C},generateFrameNumbers:function(u,v){var m=o(v,"start",0),x=o(v,"end",-1),g=o(v,"first",!1),y=o(v,"outputArray",[]),T=o(v,"frames",!1);if(!this.textureManager.exists(u))return console.warn('Texture "%s" not found',u),y;var C=this.textureManager.get(u);if(!C)return y;g&&C.has(g)&&y.push({key:u,frame:g}),T||(x===-1&&(x=C.frameTotal-2),T=a(m,x));for(var E=0;E<T.length;E++){var M=T[E];C.has(M)?y.push({key:u,frame:M}):console.warn('Frame "%s" not found in texture "%s"',M,u)}return y},get:function(u){return this.anims.get(u)},getAnimsFromTexture:function(u){for(var v=this.textureManager.get(u),m=v.key,x=this.anims.getArray(),g=[],y=0;y<x.length;y++)for(var T=x[y],C=T.frames,E=0;E<C.length;E++)if(C[E].textureKey===m){g.push(T.key);break}return g},pauseAll:function(){return this.paused||(this.paused=!0,this.emit(n.PAUSE_ALL)),this},play:function(u,v){Array.isArray(v)||(v=[v]);for(var m=0;m<v.length;m++)v[m].anims.play(u);return this},staggerPlay:function(u,v,m,x){m===void 0&&(m=0),x===void 0&&(x=!0),Array.isArray(v)||(v=[v]);var g=v.length;x||g--;for(var y=0;y<v.length;y++){var T=m<0?Math.abs(m)*(g-y):m*y;v[y].anims.playAfterDelay(u,T)}return this},remove:function(u){var v=this.get(u);return v&&(this.emit(n.REMOVE_ANIMATION,u,v),this.anims.delete(u),this.removeMix(u)),v},resumeAll:function(){return this.paused&&(this.paused=!1,this.emit(n.RESUME_ALL)),this},toJSON:function(u){var v={anims:[],globalTimeScale:this.globalTimeScale};return u!==void 0&&u!==""?v.anims.push(this.anims.get(u).toJSON()):this.anims.each(function(m,x){v.anims.push(x.toJSON())}),v},destroy:function(){this.anims.clear(),this.mixes.clear(),this.textureManager=null,this.game=null}});p.exports=f}),9674:((p,S,t)=>{var d=t(42099),c=t(30976),h=t(83419),r=t(90330),n=t(74943),e=t(95540),s=new h({initialize:function(i){this.parent=i,this.animationManager=i.scene.sys.anims,this.animationManager.on(n.REMOVE_ANIMATION,this.globalRemove,this),this.textureManager=this.animationManager.textureManager,this.anims=null,this.isPlaying=!1,this.hasStarted=!1,this.currentAnim=null,this.currentFrame=null,this.nextAnim=null,this.nextAnimsQueue=[],this.timeScale=1,this.frameRate=0,this.duration=0,this.msPerFrame=0,this.skipMissedFrames=!0,this.randomFrame=!1,this.delay=0,this.repeat=0,this.repeatDelay=0,this.yoyo=!1,this.showBeforeDelay=!1,this.showOnStart=!1,this.hideOnComplete=!1,this.forward=!0,this.inReverse=!1,this.accumulator=0,this.nextTick=0,this.delayCounter=0,this.repeatCounter=0,this.pendingRepeat=!1,this._paused=!1,this._wasPlaying=!1,this._pendingStop=0,this._pendingStopValue},chain:function(o){var i=this.parent;if(o===void 0)return this.nextAnimsQueue.length=0,this.nextAnim=null,i;Array.isArray(o)||(o=[o]);for(var a=0;a<o.length;a++){var l=o[a];this.nextAnim?this.nextAnimsQueue.push(l):this.nextAnim=l}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();var i=this.animationManager,a=typeof o=="string"?o:e(o,"key",null),l=this.exists(a)?this.get(a):i.get(a);if(!l)console.warn("Missing animation: "+a);else{this.currentAnim=l;var f=l.getTotalFrames(),u=e(o,"frameRate",l.frameRate),v=e(o,"duration",l.duration);l.calculateDuration(this,f,v,u),this.delay=e(o,"delay",l.delay),this.repeat=e(o,"repeat",l.repeat),this.repeatDelay=e(o,"repeatDelay",l.repeatDelay),this.yoyo=e(o,"yoyo",l.yoyo),this.showBeforeDelay=e(o,"showBeforeDelay",l.showBeforeDelay),this.showOnStart=e(o,"showOnStart",l.showOnStart),this.hideOnComplete=e(o,"hideOnComplete",l.hideOnComplete),this.skipMissedFrames=e(o,"skipMissedFrames",l.skipMissedFrames),this.randomFrame=e(o,"randomFrame",l.randomFrame),this.timeScale=e(o,"timeScale",this.timeScale);var m=e(o,"startFrame",0);m>f&&(m=0),this.randomFrame&&(m=c(0,f-1));var x=l.frames[m];m===0&&!this.forward&&(x=l.getLastFrame()),this.currentFrame=x}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,i){if(!this.isPlaying)this.delayCounter=i,this.play(o,!0);else{var a=this.nextAnim,l=this.nextAnimsQueue;a&&l.unshift(a),this.nextAnim=o,this._pendingStop=1,this._pendingStopValue=i}return this.parent},playAfterRepeat:function(o,i){if(i===void 0&&(i=1),!this.isPlaying)this.play(o);else{var a=this.nextAnim,l=this.nextAnimsQueue;a&&l.unshift(a),this.repeatCounter!==-1&&i>this.repeatCounter&&(i=this.repeatCounter),this.nextAnim=o,this._pendingStop=2,this._pendingStopValue=i}return this.parent},play:function(o,i){i===void 0&&(i=!1);var a=this.currentAnim,l=this.parent,f=typeof o=="string"?o:o.key;if(i&&this.isPlaying&&a.key===f)return l;if(a&&this.isPlaying){var u=this.animationManager.getMix(a.key,o);if(u>0)return this.playAfterDelay(o,u)}return this.forward=!0,this.inReverse=!1,this._paused=!1,this._wasPlaying=!0,this.startAnimation(o)},playReverse:function(o,i){i===void 0&&(i=!1);var a=typeof o=="string"?o:o.key;return i&&this.isPlaying&&this.currentAnim.key===a?this.parent:(this.forward=!1,this.inReverse=!0,this._paused=!1,this._wasPlaying=!0,this.startAnimation(o))},startAnimation:function(o){this.load(o);var i=this.currentAnim,a=this.parent;return i&&(this.repeatCounter=this.repeat===-1?Number.MAX_VALUE:this.repeat,i.getFirstTick(this),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!1,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.delayCounter+=this.delay,this.delayCounter===0?this.handleStart():this.showBeforeDelay&&this.setCurrentFrame(this.currentFrame)),a},handleStart:function(){this.showOnStart&&this.parent.setVisible(!0),this.setCurrentFrame(this.currentFrame),this.hasStarted=!0,this.emitEvents(n.ANIMATION_START)},handleRepeat:function(){this.pendingRepeat=!1,this.emitEvents(n.ANIMATION_REPEAT)},handleStop:function(){this._pendingStop=0,this.isPlaying=!1,this.emitEvents(n.ANIMATION_STOP)},handleComplete:function(){this._pendingStop=0,this.isPlaying=!1,this.hideOnComplete&&this.parent.setVisible(!1),this.emitEvents(n.ANIMATION_COMPLETE,n.ANIMATION_COMPLETE_KEY)},emitEvents:function(o,i){var a=this.currentAnim;if(a){var l=this.currentFrame,f=this.parent,u=l.textureFrame;f.emit(o,a,l,f,u),i&&f.emit(i+a.key,a,l,f,u)}},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 i=o.progress;return this.inReverse&&(i*=-1),i},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,i){i===void 0&&(i=this.currentAnim),this.isPlaying&&i.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},restart:function(o,i){o===void 0&&(o=!1),i===void 0&&(i=!1);var a=this.currentAnim,l=this.parent;return a?(i&&(this.repeatCounter=this.repeat===-1?Number.MAX_VALUE:this.repeat),a.getFirstTick(this),this.emitEvents(n.ANIMATION_RESTART),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!o,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.setCurrentFrame(a.frames[0]),this.parent):l},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,i){var a=this.currentAnim;if(!(!this.isPlaying||!a||a.paused)){if(this.accumulator+=i*this.timeScale*this.animationManager.globalTimeScale,this._pendingStop===1&&(this._pendingStopValue-=i,this._pendingStopValue<=0))return this.stop();if(!this.hasStarted)this.accumulator>=this.delayCounter&&(this.accumulator-=this.delayCounter,this.handleStart());else if(this.accumulator>=this.nextTick&&(this.forward?a.nextFrame(this):a.previousFrame(this),this.isPlaying&&this._pendingStop===0&&this.skipMissedFrames&&this.accumulator>this.nextTick)){var l=0;do this.forward?a.nextFrame(this):a.previousFrame(this),l++;while(this.isPlaying&&this.accumulator>this.nextTick&&l<60)}}},setCurrentFrame:function(o){var i=this.parent;return this.currentFrame=o,i.texture=o.frame.texture,i.frame=o.frame,i.isCropped&&i.frame.updateCropUVs(i._crop,i.flipX,i.flipY),o.setAlpha&&(i.alpha=o.alpha),i.setSizeToFrame(),i._originComponent&&(o.frame.customPivot?i.setOrigin(o.frame.pivotX,o.frame.pivotY):i.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(n.ANIMATION_UPDATE),this._pendingStop===3&&this._pendingStopValue===o&&this.stop()),i},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},get:function(o){return this.anims?this.anims.get(o):null},exists:function(o){return this.anims?this.anims.has(o):!1},create:function(o){var i=o.key,a=!1;return i&&(a=this.get(i),a?console.warn("Animation key already exists: "+i):(a=new d(this,i,o),this.anims||(this.anims=new r),this.anims.set(i,a))),a},createFromAseprite:function(o,i){return this.animationManager.createFromAseprite(o,i,this.parent)},generateFrameNames:function(o,i){return this.animationManager.generateFrameNames(o,i)},generateFrameNumbers:function(o,i){return this.animationManager.generateFrameNumbers(o,i)},remove:function(o){var i=this.get(o);return i&&(this.currentAnim===i&&this.stop(),this.anims.delete(o)),i},destroy:function(){this.animationManager.off(n.REMOVE_ANIMATION,this.globalRemove,this),this.anims&&this.anims.clear(),this.animationManager=null,this.parent=null,this.nextAnim=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null},isPaused:{get:function(){return this._paused}}});p.exports=s}),57090:(p=>{p.exports="add"}),25312:(p=>{p.exports="animationcomplete"}),89580:(p=>{p.exports="animationcomplete-"}),52860:(p=>{p.exports="animationrepeat"}),63850:(p=>{p.exports="animationrestart"}),99085:(p=>{p.exports="animationstart"}),28087:(p=>{p.exports="animationstop"}),1794:(p=>{p.exports="animationupdate"}),52562:(p=>{p.exports="pauseall"}),57953:(p=>{p.exports="remove"}),68339:(p=>{p.exports="resumeall"}),74943:((p,S,t)=>{p.exports={ADD_ANIMATION:t(57090),ANIMATION_COMPLETE:t(25312),ANIMATION_COMPLETE_KEY:t(89580),ANIMATION_REPEAT:t(52860),ANIMATION_RESTART:t(63850),ANIMATION_START:t(99085),ANIMATION_STOP:t(28087),ANIMATION_UPDATE:t(1794),PAUSE_ALL:t(52562),REMOVE_ANIMATION:t(57953),RESUME_ALL:t(68339)}}),60421:((p,S,t)=>{p.exports={Animation:t(42099),AnimationFrame:t(41138),AnimationManager:t(60848),AnimationState:t(9674),Events:t(74943)}}),2161:((p,S,t)=>{var d=t(83419),c=t(90330),h=t(50792),r=t(24736),n=new d({initialize:function(){this.entries=new c,this.events=new h},add:function(e,s){return this.entries.set(e,s),this.events.emit(r.ADD,this,e,s),this},has:function(e){return this.entries.has(e)},exists:function(e){return this.entries.has(e)},get:function(e){return this.entries.get(e)},remove:function(e){var s=this.get(e);return s&&(this.entries.delete(e),this.events.emit(r.REMOVE,this,e,s.data)),this},getKeys:function(){return this.entries.keys()},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});p.exports=n}),24047:((p,S,t)=>{var d=t(2161),c=t(83419),h=t(8443),r=new c({initialize:function(e){this.game=e,this.binary=new d,this.bitmapFont=new d,this.json=new d,this.physics=new d,this.shader=new d,this.audio=new d,this.video=new d,this.text=new d,this.html=new d,this.obj=new d,this.tilemap=new d,this.xml=new d,this.custom={},this.game.events.once(h.DESTROY,this.destroy,this)},addCustom:function(n){return this.custom.hasOwnProperty(n)||(this.custom[n]=new d),this.custom[n]},destroy:function(){for(var n=["binary","bitmapFont","json","physics","shader","audio","video","text","html","obj","tilemap","xml"],e=0;e<n.length;e++)this[n[e]].destroy(),this[n[e]]=null;for(var s in this.custom)this.custom[s].destroy();this.custom=null,this.game=null}});p.exports=r}),51464:(p=>{p.exports="add"}),59261:(p=>{p.exports="remove"}),24736:((p,S,t)=>{p.exports={ADD:t(51464),REMOVE:t(59261)}}),83388:((p,S,t)=>{p.exports={BaseCache:t(2161),CacheManager:t(24047),Events:t(24736)}}),71911:((p,S,t)=>{var d=t(83419),c=t(31401),h=t(39506),r=t(50792),n=t(19715),e=t(87841),s=t(61340),o=t(80333),i=t(26099),a=new d({Extends:r,Mixins:[c.AlphaSingle,c.Visible],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=0),r.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.roundPixels=!1,this.useBounds=!1,this.worldView=new e,this.dirty=!0,this._x=f,this._y=u,this._width=v,this._height=m,this._bounds=new e,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new s,this.transparent=!0,this.backgroundColor=o("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new i(v/2,m/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[],this.isSceneCamera=!0,this.renderRoundPixels=!0},addToRenderList:function(l){this.renderList.push(l)},setOrigin:function(l,f){return l===void 0&&(l=.5),f===void 0&&(f=l),this.originX=l,this.originY=f,this},getScroll:function(l,f,u){u===void 0&&(u=new i);var v=this.width*.5,m=this.height*.5;return u.x=l-v,u.y=f-m,this.useBounds&&(u.x=this.clampX(u.x),u.y=this.clampY(u.y)),u},centerOnX:function(l){var f=this.width*.5;return this.midPoint.x=l,this.scrollX=l-f,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(l){var f=this.height*.5;return this.midPoint.y=l,this.scrollY=l-f,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(l,f){return this.centerOnX(l),this.centerOnY(f),this},centerToBounds:function(){if(this.useBounds){var l=this._bounds,f=this.width*.5,u=this.height*.5;this.midPoint.set(l.centerX,l.centerY),this.scrollX=l.centerX-f,this.scrollY=l.centerY-u}return this},centerToSize:function(){return this.scrollX=this.width*.5,this.scrollY=this.height*.5,this},cull:function(l){if(this.disableCull)return l;var f=this.matrix.matrix,u=f[0],v=f[1],m=f[2],x=f[3],g=u*x-v*m;if(!g)return l;var y=f[4],T=f[5],C=this.scrollX,E=this.scrollY,M=this.width,P=this.height,A=this.y,R=A+P,F=this.x,w=F+M,I=this.culledObjects,U=l.length;g=1/g,I.length=0;for(var N=0;N<U;++N){var D=l[N];if(!D.hasOwnProperty("width")||D.parentContainer){I.push(D);continue}var B=D.width,L=D.height,G=D.x-C*D.scrollFactorX-B*D.originX,O=D.y-E*D.scrollFactorY-L*D.originY,X=G*u+O*m+y,z=G*v+O*x+T,V=(G+B)*u+(O+L)*m+y,Y=(G+B)*v+(O+L)*x+T;V>F&&X<w&&Y>A&&z<R&&I.push(D)}return I},getWorldPoint:function(l,f,u){u===void 0&&(u=new i);var v=this.matrix.matrix,m=v[0],x=v[1],g=v[2],y=v[3],T=v[4],C=v[5],E=m*y-x*g;if(!E)return u.x=l,u.y=f,u;E=1/E;var M=y*E,P=-x*E,A=-g*E,R=m*E,F=(g*C-y*T)*E,w=(x*T-m*C)*E,I=Math.cos(this.rotation),U=Math.sin(this.rotation),N=this.zoomX,D=this.zoomY,B=this.scrollX,L=this.scrollY,G=l+(B*I-L*U)*N,O=f+(B*U+L*I)*D;return u.x=G*M+O*A+F,u.y=G*P+O*R+w,u},ignore:function(l){var f=this.id;Array.isArray(l)||(l=[l]);for(var u=0;u<l.length;u++){var v=l[u];Array.isArray(v)?this.ignore(v):v.isParent?this.ignore(v.getChildren()):v.cameraFilter|=f}return this},clampX:function(l){var f=this._bounds,u=this.displayWidth,v=f.x+(u-this.width)/2,m=Math.max(v,v+f.width-u);return l<v?l=v:l>m&&(l=m),l},clampY:function(l){var f=this._bounds,u=this.displayHeight,v=f.y+(u-this.height)/2,m=Math.max(v,v+f.height-u);return l<v?l=v:l>m&&(l=m),l},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(l){return l===void 0&&(l=0),this.rotation=h(l),this},setBackgroundColor:function(l){return l===void 0&&(l="rgba(0,0,0,0)"),this.backgroundColor=o(l),this.transparent=this.backgroundColor.alpha===0,this},setBounds:function(l,f,u,v,m){return m===void 0&&(m=!1),this._bounds.setTo(l,f,u,v),this.dirty=!0,this.useBounds=!0,m?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(l){l===void 0&&(l=new e);var f=this._bounds;return l.setTo(f.x,f.y,f.width,f.height),l},setName:function(l){return l===void 0&&(l=""),this.name=l,this},setPosition:function(l,f){return f===void 0&&(f=l),this.x=l,this.y=f,this},setRotation:function(l){return l===void 0&&(l=0),this.rotation=l,this},setRoundPixels:function(l){return this.roundPixels=l,this},setScene:function(l,f){f===void 0&&(f=!0),this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=l,this.isSceneCamera=f;var u=l.sys;return this.sceneManager=u.game.scene,this.scaleManager=u.scale,this.cameraManager=u.cameras,this.updateSystem(),this},setScroll:function(l,f){return f===void 0&&(f=l),this.scrollX=l,this.scrollY=f,this},setSize:function(l,f){return f===void 0&&(f=l),this.width=l,this.height=f,this},setViewport:function(l,f,u,v){return this.x=l,this.y=f,this.width=u,this.height=v,this},setZoom:function(l,f){return l===void 0&&(l=1),f===void 0&&(f=l),l===0&&(l=.001),f===0&&(f=.001),this.zoomX=l,this.zoomY=f,this},setMask:function(l,f){return f===void 0&&(f=!0),this.mask=l,this._maskCamera=f?this.cameraManager.default:this,this},clearMask:function(l){return l===void 0&&(l=!1),l&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var l={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&&(l.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),l},update:function(){},setIsSceneCamera:function(l){return this.isSceneCamera=l,this},updateSystem:function(){if(!(!this.scaleManager||!this.isSceneCamera)){var l=this._x!==0||this._y!==0||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,f=this.sceneManager;l&&!this._customViewport?f.customViewports++:!l&&this._customViewport&&f.customViewports--,this.dirty=!0,this._customViewport=l}},destroy:function(){this.emit(n.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this.renderList=[],this._bounds=null,this.scene=null,this.scaleManager=null,this.sceneManager=null,this.cameraManager=null},x:{get:function(){return this._x},set:function(l){this._x=l,this.updateSystem()}},y:{get:function(){return this._y},set:function(l){this._y=l,this.updateSystem()}},width:{get:function(){return this._width},set:function(l){this._width=l,this.updateSystem()}},height:{get:function(){return this._height},set:function(l){this._height=l,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(l){l!==this._scrollX&&(this._scrollX=l,this.dirty=!0)}},scrollY:{get:function(){return this._scrollY},set:function(l){l!==this._scrollY&&(this._scrollY=l,this.dirty=!0)}},zoom:{get:function(){return(this._zoomX+this._zoomY)/2},set:function(l){this._zoomX=l,this._zoomY=l,this.dirty=!0}},zoomX:{get:function(){return this._zoomX},set:function(l){this._zoomX=l,this.dirty=!0}},zoomY:{get:function(){return this._zoomY},set:function(l){this._zoomY=l,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(l){this._rotation=l,this.dirty=!0}},centerX:{get:function(){return this.x+.5*this.width}},centerY:{get:function(){return this.y+.5*this.height}},displayWidth:{get:function(){return this.width/this.zoomX}},displayHeight:{get:function(){return this.height/this.zoomY}}});p.exports=a}),38058:((p,S,t)=>{var d=t(71911),c=t(67502),h=t(45319),r=t(83419),n=t(31401),e=t(20052),s=t(19715),o=t(28915),i=t(87841),a=t(26099),l=new r({Extends:d,Mixins:[n.PostPipeline],initialize:function(u,v,m,x){d.call(this,u,v,m,x),this.initPostPipeline(),this.inputEnabled=!0,this.fadeEffect=new e.Fade(this),this.flashEffect=new e.Flash(this),this.shakeEffect=new e.Shake(this),this.panEffect=new e.Pan(this),this.rotateToEffect=new e.RotateTo(this),this.zoomEffect=new e.Zoom(this),this.lerp=new a(1,1),this.followOffset=new a,this.deadzone=null,this._follow=null},setDeadzone:function(f,u){if(f===void 0)this.deadzone=null;else{if(this.deadzone?(this.deadzone.width=f,this.deadzone.height=u):this.deadzone=new i(0,0,f,u),this._follow){var v=this.width/2,m=this.height/2,x=this._follow.x-this.followOffset.x,g=this._follow.y-this.followOffset.y;this.midPoint.set(x,g),this.scrollX=x-v,this.scrollY=g-m}c(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},fadeIn:function(f,u,v,m,x,g){return this.fadeEffect.start(!1,f,u,v,m,!0,x,g)},fadeOut:function(f,u,v,m,x,g){return this.fadeEffect.start(!0,f,u,v,m,!0,x,g)},fadeFrom:function(f,u,v,m,x,g,y){return this.fadeEffect.start(!1,f,u,v,m,x,g,y)},fade:function(f,u,v,m,x,g,y){return this.fadeEffect.start(!0,f,u,v,m,x,g,y)},flash:function(f,u,v,m,x,g,y){return this.flashEffect.start(f,u,v,m,x,g,y)},shake:function(f,u,v,m,x){return this.shakeEffect.start(f,u,v,m,x)},pan:function(f,u,v,m,x,g,y){return this.panEffect.start(f,u,v,m,x,g,y)},rotateTo:function(f,u,v,m,x,g,y){return this.rotateToEffect.start(f,u,v,m,x,g,y)},zoomTo:function(f,u,v,m,x,g){return this.zoomEffect.start(f,u,v,m,x,g)},preRender:function(){this.renderList.length=0;var f=this.width,u=this.height,v=f*.5,m=u*.5,x=this.zoomX,g=this.zoomY,y=this.matrix;this.renderRoundPixels=this.roundPixels&&Number.isInteger(x)&&Number.isInteger(g);var T=f*this.originX,C=u*this.originY,E=this._follow,M=this.deadzone,P=this.scrollX,A=this.scrollY;M&&c(M,this.midPoint.x,this.midPoint.y);var R=!1;if(E&&!this.panEffect.isRunning){var F=this.lerp,w=E.x-this.followOffset.x,I=E.y-this.followOffset.y;M?(w<M.x?P=o(P,P-(M.x-w),F.x):w>M.right&&(P=o(P,P+(w-M.right),F.x)),I<M.y?A=o(A,A-(M.y-I),F.y):I>M.bottom&&(A=o(A,A+(I-M.bottom),F.y))):(P=o(P,w-T,F.x),A=o(A,I-C,F.y)),R=!0}this.roundPixels&&(P=Math.floor(P),A=Math.floor(A)),this.useBounds&&(P=this.clampX(P),A=this.clampY(A)),this.scrollX=P,this.scrollY=A;var U=P+v,N=A+m;this.midPoint.set(U,N);var D=Math.floor(f/x+.5),B=Math.floor(u/g+.5),L=Math.floor(U-D/2+.5),G=Math.floor(N-B/2+.5);this.worldView.setTo(L,G,D,B),y.applyITRS(Math.floor(this.x+T+.5),Math.floor(this.y+C+.5),this.rotation,x,g),y.translate(-T,-C),this.shakeEffect.preRender(),R&&this.emit(s.FOLLOW_UPDATE,this,E)},setLerp:function(f,u){return f===void 0&&(f=1),u===void 0&&(u=f),this.lerp.set(f,u),this},setFollowOffset:function(f,u){return f===void 0&&(f=0),u===void 0&&(u=0),this.followOffset.set(f,u),this},startFollow:function(f,u,v,m,x,g){u===void 0&&(u=!1),v===void 0&&(v=1),m===void 0&&(m=v),x===void 0&&(x=0),g===void 0&&(g=x),this._follow=f,this.roundPixels=u,v=h(v,0,1),m=h(m,0,1),this.lerp.set(v,m),this.followOffset.set(x,g);var y=this.width/2,T=this.height/2,C=f.x-x,E=f.y-g;return this.midPoint.set(C,E),this.scrollX=C-y,this.scrollY=E-T,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.rotateToEffect.reset(),this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(f,u){this.visible&&(this.rotateToEffect.update(f,u),this.panEffect.update(f,u),this.zoomEffect.update(f,u),this.shakeEffect.update(f,u),this.flashEffect.update(f,u),this.fadeEffect.update(f,u))},destroy:function(){this.resetFX(),d.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});p.exports=l}),32743:((p,S,t)=>{var d=t(38058),c=t(83419),h=t(95540),r=t(37277),n=t(37303),e=t(97480),s=t(44594),o=new c({initialize:function(a){this.scene=a,this.systems=a.sys,this.roundPixels=a.sys.game.config.roundPixels,this.cameras=[],this.main,this.default,a.sys.events.once(s.BOOT,this.boot,this),a.sys.events.on(s.START,this.start,this)},boot:function(){var i=this.systems;i.settings.cameras?this.fromJSON(i.settings.cameras):this.add(),this.main=this.cameras[0],this.default=new d(0,0,i.scale.width,i.scale.height).setScene(this.scene),i.game.scale.on(e.RESIZE,this.onResize,this),this.systems.events.once(s.DESTROY,this.destroy,this)},start:function(){if(!this.main){var i=this.systems;i.settings.cameras?this.fromJSON(i.settings.cameras):this.add(),this.main=this.cameras[0]}var a=this.systems.events;a.on(s.UPDATE,this.update,this),a.once(s.SHUTDOWN,this.shutdown,this)},add:function(i,a,l,f,u,v){i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=this.scene.sys.scale.width),f===void 0&&(f=this.scene.sys.scale.height),u===void 0&&(u=!1),v===void 0&&(v="");var m=new d(i,a,l,f);return m.setName(v),m.setScene(this.scene),m.setRoundPixels(this.roundPixels),m.id=this.getNextID(),this.cameras.push(m),u&&(this.main=m),m},addExisting:function(i,a){a===void 0&&(a=!1);var l=this.cameras.indexOf(i);return l===-1?(i.id=this.getNextID(),i.setRoundPixels(this.roundPixels),this.cameras.push(i),a&&(this.main=i),i):null},getNextID:function(){for(var i=this.cameras,a=1,l=0;l<32;l++){for(var f=!1,u=0;u<i.length;u++){var v=i[u];if(v&&v.id===a){f=!0;continue}}if(f)a=a<<1;else return a}return 0},getTotal:function(i){i===void 0&&(i=!1);for(var a=0,l=this.cameras,f=0;f<l.length;f++){var u=l[f];(!i||i&&u.visible)&&a++}return a},fromJSON:function(i){Array.isArray(i)||(i=[i]);for(var a=this.scene.sys.scale.width,l=this.scene.sys.scale.height,f=0;f<i.length;f++){var u=i[f],v=h(u,"x",0),m=h(u,"y",0),x=h(u,"width",a),g=h(u,"height",l),y=this.add(v,m,x,g);y.name=h(u,"name",""),y.zoom=h(u,"zoom",1),y.rotation=h(u,"rotation",0),y.scrollX=h(u,"scrollX",0),y.scrollY=h(u,"scrollY",0),y.roundPixels=h(u,"roundPixels",!1),y.visible=h(u,"visible",!0);var T=h(u,"backgroundColor",!1);T&&y.setBackgroundColor(T);var C=h(u,"bounds",null);if(C){var E=h(C,"x",0),M=h(C,"y",0),P=h(C,"width",a),A=h(C,"height",l);y.setBounds(E,M,P,A)}}return this},getCamera:function(i){for(var a=this.cameras,l=0;l<a.length;l++)if(a[l].name===i)return a[l];return null},getCamerasBelowPointer:function(i){for(var a=this.cameras,l=i.x,f=i.y,u=[],v=0;v<a.length;v++){var m=a[v];m.visible&&m.inputEnabled&&n(m,l,f)&&u.unshift(m)}return u},remove:function(i,a){a===void 0&&(a=!0),Array.isArray(i)||(i=[i]);for(var l=0,f=this.cameras,u=0;u<i.length;u++){var v=f.indexOf(i[u]);v!==-1&&(a?f[v].destroy():f[v].renderList=[],f.splice(v,1),l++)}return!this.main&&f[0]&&(this.main=f[0]),l},render:function(i,a){for(var l=this.scene,f=this.cameras,u=0;u<f.length;u++){var v=f[u];if(v.visible&&v.alpha>0){v.preRender();var m=this.getVisibleChildren(a.getChildren(),v);i.render(l,m,v)}}},getVisibleChildren:function(i,a){return i.filter(function(l){return l.willRender(a)})},resetAll:function(){for(var i=0;i<this.cameras.length;i++)this.cameras[i].destroy();return this.cameras=[],this.main=this.add(),this.main},update:function(i,a){for(var l=0;l<this.cameras.length;l++)this.cameras[l].update(i,a)},onResize:function(i,a,l,f,u){for(var v=0;v<this.cameras.length;v++){var m=this.cameras[v];m._x===0&&m._y===0&&m._width===f&&m._height===u&&m.setSize(a.width,a.height)}},resize:function(i,a){for(var l=0;l<this.cameras.length;l++)this.cameras[l].setSize(i,a)},shutdown:function(){this.main=void 0;for(var i=0;i<this.cameras.length;i++)this.cameras[i].destroy();this.cameras=[];var a=this.systems.events;a.off(s.UPDATE,this.update,this),a.off(s.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.default.destroy(),this.systems.events.off(s.START,this.start,this),this.systems.events.off(s.DESTROY,this.destroy,this),this.systems.game.scale.off(e.RESIZE,this.onResize,this),this.scene=null,this.systems=null}});r.register("CameraManager",o,"cameras"),p.exports=o}),5020:((p,S,t)=>{var d=t(45319),c=t(83419),h=t(19715),r=new c({initialize:function(e){this.camera=e,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(n,e,s,o,i,a,l,f){if(n===void 0&&(n=!0),e===void 0&&(e=1e3),s===void 0&&(s=0),o===void 0&&(o=0),i===void 0&&(i=0),a===void 0&&(a=!1),l===void 0&&(l=null),f===void 0&&(f=this.camera.scene),!a&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=n,this.progress=0,this.red=s,this.green=o,this.blue=i,this.alpha=n?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=l,this._onUpdateScope=f;var u=n?h.FADE_OUT_START:h.FADE_IN_START;return this.camera.emit(u,this.camera,this,e,s,o,i),this.camera},update:function(n,e){this.isRunning&&(this._elapsed+=e,this.progress=d(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed<this.duration?this.alpha=this.direction?this.progress:1-this.progress:(this.alpha=this.direction?1:0,this.effectComplete()))},postRenderCanvas:function(n){if(!this.isRunning&&!this.isComplete)return!1;var e=this.camera;return n.fillStyle="rgba("+this.red+","+this.green+","+this.blue+","+this.alpha+")",n.fillRect(e.x,e.y,e.width,e.height),!0},postRenderWebGL:function(n,e){if(!this.isRunning&&!this.isComplete)return!1;var s=this.camera,o=this.red/255,i=this.green/255,a=this.blue/255;return n.drawFillRect(s.x,s.y,s.width,s.height,e(a,i,o,1),this.alpha),!0},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.isComplete=!0;var n=this.direction?h.FADE_OUT_COMPLETE:h.FADE_IN_COMPLETE;this.camera.emit(n,this.camera,this)},reset:function(){this.isRunning=!1,this.isComplete=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});p.exports=r}),10662:((p,S,t)=>{var d=t(45319),c=t(83419),h=t(19715),r=new c({initialize:function(e){this.camera=e,this.isRunning=!1,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=1,this.progress=0,this._elapsed=0,this._alpha,this._onUpdate,this._onUpdateScope},start:function(n,e,s,o,i,a,l){return n===void 0&&(n=250),e===void 0&&(e=255),s===void 0&&(s=255),o===void 0&&(o=255),i===void 0&&(i=!1),a===void 0&&(a=null),l===void 0&&(l=this.camera.scene),!i&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=n,this.progress=0,this.red=e,this.green=s,this.blue=o,this._alpha=this.alpha,this._elapsed=0,this._onUpdate=a,this._onUpdateScope=l,this.camera.emit(h.FLASH_START,this.camera,this,n,e,s,o),this.camera)},update:function(n,e){this.isRunning&&(this._elapsed+=e,this.progress=d(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed<this.duration?this.alpha=this._alpha*(1-this.progress):this.effectComplete())},postRenderCanvas:function(n){if(!this.isRunning)return!1;var e=this.camera;return n.fillStyle="rgba("+this.red+","+this.green+","+this.blue+","+this.alpha+")",n.fillRect(e.x,e.y,e.width,e.height),!0},postRenderWebGL:function(n,e){if(!this.isRunning)return!1;var s=this.camera,o=this.red/255,i=this.green/255,a=this.blue/255;return n.drawFillRect(s.x,s.y,s.width,s.height,e(a,i,o,1),this.alpha),!0},effectComplete:function(){this.alpha=this._alpha,this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(h.FLASH_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});p.exports=r}),20359:((p,S,t)=>{var d=t(45319),c=t(83419),h=t(62640),r=t(19715),n=t(26099),e=new c({initialize:function(o){this.camera=o,this.isRunning=!1,this.duration=0,this.source=new n,this.current=new n,this.destination=new n,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(s,o,i,a,l,f,u){i===void 0&&(i=1e3),a===void 0&&(a=h.Linear),l===void 0&&(l=!1),f===void 0&&(f=null),u===void 0&&(u=this.camera.scene);var v=this.camera;return!l&&this.isRunning||(this.isRunning=!0,this.duration=i,this.progress=0,this.source.set(v.scrollX,v.scrollY),this.destination.set(s,o),v.getScroll(s,o,this.current),typeof a=="string"&&h.hasOwnProperty(a)?this.ease=h[a]:typeof a=="function"&&(this.ease=a),this._elapsed=0,this._onUpdate=f,this._onUpdateScope=u,this.camera.emit(r.PAN_START,this.camera,this,i,s,o)),v},update:function(s,o){if(this.isRunning){this._elapsed+=o;var i=d(this._elapsed/this.duration,0,1);this.progress=i;var a=this.camera;if(this._elapsed<this.duration){var l=this.ease(i);a.getScroll(this.destination.x,this.destination.y,this.current);var f=this.source.x+(this.current.x-this.source.x)*l,u=this.source.y+(this.current.y-this.source.y)*l;a.setScroll(f,u),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,a,i,f,u)}else a.centerOn(this.destination.x,this.destination.y),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,a,i,a.scrollX,a.scrollY),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(r.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}});p.exports=e}),34208:((p,S,t)=>{var d=t(45319),c=t(83419),h=t(19715),r=t(62640),n=new c({initialize:function(s){this.camera=s,this.isRunning=!1,this.duration=0,this.source=0,this.current=0,this.destination=0,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope,this.clockwise=!0,this.shortestPath=!1},start:function(e,s,o,i,a,l,f){o===void 0&&(o=1e3),i===void 0&&(i=r.Linear),a===void 0&&(a=!1),l===void 0&&(l=null),f===void 0&&(f=this.camera.scene),s===void 0&&(s=!1),this.shortestPath=s;var u=e;e<0?(u=-1*e,this.clockwise=!1):this.clockwise=!0;var v=360*Math.PI/180;u=u-Math.floor(u/v)*v;var m=this.camera;if(!a&&this.isRunning)return m;if(this.isRunning=!0,this.duration=o,this.progress=0,this.source=m.rotation,this.destination=u,typeof i=="string"&&r.hasOwnProperty(i)?this.ease=r[i]:typeof i=="function"&&(this.ease=i),this._elapsed=0,this._onUpdate=l,this._onUpdateScope=f,this.shortestPath){var x=0,g=0;this.destination>this.source?x=Math.abs(this.destination-this.source):x=Math.abs(this.destination+v)-this.source,this.source>this.destination?g=Math.abs(this.source-this.destination):g=Math.abs(this.source+v)-this.destination,x<g?this.clockwise=!0:x>g&&(this.clockwise=!1)}return this.camera.emit(h.ROTATE_START,this.camera,this,o,u),m},update:function(e,s){if(this.isRunning){this._elapsed+=s;var o=d(this._elapsed/this.duration,0,1);this.progress=o;var i=this.camera;if(this._elapsed<this.duration){var a=this.ease(o);this.current=i.rotation;var l=0,f=360*Math.PI/180,u=this.destination,v=this.current;this.clockwise===!1&&(u=this.current,v=this.destination),u>=v?l=Math.abs(u-v):l=Math.abs(u+f)-v;var m=0;this.clockwise?m=i.rotation+l*a:m=i.rotation-l*a,i.rotation=m,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,i,o,m)}else i.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,i,o,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(h.ROTATE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});p.exports=n}),30330:((p,S,t)=>{var d=t(45319),c=t(83419),h=t(19715),r=t(26099),n=new c({initialize:function(s){this.camera=s,this.isRunning=!1,this.duration=0,this.intensity=new r,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(e,s,o,i,a){return e===void 0&&(e=100),s===void 0&&(s=.05),o===void 0&&(o=!1),i===void 0&&(i=null),a===void 0&&(a=this.camera.scene),!o&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=e,this.progress=0,typeof s=="number"?this.intensity.set(s):this.intensity.set(s.x,s.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=i,this._onUpdateScope=a,this.camera.emit(h.SHAKE_START,this.camera,this,e,s),this.camera)},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(e,s){if(this.isRunning)if(this._elapsed+=s,this.progress=d(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed<this.duration){var o=this.intensity,i=this.camera.width,a=this.camera.height,l=this.camera.zoom;this._offsetX=(Math.random()*o.x*i*2-o.x*i)*l,this._offsetY=(Math.random()*o.y*a*2-o.y*a)*l,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(h.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}});p.exports=n}),45641:((p,S,t)=>{var d=t(45319),c=t(83419),h=t(62640),r=t(19715),n=new c({initialize:function(s){this.camera=s,this.isRunning=!1,this.duration=0,this.source=1,this.destination=1,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(e,s,o,i,a,l){s===void 0&&(s=1e3),o===void 0&&(o=h.Linear),i===void 0&&(i=!1),a===void 0&&(a=null),l===void 0&&(l=this.camera.scene);var f=this.camera;return!i&&this.isRunning||(this.isRunning=!0,this.duration=s,this.progress=0,this.source=f.zoom,this.destination=e,typeof o=="string"&&h.hasOwnProperty(o)?this.ease=h[o]:typeof o=="function"&&(this.ease=o),this._elapsed=0,this._onUpdate=a,this._onUpdateScope=l,this.camera.emit(r.ZOOM_START,this.camera,this,s,e)),f},update:function(e,s){this.isRunning&&(this._elapsed+=s,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(r.ZOOM_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});p.exports=n}),20052:((p,S,t)=>{p.exports={Fade:t(5020),Flash:t(10662),Pan:t(20359),Shake:t(30330),RotateTo:t(34208),Zoom:t(45641)}}),16438:(p=>{p.exports="cameradestroy"}),32726:(p=>{p.exports="camerafadeincomplete"}),87807:(p=>{p.exports="camerafadeinstart"}),45917:(p=>{p.exports="camerafadeoutcomplete"}),95666:(p=>{p.exports="camerafadeoutstart"}),47056:(p=>{p.exports="cameraflashcomplete"}),91261:(p=>{p.exports="cameraflashstart"}),45047:(p=>{p.exports="followupdate"}),81927:(p=>{p.exports="camerapancomplete"}),74264:(p=>{p.exports="camerapanstart"}),54419:(p=>{p.exports="postrender"}),79330:(p=>{p.exports="prerender"}),93183:(p=>{p.exports="camerarotatecomplete"}),80112:(p=>{p.exports="camerarotatestart"}),62252:(p=>{p.exports="camerashakecomplete"}),86017:(p=>{p.exports="camerashakestart"}),539:(p=>{p.exports="camerazoomcomplete"}),51892:(p=>{p.exports="camerazoomstart"}),19715:((p,S,t)=>{p.exports={DESTROY:t(16438),FADE_IN_COMPLETE:t(32726),FADE_IN_START:t(87807),FADE_OUT_COMPLETE:t(45917),FADE_OUT_START:t(95666),FLASH_COMPLETE:t(47056),FLASH_START:t(91261),FOLLOW_UPDATE:t(45047),PAN_COMPLETE:t(81927),PAN_START:t(74264),POST_RENDER:t(54419),PRE_RENDER:t(79330),ROTATE_COMPLETE:t(93183),ROTATE_START:t(80112),SHAKE_COMPLETE:t(62252),SHAKE_START:t(86017),ZOOM_COMPLETE:t(539),ZOOM_START:t(51892)}}),87969:((p,S,t)=>{p.exports={Camera:t(38058),BaseCamera:t(71911),CameraManager:t(32743),Effects:t(20052),Events:t(19715)}}),63091:((p,S,t)=>{var d=t(83419),c=t(35154),h=new d({initialize:function(n){this.camera=c(n,"camera",null),this.left=c(n,"left",null),this.right=c(n,"right",null),this.up=c(n,"up",null),this.down=c(n,"down",null),this.zoomIn=c(n,"zoomIn",null),this.zoomOut=c(n,"zoomOut",null),this.zoomSpeed=c(n,"zoomSpeed",.01),this.minZoom=c(n,"minZoom",.001),this.maxZoom=c(n,"maxZoom",1e3),this.speedX=0,this.speedY=0;var e=c(n,"speed",null);typeof e=="number"?(this.speedX=e,this.speedY=e):(this.speedX=c(n,"speed.x",0),this.speedY=c(n,"speed.y",0)),this._zoom=0,this.active=this.camera!==null},start:function(){return this.active=this.camera!==null,this},stop:function(){return this.active=!1,this},setCamera:function(r){return this.camera=r,this},update:function(r){if(this.active){r===void 0&&(r=1);var n=this.camera;this.up&&this.up.isDown?n.scrollY-=this.speedY*r|0:this.down&&this.down.isDown&&(n.scrollY+=this.speedY*r|0),this.left&&this.left.isDown?n.scrollX-=this.speedX*r|0:this.right&&this.right.isDown&&(n.scrollX+=this.speedX*r|0),this.zoomIn&&this.zoomIn.isDown?(n.zoom-=this.zoomSpeed,n.zoom<this.minZoom&&(n.zoom=this.minZoom)):this.zoomOut&&this.zoomOut.isDown&&(n.zoom+=this.zoomSpeed,n.zoom>this.maxZoom&&(n.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});p.exports=h}),58818:((p,S,t)=>{var d=t(83419),c=t(35154),h=new d({initialize:function(n){this.camera=c(n,"camera",null),this.left=c(n,"left",null),this.right=c(n,"right",null),this.up=c(n,"up",null),this.down=c(n,"down",null),this.zoomIn=c(n,"zoomIn",null),this.zoomOut=c(n,"zoomOut",null),this.zoomSpeed=c(n,"zoomSpeed",.01),this.minZoom=c(n,"minZoom",.001),this.maxZoom=c(n,"maxZoom",1e3),this.accelX=0,this.accelY=0;var e=c(n,"acceleration",null);typeof e=="number"?(this.accelX=e,this.accelY=e):(this.accelX=c(n,"acceleration.x",0),this.accelY=c(n,"acceleration.y",0)),this.dragX=0,this.dragY=0;var s=c(n,"drag",null);typeof s=="number"?(this.dragX=s,this.dragY=s):(this.dragX=c(n,"drag.x",0),this.dragY=c(n,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var o=c(n,"maxSpeed",null);typeof o=="number"?(this.maxSpeedX=o,this.maxSpeedY=o):(this.maxSpeedX=c(n,"maxSpeed.x",0),this.maxSpeedY=c(n,"maxSpeed.y",0)),this._speedX=0,this._speedY=0,this._zoom=0,this.active=this.camera!==null},start:function(){return this.active=this.camera!==null,this},stop:function(){return this.active=!1,this},setCamera:function(r){return this.camera=r,this},update:function(r){if(this.active){r===void 0&&(r=1);var n=this.camera;this._speedX>0?(this._speedX-=this.dragX*r,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*r,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*r,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*r,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,this._speedX!==0&&(n.scrollX-=this._speedX*r|0),this._speedY!==0&&(n.scrollY-=this._speedY*r|0),this._zoom!==0&&(n.zoom+=this._zoom,n.zoom<this.minZoom?n.zoom=this.minZoom:n.zoom>this.maxZoom&&(n.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});p.exports=h}),38865:((p,S,t)=>{p.exports={FixedKeyControl:t(63091),SmoothedKeyControl:t(58818)}}),26638:((p,S,t)=>{p.exports={Controls:t(38865),Scene2D:t(87969)}}),8054:((p,S,t)=>{var d={VERSION:"3.90.0",LOG_VERSION:"v390",BlendModes:t(10312),ScaleModes:t(29795),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};p.exports=d}),69547:((p,S,t)=>{var d=t(83419),c=t(8054),h=t(42363),r=t(82264),n=t(95540),e=t(35154),s=t(41212),o=t(29747),i=t(75508),a=t(36060),l=t(80333),f=new d({initialize:function(v){v===void 0&&(v={});var m=["#ff0000","#ffff00","#00ff00","#00ffff","#000000"],x="#ffffff",g=e(v,"scale",null);this.width=e(g,"width",1024,v),this.height=e(g,"height",768,v),this.zoom=e(g,"zoom",1,v),this.parent=e(g,"parent",void 0,v),this.scaleMode=e(g,g?"mode":"scaleMode",0,v),this.expandParent=e(g,"expandParent",!0,v),this.autoRound=e(g,"autoRound",!1,v),this.autoCenter=e(g,"autoCenter",0,v),this.resizeInterval=e(g,"resizeInterval",500,v),this.fullscreenTarget=e(g,"fullscreenTarget",null,v),this.minWidth=e(g,"min.width",0,v),this.maxWidth=e(g,"max.width",0,v),this.minHeight=e(g,"min.height",0,v),this.maxHeight=e(g,"max.height",0,v),this.snapWidth=e(g,"snap.width",0,v),this.snapHeight=e(g,"snap.height",0,v),this.renderType=e(v,"type",c.AUTO),this.canvas=e(v,"canvas",null),this.context=e(v,"context",null),this.canvasStyle=e(v,"canvasStyle",null),this.customEnvironment=e(v,"customEnvironment",!1),this.sceneConfig=e(v,"scene",null),this.seed=e(v,"seed",[(Date.now()*Math.random()).toString()]),i.RND=new i.RandomDataGenerator(this.seed),this.gameTitle=e(v,"title",""),this.gameURL=e(v,"url","https://phaser.io/"+c.LOG_VERSION),this.gameVersion=e(v,"version",""),this.autoFocus=e(v,"autoFocus",!0),this.stableSort=e(v,"stableSort",-1),this.stableSort===-1&&(this.stableSort=r.browser.es2019?1:0),r.features.stableSort=this.stableSort,this.domCreateContainer=e(v,"dom.createContainer",!1),this.domPointerEvents=e(v,"dom.pointerEvents","none"),this.inputKeyboard=e(v,"input.keyboard",!0),this.inputKeyboardEventTarget=e(v,"input.keyboard.target",window),this.inputKeyboardCapture=e(v,"input.keyboard.capture",[]),this.inputMouse=e(v,"input.mouse",!0),this.inputMouseEventTarget=e(v,"input.mouse.target",null),this.inputMousePreventDefaultDown=e(v,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=e(v,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=e(v,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=e(v,"input.mouse.preventDefaultWheel",!0),this.inputTouch=e(v,"input.touch",r.input.touch),this.inputTouchEventTarget=e(v,"input.touch.target",null),this.inputTouchCapture=e(v,"input.touch.capture",!0),this.inputActivePointers=e(v,"input.activePointers",1),this.inputSmoothFactor=e(v,"input.smoothFactor",0),this.inputWindowEvents=e(v,"input.windowEvents",!0),this.inputGamepad=e(v,"input.gamepad",!1),this.inputGamepadEventTarget=e(v,"input.gamepad.target",window),this.disableContextMenu=e(v,"disableContextMenu",!1),this.audio=e(v,"audio",{}),this.hideBanner=e(v,"banner",null)===!1,this.hidePhaser=e(v,"banner.hidePhaser",!1),this.bannerTextColor=e(v,"banner.text",x),this.bannerBackgroundColor=e(v,"banner.background",m),this.gameTitle===""&&this.hidePhaser&&(this.hideBanner=!0),this.fps=e(v,"fps",null),this.disablePreFX=e(v,"disablePreFX",!1),this.disablePostFX=e(v,"disablePostFX",!1);var y=e(v,"render",null);this.pipeline=e(y,"pipeline",null,v),this.autoMobilePipeline=e(y,"autoMobilePipeline",!0,v),this.defaultPipeline=e(y,"defaultPipeline",a.MULTI_PIPELINE,v),this.antialias=e(y,"antialias",!0,v),this.antialiasGL=e(y,"antialiasGL",!0,v),this.mipmapFilter=e(y,"mipmapFilter","",v),this.desynchronized=e(y,"desynchronized",!1,v),this.roundPixels=e(y,"roundPixels",!1,v),this.pixelArt=e(y,"pixelArt",this.zoom!==1,v),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.transparent=e(y,"transparent",!1,v),this.clearBeforeRender=e(y,"clearBeforeRender",!0,v),this.preserveDrawingBuffer=e(y,"preserveDrawingBuffer",!1,v),this.premultipliedAlpha=e(y,"premultipliedAlpha",!0,v),this.failIfMajorPerformanceCaveat=e(y,"failIfMajorPerformanceCaveat",!1,v),this.powerPreference=e(y,"powerPreference","default",v),this.batchSize=e(y,"batchSize",4096,v),this.maxTextures=e(y,"maxTextures",-1,v),this.maxLights=e(y,"maxLights",10,v);var T=e(v,"backgroundColor",0);this.backgroundColor=l(T),this.transparent&&(this.backgroundColor=l(0),this.backgroundColor.alpha=0),this.preBoot=e(v,"callbacks.preBoot",o),this.postBoot=e(v,"callbacks.postBoot",o),this.physics=e(v,"physics",{}),this.defaultPhysicsSystem=e(this.physics,"default",!1),this.loaderBaseURL=e(v,"loader.baseURL",""),this.loaderPath=e(v,"loader.path",""),this.loaderMaxParallelDownloads=e(v,"loader.maxParallelDownloads",r.os.android?6:32),this.loaderCrossOrigin=e(v,"loader.crossOrigin",void 0),this.loaderResponseType=e(v,"loader.responseType",""),this.loaderAsync=e(v,"loader.async",!0),this.loaderUser=e(v,"loader.user",""),this.loaderPassword=e(v,"loader.password",""),this.loaderTimeout=e(v,"loader.timeout",0),this.loaderMaxRetries=e(v,"loader.maxRetries",2),this.loaderWithCredentials=e(v,"loader.withCredentials",!1),this.loaderImageLoadType=e(v,"loader.imageLoadType","XHR"),this.loaderLocalScheme=e(v,"loader.localScheme",["file://","capacitor://"]),this.glowFXQuality=e(v,"fx.glow.quality",.1),this.glowFXDistance=e(v,"fx.glow.distance",10),this.installGlobalPlugins=[],this.installScenePlugins=[];var C=e(v,"plugins",null),E=h.DefaultScene;C&&(Array.isArray(C)?this.defaultPlugins=C:s(C)&&(this.installGlobalPlugins=n(C,"global",[]),this.installScenePlugins=n(C,"scene",[]),Array.isArray(C.default)?E=C.default:Array.isArray(C.defaultMerge)&&(E=E.concat(C.defaultMerge)))),this.defaultPlugins=E;var M="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=e(v,"images.default",M+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=e(v,"images.missing",M+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=e(v,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=c.WEBGL:window.FORCE_CANVAS&&(this.renderType=c.CANVAS))}});p.exports=f}),86054:((p,S,t)=>{var d=t(20623),c=t(27919),h=t(8054),r=t(89357),n=function(e){var s=e.config;if((s.customEnvironment||s.canvas)&&s.renderType===h.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!s.customEnvironment&&!s.canvas&&s.renderType!==h.HEADLESS)if(s.renderType===h.AUTO&&(s.renderType=r.webGL?h.WEBGL:h.CANVAS),s.renderType===h.WEBGL){if(!r.webGL)throw new Error("Cannot create WebGL context, aborting.")}else if(s.renderType===h.CANVAS){if(!r.canvas)throw new Error("Cannot create Canvas context, aborting.")}else throw new Error("Unknown value for renderer type: "+s.renderType);s.antialias||c.disableSmoothing();var o=e.scale.baseSize,i=o.width,a=o.height;if(s.canvas?(e.canvas=s.canvas,e.canvas.width=i,e.canvas.height=a):e.canvas=c.create(e,i,a,s.renderType),s.canvasStyle&&(e.canvas.style=s.canvasStyle),s.antialias||d.setCrisp(e.canvas),s.renderType!==h.HEADLESS){var l,f;l=t(68627),f=t(74797),s.renderType===h.WEBGL?e.renderer=new f(e):(e.renderer=new l(e),e.context=e.renderer.gameContext)}};p.exports=n}),96391:((p,S,t)=>{var d=t(8054),c=function(h){var r=h.config;if(!r.hideBanner){var n="WebGL";r.renderType===d.CANVAS?n="Canvas":r.renderType===d.HEADLESS&&(n="Headless");var e=r.audio,s=h.device.audio,o;if(s.webAudio&&!e.disableWebAudio?o="Web Audio":e.noAudio||!s.webAudio&&!s.audioData?o="No Audio":o="HTML5 Audio",h.device.browser.ie)window.console&&console.log("Phaser v"+d.VERSION+" / https://phaser.io");else{var i="",a=[i];if(Array.isArray(r.bannerBackgroundColor)){var l;r.bannerBackgroundColor.forEach(function(u){i=i.concat("%c "),a.push("background: "+u),l=u}),a[a.length-1]="color: "+r.bannerTextColor+"; background: "+l}else i=i.concat("%c "),a.push("color: "+r.bannerTextColor+"; background: "+r.bannerBackgroundColor);a.push("background: transparent"),r.gameTitle&&(i=i.concat(r.gameTitle),r.gameVersion&&(i=i.concat(" v"+r.gameVersion)),r.hidePhaser||(i=i.concat(" / ")));var f="";r.hidePhaser||(i=i.concat("Phaser v"+d.VERSION+f+" ("+n+" | "+o+")")),i=i.concat(" %c "+r.gameURL),a[0]=i,console.log.apply(console,a)}}};p.exports=c}),50127:((p,S,t)=>{var d=t(40366),c=t(60848),h=t(24047),r=t(27919),n=t(83419),e=t(69547),s=t(83719),o=t(86054),i=t(45893),a=t(96391),l=t(82264),f=t(57264),u=t(50792),v=t(8443),m=t(7003),x=t(37277),g=t(77332),y=t(76531),T=t(60903),C=t(69442),E=t(17130),M=t(65898),P=t(51085),A=t(14747),R=new n({initialize:function(w){this.config=new e(w),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new u,this.anims=new c(this),this.textures=new E(this),this.cache=new h(this),this.registry=new i(this,new u),this.input=new m(this,this.config),this.scene=new T(this,this.config.sceneConfig),this.device=l,this.scale=new y(this,this.config),this.sound=null,this.sound=A.create(this),this.loop=new M(this,this.config.fps),this.plugins=new g(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,this.isPaused=!1,f(this.boot.bind(this))},boot:function(){if(!x.hasCore("EventEmitter")){console.warn("Aborting. Core Plugins missing.");return}this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),o(this),s(this),a(this),d(this.canvas,this.config.parent),this.textures.once(C.READY,this.texturesReady,this),this.events.emit(v.BOOT)},texturesReady:function(){this.events.emit(v.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.renderer?this.loop.start(this.step.bind(this)):this.loop.start(this.headlessStep.bind(this)),P(this);var F=this.events;F.on(v.HIDDEN,this.onHidden,this),F.on(v.VISIBLE,this.onVisible,this),F.on(v.BLUR,this.onBlur,this),F.on(v.FOCUS,this.onFocus,this)},step:function(F,w){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var I=this.events;I.emit(v.PRE_STEP,F,w),I.emit(v.STEP,F,w),this.scene.update(F,w),I.emit(v.POST_STEP,F,w);var U=this.renderer;U.preRender(),I.emit(v.PRE_RENDER,U,F,w),this.scene.render(U),U.postRender(),I.emit(v.POST_RENDER,U,F,w)}},headlessStep:function(F,w){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var I=this.events;I.emit(v.PRE_STEP,F,w),I.emit(v.STEP,F,w),this.scene.update(F,w),I.emit(v.POST_STEP,F,w),this.scene.isProcessing=!1,I.emit(v.PRE_RENDER,null,F,w),I.emit(v.POST_RENDER,null,F,w)}},onHidden:function(){this.loop.pause(),this.events.emit(v.PAUSE)},pause:function(){var F=this.isPaused;this.isPaused=!0,F||this.events.emit(v.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(v.RESUME,this.loop.pauseDuration)},resume:function(){var F=this.isPaused;this.isPaused=!1,F&&this.events.emit(v.RESUME,0)},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(F,w){w===void 0&&(w=!1),this.pendingDestroy=!0,this.removeCanvas=F,this.noReturn=w},runDestroy:function(){this.scene.destroy(),this.events.emit(v.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(r.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});p.exports=R}),65898:((p,S,t)=>{var d=t(83419),c=t(35154),h=t(29747),r=t(43092),n=new d({initialize:function(s,o){this.game=s,this.raf=new r,this.started=!1,this.running=!1,this.minFps=c(o,"min",5),this.targetFps=c(o,"target",60),this.fpsLimit=c(o,"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=h,this.forceSetTimeOut=c(o,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this.pauseDuration=0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=c(o,"deltaHistory",10),this.panicMax=c(o,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=c(o,"smoothStep",!0)},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.pauseDuration=this.time-this._pauseTime,this.startTime+=this.pauseDuration},resetDelta:function(){var e=window.performance.now();this.time=e,this.lastTime=e,this.nextFpsUpdate=e+1e3,this.framesThisSecond=0;for(var s=0;s<this.deltaSmoothingMax;s++)this.deltaHistory[s]=Math.min(this._target,this.deltaHistory[s]);this.delta=0,this.deltaIndex=0,this._coolDown=this.panicMax},start:function(e){if(this.started)return this;this.started=!0,this.running=!0;for(var s=0;s<this.deltaSmoothingMax;s++)this.deltaHistory[s]=this._target;this.resetDelta(),this.startTime=window.performance.now(),this.callback=e;var o=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(o,this.forceSetTimeOut,this._target)},smoothDelta:function(e){var s=this.deltaIndex,o=this.deltaHistory,i=this.deltaSmoothingMax;(this._coolDown>0||!this.inFocus)&&(this._coolDown--,e=Math.min(e,this._target)),e>this._min&&(e=o[s],e=Math.min(e,this._min)),o[s]=e,this.deltaIndex++,this.deltaIndex>=i&&(this.deltaIndex=0);for(var a=0,l=0;l<i;l++)a+=o[l];return a/=i,a},updateFPS:function(e){this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=e+1e3,this.framesThisSecond=0},stepLimitFPS:function(e){this.now=e;var s=Math.max(0,e-this.lastTime);this.rawDelta=s,this.time+=this.rawDelta,this.smoothStep&&(s=this.smoothDelta(s)),this.delta+=s,e>=this.nextFpsUpdate&&this.updateFPS(e),this.framesThisSecond++,this.delta>=this._limitRate&&(this.callback(e,this.delta),this.delta=0),this.lastTime=e,this.frame++},step:function(e){this.now=e;var s=Math.max(0,e-this.lastTime);this.rawDelta=s,this.time+=this.rawDelta,this.smoothStep&&(s=this.smoothDelta(s)),this.delta=s,e>=this.nextFpsUpdate&&this.updateFPS(e),this.framesThisSecond++,this.callback(e,s),this.lastTime=e,this.frame++},tick:function(){var e=window.performance.now();this.hasFpsLimit?this.stepLimitFPS(e):this.step(e)},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(e){e===void 0&&(e=!1);var s=window.performance.now();if(!this.running){e&&(this.startTime+=-this.lastTime+(this.lastTime+s));var o=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(o,this.forceSetTimeOut,this._target),this.running=!0,this.nextFpsUpdate=s+1e3,this.framesThisSecond=0,this.fpsLimitTriggered=!1,this.tick()}},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.raf.destroy(),this.raf=null,this.game=null,this.callback=null}});p.exports=n}),51085:((p,S,t)=>{var d=t(8443),c=function(h){var r,n=h.events;if(document.hidden!==void 0)r="visibilitychange";else{var e=["webkit","moz","ms"];e.forEach(function(o){document[o+"Hidden"]!==void 0&&(document.hidden=function(){return document[o+"Hidden"]},r=o+"visibilitychange")})}var s=function(o){document.hidden||o.type==="pause"?n.emit(d.HIDDEN):n.emit(d.VISIBLE)};r&&document.addEventListener(r,s,!1),window.onblur=function(){n.emit(d.BLUR)},window.onfocus=function(){n.emit(d.FOCUS)},window.focus&&h.config.autoFocus&&window.focus()};p.exports=c}),97217:(p=>{p.exports="blur"}),47548:(p=>{p.exports="boot"}),19814:(p=>{p.exports="contextlost"}),68446:(p=>{p.exports="destroy"}),41700:(p=>{p.exports="focus"}),25432:(p=>{p.exports="hidden"}),65942:(p=>{p.exports="pause"}),59211:(p=>{p.exports="postrender"}),47789:(p=>{p.exports="poststep"}),39066:(p=>{p.exports="prerender"}),460:(p=>{p.exports="prestep"}),16175:(p=>{p.exports="ready"}),42331:(p=>{p.exports="resume"}),11966:(p=>{p.exports="step"}),32969:(p=>{p.exports="systemready"}),94830:(p=>{p.exports="visible"}),8443:((p,S,t)=>{p.exports={BLUR:t(97217),BOOT:t(47548),CONTEXT_LOST:t(19814),DESTROY:t(68446),FOCUS:t(41700),HIDDEN:t(25432),PAUSE:t(65942),POST_RENDER:t(59211),POST_STEP:t(47789),PRE_RENDER:t(39066),PRE_STEP:t(460),READY:t(16175),RESUME:t(42331),STEP:t(11966),SYSTEM_READY:t(32969),VISIBLE:t(94830)}}),42857:((p,S,t)=>{p.exports={Config:t(69547),CreateRenderer:t(86054),DebugHeader:t(96391),Events:t(8443),TimeStep:t(65898),VisibilityHandler:t(51085)}}),99584:((p,S,t)=>{var d=t(5290),c=t(27919),h=t(35154),r=function(n){var e=h(n,"data",[]),s=h(n,"canvas",null),o=h(n,"palette",d),i=h(n,"pixelWidth",1),a=h(n,"pixelHeight",i),l=h(n,"resizeCanvas",!0),f=h(n,"clearCanvas",!0),u=h(n,"preRender",null),v=h(n,"postRender",null),m=Math.floor(Math.abs(e[0].length*i)),x=Math.floor(Math.abs(e.length*a));s||(s=c.create2D(this,m,x),l=!1,f=!1),l&&(s.width=m,s.height=x);var g=s.getContext("2d",{willReadFrequently:!0});f&&g.clearRect(0,0,m,x),u&&u(s,g);for(var y=0;y<e.length;y++)for(var T=e[y],C=0;C<T.length;C++){var E=T[C];E!=="."&&E!==" "&&(g.fillStyle=o[E],g.fillRect(C*i,y*a,i,a))}return v&&v(s,g),s};p.exports=r}),15822:((p,S,t)=>{p.exports={GenerateTexture:t(99584),Palettes:t(57763)}}),5290:(p=>{p.exports={0:"#000",1:"#9D9D9D",2:"#FFF",3:"#BE2633",4:"#E06F8B",5:"#493C2B",6:"#A46422",7:"#EB8931",8:"#F7E26B",9:"#2F484E",A:"#44891A",B:"#A3CE27",C:"#1B2632",D:"#005784",E:"#31A2F2",F:"#B2DCEF"}}),23816:(p=>{p.exports={0:"#000",1:"#fff",2:"#8b4131",3:"#7bbdc5",4:"#8b41ac",5:"#6aac41",6:"#3931a4",7:"#d5de73",8:"#945a20",9:"#5a4100",A:"#bd736a",B:"#525252",C:"#838383",D:"#acee8b",E:"#7b73de",F:"#acacac"}}),9866:(p=>{p.exports={0:"#000",1:"#2234d1",2:"#0c7e45",3:"#44aacc",4:"#8a3622",5:"#5c2e78",6:"#aa5c3d",7:"#b5b5b5",8:"#5e606e",9:"#4c81fb",A:"#6cd947",B:"#7be2f9",C:"#eb8a60",D:"#e23d69",E:"#ffd93f",F:"#fff"}}),77552:(p=>{p.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#f5f4eb"}}),92259:(p=>{p.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#fff"}}),57763:((p,S,t)=>{p.exports={ARNE16:t(5290),C64:t(23816),CGA:t(9866),JMP:t(77552),MSX:t(92259)}}),46728:((p,S,t)=>{var d=t(83419),c=t(36316),h=t(80021),r=t(26099),n=new d({Extends:h,initialize:function(s,o,i,a){h.call(this,"CubicBezierCurve"),Array.isArray(s)&&(a=new r(s[6],s[7]),i=new r(s[4],s[5]),o=new r(s[2],s[3]),s=new r(s[0],s[1])),this.p0=s,this.p1=o,this.p2=i,this.p3=a},getStartPoint:function(e){return e===void 0&&(e=new r),e.copy(this.p0)},getResolution:function(e){return e},getPoint:function(e,s){s===void 0&&(s=new r);var o=this.p0,i=this.p1,a=this.p2,l=this.p3;return s.set(c(e,o.x,i.x,a.x,l.x),c(e,o.y,i.y,a.y,l.y))},draw:function(e,s){s===void 0&&(s=32);var o=this.getPoints(s);e.beginPath(),e.moveTo(this.p0.x,this.p0.y);for(var i=1;i<o.length;i++)e.lineTo(o[i].x,o[i].y);return e.strokePath(),e},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y,this.p2.x,this.p2.y,this.p3.x,this.p3.y]}}});n.fromJSON=function(e){var s=e.points,o=new r(s[0],s[1]),i=new r(s[2],s[3]),a=new r(s[4],s[5]),l=new r(s[6],s[7]);return new n(o,i,a,l)},p.exports=n}),80021:((p,S,t)=>{var d=t(83419),c=t(19217),h=t(87841),r=t(26099),n=new d({initialize:function(s){this.type=s,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new r,this._tmpVec2B=new r},draw:function(e,s){return s===void 0&&(s=32),e.strokePoints(this.getPoints(s))},getBounds:function(e,s){e||(e=new h),s===void 0&&(s=16);var o=this.getLength();s>o&&(s=o/2);var i=Math.max(1,Math.round(o/s));return c(this.getSpacedPoints(i),e)},getDistancePoints:function(e){var s=this.getLength(),o=Math.max(1,s/e);return this.getSpacedPoints(o)},getEndPoint:function(e){return e===void 0&&(e=new r),this.getPointAt(1,e)},getLength:function(){var e=this.getLengths();return e[e.length-1]},getLengths:function(e){if(e===void 0&&(e=this.arcLengthDivisions),this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var s=[],o,i=this.getPoint(0,this._tmpVec2A),a=0;s.push(0);for(var l=1;l<=e;l++)o=this.getPoint(l/e,this._tmpVec2B),a+=o.distance(i),s.push(a),i.copy(o);return this.cacheArcLengths=s,s},getPointAt:function(e,s){var o=this.getUtoTmapping(e);return this.getPoint(o,s)},getPoints:function(e,s,o){o===void 0&&(o=[]),e||(s?e=this.getLength()/s:e=this.defaultDivisions);for(var i=0;i<=e;i++)o.push(this.getPoint(i/e));return o},getRandomPoint:function(e){return e===void 0&&(e=new r),this.getPoint(Math.random(),e)},getSpacedPoints:function(e,s,o){o===void 0&&(o=[]),e||(s?e=this.getLength()/s:e=this.defaultDivisions);for(var i=0;i<=e;i++){var a=this.getUtoTmapping(i/e,null,e);o.push(this.getPoint(a))}return o},getStartPoint:function(e){return e===void 0&&(e=new r),this.getPointAt(0,e)},getTangent:function(e,s){s===void 0&&(s=new r);var o=1e-4,i=e-o,a=e+o;return i<0&&(i=0),a>1&&(a=1),this.getPoint(i,this._tmpVec2A),this.getPoint(a,s),s.subtract(this._tmpVec2A).normalize()},getTangentAt:function(e,s){var o=this.getUtoTmapping(e);return this.getTangent(o,s)},getTFromDistance:function(e,s){return e<=0?0:this.getUtoTmapping(0,e,s)},getUtoTmapping:function(e,s,o){var i=this.getLengths(o),a=0,l=i.length,f;s?f=Math.min(s,i[l-1]):f=e*i[l-1];for(var u=0,v=l-1,m;u<=v;)if(a=Math.floor(u+(v-u)/2),m=i[a]-f,m<0)u=a+1;else if(m>0)v=a-1;else{v=a;break}if(a=v,i[a]===f)return a/(l-1);var x=i[a],g=i[a+1],y=g-x,T=(f-x)/y;return(a+T)/(l-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});p.exports=n}),73825:((p,S,t)=>{var d=t(83419),c=t(80021),h=t(39506),r=t(35154),n=t(43396),e=t(26099),s=new d({Extends:c,initialize:function(i,a,l,f,u,v,m,x){if(typeof i=="object"){var g=i;i=r(g,"x",0),a=r(g,"y",0),l=r(g,"xRadius",0),f=r(g,"yRadius",l),u=r(g,"startAngle",0),v=r(g,"endAngle",360),m=r(g,"clockwise",!1),x=r(g,"rotation",0)}else f===void 0&&(f=l),u===void 0&&(u=0),v===void 0&&(v=360),m===void 0&&(m=!1),x===void 0&&(x=0);c.call(this,"EllipseCurve"),this.p0=new e(i,a),this._xRadius=l,this._yRadius=f,this._startAngle=h(u),this._endAngle=h(v),this._clockwise=m,this._rotation=h(x)},getStartPoint:function(o){return o===void 0&&(o=new e),this.getPoint(0,o)},getResolution:function(o){return o*2},getPoint:function(o,i){i===void 0&&(i=new e);for(var a=Math.PI*2,l=this._endAngle-this._startAngle,f=Math.abs(l)<Number.EPSILON;l<0;)l+=a;for(;l>a;)l-=a;l<Number.EPSILON&&(f?l=0:l=a),this._clockwise&&!f&&(l===a?l=-a:l=l-a);var u=this._startAngle+o*l,v=this.p0.x+this._xRadius*Math.cos(u),m=this.p0.y+this._yRadius*Math.sin(u);if(this._rotation!==0){var x=Math.cos(this._rotation),g=Math.sin(this._rotation),y=v-this.p0.x,T=m-this.p0.y;v=y*x-T*g+this.p0.x,m=y*g+T*x+this.p0.y}return i.set(v,m)},setXRadius:function(o){return this.xRadius=o,this},setYRadius:function(o){return this.yRadius=o,this},setWidth:function(o){return this.xRadius=o/2,this},setHeight:function(o){return this.yRadius=o/2,this},setStartAngle:function(o){return this.startAngle=o,this},setEndAngle:function(o){return this.endAngle=o,this},setClockwise:function(o){return this.clockwise=o,this},setRotation:function(o){return this.rotation=o,this},x:{get:function(){return this.p0.x},set:function(o){this.p0.x=o}},y:{get:function(){return this.p0.y},set:function(o){this.p0.y=o}},xRadius:{get:function(){return this._xRadius},set:function(o){this._xRadius=o}},yRadius:{get:function(){return this._yRadius},set:function(o){this._yRadius=o}},startAngle:{get:function(){return n(this._startAngle)},set:function(o){this._startAngle=h(o)}},endAngle:{get:function(){return n(this._endAngle)},set:function(o){this._endAngle=h(o)}},clockwise:{get:function(){return this._clockwise},set:function(o){this._clockwise=o}},angle:{get:function(){return n(this._rotation)},set:function(o){this._rotation=h(o)}},rotation:{get:function(){return this._rotation},set:function(o){this._rotation=o}},toJSON:function(){return{type:this.type,x:this.p0.x,y:this.p0.y,xRadius:this._xRadius,yRadius:this._yRadius,startAngle:n(this._startAngle),endAngle:n(this._endAngle),clockwise:this._clockwise,rotation:n(this._rotation)}}});s.fromJSON=function(o){return new s(o)},p.exports=s}),33951:((p,S,t)=>{var d=t(83419),c=t(80021),h=t(19217),r=t(87841),n=t(26099),e=new d({Extends:c,initialize:function(o,i){c.call(this,"LineCurve"),Array.isArray(o)&&(i=new n(o[2],o[3]),o=new n(o[0],o[1])),this.p0=o,this.p1=i,this.arcLengthDivisions=1},getBounds:function(s){return s===void 0&&(s=new r),h([this.p0,this.p1],s)},getStartPoint:function(s){return s===void 0&&(s=new n),s.copy(this.p0)},getResolution:function(s){return s===void 0&&(s=1),s},getPoint:function(s,o){return o===void 0&&(o=new n),s===1?o.copy(this.p1):(o.copy(this.p1).subtract(this.p0).scale(s).add(this.p0),o)},getPointAt:function(s,o){return this.getPoint(s,o)},getTangent:function(s,o){return o===void 0&&(o=new n),o.copy(this.p1).subtract(this.p0).normalize(),o},getUtoTmapping:function(s,o,i){var a;if(o){var l=this.getLengths(i),f=l[l.length-1],u=Math.min(o,f);a=u/f}else a=s;return a},draw:function(s){return s.lineBetween(this.p0.x,this.p0.y,this.p1.x,this.p1.y),s},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y]}}});e.fromJSON=function(s){var o=s.points,i=new n(o[0],o[1]),a=new n(o[2],o[3]);return new e(i,a)},p.exports=e}),14744:((p,S,t)=>{var d=t(83419),c=t(80021),h=t(32112),r=t(26099),n=new d({Extends:c,initialize:function(s,o,i){c.call(this,"QuadraticBezierCurve"),Array.isArray(s)&&(i=new r(s[4],s[5]),o=new r(s[2],s[3]),s=new r(s[0],s[1])),this.p0=s,this.p1=o,this.p2=i},getStartPoint:function(e){return e===void 0&&(e=new r),e.copy(this.p0)},getResolution:function(e){return e},getPoint:function(e,s){s===void 0&&(s=new r);var o=this.p0,i=this.p1,a=this.p2;return s.set(h(e,o.x,i.x,a.x),h(e,o.y,i.y,a.y))},draw:function(e,s){s===void 0&&(s=32);var o=this.getPoints(s);e.beginPath(),e.moveTo(this.p0.x,this.p0.y);for(var i=1;i<o.length;i++)e.lineTo(o[i].x,o[i].y);return e.strokePath(),e},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y,this.p2.x,this.p2.y]}}});n.fromJSON=function(e){var s=e.points,o=new r(s[0],s[1]),i=new r(s[2],s[3]),a=new r(s[4],s[5]);return new n(o,i,a)},p.exports=n}),42534:((p,S,t)=>{var d=t(87842),c=t(83419),h=t(80021),r=t(26099),n=new c({Extends:h,initialize:function(s){s===void 0&&(s=[]),h.call(this,"SplineCurve"),this.points=[],this.addPoints(s)},addPoints:function(e){for(var s=0;s<e.length;s++){var o=new r;typeof e[s]=="number"?(o.x=e[s],o.y=e[s+1],s++):Array.isArray(e[s])?(o.x=e[s][0],o.y=e[s][1]):(o.x=e[s].x,o.y=e[s].y),this.points.push(o)}return this},addPoint:function(e,s){var o=new r(e,s);return this.points.push(o),o},getStartPoint:function(e){return e===void 0&&(e=new r),e.copy(this.points[0])},getResolution:function(e){return e*this.points.length},getPoint:function(e,s){s===void 0&&(s=new r);var o=this.points,i=(o.length-1)*e,a=Math.floor(i),l=i-a,f=o[a===0?a:a-1],u=o[a],v=o[a>o.length-2?o.length-1:a+1],m=o[a>o.length-3?o.length-1:a+2];return s.set(d(l,f.x,u.x,v.x,m.x),d(l,f.y,u.y,v.y,m.y))},toJSON:function(){for(var e=[],s=0;s<this.points.length;s++)e.push(this.points[s].x),e.push(this.points[s].y);return{type:this.type,points:e}}});n.fromJSON=function(e){return new n(e.points)},p.exports=n}),25410:((p,S,t)=>{p.exports={Path:t(46669),MoveTo:t(68618),CubicBezier:t(46728),Curve:t(80021),Ellipse:t(73825),Line:t(33951),QuadraticBezier:t(14744),Spline:t(42534)}}),68618:((p,S,t)=>{var d=t(83419),c=t(26099),h=new d({initialize:function(n,e){this.active=!1,this.p0=new c(n,e)},getPoint:function(r,n){return n===void 0&&(n=new c),n.copy(this.p0)},getPointAt:function(r,n){return this.getPoint(r,n)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});p.exports=h}),46669:((p,S,t)=>{var d=t(83419),c=t(46728),h=t(73825),r=t(39429),n=t(33951),e=t(68618),s=t(14744),o=t(87841),i=t(42534),a=t(26099),l=t(36383),f=new d({initialize:function(v,m){v===void 0&&(v=0),m===void 0&&(m=0),this.name="",this.defaultDivisions=12,this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new a,this._tmpVec2A=new a,this._tmpVec2B=new a,typeof v=="object"?this.fromJSON(v):this.startPoint.set(v,m)},add:function(u){return this.curves.push(u),this},circleTo:function(u,v,m){return v===void 0&&(v=!1),this.ellipseTo(u,u,0,360,v,m)},closePath:function(){var u=this.curves[0].getPoint(0),v=this.curves[this.curves.length-1].getPoint(1);return u.equals(v)||this.curves.push(new n(v,u)),this},cubicBezierTo:function(u,v,m,x,g,y){var T=this.getEndPoint(),C,E,M;return u instanceof a?(C=u,E=v,M=m):(C=new a(m,x),E=new a(g,y),M=new a(u,v)),this.add(new c(T,C,E,M))},quadraticBezierTo:function(u,v,m,x){var g=this.getEndPoint(),y,T;return u instanceof a?(y=u,T=v):(y=new a(m,x),T=new a(u,v)),this.add(new s(g,y,T))},draw:function(u,v){for(var m=0;m<this.curves.length;m++){var x=this.curves[m];x.active&&x.draw(u,v)}return u},ellipseTo:function(u,v,m,x,g,y){var T=new h(0,0,u,v,m,x,g,y),C=this.getEndPoint(this._tmpVec2A),E=T.getStartPoint(this._tmpVec2B);return C.subtract(E),T.x=C.x,T.y=C.y,this.add(T)},fromJSON:function(u){this.curves=[],this.cacheLengths=[],this.startPoint.set(u.x,u.y),this.autoClose=u.autoClose;for(var v=0;v<u.curves.length;v++){var m=u.curves[v];switch(m.type){case"LineCurve":this.add(n.fromJSON(m));break;case"EllipseCurve":this.add(h.fromJSON(m));break;case"SplineCurve":this.add(i.fromJSON(m));break;case"CubicBezierCurve":this.add(c.fromJSON(m));break;case"QuadraticBezierCurve":this.add(s.fromJSON(m));break}}return this},getBounds:function(u,v){u===void 0&&(u=new o),v===void 0&&(v=16),u.x=Number.MAX_VALUE,u.y=Number.MAX_VALUE;for(var m=new o,x=l.MIN_SAFE_INTEGER,g=l.MIN_SAFE_INTEGER,y=0;y<this.curves.length;y++){var T=this.curves[y];T.active&&(T.getBounds(m,v),u.x=Math.min(u.x,m.x),u.y=Math.min(u.y,m.y),x=Math.max(x,m.right),g=Math.max(g,m.bottom))}return u.right=x,u.bottom=g,u},getCurveLengths:function(){if(this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var u=[],v=0,m=0;m<this.curves.length;m++)v+=this.curves[m].getLength(),u.push(v);return this.cacheLengths=u,u},getCurveAt:function(u){for(var v=u*this.getLength(),m=this.getCurveLengths(),x=0;x<m.length;){if(m[x]>=v)return this.curves[x];x++}return null},getEndPoint:function(u){return u===void 0&&(u=new a),this.curves.length>0?this.curves[this.curves.length-1].getPoint(1,u):u.copy(this.startPoint),u},getLength:function(){var u=this.getCurveLengths();return u[u.length-1]},getPoint:function(u,v){v===void 0&&(v=new a);for(var m=u*this.getLength(),x=this.getCurveLengths(),g=0;g<x.length;){if(x[g]>=m){var y=x[g]-m,T=this.curves[g],C=T.getLength(),E=C===0?0:1-y/C;return T.getPointAt(E,v)}g++}return null},getPoints:function(u,v){!u&&!v&&(u=this.defaultDivisions);for(var m=[],x,g=0;g<this.curves.length;g++){var y=this.curves[g];if(y.active)for(var T=y.getResolution(u),C=y.getPoints(T,v),E=0;E<C.length;E++){var M=C[E];x&&x.equals(M)||(m.push(M),x=M)}}return this.autoClose&&m.length>1&&!m[m.length-1].equals(m[0])&&m.push(m[0]),m},getRandomPoint:function(u){return u===void 0&&(u=new a),this.getPoint(Math.random(),u)},getSpacedPoints:function(u){u===void 0&&(u=40);for(var v=[],m=0;m<=u;m++)v.push(this.getPoint(m/u));return this.autoClose&&v.push(v[0]),v},getStartPoint:function(u){return u===void 0&&(u=new a),u.copy(this.startPoint)},getTangent:function(u,v){v===void 0&&(v=new a);for(var m=u*this.getLength(),x=this.getCurveLengths(),g=0;g<x.length;){if(x[g]>=m){var y=x[g]-m,T=this.curves[g],C=T.getLength(),E=C===0?0:1-y/C;return T.getTangentAt(E,v)}g++}return null},lineTo:function(u,v){u instanceof a?this._tmpVec2B.copy(u):typeof u=="object"?this._tmpVec2B.setFromObject(u):this._tmpVec2B.set(u,v);var m=this.getEndPoint(this._tmpVec2A);return this.add(new n([m.x,m.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(u){return u.unshift(this.getEndPoint()),this.add(new i(u))},moveTo:function(u,v){return u instanceof a?this.add(new e(u.x,u.y)):this.add(new e(u,v))},toJSON:function(){for(var u=[],v=0;v<this.curves.length;v++)u.push(this.curves[v].toJSON());return{type:"Path",x:this.startPoint.x,y:this.startPoint.y,autoClose:this.autoClose,curves:u}},updateArcLengths:function(){this.cacheLengths=[],this.getCurveLengths()},destroy:function(){this.curves.length=0,this.cacheLengths.length=0,this.startPoint=void 0}});r.register("path",function(u,v){return new f(u,v)}),p.exports=f}),45893:((p,S,t)=>{var d=t(83419),c=t(24882),h=new d({initialize:function(n,e){this.parent=n,this.events=e,e||(this.events=n.events?n.events:n),this.list={},this.values={},this._frozen=!1,!n.hasOwnProperty("sys")&&this.events&&this.events.once(c.DESTROY,this.destroy,this)},get:function(r){var n=this.list;if(Array.isArray(r)){for(var e=[],s=0;s<r.length;s++)e.push(n[r[s]]);return e}else return n[r]},getAll:function(){var r={};for(var n in this.list)this.list.hasOwnProperty(n)&&(r[n]=this.list[n]);return r},query:function(r){var n={};for(var e in this.list)this.list.hasOwnProperty(e)&&e.match(r)&&(n[e]=this.list[e]);return n},set:function(r,n){if(this._frozen)return this;if(typeof r=="string")return this.setValue(r,n);for(var e in r)this.setValue(e,r[e]);return this},inc:function(r,n){if(this._frozen)return this;n===void 0&&(n=1);var e=this.get(r);return e===void 0&&(e=0),this.set(r,e+n),this},toggle:function(r){return this._frozen?this:(this.set(r,!this.get(r)),this)},setValue:function(r,n){if(this._frozen)return this;if(this.has(r))this.values[r]=n;else{var e=this,s=this.list,o=this.events,i=this.parent;Object.defineProperty(this.values,r,{enumerable:!0,configurable:!0,get:function(){return s[r]},set:function(a){if(!e._frozen){var l=s[r];s[r]=a,o.emit(c.CHANGE_DATA,i,r,a,l),o.emit(c.CHANGE_DATA_KEY+r,i,a,l)}}}),s[r]=n,o.emit(c.SET_DATA,i,r,n)}return this},each:function(r,n){for(var e=[this.parent,null,void 0],s=1;s<arguments.length;s++)e.push(arguments[s]);for(var o in this.list)e[1]=o,e[2]=this.list[o],r.apply(n,e);return this},merge:function(r,n){n===void 0&&(n=!0);for(var e in r)r.hasOwnProperty(e)&&(n||!n&&!this.has(e))&&this.setValue(e,r[e]);return this},remove:function(r){if(this._frozen)return this;if(Array.isArray(r))for(var n=0;n<r.length;n++)this.removeValue(r[n]);else return this.removeValue(r);return this},removeValue:function(r){if(this.has(r)){var n=this.list[r];delete this.list[r],delete this.values[r],this.events.emit(c.REMOVE_DATA,this.parent,r,n)}return this},pop:function(r){var n=void 0;return!this._frozen&&this.has(r)&&(n=this.list[r],delete this.list[r],delete this.values[r],this.events.emit(c.REMOVE_DATA,this.parent,r,n)),n},has:function(r){return this.list.hasOwnProperty(r)},setFreeze:function(r){return this._frozen=r,this},reset:function(){for(var r in this.list)delete this.list[r],delete this.values[r];return this._frozen=!1,this},destroy:function(){this.reset(),this.events.off(c.CHANGE_DATA),this.events.off(c.SET_DATA),this.events.off(c.REMOVE_DATA),this.parent=null},freeze:{get:function(){return this._frozen},set:function(r){this._frozen=!!r}},count:{get:function(){var r=0;for(var n in this.list)this.list[n]!==void 0&&r++;return r}}});p.exports=h}),63646:((p,S,t)=>{var d=t(83419),c=t(45893),h=t(37277),r=t(44594),n=new d({Extends:c,initialize:function(s){c.call(this,s,s.sys.events),this.scene=s,this.systems=s.sys,s.sys.events.once(r.BOOT,this.boot,this),s.sys.events.on(r.START,this.start,this)},boot:function(){this.events=this.systems.events,this.events.once(r.DESTROY,this.destroy,this)},start:function(){this.events.once(r.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){c.prototype.destroy.call(this),this.events.off(r.START,this.start,this),this.scene=null,this.systems=null}});h.register("DataManagerPlugin",n,"data"),p.exports=n}),10700:(p=>{p.exports="changedata"}),93608:(p=>{p.exports="changedata-"}),60883:(p=>{p.exports="destroy"}),69780:(p=>{p.exports="removedata"}),22166:(p=>{p.exports="setdata"}),24882:((p,S,t)=>{p.exports={CHANGE_DATA:t(10700),CHANGE_DATA_KEY:t(93608),DESTROY:t(60883),REMOVE_DATA:t(69780),SET_DATA:t(22166)}}),44965:((p,S,t)=>{p.exports={DataManager:t(45893),DataManagerPlugin:t(63646),Events:t(24882)}}),7098:((p,S,t)=>{var d=t(84148),c={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};function h(){if(typeof importScripts=="function")return c;c.audioData=!!window.Audio,c.webAudio=!!(window.AudioContext||window.webkitAudioContext);var r=document.createElement("audio"),n=!!r.canPlayType;try{if(n){var e=function(i,a){var l=r.canPlayType("audio/"+i).replace(/^no$/,"");return a?!!(l||r.canPlayType("audio/"+a).replace(/^no$/,"")):!!l};if(c.ogg=e('ogg; codecs="vorbis"'),c.opus=e('ogg; codecs="opus"',"opus"),c.mp3=e("mpeg"),c.wav=e("wav"),c.m4a=e("x-m4a"),c.aac=e("aac"),c.flac=e("flac","x-flac"),c.webm=e('webm; codecs="vorbis"'),r.canPlayType('audio/mp4; codecs="ec-3"')!==""){if(d.edge)c.dolby=!0;else if(d.safari&&d.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var s=parseInt(RegExp.$1,10),o=parseInt(RegExp.$2,10);(s===10&&o>=11||s>10)&&(c.dolby=!0)}}}}catch{}return c}p.exports=h()}),84148:((p,S,t)=>{var d=t(25892),c={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0,es2019:!1};function h(){var r=navigator.userAgent;return/Edg\/\d+/.test(r)?(c.edge=!0,c.es2019=!0):/OPR/.test(r)?(c.opera=!0,c.es2019=!0):/Chrome\/(\d+)/.test(r)&&!d.windowsPhone?(c.chrome=!0,c.chromeVersion=parseInt(RegExp.$1,10),c.es2019=c.chromeVersion>69):/Firefox\D+(\d+)/.test(r)?(c.firefox=!0,c.firefoxVersion=parseInt(RegExp.$1,10),c.es2019=c.firefoxVersion>10):/AppleWebKit\/(?!.*CriOS)/.test(r)&&d.iOS?(c.mobileSafari=!0,c.es2019=!0):/MSIE (\d+\.\d+);/.test(r)?(c.ie=!0,c.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+(\.\d+)?) Safari/.test(r)&&!d.windowsPhone?(c.safari=!0,c.safariVersion=parseInt(RegExp.$1,10),c.es2019=c.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(r)&&(c.ie=!0,c.trident=!0,c.tridentVersion=parseInt(RegExp.$1,10),c.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(r)&&(c.silk=!0),c}p.exports=h()}),89289:((p,S,t)=>{var d=t(27919),c={supportInverseAlpha:!1,supportNewBlendModes:!1};function h(){var e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",o=new Image;return o.onload=function(){var i=new Image;i.onload=function(){var a=d.create2D(i,6),l=a.getContext("2d",{willReadFrequently:!0});if(l.globalCompositeOperation="multiply",l.drawImage(o,0,0),l.drawImage(i,2,0),!l.getImageData(2,0,1,1))return!1;var f=l.getImageData(2,0,1,1).data;d.remove(i),c.supportNewBlendModes=f[0]===255&&f[1]===0&&f[2]===0},i.src=e+"/wCKxvRF"+s},o.src=e+"AP804Oa6"+s,!1}function r(){var e=d.create2D(this,2),s=e.getContext("2d",{willReadFrequently:!0});s.fillStyle="rgba(10, 20, 30, 0.5)",s.fillRect(0,0,1,1);var o=s.getImageData(0,0,1,1);if(o===null)return!1;s.putImageData(o,1,0);var i=s.getImageData(1,0,1,1),a=i.data[0]===o.data[0]&&i.data[1]===o.data[1]&&i.data[2]===o.data[2]&&i.data[3]===o.data[3];return d.remove(this),a}function n(){return typeof importScripts!="function"&&document!==void 0&&(c.supportNewBlendModes=h(),c.supportInverseAlpha=r()),c}p.exports=n()}),89357:((p,S,t)=>{var d=t(25892),c=t(84148),h=t(27919),r={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,stableSort:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};function n(){var s=new ArrayBuffer(4),o=new Uint8Array(s),i=new Uint32Array(s);return o[0]=161,o[1]=178,o[2]=195,o[3]=212,i[0]===3569595041?!0:i[0]===2712847316?!1:null}function e(){if(typeof importScripts=="function")return r;r.canvas=!!window.CanvasRenderingContext2D;try{r.localStorage=!!localStorage.getItem}catch{r.localStorage=!1}r.file=!!window.File&&!!window.FileReader&&!!window.FileList&&!!window.Blob,r.fileSystem=!!window.requestFileSystem;var s=!1,o=function(){if(window.WebGLRenderingContext)try{var i=h.createWebGL(this),a=i.getContext("webgl")||i.getContext("experimental-webgl"),l=h.create2D(this),f=l.getContext("2d",{willReadFrequently:!0}),u=f.createImageData(1,1);return s=u.data instanceof Uint8ClampedArray,h.remove(i),h.remove(l),!!a}catch{return!1}return!1};return r.webGL=o(),r.worker=!!window.Worker,r.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,r.getUserMedia=r.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,c.firefox&&c.firefoxVersion<21&&(r.getUserMedia=!1),!d.iOS&&(c.ie||c.firefox||c.chrome)&&(r.canvasBitBltShift=!0),(c.safari||c.mobileSafari)&&(r.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(r.vibration=!0),typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint32Array<"u"&&(r.littleEndian=n()),r.support32bit=typeof ArrayBuffer<"u"&&typeof Uint8ClampedArray<"u"&&typeof Int32Array<"u"&&r.littleEndian!==null&&s,r}p.exports=e()}),91639:(p=>{var S={available:!1,cancel:"",keyboard:!1,request:""};function t(){if(typeof importScripts=="function")return S;var d,c="Fullscreen",h="FullScreen",r=["request"+c,"request"+h,"webkitRequest"+c,"webkitRequest"+h,"msRequest"+c,"msRequest"+h,"mozRequest"+h,"mozRequest"+c];for(d=0;d<r.length;d++)if(document.documentElement[r[d]]){S.available=!0,S.request=r[d];break}var n=["cancel"+h,"exit"+c,"webkitCancel"+h,"webkitExit"+c,"msCancel"+h,"msExit"+c,"mozCancel"+h,"mozExit"+c];if(S.available){for(d=0;d<n.length;d++)if(document[n[d]]){S.cancel=n[d];break}}return window.Element&&Element.ALLOW_KEYBOARD_INPUT&&!/ Version\/5\.1(?:\.\d+)? Safari\//.test(navigator.userAgent)&&(S.keyboard=!0),Object.defineProperty(S,"active",{get:function(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)}}),S}p.exports=t()}),31784:((p,S,t)=>{var d=t(84148),c={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};function h(){return typeof importScripts=="function"||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(c.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(c.mspointer=!0),navigator.getGamepads&&(c.gamepads=!0),"onwheel"in window||d.ie&&"WheelEvent"in window?c.wheelEvent="wheel":"onmousewheel"in window?c.wheelEvent="mousewheel":d.firefox&&"MouseScrollEvent"in window&&(c.wheelEvent="DOMMouseScroll")),c}p.exports=h()}),25892:(p=>{var S={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};function t(){if(typeof importScripts=="function")return S;var d=navigator.userAgent;/Windows/.test(d)?S.windows=!0:/Mac OS/.test(d)&&!/like Mac OS/.test(d)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(S.iOS=!0,S.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),S.iOSVersion=parseInt(RegExp.$1,10)):S.macOS=!0:/Android/.test(d)?S.android=!0:/Linux/.test(d)?S.linux=!0:/iP[ao]d|iPhone/i.test(d)?(S.iOS=!0,navigator.appVersion.match(/OS (\d+)/),S.iOSVersion=parseInt(RegExp.$1,10),S.iPhone=d.toLowerCase().indexOf("iphone")!==-1,S.iPad=d.toLowerCase().indexOf("ipad")!==-1):/Kindle/.test(d)||/\bKF[A-Z][A-Z]+/.test(d)||/Silk.*Mobile Safari/.test(d)?S.kindle=!0:/CrOS/.test(d)&&(S.chromeOS=!0),(/Windows Phone/i.test(d)||/IEMobile/i.test(d))&&(S.android=!1,S.iOS=!1,S.macOS=!1,S.windows=!0,S.windowsPhone=!0);var c=/Silk/.test(d);return(S.windows||S.macOS||S.linux&&!c||S.chromeOS)&&(S.desktop=!0),(S.windowsPhone||/Windows NT/i.test(d)&&/Touch/i.test(d))&&(S.desktop=!1),navigator.standalone&&(S.webApp=!0),typeof importScripts!="function"&&(window.cordova!==void 0&&(S.cordova=!0),window.ejecta!==void 0&&(S.ejecta=!0)),typeof process<"u"&&process.versions&&process.versions.node&&(S.node=!0),S.node&&typeof process.versions=="object"&&(S.nodeWebkit=!!process.versions["node-webkit"],S.electron=!!process.versions.electron),/Crosswalk/.test(d)&&(S.crosswalk=!0),S.pixelRatio=window.devicePixelRatio||1,S}p.exports=t()}),43267:((p,S,t)=>{var d=t(95540),c={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1,hasRequestVideoFrame:!1};function h(){if(typeof importScripts=="function")return c;var r=document.createElement("video"),n=!!r.canPlayType,e=/^no$/;try{n&&(r.canPlayType('video/ogg; codecs="theora"').replace(e,"")&&(c.ogg=!0),r.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(e,"")&&(c.h264=!0,c.mp4=!0),r.canPlayType("video/x-m4v").replace(e,"")&&(c.m4v=!0),r.canPlayType('video/webm; codecs="vp8, vorbis"').replace(e,"")&&(c.webm=!0),r.canPlayType('video/webm; codecs="vp9"').replace(e,"")&&(c.vp9=!0),r.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(e,"")&&(c.hls=!0))}catch{}return r.parentNode&&r.parentNode.removeChild(r),c.getVideoURL=function(s){Array.isArray(s)||(s=[s]);for(var o=0;o<s.length;o++){var i=d(s[o],"url",s[o]);if(i.indexOf("blob:")===0)return{url:i,type:""};var a;if(i.indexOf("data:")===0?a=i.split(",")[0].match(/\/(.*?);/):a=i.match(/\.([a-zA-Z0-9]+)($|\?)/),a=d(s[o],"type",a?a[1]:"").toLowerCase(),c[a])return{url:i,type:a}}return null},c}p.exports=h()}),82264:((p,S,t)=>{p.exports={os:t(25892),browser:t(84148),features:t(89357),input:t(31784),audio:t(7098),video:t(43267),fullscreen:t(91639),canvasFeatures:t(89289)}}),89422:((p,S,t)=>{var d=t(83419),c=new Float32Array(20),h=new d({initialize:function(){this._matrix=new Float32Array(20),this.alpha=1,this._dirty=!0,this._data=new Float32Array(20),this.reset()},set:function(r){return this._matrix.set(r),this._dirty=!0,this},reset:function(){var r=this._matrix;return r.fill(0),r[0]=1,r[6]=1,r[12]=1,r[18]=1,this.alpha=1,this._dirty=!0,this},getData:function(){var r=this._data;return this._dirty&&(r.set(this._matrix),r[4]/=255,r[9]/=255,r[14]/=255,r[19]/=255,this._dirty=!1),r},brightness:function(r,n){r===void 0&&(r=0),n===void 0&&(n=!1);var e=r;return this.multiply([e,0,0,0,0,0,e,0,0,0,0,0,e,0,0,0,0,0,1,0],n)},saturate:function(r,n){r===void 0&&(r=0),n===void 0&&(n=!1);var e=r*2/3+1,s=(e-1)*-.5;return this.multiply([e,s,s,0,0,s,e,s,0,0,s,s,e,0,0,0,0,0,1,0],n)},desaturate:function(r){return r===void 0&&(r=!1),this.saturate(-1,r)},hue:function(r,n){r===void 0&&(r=0),n===void 0&&(n=!1),r=r/180*Math.PI;var e=Math.cos(r),s=Math.sin(r),o=.213,i=.715,a=.072;return this.multiply([o+e*(1-o)+s*-o,i+e*-i+s*-i,a+e*-a+s*(1-a),0,0,o+e*-o+s*.143,i+e*(1-i)+s*.14,a+e*-a+s*-.283,0,0,o+e*-o+s*-.787,i+e*-i+s*i,a+e*(1-a)+s*a,0,0,0,0,0,1,0],n)},grayscale:function(r,n){return r===void 0&&(r=1),n===void 0&&(n=!1),this.saturate(-r,n)},blackWhite:function(r){return r===void 0&&(r=!1),this.multiply(h.BLACK_WHITE,r)},contrast:function(r,n){r===void 0&&(r=0),n===void 0&&(n=!1);var e=r+1,s=-.5*(e-1);return this.multiply([e,0,0,0,s,0,e,0,0,s,0,0,e,0,s,0,0,0,1,0],n)},negative:function(r){return r===void 0&&(r=!1),this.multiply(h.NEGATIVE,r)},desaturateLuminance:function(r){return r===void 0&&(r=!1),this.multiply(h.DESATURATE_LUMINANCE,r)},sepia:function(r){return r===void 0&&(r=!1),this.multiply(h.SEPIA,r)},night:function(r,n){return r===void 0&&(r=.1),n===void 0&&(n=!1),this.multiply([r*-2,-r,0,0,0,-r,0,r,0,0,0,r,r*2,0,0,0,0,0,1,0],n)},lsd:function(r){return r===void 0&&(r=!1),this.multiply(h.LSD,r)},brown:function(r){return r===void 0&&(r=!1),this.multiply(h.BROWN,r)},vintagePinhole:function(r){return r===void 0&&(r=!1),this.multiply(h.VINTAGE,r)},kodachrome:function(r){return r===void 0&&(r=!1),this.multiply(h.KODACHROME,r)},technicolor:function(r){return r===void 0&&(r=!1),this.multiply(h.TECHNICOLOR,r)},polaroid:function(r){return r===void 0&&(r=!1),this.multiply(h.POLAROID,r)},shiftToBGR:function(r){return r===void 0&&(r=!1),this.multiply(h.SHIFT_BGR,r)},multiply:function(r,n){n===void 0&&(n=!1),n||this.reset();var e=this._matrix,s=c;return s.set(e),e.set([s[0]*r[0]+s[1]*r[5]+s[2]*r[10]+s[3]*r[15],s[0]*r[1]+s[1]*r[6]+s[2]*r[11]+s[3]*r[16],s[0]*r[2]+s[1]*r[7]+s[2]*r[12]+s[3]*r[17],s[0]*r[3]+s[1]*r[8]+s[2]*r[13]+s[3]*r[18],s[0]*r[4]+s[1]*r[9]+s[2]*r[14]+s[3]*r[19]+s[4],s[5]*r[0]+s[6]*r[5]+s[7]*r[10]+s[8]*r[15],s[5]*r[1]+s[6]*r[6]+s[7]*r[11]+s[8]*r[16],s[5]*r[2]+s[6]*r[7]+s[7]*r[12]+s[8]*r[17],s[5]*r[3]+s[6]*r[8]+s[7]*r[13]+s[8]*r[18],s[5]*r[4]+s[6]*r[9]+s[7]*r[14]+s[8]*r[19]+s[9],s[10]*r[0]+s[11]*r[5]+s[12]*r[10]+s[13]*r[15],s[10]*r[1]+s[11]*r[6]+s[12]*r[11]+s[13]*r[16],s[10]*r[2]+s[11]*r[7]+s[12]*r[12]+s[13]*r[17],s[10]*r[3]+s[11]*r[8]+s[12]*r[13]+s[13]*r[18],s[10]*r[4]+s[11]*r[9]+s[12]*r[14]+s[13]*r[19]+s[14],s[15]*r[0]+s[16]*r[5]+s[17]*r[10]+s[18]*r[15],s[15]*r[1]+s[16]*r[6]+s[17]*r[11]+s[18]*r[16],s[15]*r[2]+s[16]*r[7]+s[17]*r[12]+s[18]*r[17],s[15]*r[3]+s[16]*r[8]+s[17]*r[13]+s[18]*r[18],s[15]*r[4]+s[16]*r[9]+s[17]*r[14]+s[18]*r[19]+s[19]]),this._dirty=!0,this}});h.BLACK_WHITE=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],h.NEGATIVE=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],h.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],h.SEPIA=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],h.LSD=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],h.BROWN=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],h.VINTAGE=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],h.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],h.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],h.POLAROID=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],h.SHIFT_BGR=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],p.exports=h}),51767:((p,S,t)=>{var d=t(83419),c=t(29747),h=new d({initialize:function(n,e,s){this._rgb=[0,0,0],this.onChangeCallback=c,this.dirty=!1,this.set(n,e,s)},set:function(r,n,e){return r===void 0&&(r=0),n===void 0&&(n=0),e===void 0&&(e=0),this._rgb=[r,n,e],this.onChange(),this},equals:function(r,n,e){var s=this._rgb;return s[0]===r&&s[1]===n&&s[2]===e},onChange:function(){this.dirty=!0;var r=this._rgb;this.onChangeCallback.call(this,r[0],r[1],r[2])},r:{get:function(){return this._rgb[0]},set:function(r){this._rgb[0]=r,this.onChange()}},g:{get:function(){return this._rgb[1]},set:function(r){this._rgb[1]=r,this.onChange()}},b:{get:function(){return this._rgb[2]},set:function(r){this._rgb[2]=r,this.onChange()}},destroy:function(){this.onChangeCallback=null}});p.exports=h}),60461:(p=>{var S={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12};p.exports=S}),54312:((p,S,t)=>{var d=t(62235),c=t(35893),h=t(86327),r=t(88417),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,c(s)+o),h(e,d(s)+i),e};p.exports=n}),46768:((p,S,t)=>{var d=t(62235),c=t(26541),h=t(86327),r=t(385),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,c(s)-o),h(e,d(s)+i),e};p.exports=n}),35827:((p,S,t)=>{var d=t(62235),c=t(54380),h=t(86327),r=t(40136),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,c(s)+o),h(e,d(s)+i),e};p.exports=n}),46871:((p,S,t)=>{var d=t(66786),c=t(35893),h=t(7702),r=function(n,e,s,o){return s===void 0&&(s=0),o===void 0&&(o=0),d(n,c(e)+s,h(e)+o),n};p.exports=r}),5198:((p,S,t)=>{var d=t(7702),c=t(26541),h=t(20786),r=t(385),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,c(s)-o),h(e,d(s)+i),e};p.exports=n}),11879:((p,S,t)=>{var d=t(60461),c=[];c[d.BOTTOM_CENTER]=t(54312),c[d.BOTTOM_LEFT]=t(46768),c[d.BOTTOM_RIGHT]=t(35827),c[d.CENTER]=t(46871),c[d.LEFT_CENTER]=t(5198),c[d.RIGHT_CENTER]=t(80503),c[d.TOP_CENTER]=t(89698),c[d.TOP_LEFT]=t(922),c[d.TOP_RIGHT]=t(21373),c[d.LEFT_BOTTOM]=c[d.BOTTOM_LEFT],c[d.LEFT_TOP]=c[d.TOP_LEFT],c[d.RIGHT_BOTTOM]=c[d.BOTTOM_RIGHT],c[d.RIGHT_TOP]=c[d.TOP_RIGHT];var h=function(r,n,e,s,o){return c[e](r,n,s,o)};p.exports=h}),80503:((p,S,t)=>{var d=t(7702),c=t(54380),h=t(20786),r=t(40136),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,c(s)+o),h(e,d(s)+i),e};p.exports=n}),89698:((p,S,t)=>{var d=t(35893),c=t(17717),h=t(88417),r=t(66737),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),h(e,d(s)+o),r(e,c(s)-i),e};p.exports=n}),922:((p,S,t)=>{var d=t(26541),c=t(17717),h=t(385),r=t(66737),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),h(e,d(s)-o),r(e,c(s)-i),e};p.exports=n}),21373:((p,S,t)=>{var d=t(54380),c=t(17717),h=t(40136),r=t(66737),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),h(e,d(s)+o),r(e,c(s)-i),e};p.exports=n}),91660:((p,S,t)=>{p.exports={BottomCenter:t(54312),BottomLeft:t(46768),BottomRight:t(35827),Center:t(46871),LeftCenter:t(5198),QuickSet:t(11879),RightCenter:t(80503),TopCenter:t(89698),TopLeft:t(922),TopRight:t(21373)}}),71926:((p,S,t)=>{var d=t(60461),c=t(79291),h={In:t(91660),To:t(16694)};h=c(!1,h,d),p.exports=h}),21578:((p,S,t)=>{var d=t(62235),c=t(35893),h=t(88417),r=t(66737),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),h(e,c(s)+o),r(e,d(s)+i),e};p.exports=n}),10210:((p,S,t)=>{var d=t(62235),c=t(26541),h=t(385),r=t(66737),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),h(e,c(s)-o),r(e,d(s)+i),e};p.exports=n}),82341:((p,S,t)=>{var d=t(62235),c=t(54380),h=t(40136),r=t(66737),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),h(e,c(s)+o),r(e,d(s)+i),e};p.exports=n}),87958:((p,S,t)=>{var d=t(62235),c=t(26541),h=t(86327),r=t(40136),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,c(s)-o),h(e,d(s)+i),e};p.exports=n}),40080:((p,S,t)=>{var d=t(7702),c=t(26541),h=t(20786),r=t(40136),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,c(s)-o),h(e,d(s)+i),e};p.exports=n}),88466:((p,S,t)=>{var d=t(26541),c=t(17717),h=t(40136),r=t(66737),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),h(e,d(s)-o),r(e,c(s)-i),e};p.exports=n}),38829:((p,S,t)=>{var d=t(60461),c=[];c[d.BOTTOM_CENTER]=t(21578),c[d.BOTTOM_LEFT]=t(10210),c[d.BOTTOM_RIGHT]=t(82341),c[d.LEFT_BOTTOM]=t(87958),c[d.LEFT_CENTER]=t(40080),c[d.LEFT_TOP]=t(88466),c[d.RIGHT_BOTTOM]=t(19211),c[d.RIGHT_CENTER]=t(34609),c[d.RIGHT_TOP]=t(48741),c[d.TOP_CENTER]=t(49440),c[d.TOP_LEFT]=t(81288),c[d.TOP_RIGHT]=t(61323);var h=function(r,n,e,s,o){return c[e](r,n,s,o)};p.exports=h}),19211:((p,S,t)=>{var d=t(62235),c=t(54380),h=t(86327),r=t(385),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,c(s)+o),h(e,d(s)+i),e};p.exports=n}),34609:((p,S,t)=>{var d=t(7702),c=t(54380),h=t(20786),r=t(385),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,c(s)+o),h(e,d(s)+i),e};p.exports=n}),48741:((p,S,t)=>{var d=t(54380),c=t(17717),h=t(385),r=t(66737),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),h(e,d(s)+o),r(e,c(s)-i),e};p.exports=n}),49440:((p,S,t)=>{var d=t(35893),c=t(17717),h=t(86327),r=t(88417),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,d(s)+o),h(e,c(s)-i),e};p.exports=n}),81288:((p,S,t)=>{var d=t(26541),c=t(17717),h=t(86327),r=t(385),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,d(s)-o),h(e,c(s)-i),e};p.exports=n}),61323:((p,S,t)=>{var d=t(54380),c=t(17717),h=t(86327),r=t(40136),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,d(s)+o),h(e,c(s)-i),e};p.exports=n}),16694:((p,S,t)=>{p.exports={BottomCenter:t(21578),BottomLeft:t(10210),BottomRight:t(82341),LeftBottom:t(87958),LeftCenter:t(40080),LeftTop:t(88466),QuickSet:t(38829),RightBottom:t(19211),RightCenter:t(34609),RightTop:t(48741),TopCenter:t(49440),TopLeft:t(81288),TopRight:t(61323)}}),66786:((p,S,t)=>{var d=t(88417),c=t(20786),h=function(r,n,e){return d(r,n),c(r,e)};p.exports=h}),62235:(p=>{var S=function(t){return t.y+t.height-t.height*t.originY};p.exports=S}),72873:((p,S,t)=>{var d=t(62235),c=t(26541),h=t(54380),r=t(17717),n=t(87841),e=function(s,o){o===void 0&&(o=new n);var i=c(s),a=r(s);return o.x=i,o.y=a,o.width=h(s)-i,o.height=d(s)-a,o};p.exports=e}),35893:(p=>{var S=function(t){return t.x-t.width*t.originX+t.width*.5};p.exports=S}),7702:(p=>{var S=function(t){return t.y-t.height*t.originY+t.height*.5};p.exports=S}),26541:(p=>{var S=function(t){return t.x-t.width*t.originX};p.exports=S}),87431:(p=>{var S=function(t){return t.width*t.originX};p.exports=S}),46928:(p=>{var S=function(t){return t.height*t.originY};p.exports=S}),54380:(p=>{var S=function(t){return t.x+t.width-t.width*t.originX};p.exports=S}),17717:(p=>{var S=function(t){return t.y-t.height*t.originY};p.exports=S}),86327:(p=>{var S=function(t,d){return t.y=d-t.height+t.height*t.originY,t};p.exports=S}),88417:(p=>{var S=function(t,d){var c=t.width*t.originX;return t.x=d+c-t.width*.5,t};p.exports=S}),20786:(p=>{var S=function(t,d){var c=t.height*t.originY;return t.y=d+c-t.height*.5,t};p.exports=S}),385:(p=>{var S=function(t,d){return t.x=d+t.width*t.originX,t};p.exports=S}),40136:(p=>{var S=function(t,d){return t.x=d-t.width+t.width*t.originX,t};p.exports=S}),66737:(p=>{var S=function(t,d){return t.y=d+t.height*t.originY,t};p.exports=S}),58724:((p,S,t)=>{p.exports={CenterOn:t(66786),GetBottom:t(62235),GetBounds:t(72873),GetCenterX:t(35893),GetCenterY:t(7702),GetLeft:t(26541),GetOffsetX:t(87431),GetOffsetY:t(46928),GetRight:t(54380),GetTop:t(17717),SetBottom:t(86327),SetCenterX:t(88417),SetCenterY:t(20786),SetLeft:t(385),SetRight:t(40136),SetTop:t(66737)}}),20623:(p=>{var S={setCrisp:function(t){var d=["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"];return d.forEach(function(c){t.style["image-rendering"]=c}),t.style.msInterpolationMode="nearest-neighbor",t},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}};p.exports=S}),27919:((p,S,t)=>{var d=t(8054),c=t(68703),h=[],r=!1,n=function(){var e=function(m,x,g,y,T){x===void 0&&(x=1),g===void 0&&(g=1),y===void 0&&(y=d.CANVAS),T===void 0&&(T=!1);var C,E=i(y);return E===null?(E={parent:m,canvas:document.createElement("canvas"),type:y},y===d.CANVAS&&h.push(E),C=E.canvas):(E.parent=m,C=E.canvas),T&&(E.parent=C),C.width=x,C.height=g,r&&y===d.CANVAS&&c.disable(C.getContext("2d",{willReadFrequently:!1})),C},s=function(m,x,g){return e(m,x,g,d.CANVAS)},o=function(m,x,g){return e(m,x,g,d.WEBGL)},i=function(m){if(m===void 0&&(m=d.CANVAS),m===d.WEBGL)return null;for(var x=0;x<h.length;x++){var g=h[x];if(!g.parent&&g.type===m)return g}return null},a=function(m){var x=m instanceof HTMLCanvasElement;h.forEach(function(g){(x&&g.canvas===m||!x&&g.parent===m)&&(g.parent=null,g.canvas.width=1,g.canvas.height=1)})},l=function(){var m=0;return h.forEach(function(x){x.parent&&m++}),m},f=function(){return h.length-l()},u=function(){r=!0},v=function(){r=!1};return{create2D:s,create:e,createWebGL:o,disableSmoothing:u,enableSmoothing:v,first:i,free:f,pool:h,remove:a,total:l}};p.exports=n()}),68703:(p=>{var S="",t=function(){var d=function(n){for(var e=["i","webkitI","msI","mozI","oI"],s=0;s<e.length;s++){var o=e[s]+"mageSmoothingEnabled";if(o in n)return o}return null},c=function(n){return S===""&&(S=d(n)),S&&(n[S]=!0),n},h=function(n){return S===""&&(S=d(n)),S&&(n[S]=!1),n},r=function(n){return S!==null?n[S]:null};return{disable:h,enable:c,getPrefix:d,isEnabled:r}};p.exports=t()}),65208:(p=>{var S=function(t,d){return d===void 0&&(d="none"),t.style.msTouchAction=d,t.style["ms-touch-action"]=d,t.style["touch-action"]=d,t};p.exports=S}),91610:(p=>{var S=function(t,d){d===void 0&&(d="none");var c=["-webkit-","-khtml-","-moz-","-ms-",""];return c.forEach(function(h){t.style[h+"user-select"]=d}),t.style["-webkit-touch-callout"]=d,t.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",t};p.exports=S}),26253:((p,S,t)=>{p.exports={CanvasInterpolation:t(20623),CanvasPool:t(27919),Smoothing:t(68703),TouchAction:t(65208),UserSelect:t(91610)}}),40987:((p,S,t)=>{var d=t(83419),c=t(37589),h=t(1e3),r=t(7537),n=t(87837),e=new d({initialize:function(o,i,a,l){o===void 0&&(o=0),i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=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(o,i,a,l)},transparent:function(){return this._locked=!0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this._locked=!1,this.update(!0)},setTo:function(s,o,i,a,l){return a===void 0&&(a=255),l===void 0&&(l=!0),this._locked=!0,this.red=s,this.green=o,this.blue=i,this.alpha=a,this._locked=!1,this.update(l)},setGLTo:function(s,o,i,a){return a===void 0&&(a=1),this._locked=!0,this.redGL=s,this.greenGL=o,this.blueGL=i,this.alphaGL=a,this._locked=!1,this.update(!0)},setFromRGB:function(s){return this._locked=!0,this.red=s.r,this.green=s.g,this.blue=s.b,s.hasOwnProperty("a")&&(this.alpha=s.a),this._locked=!1,this.update(!0)},setFromHSV:function(s,o,i){return r(s,o,i,this)},update:function(s){if(s===void 0&&(s=!1),this._locked)return this;var o=this.r,i=this.g,a=this.b,l=this.a;return this._color=c(o,i,a),this._color32=h(o,i,a,l),this._rgba="rgba("+o+","+i+","+a+","+l/255+")",s&&n(o,i,a,this),this},updateHSV:function(){var s=this.r,o=this.g,i=this.b;return n(s,o,i,this),this},clone:function(){return new e(this.r,this.g,this.b,this.a)},gray:function(s){return this.setTo(s,s,s)},random:function(s,o){s===void 0&&(s=0),o===void 0&&(o=255);var i=Math.floor(s+Math.random()*(o-s)),a=Math.floor(s+Math.random()*(o-s)),l=Math.floor(s+Math.random()*(o-s));return this.setTo(i,a,l)},randomGray:function(s,o){s===void 0&&(s=0),o===void 0&&(o=255);var i=Math.floor(s+Math.random()*(o-s));return this.setTo(i,i,i)},saturate:function(s){return this.s+=s/100,this},desaturate:function(s){return this.s-=s/100,this},lighten:function(s){return this.v+=s/100,this},darken:function(s){return this.v-=s/100,this},brighten:function(s){var o=this.r,i=this.g,a=this.b;return o=Math.max(0,Math.min(255,o-Math.round(255*-(s/100)))),i=Math.max(0,Math.min(255,i-Math.round(255*-(s/100)))),a=Math.max(0,Math.min(255,a-Math.round(255*-(s/100)))),this.setTo(o,i,a)},color:{get:function(){return this._color}},color32:{get:function(){return this._color32}},rgba:{get:function(){return this._rgba}},redGL:{get:function(){return this.gl[0]},set:function(s){this.gl[0]=Math.min(Math.abs(s),1),this.r=Math.floor(this.gl[0]*255),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(s){this.gl[1]=Math.min(Math.abs(s),1),this.g=Math.floor(this.gl[1]*255),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(s){this.gl[2]=Math.min(Math.abs(s),1),this.b=Math.floor(this.gl[2]*255),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(s){this.gl[3]=Math.min(Math.abs(s),1),this.a=Math.floor(this.gl[3]*255),this.update()}},red:{get:function(){return this.r},set:function(s){s=Math.floor(Math.abs(s)),this.r=Math.min(s,255),this.gl[0]=s/255,this.update(!0)}},green:{get:function(){return this.g},set:function(s){s=Math.floor(Math.abs(s)),this.g=Math.min(s,255),this.gl[1]=s/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(s){s=Math.floor(Math.abs(s)),this.b=Math.min(s,255),this.gl[2]=s/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(s){s=Math.floor(Math.abs(s)),this.a=Math.min(s,255),this.gl[3]=s/255,this.update()}},h:{get:function(){return this._h},set:function(s){this._h=s,r(s,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(s){this._s=s,r(this._h,s,this._v,this)}},v:{get:function(){return this._v},set:function(s){this._v=s,r(this._h,this._s,s,this)}}});p.exports=e}),92728:((p,S,t)=>{var d=t(37589),c=function(h){h===void 0&&(h=1024);var r=[],n=255,e,s=255,o=0,i=0;for(e=0;e<=n;e++)r.push({r:s,g:e,b:i,color:d(s,e,i)});for(o=255,e=n;e>=0;e--)r.push({r:e,g:o,b:i,color:d(e,o,i)});for(s=0,e=0;e<=n;e++,o--)r.push({r:s,g:o,b:e,color:d(s,o,e)});for(o=0,i=255,e=0;e<=n;e++,i--,s++)r.push({r:s,g:o,b:i,color:d(s,o,i)});if(h===1024)return r;var a=[],l=0,f=1024/h;for(e=0;e<h;e++)a.push(r[Math.floor(l)]),l+=f;return a};p.exports=c}),91588:(p=>{var S=function(t){var d={r:t>>16&255,g:t>>8&255,b:t&255,a:255};return t>16777215&&(d.a=t>>>24),d};p.exports=S}),62957:(p=>{var S=function(t){var d=t.toString(16);return d.length===1?"0"+d:d};p.exports=S}),37589:(p=>{var S=function(t,d,c){return t<<16|d<<8|c};p.exports=S}),1e3:(p=>{var S=function(t,d,c,h){return h<<24|t<<16|d<<8|c};p.exports=S}),62183:((p,S,t)=>{var d=t(40987),c=t(89528),h=function(r,n,e){var s=e,o=e,i=e;if(n!==0){var a=e<.5?e*(1+n):e+n-e*n,l=2*e-a;s=c(l,a,r+1/3),o=c(l,a,r),i=c(l,a,r-1/3)}var f=new d;return f.setGLTo(s,o,i,1)};p.exports=h}),27939:((p,S,t)=>{var d=t(7537),c=function(h,r){h===void 0&&(h=1),r===void 0&&(r=1);for(var n=[],e=0;e<=359;e++)n.push(d(e/359,h,r));return n};p.exports=c}),7537:((p,S,t)=>{var d=t(37589);function c(r,n,e,s){var o=(r+n*6)%6,i=Math.min(o,4-o,1);return Math.round(255*(s-s*e*Math.max(0,i)))}var h=function(r,n,e,s){n===void 0&&(n=1),e===void 0&&(e=1);var o=c(5,r,n,e),i=c(3,r,n,e),a=c(1,r,n,e);return s?s.setTo?s.setTo(o,i,a,s.alpha,!0):(s.r=o,s.g=i,s.b=a,s.color=d(o,i,a),s):{r:o,g:i,b:a,color:d(o,i,a)}};p.exports=h}),70238:((p,S,t)=>{var d=t(40987),c=function(h){var r=new d;h=h.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(i,a,l,f){return a+a+l+l+f+f});var n=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(h);if(n){var e=parseInt(n[1],16),s=parseInt(n[2],16),o=parseInt(n[3],16);r.setTo(e,s,o)}return r};p.exports=c}),89528:(p=>{var S=function(t,d,c){return c<0&&(c+=1),c>1&&(c-=1),c<.16666666666666666?t+(d-t)*6*c:c<.5?d:c<.6666666666666666?t+(d-t)*(.6666666666666666-c)*6:t};p.exports=S}),30100:((p,S,t)=>{var d=t(40987),c=t(90664),h=function(r){var n=c(r);return new d(n.r,n.g,n.b,n.a)};p.exports=h}),90664:(p=>{var S=function(t){return t>16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:t&255}:{a:255,r:t>>16&255,g:t>>8&255,b:t&255}};p.exports=S}),13699:((p,S,t)=>{var d=t(28915),c=t(37589),h=function(e,s,o,i,a,l,f,u){f===void 0&&(f=100),u===void 0&&(u=0);var v=u/f,m=d(e,i,v),x=d(s,a,v),g=d(o,l,v);return{r:m,g:x,b:g,a:255,color:c(m,x,g)}},r=function(e,s,o,i){return o===void 0&&(o=100),i===void 0&&(i=0),h(e.r,e.g,e.b,s.r,s.g,s.b,o,i)},n=function(e,s,o,i,a,l){return a===void 0&&(a=100),l===void 0&&(l=0),h(e.r,e.g,e.b,s,o,i,a,l)};p.exports={RGBWithRGB:h,ColorWithRGB:n,ColorWithColor:r}}),68957:((p,S,t)=>{var d=t(40987),c=function(h){return new d(h.r,h.g,h.b,h.a)};p.exports=c}),87388:((p,S,t)=>{var d=t(40987),c=function(h){var r=new d,n=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(h.toLowerCase());if(n){var e=parseInt(n[1],10),s=parseInt(n[2],10),o=parseInt(n[3],10),i=n[4]!==void 0?parseFloat(n[4]):1;r.setTo(e,s,o,i*255)}return r};p.exports=c}),87837:(p=>{var S=function(t,d,c,h){h===void 0&&(h={h:0,s:0,v:0}),t/=255,d/=255,c/=255;var r=Math.min(t,d,c),n=Math.max(t,d,c),e=n-r,s=0,o=n===0?0:e/n,i=n;return n!==r&&(n===t?s=(d-c)/e+(d<c?6:0):n===d?s=(c-t)/e+2:n===c&&(s=(t-d)/e+4),s/=6),h.hasOwnProperty("_h")?(h._h=s,h._s=o,h._v=i):(h.h=s,h.s=o,h.v=i),h};p.exports=S}),75723:((p,S,t)=>{var d=t(62957),c=function(h,r,n,e,s){return e===void 0&&(e=255),s===void 0&&(s="#"),s==="#"?"#"+((1<<24)+(h<<16)+(r<<8)+n).toString(16).slice(1,7):"0x"+d(e)+d(h)+d(r)+d(n)};p.exports=c}),85386:((p,S,t)=>{var d=t(30976),c=t(40987),h=function(r,n){return r===void 0&&(r=0),n===void 0&&(n=255),new c(d(r,n),d(r,n),d(r,n))};p.exports=h}),80333:((p,S,t)=>{var d=t(70238),c=t(30100),h=t(68957),r=t(87388),n=function(e){var s=typeof e;switch(s){case"string":return e.substr(0,3).toLowerCase()==="rgb"?r(e):d(e);case"number":return c(e);case"object":return h(e)}};p.exports=n}),3956:((p,S,t)=>{var d=t(40987);d.ColorSpectrum=t(92728),d.ColorToRGBA=t(91588),d.ComponentToHex=t(62957),d.GetColor=t(37589),d.GetColor32=t(1e3),d.HexStringToColor=t(70238),d.HSLToColor=t(62183),d.HSVColorWheel=t(27939),d.HSVToRGB=t(7537),d.HueToComponent=t(89528),d.IntegerToColor=t(30100),d.IntegerToRGB=t(90664),d.Interpolate=t(13699),d.ObjectToColor=t(68957),d.RandomRGB=t(85386),d.RGBStringToColor=t(87388),d.RGBToHSV=t(87837),d.RGBToString=t(75723),d.ValueToColor=t(80333),p.exports=d}),27460:((p,S,t)=>{p.exports={Align:t(71926),BaseShader:t(73894),Bounds:t(58724),Canvas:t(26253),Color:t(3956),ColorMatrix:t(89422),Masks:t(69781),RGB:t(51767)}}),6858:((p,S,t)=>{var d=t(83419),c=t(39429),h=new d({initialize:function(n,e,s,o,i,a){e||(e=n.sys.make.image({x:s,y:o,key:i,frame:a,add:!1})),this.bitmapMask=e,this.invertAlpha=!1,this.isStencil=!1},setBitmap:function(r){this.bitmapMask=r},preRenderWebGL:function(r,n,e){r.pipelines.BITMAPMASK_PIPELINE.beginMask(this,n,e)},postRenderWebGL:function(r,n,e){r.pipelines.BITMAPMASK_PIPELINE.endMask(this,n,e)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null}});c.register("bitmapMask",function(r,n,e,s,o){return new h(this.scene,r,n,e,s,o)}),p.exports=h}),80661:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r,n){this.geometryMask=n,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(h){return this.geometryMask=h,this},setInvertAlpha:function(h){return h===void 0&&(h=!0),this.invertAlpha=h,this},preRenderWebGL:function(h,r,n){var e=h.gl;h.flush(),h.maskStack.length===0&&(e.enable(e.STENCIL_TEST),e.clear(e.STENCIL_BUFFER_BIT),h.maskCount=0),h.currentCameraMask.mask!==this&&(h.currentMask.mask=this),h.maskStack.push({mask:this,camera:n}),this.applyStencil(h,n,!0),h.maskCount++},applyStencil:function(h,r,n){var e=h.gl,s=this.geometryMask,o=h.maskCount,i=255;e.colorMask(!1,!1,!1,!1),n?(e.stencilFunc(e.EQUAL,o,i),e.stencilOp(e.KEEP,e.KEEP,e.INCR),o++):(e.stencilFunc(e.EQUAL,o+1,i),e.stencilOp(e.KEEP,e.KEEP,e.DECR)),this.level=o,s.renderWebGL(h,s,r),h.flush(),e.colorMask(!0,!0,!0,!0),e.stencilOp(e.KEEP,e.KEEP,e.KEEP),this.invertAlpha?e.stencilFunc(e.NOTEQUAL,o,i):e.stencilFunc(e.EQUAL,o,i)},postRenderWebGL:function(h){var r=h.gl;h.maskStack.pop(),h.maskCount--,h.flush();var n=h.currentMask;if(h.maskStack.length===0)n.mask=null,r.disable(r.STENCIL_TEST);else{var e=h.maskStack[h.maskStack.length-1];e.mask.applyStencil(h,e.camera,!1),h.currentCameraMask.mask!==e.mask?(n.mask=e.mask,n.camera=e.camera):n.mask=null}},preRenderCanvas:function(h,r,n){var e=this.geometryMask;h.currentContext.save(),e.renderCanvas(h,e,n,null,null,!0),h.currentContext.clip()},postRenderCanvas:function(h){h.currentContext.restore()},destroy:function(){this.geometryMask=null}});p.exports=c}),69781:((p,S,t)=>{p.exports={BitmapMask:t(6858),GeometryMask:t(80661)}}),73894:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r,n,e,s){(!n||n==="")&&(n=["precision mediump float;","uniform vec2 resolution;","varying vec2 fragCoord;","void main () {"," vec2 uv = fragCoord / resolution.xy;"," gl_FragColor = vec4(uv.xyx, 1.0);","}"].join(`
|
|
`)),(!e||e==="")&&(e=["precision mediump float;","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","varying vec2 fragCoord;","varying vec2 outTexCoord;","void main () {"," gl_Position = uProjectionMatrix * uViewMatrix * vec4(inPosition, 1.0, 1.0);"," fragCoord = vec2(inPosition.x, uResolution.y - inPosition.y);"," outTexCoord = vec2(inPosition.x / uResolution.x, fragCoord.y / uResolution.y);","}"].join(`
|
|
`)),s===void 0&&(s=null),this.key=r,this.fragmentSrc=n,this.vertexSrc=e,this.uniforms=s}});p.exports=c}),40366:(p=>{var S=function(t,d){var c;if(d)typeof d=="string"?c=document.getElementById(d):typeof d=="object"&&d.nodeType===1&&(c=d);else if(t.parentElement||d===null)return t;return c||(c=document.body),c.appendChild(t),t};p.exports=S}),83719:((p,S,t)=>{var d=t(40366),c=function(h){var r=h.config;if(!(!r.parent||!r.domCreateContainer)){var n=document.createElement("div");n.style.cssText=["display: block;","width: "+h.scale.width+"px;","height: "+h.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+r.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),h.domContainer=n,d(n,r.parent)}};p.exports=c}),57264:((p,S,t)=>{var d=t(25892),c=function(h){if(document.readyState==="complete"||document.readyState==="interactive"){h();return}var r=function(){document.removeEventListener("deviceready",r,!0),document.removeEventListener("DOMContentLoaded",r,!0),window.removeEventListener("load",r,!0),h()};document.body?d.cordova?document.addEventListener("deviceready",r,!1):(document.addEventListener("DOMContentLoaded",r,!0),window.addEventListener("load",r,!0)):window.setTimeout(r,20)};p.exports=c}),57811:(p=>{var S=function(t){if(!t)return window.innerHeight;var d=Math.abs(window.orientation),c={w:0,h:0},h=document.createElement("div");return h.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(h),c.w=d===90?h.offsetHeight:window.innerWidth,c.h=d===90?window.innerWidth:h.offsetHeight,document.documentElement.removeChild(h),h=null,Math.abs(window.orientation)!==90?c.h:c.w};p.exports=S}),45818:((p,S,t)=>{var d=t(13560),c=function(h,r){var n=window.screen,e=n?n.orientation||n.mozOrientation||n.msOrientation:!1;if(e&&typeof e.type=="string")return e.type;if(typeof e=="string")return e;if(typeof window.orientation=="number")return window.orientation===0||window.orientation===180?d.ORIENTATION.PORTRAIT:d.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return d.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return d.ORIENTATION.LANDSCAPE}else return r>h?d.ORIENTATION.PORTRAIT:d.ORIENTATION.LANDSCAPE};p.exports=c}),74403:(p=>{var S=function(t){var d;return t!==""&&(typeof t=="string"?d=document.getElementById(t):t&&t.nodeType===1&&(d=t)),d||(d=document.body),d};p.exports=S}),56836:(p=>{var S=function(t){var d="";try{if(window.DOMParser){var c=new DOMParser;d=c.parseFromString(t,"text/xml")}else d=new ActiveXObject("Microsoft.XMLDOM"),d.loadXML(t)}catch{d=null}return!d||!d.documentElement||d.getElementsByTagName("parsererror").length?null:d};p.exports=S}),35846:(p=>{var S=function(t){t.parentNode&&t.parentNode.removeChild(t)};p.exports=S}),43092:((p,S,t)=>{var d=t(83419),c=t(29747),h=new d({initialize:function(){this.isRunning=!1,this.callback=c,this.isSetTimeOut=!1,this.timeOutID=null,this.delay=0;var n=this;this.step=function e(s){n.callback(s),n.isRunning&&(n.timeOutID=window.requestAnimationFrame(e))},this.stepTimeout=function e(){n.isRunning&&(n.timeOutID=window.setTimeout(e,n.delay)),n.callback(window.performance.now())}},start:function(r,n,e){this.isRunning||(this.callback=r,this.isSetTimeOut=n,this.delay=e,this.isRunning=!0,this.timeOutID=n?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=c}});p.exports=h}),84902:((p,S,t)=>{var d={AddToDOM:t(40366),DOMContentLoaded:t(57264),GetInnerHeight:t(57811),GetScreenOrientation:t(45818),GetTarget:t(74403),ParseXML:t(56836),RemoveFromDOM:t(35846),RequestAnimationFrame:t(43092)};p.exports=d}),47565:((p,S,t)=>{var d=t(83419),c=t(50792),h=t(37277),r=new d({Extends:c,initialize:function(){c.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});h.register("EventEmitter",r,"events"),p.exports=r}),93055:((p,S,t)=>{p.exports={EventEmitter:t(47565)}}),20122:((p,S,t)=>{var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s){s===void 0&&(s=1),c.call(this,h.BARREL,e),this.amount=s}});p.exports=r}),32251:((p,S,t)=>{var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s,o,i,a,l,f){o===void 0&&(o=1),i===void 0&&(i=1),a===void 0&&(a=1),l===void 0&&(l=1),f===void 0&&(f=4),c.call(this,h.BLOOM,e),this.steps=f,this.offsetX=o,this.offsetY=i,this.blurStrength=a,this.strength=l,this.glcolor=[1,1,1],s!=null&&(this.color=s)},color:{get:function(){var n=this.glcolor;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}}});p.exports=r}),9047:((p,S,t)=>{var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s,o,i,a,l,f){s===void 0&&(s=0),o===void 0&&(o=2),i===void 0&&(i=2),a===void 0&&(a=1),f===void 0&&(f=4),c.call(this,h.BLUR,e),this.quality=s,this.x=o,this.y=i,this.steps=f,this.strength=a,this.glcolor=[1,1,1],l!=null&&(this.color=l)},color:{get:function(){var n=this.glcolor;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}}});p.exports=r}),27885:((p,S,t)=>{var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s,o,i,a,l,f,u){s===void 0&&(s=.5),o===void 0&&(o=1),i===void 0&&(i=.2),a===void 0&&(a=!1),l===void 0&&(l=1),f===void 0&&(f=1),u===void 0&&(u=1),c.call(this,h.BOKEH,e),this.radius=s,this.amount=o,this.contrast=i,this.isTiltShift=a,this.strength=u,this.blurX=l,this.blurY=f}});p.exports=r}),12578:((p,S,t)=>{var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s,o,i,a,l){s===void 0&&(s=8),a===void 0&&(a=1),l===void 0&&(l=.005),c.call(this,h.CIRCLE,e),this.scale=a,this.feather=l,this.thickness=s,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4],o!=null&&(this.color=o),i!=null&&(this.backgroundColor=i)},color:{get:function(){var n=this.glcolor;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}},backgroundColor:{get:function(){var n=this.glcolor2;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor2;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}},backgroundAlpha:{get:function(){return this.glcolor2[3]},set:function(n){this.glcolor2[3]=n}}});p.exports=r}),15802:((p,S,t)=>{var d=t(83419),c=t(89422),h=t(14811),r=new d({Extends:c,initialize:function(e){c.call(this),this.type=h.COLOR_MATRIX,this.gameObject=e,this.active=!0},destroy:function(){this.gameObject=null,this._matrix=null,this._data=null}});p.exports=r}),72898:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r,n){this.type=r,this.gameObject=n,this.active=!0},setActive:function(h){return this.active=h,this},destroy:function(){this.gameObject=null,this.active=!1}});p.exports=c}),44553:((p,S,t)=>{var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s,o,i){s===void 0&&(s="__WHITE"),o===void 0&&(o=.005),i===void 0&&(i=.005),c.call(this,h.DISPLACEMENT,e),this.x=o,this.y=i,this.glTexture,this.setTexture(s)},setTexture:function(n){var e=this.gameObject.scene.sys.textures.getFrame(n);return e&&(this.glTexture=e.glTexture),this}});p.exports=r}),68531:((p,S,t)=>{var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s,o,i,a){o===void 0&&(o=4),i===void 0&&(i=0),a===void 0&&(a=!1),c.call(this,h.GLOW,e),this.outerStrength=o,this.innerStrength=i,this.knockout=a,this.glcolor=[1,1,1,1],s!==void 0&&(this.color=s)},color:{get:function(){var n=this.glcolor;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}}});p.exports=r}),37102:((p,S,t)=>{var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s,o,i,a,l,f,u,v){i===void 0&&(i=.2),a===void 0&&(a=0),l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=1),v===void 0&&(v=0),c.call(this,h.GRADIENT,e),this.alpha=i,this.size=v,this.fromX=a,this.fromY=l,this.toX=f,this.toY=u,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0],s!=null&&(this.color1=s),o!=null&&(this.color2=o)},color1:{get:function(){var n=this.glcolor1;return(n[0]<<16)+(n[1]<<8)+(n[2]|0)},set:function(n){var e=this.glcolor1;e[0]=n>>16&255,e[1]=n>>8&255,e[2]=n&255}},color2:{get:function(){var n=this.glcolor2;return(n[0]<<16)+(n[1]<<8)+(n[2]|0)},set:function(n){var e=this.glcolor2;e[0]=n>>16&255,e[1]=n>>8&255,e[2]=n&255}}});p.exports=r}),86886:((p,S,t)=>{var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s){s===void 0&&(s=1),c.call(this,h.PIXELATE,e),this.amount=s}});p.exports=r}),92322:((p,S,t)=>{var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s,o,i,a,l,f,u){s===void 0&&(s=0),o===void 0&&(o=0),i===void 0&&(i=.1),a===void 0&&(a=1),f===void 0&&(f=6),u===void 0&&(u=1),c.call(this,h.SHADOW,e),this.x=s,this.y=o,this.decay=i,this.power=a,this.glcolor=[0,0,0,1],this.samples=f,this.intensity=u,l!==void 0&&(this.color=l)},color:{get:function(){var n=this.glcolor;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}}});p.exports=r}),39563:((p,S,t)=>{var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s,o,i,a){s===void 0&&(s=.5),o===void 0&&(o=.5),i===void 0&&(i=3),a===void 0&&(a=!1),c.call(this,h.SHINE,e),this.speed=s,this.lineWidth=o,this.gradient=i,this.reveal=a}});p.exports=r}),56448:((p,S,t)=>{var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s,o,i,a){s===void 0&&(s=.5),o===void 0&&(o=.5),i===void 0&&(i=.5),a===void 0&&(a=.5),c.call(this,h.VIGNETTE,e),this.x=s,this.y=o,this.radius=i,this.strength=a}});p.exports=r}),38433:((p,S,t)=>{var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s,o,i,a){s===void 0&&(s=.1),o===void 0&&(o=0),i===void 0&&(i=0),a===void 0&&(a=!1),c.call(this,h.WIPE,e),this.progress=0,this.wipeWidth=s,this.direction=o,this.axis=i,this.reveal=a}});p.exports=r}),14811:(p=>{var S={GLOW:4,SHADOW:5,PIXELATE:6,VIGNETTE:7,SHINE:8,BLUR:9,GRADIENT:12,BLOOM:13,COLOR_MATRIX:14,CIRCLE:15,BARREL:16,DISPLACEMENT:17,WIPE:18,BOKEH:19};p.exports=S}),66064:((p,S,t)=>{var d=t(79291),c=t(14811),h={Barrel:t(20122),Controller:t(72898),Bloom:t(32251),Blur:t(9047),Bokeh:t(27885),Circle:t(12578),ColorMatrix:t(15802),Displacement:t(44553),Glow:t(68531),Gradient:t(37102),Pixelate:t(86886),Shadow:t(92322),Shine:t(39563),Vignette:t(56448),Wipe:t(38433)};h=d(!1,h,c),p.exports=h}),25305:((p,S,t)=>{var d=t(10312),c=t(23568),h=function(r,n,e){n.x=c(e,"x",0),n.y=c(e,"y",0),n.depth=c(e,"depth",0),n.flipX=c(e,"flipX",!1),n.flipY=c(e,"flipY",!1);var s=c(e,"scale",null);typeof s=="number"?n.setScale(s):s!==null&&(n.scaleX=c(s,"x",1),n.scaleY=c(s,"y",1));var o=c(e,"scrollFactor",null);typeof o=="number"?n.setScrollFactor(o):o!==null&&(n.scrollFactorX=c(o,"x",1),n.scrollFactorY=c(o,"y",1)),n.rotation=c(e,"rotation",0);var i=c(e,"angle",null);i!==null&&(n.angle=i),n.alpha=c(e,"alpha",1);var a=c(e,"origin",null);if(typeof a=="number")n.setOrigin(a);else if(a!==null){var l=c(a,"x",.5),f=c(a,"y",.5);n.setOrigin(l,f)}n.blendMode=c(e,"blendMode",d.NORMAL),n.visible=c(e,"visible",!0);var u=c(e,"add",!0);return u&&r.sys.displayList.add(n),n.preUpdate&&r.sys.updateList.add(n),n};p.exports=h}),13059:((p,S,t)=>{var d=t(23568),c=function(h,r){var n=d(r,"anims",null);if(n===null)return h;if(typeof n=="string")h.anims.play(n);else if(typeof n=="object"){var e=h.anims,s=d(n,"key",void 0);if(s){var o=d(n,"startFrame",void 0),i=d(n,"delay",0),a=d(n,"repeat",0),l=d(n,"repeatDelay",0),f=d(n,"yoyo",!1),u=d(n,"play",!1),v=d(n,"delayedPlay",0),m={key:s,delay:i,repeat:a,repeatDelay:l,yoyo:f,startFrame:o};u?e.play(m):v>0?e.playAfterDelay(m,v):e.load(m)}}return h};p.exports=c}),8050:((p,S,t)=>{var d=t(83419),c=t(73162),h=t(37277),r=t(51708),n=t(44594),e=t(19186),s=new d({Extends:c,initialize:function(i){c.call(this,i),this.sortChildrenFlag=!1,this.scene=i,this.systems=i.sys,this.events=i.sys.events,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.events.once(n.BOOT,this.boot,this),this.events.on(n.START,this.start,this)},boot:function(){this.events.once(n.DESTROY,this.destroy,this)},addChildCallback:function(o){o.displayList&&o.displayList!==this&&o.removeFromDisplayList(),o.parentContainer&&o.parentContainer.remove(o),o.displayList||(this.queueDepthSort(),o.displayList=this,o.emit(r.ADDED_TO_SCENE,o,this.scene),this.events.emit(n.ADDED_TO_SCENE,o,this.scene))},removeChildCallback:function(o){this.queueDepthSort(),o.displayList=null,o.emit(r.REMOVED_FROM_SCENE,o,this.scene),this.events.emit(n.REMOVED_FROM_SCENE,o,this.scene)},start:function(){this.events.once(n.SHUTDOWN,this.shutdown,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(e(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(o,i){return o._depth-i._depth},getChildren:function(){return this.list},shutdown:function(){for(var o=this.list,i=o.length;i--;)o[i]&&o[i].destroy(!0);o.length=0,this.events.off(n.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(n.START,this.start,this),this.scene=null,this.systems=null,this.events=null}});h.register("DisplayList",s,"displayList"),p.exports=s}),95643:((p,S,t)=>{var d=t(83419),c=t(53774),h=t(45893),r=t(50792),n=t(51708),e=t(44594),s=new d({Extends:r,initialize:function(i,a){r.call(this),this.scene=i,this.displayList=null,this.type=a,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(n.ADDED_TO_SCENE,this.addedToScene,this),this.on(n.REMOVED_FROM_SCENE,this.removedFromScene,this),i.sys.queueDepthSort()},setActive:function(o){return this.active=o,this},setName:function(o){return this.name=o,this},setState:function(o){return this.state=o,this},setDataEnabled:function(){return this.data||(this.data=new h(this)),this},setData:function(o,i){return this.data||(this.data=new h(this)),this.data.set(o,i),this},incData:function(o,i){return this.data||(this.data=new h(this)),this.data.inc(o,i),this},toggleData:function(o){return this.data||(this.data=new h(this)),this.data.toggle(o),this},getData:function(o){return this.data||(this.data=new h(this)),this.data.get(o)},setInteractive:function(o,i,a){return this.scene.sys.input.enable(this,o,i,a),this},disableInteractive:function(o){return o===void 0&&(o=!1),this.scene.sys.input.disable(this,o),this},removeInteractive:function(o){return o===void 0&&(o=!1),this.scene.sys.input.clear(this),o&&this.scene.sys.input.resetCursor(),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return c(this)},willRender:function(o){var i=this.displayList&&this.displayList.active?this.displayList.willRender(o):!0;return!(!i||s.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&o.id)},getIndexList:function(){for(var o=this,i=this.parentContainer,a=[];i&&(a.unshift(i.getIndex(o)),o=i,i.parentContainer);)i=i.parentContainer;return this.displayList?a.unshift(this.displayList.getIndex(o)):a.unshift(this.scene.sys.displayList.getIndex(o)),a},addToDisplayList:function(o){return o===void 0&&(o=this.scene.sys.displayList),this.displayList&&this.displayList!==o&&this.removeFromDisplayList(),o.exists(this)||(this.displayList=o,o.add(this,!0),o.queueDepthSort(),this.emit(n.ADDED_TO_SCENE,this,this.scene),o.events.emit(e.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var o=this.displayList||this.scene.sys.displayList;return o&&o.exists(this)&&(o.remove(this,!0),o.queueDepthSort(),this.displayList=null,this.emit(n.REMOVED_FROM_SCENE,this,this.scene),o.events.emit(e.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},getDisplayList:function(){var o=null;return this.parentContainer?o=this.parentContainer.list:this.displayList&&(o=this.displayList.list),o},destroy:function(o){!this.scene||this.ignoreDestroy||(o===void 0&&(o=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(n.DESTROY,this,o),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.preFX&&(this.preFX.destroy(),this.preFX=void 0),this.postFX&&(this.postFX.destroy(),this.postFX=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});s.RENDER_MASK=15,p.exports=s}),44603:((p,S,t)=>{var d=t(83419),c=t(37277),h=t(44594),r=new d({initialize:function(e){this.scene=e,this.systems=e.sys,this.events=e.sys.events,this.displayList,this.updateList,this.events.once(h.BOOT,this.boot,this),this.events.on(h.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(h.DESTROY,this.destroy,this)},start:function(){this.events.once(h.SHUTDOWN,this.shutdown,this)},shutdown:function(){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,this.displayList=null,this.updateList=null}});r.register=function(n,e){r.prototype.hasOwnProperty(n)||(r.prototype[n]=e)},r.remove=function(n){r.prototype.hasOwnProperty(n)&&delete r.prototype[n]},c.register("GameObjectCreator",r,"make"),p.exports=r}),39429:((p,S,t)=>{var d=t(83419),c=t(37277),h=t(44594),r=new d({initialize:function(e){this.scene=e,this.systems=e.sys,this.events=e.sys.events,this.displayList,this.updateList,this.events.once(h.BOOT,this.boot,this),this.events.on(h.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(h.DESTROY,this.destroy,this)},start:function(){this.events.once(h.SHUTDOWN,this.shutdown,this)},existing:function(n){return(n.renderCanvas||n.renderWebGL)&&this.displayList.add(n),n.preUpdate&&this.updateList.add(n),n},shutdown:function(){this.events.off(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,this.displayList=null,this.updateList=null}});r.register=function(n,e){r.prototype.hasOwnProperty(n)||(r.prototype[n]=e)},r.remove=function(n){r.prototype.hasOwnProperty(n)&&delete r.prototype[n]},c.register("GameObjectFactory",r,"add"),p.exports=r}),91296:((p,S,t)=>{var d=t(61340),c=new d,h=new d,r=new d,n={camera:c,sprite:h,calc:r},e=function(s,o,i){var a=c,l=h,f=r;return l.applyITRS(s.x,s.y,s.rotation,s.scaleX,s.scaleY),a.copyFrom(o.matrix),i?(a.multiplyWithOffset(i,-o.scrollX*s.scrollFactorX,-o.scrollY*s.scrollFactorY),l.e=s.x,l.f=s.y):(l.e-=o.scrollX*s.scrollFactorX,l.f-=o.scrollY*s.scrollFactorY),a.multiply(l,f),n};p.exports=e}),45027:((p,S,t)=>{var d=t(83419),c=t(25774),h=t(37277),r=t(44594),n=new d({Extends:c,initialize:function(s){c.call(this),this.checkQueue=!0,this.scene=s,this.systems=s.sys,s.sys.events.once(r.BOOT,this.boot,this),s.sys.events.on(r.START,this.start,this)},boot:function(){this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){var e=this.systems.events;e.on(r.PRE_UPDATE,this.update,this),e.on(r.UPDATE,this.sceneUpdate,this),e.once(r.SHUTDOWN,this.shutdown,this)},sceneUpdate:function(e,s){for(var o=this._active,i=o.length,a=0;a<i;a++){var l=o[a];l.active&&l.preUpdate.call(l,e,s)}},shutdown:function(){for(var e=this._active.length;e--;)this._active[e].destroy(!0);for(e=this._pending.length;e--;)this._pending[e].destroy(!0);for(e=this._destroy.length;e--;)this._destroy[e].destroy(!0);this._toProcess=0,this._pending=[],this._active=[],this._destroy=[],this.removeAllListeners();var s=this.systems.events;s.off(r.PRE_UPDATE,this.update,this),s.off(r.UPDATE,this.sceneUpdate,this),s.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.systems.events.off(r.START,this.start,this),this.scene=null,this.systems=null}});h.register("UpdateList",n,"updateList"),p.exports=n}),3217:(p=>{var S=function(t,d,c,h,r,n,e,s,o,i,a,l,f,u,v){var m=c.x-d.displayOriginX+r,x=c.y-d.displayOriginY+n,g=m+c.w,y=x+c.h,T=e.a,C=e.b,E=e.c,M=e.d,P=e.e,A=e.f,R=m*T+x*E+P,F=m*C+x*M+A,w=m*T+y*E+P,I=m*C+y*M+A,U=g*T+y*E+P,N=g*C+y*M+A,D=g*T+x*E+P,B=g*C+x*M+A;s&&(R=Math.round(R),F=Math.round(F),w=Math.round(w),I=Math.round(I),U=Math.round(U),N=Math.round(N),D=Math.round(D),B=Math.round(B)),t.batchQuad(d,R,F,w,I,U,N,D,B,h.u0,h.v0,h.u1,h.v1,o,i,a,l,f,u,v)};p.exports=S}),53048:(p=>{var S=function(t,d,c,h){if(c===void 0&&(c=!1),h===void 0)return h={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},h;var r=t.text,n=r.length,e=t.maxWidth,s=t.wordWrapCharCode,o=Number.MAX_VALUE,i=Number.MAX_VALUE,a=0,l=0,f=t.fontData.chars,u=t.fontData.lineHeight,v=t.letterSpacing,m=t.lineSpacing,x=0,g=0,y=0,T=null,C=t._align,E=0,M=0,P=t.fontSize/t.fontData.size,A=P*t.scaleX,R=P*t.scaleY,F=null,w=0,I=[],U=Number.MAX_VALUE,N=0,D=0,B=0,L,G,O,X=[],z=[],V=null,Y=function(ft,ct){for(var rt=0,dt=0;dt<ft.length;dt++){var vt=ft.charCodeAt(dt),pt=ct.chars[vt];pt&&(rt+=pt.xAdvance)}return rt*A};if(e>0){O=r.split(`
|
|
`);var W=[];for(L=0;L<O.length;L++){var H=O[L],K="",b="",J="",$="";for(G=0;G<H.length;G++)if(y=H.charCodeAt(G),K+=H[G],y===s||G===H.length-1){$=J+K;var Z=Y($,t.fontData);Z<=e?J=$:(b=b.slice(0,-1),b+=(b?`
|
|
`:"")+J,J=K),K=""}b=b.slice(0,-1),b+=(b?`
|
|
`:"")+J,W.push(b)}r=W.join(`
|
|
`),h.wrappedText=r,n=r.length}var q=0;for(L=0;L<n;L++){if(y=r.charCodeAt(L),y===10){V!==null&&(X.push({word:V.word,i:V.i,x:V.x*A,y:V.y*R,w:V.w*A,h:V.h*R}),V=null),F=null,I[D]=B,B>N&&(N=B),B<U&&(U=B),D++,B=0,x=0,g=(u+m)*D;continue}if(T=f[y],!!T){if(E=x,M=g,F!==null){var _=T.kerning[w];E+=_!==void 0?_:0}o>E&&(o=E),i>M&&(i=M);var tt=E+T.xAdvance,Q=M+u;a<tt&&(a=tt),l<Q&&(l=Q);var j=T.xOffset+T.xAdvance+(_!==void 0?_:0);y===s?V!==null&&(X.push({word:V.word,i:V.i,x:V.x*A,y:V.y*R,w:V.w*A,h:V.h*R}),V=null):(V===null&&(V={word:"",i:q,x,y:g,w:0,h:u}),V.word=V.word.concat(r[L]),V.w+=j),z.push({i:q,idx:L,char:r[L],code:y,x:(T.xOffset+E)*P,y:(T.yOffset+g)*P,w:T.width*P,h:T.height*P,t:g*P,r:tt*P,b:u*P,line:D,glyph:T}),x+=T.xAdvance+v+(_!==void 0?_:0),F=T,w=y,B=tt*P,q++}}if(V!==null&&X.push({word:V.word,i:V.i,x:V.x*A,y:V.y*R,w:V.w*A,h:V.h*R}),I[D]=B,B>N&&(N=B),B<U&&(U=B),C>0)for(var k=0;k<z.length;k++){var et=z[k];if(C===1){var nt=(N-I[et.line])/2;et.x+=nt,et.r+=nt}else if(C===2){var lt=N-I[et.line];et.x+=lt,et.r+=lt}}var it=h.local,st=h.global;return O=h.lines,it.x=o*P,it.y=i*P,it.width=a*P,it.height=l*P,st.x=t.x-t._displayOriginX+o*A,st.y=t.y-t._displayOriginY+i*R,st.width=a*A,st.height=l*R,O.shortest=U,O.longest=N,O.lengths=I,d&&(it.x=Math.ceil(it.x),it.y=Math.ceil(it.y),it.width=Math.ceil(it.width),it.height=Math.ceil(it.height),st.x=Math.ceil(st.x),st.y=Math.ceil(st.y),st.width=Math.ceil(st.width),st.height=Math.ceil(st.height),O.shortest=Math.ceil(U),O.longest=Math.ceil(N)),c&&(t._displayOriginX=t.originX*it.width,t._displayOriginY=t.originY*it.height,st.x=t.x-t._displayOriginX*t.scaleX,st.y=t.y-t._displayOriginY*t.scaleY,d&&(st.x=Math.ceil(st.x),st.y=Math.ceil(st.y))),h.words=X,h.characters=z,h.lines.height=u,h.scale=P,h.scaleX=t.scaleX,h.scaleY=t.scaleY,h};p.exports=S}),61327:((p,S,t)=>{var d=t(21859),c=function(h,r,n,e,s,o,i){var a=h.sys.textures.get(n),l=a.get(e),f=h.sys.cache.xml.get(s);if(l&&f){var u=d(f,l,o,i,a);return h.sys.cache.bitmapFont.add(r,{data:u,texture:n,frame:e,fromAtlas:!0}),!0}else return!1};p.exports=c}),6925:((p,S,t)=>{var d=t(35154),c=function(h,r){var n=r.width,e=r.height,s=Math.floor(n/2),o=Math.floor(e/2),i=d(r,"chars","");if(i!==""){var a=d(r,"image",""),l=h.sys.textures.getFrame(a),f=l.cutX,u=l.cutY,v=l.source.width,m=l.source.height,x=d(r,"offset.x",0),g=d(r,"offset.y",0),y=d(r,"spacing.x",0),T=d(r,"spacing.y",0),C=d(r,"lineSpacing",0),E=d(r,"charsPerRow",null);E===null&&(E=v/n,E>i.length&&(E=i.length));for(var M=x,P=g,A={retroFont:!0,font:a,size:n,lineHeight:e+C,chars:{}},R=0,F=0;F<i.length;F++){var w=i.charCodeAt(F),I=(f+M)/v,U=(u+P)/m,N=(f+M+n)/v,D=(u+P+e)/m;A.chars[w]={x:M,y:P,width:n,height:e,centerX:s,centerY:o,xOffset:0,yOffset:0,xAdvance:n,data:{},kerning:{},u0:I,v0:U,u1:N,v1:D},R++,R===E?(R=0,M=x,P+=e+T):M+=n+y}var B={data:A,frame:null,texture:a};return B}};p.exports=c}),21859:(p=>{function S(d,c){return parseInt(d.getAttribute(c),10)}var t=function(d,c,h,r,n){h===void 0&&(h=0),r===void 0&&(r=0);var e=c.cutX,s=c.cutY,o=c.source.width,i=c.source.height,a=c.sourceIndex,l={},f=d.getElementsByTagName("info")[0],u=d.getElementsByTagName("common")[0];l.font=f.getAttribute("face"),l.size=S(f,"size"),l.lineHeight=S(u,"lineHeight")+r,l.chars={};var v=d.getElementsByTagName("char"),m=c!==void 0&&c.trimmed;if(m)var x=c.height,g=c.width;for(var y=0;y<v.length;y++){var T=v[y],C=S(T,"id"),E=String.fromCharCode(C),M=S(T,"x"),P=S(T,"y"),A=S(T,"width"),R=S(T,"height");m&&(M<g&&(g=M),P<x&&(x=P)),m&&x!==0&&g!==0&&(M-=c.x,P-=c.y);var F=(e+M)/o,w=(s+P)/i,I=(e+M+A)/o,U=(s+P+R)/i;if(l.chars[C]={x:M,y:P,width:A,height:R,centerX:Math.floor(A/2),centerY:Math.floor(R/2),xOffset:S(T,"xoffset"),yOffset:S(T,"yoffset"),xAdvance:S(T,"xadvance")+h,data:{},kerning:{},u0:F,v0:w,u1:I,v1:U},n&&A!==0&&R!==0){var N=n.add(E,a,M,P,A,R);N&&N.setUVs(A,R,F,w,I,U)}}var D=d.getElementsByTagName("kerning");for(y=0;y<D.length;y++){var B=D[y],L=S(B,"first"),G=S(B,"second"),O=S(B,"amount");l.chars[G].kerning[L]=O}return l};p.exports=t}),196:((p,S,t)=>{var d=t(87662),c=t(79291),h={Parse:t(6925)};h=c(!1,h,d),p.exports=h}),87662:(p=>{var S={TEXT_SET1:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:` !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ`,TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:`ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.' `,TEXT_SET7:`AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-'39`,TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:`ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'"?!`,TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:`ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()':;0123456789`};p.exports=S}),2638:((p,S,t)=>{var d=t(22186),c=t(83419),h=t(12310),r=new c({Extends:d,Mixins:[h],initialize:function(e,s,o,i,a,l,f){d.call(this,e,s,o,i,a,l,f),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(n,e){return this.cropWidth=n,this.cropHeight=e,this},setDisplayCallback:function(n){return this.displayCallback=n,this},setScrollX:function(n){return this.scrollX=n,this},setScrollY:function(n){return this.scrollY=n,this}});p.exports=r}),86741:((p,S,t)=>{var d=t(20926),c=function(h,r,n,e){var s=r._text,o=s.length,i=h.currentContext;if(!(o===0||!d(h,i,r,n,e))){n.addToRenderList(r);var a=r.fromAtlas?r.frame:r.texture.frames.__BASE,l=r.displayCallback,f=r.callbackData,u=r.fontData.chars,v=r.fontData.lineHeight,m=r._letterSpacing,x=0,g=0,y=0,T=null,C=0,E=0,M=0,P=0,A=0,R=0,F=null,w=0,I=r.frame.source.image,U=a.cutX,N=a.cutY,D=0,B=0,L=r._fontSize/r.fontData.size,G=r._align,O=0,X=0;r.getTextBounds(!1);var z=r._bounds.lines;G===1?X=(z.longest-z.lengths[0])/2:G===2&&(X=z.longest-z.lengths[0]),i.translate(-r.displayOriginX,-r.displayOriginY);var V=n.roundPixels;r.cropWidth>0&&r.cropHeight>0&&(i.beginPath(),i.rect(0,0,r.cropWidth,r.cropHeight),i.clip());for(var Y=0;Y<o;Y++){if(B=L,D=0,y=s.charCodeAt(Y),y===10){O++,G===1?X=(z.longest-z.lengths[O])/2:G===2&&(X=z.longest-z.lengths[O]),x=0,g+=v,F=null;continue}if(T=u[y],!!T){if(C=U+T.x,E=N+T.y,M=T.width,P=T.height,A=T.xOffset+x-r.scrollX,R=T.yOffset+g-r.scrollY,F!==null){var W=T.kerning[w];A+=W!==void 0?W:0}if(l){f.index=Y,f.charCode=y,f.x=A,f.y=R,f.scale=B,f.rotation=D,f.data=T.data;var H=l(f);A=H.x,R=H.y,B=H.scale,D=H.rotation}A*=B,R*=B,A+=X,x+=T.xAdvance+m+(W!==void 0?W:0),F=T,w=y,!(M===0||P===0||y===32)&&(V&&(A=Math.round(A),R=Math.round(R)),i.save(),i.translate(A,R),i.rotate(D),i.scale(B,B),i.drawImage(I,C,E,M,P,0,0,M,P),i.restore())}}i.restore()}};p.exports=c}),11164:((p,S,t)=>{var d=t(2638),c=t(25305),h=t(44603),r=t(23568);h.register("dynamicBitmapText",function(n,e){n===void 0&&(n={});var s=r(n,"font",""),o=r(n,"text",""),i=r(n,"size",!1),a=new d(this.scene,0,0,s,o,i);return e!==void 0&&(n.add=e),c(this.scene,a,n),a})}),72566:((p,S,t)=>{var d=t(2638),c=t(39429);c.register("dynamicBitmapText",function(h,r,n,e,s){return this.displayList.add(new d(this.scene,h,r,n,e,s))})}),12310:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(73482),h=t(86741),p.exports={renderWebGL:c,renderCanvas:h}}),73482:((p,S,t)=>{var d=t(91296),c=t(61340),h=t(70554),r=new c,n=function(e,s,o,i){var a=s.text,l=a.length;if(l!==0){o.addToRenderList(s);var f=e.pipelines.set(s.pipeline,s),u=d(s,o,i);e.pipelines.preBatch(s);var v=u.sprite,m=u.calc,x=r,g=s.cropWidth>0||s.cropHeight>0;g&&(f.flush(),e.pushScissor(m.tx,m.ty,s.cropWidth*m.scaleX,s.cropHeight*m.scaleY));var y=s.frame,T=y.glTexture,C=s.tintFill,E=h.getTintAppendFloatAlpha(s.tintTopLeft,o.alpha*s._alphaTL),M=h.getTintAppendFloatAlpha(s.tintTopRight,o.alpha*s._alphaTR),P=h.getTintAppendFloatAlpha(s.tintBottomLeft,o.alpha*s._alphaBL),A=h.getTintAppendFloatAlpha(s.tintBottomRight,o.alpha*s._alphaBR),R=f.setGameObject(s),F=0,w=0,I=0,U=0,N=s.letterSpacing,D,B=0,L=0,G,O=s.scrollX,X=s.scrollY,z=s.fontData,V=z.chars,Y=z.lineHeight,W=s.fontSize/z.size,H=0,K=s._align,b=0,J=0,$=s.getTextBounds(!1);s.maxWidth>0&&(a=$.wrappedText,l=a.length);var Z=s._bounds.lines;K===1?J=(Z.longest-Z.lengths[0])/2:K===2&&(J=Z.longest-Z.lengths[0]);for(var q=o.roundPixels,_=s.displayCallback,tt=s.callbackData,Q=0;Q<l;Q++){if(I=a.charCodeAt(Q),I===10){b++,K===1?J=(Z.longest-Z.lengths[b])/2:K===2&&(J=Z.longest-Z.lengths[b]),F=0,w+=Y,G=null;continue}if(D=V[I],!!D){B=D.width,L=D.height;var j=D.xOffset+F-O,k=D.yOffset+w-X;if(G!==null){var et=D.kerning[U]||0;j+=et,F+=et}if(F+=D.xAdvance+N,G=D,U=I,!(B===0||L===0||I===32)){if(W=s.fontSize/s.fontData.size,H=0,_){tt.color=0,tt.tint.topLeft=E,tt.tint.topRight=M,tt.tint.bottomLeft=P,tt.tint.bottomRight=A,tt.index=Q,tt.charCode=I,tt.x=j,tt.y=k,tt.scale=W,tt.rotation=H,tt.data=D.data;var nt=_(tt);j=nt.x,k=nt.y,W=nt.scale,H=nt.rotation,nt.color?(E=nt.color,M=nt.color,P=nt.color,A=nt.color):(E=nt.tint.topLeft,M=nt.tint.topRight,P=nt.tint.bottomLeft,A=nt.tint.bottomRight),E=h.getTintAppendFloatAlpha(E,o.alpha*s._alphaTL),M=h.getTintAppendFloatAlpha(M,o.alpha*s._alphaTR),P=h.getTintAppendFloatAlpha(P,o.alpha*s._alphaBL),A=h.getTintAppendFloatAlpha(A,o.alpha*s._alphaBR)}j*=W,k*=W,j-=s.displayOriginX,k-=s.displayOriginY,j+=J,x.applyITRS(j,k,H,W,W),m.multiply(x,v);var lt=D.u0,it=D.v0,st=D.u1,ft=D.v1,ct=B,rt=L,dt=v.e,vt=v.f,pt=rt*v.c+v.e,yt=rt*v.d+v.f,Tt=ct*v.a+rt*v.c+v.e,St=ct*v.b+rt*v.d+v.f,Ct=ct*v.a+v.e,Et=ct*v.b+v.f;q&&(dt=Math.round(dt),vt=Math.round(vt),pt=Math.round(pt),yt=Math.round(yt),Tt=Math.round(Tt),St=Math.round(St),Ct=Math.round(Ct),Et=Math.round(Et)),f.shouldFlush(6)&&(f.flush(),R=f.setGameObject(s)),f.batchQuad(s,dt,vt,pt,yt,Tt,St,Ct,Et,lt,it,st,ft,E,M,P,A,C,T,R)}}}g&&(f.flush(),e.popScissor()),e.pipelines.postBatch(s)}};p.exports=n}),22186:((p,S,t)=>{var d=t(83419),c=t(45319),h=t(31401),r=t(95643),n=t(53048),e=t(61327),s=t(21859),o=t(87841),i=t(18658),a=new d({Extends:r,Mixins:[h.Alpha,h.BlendMode,h.Depth,h.GetBounds,h.Mask,h.Origin,h.Pipeline,h.PostPipeline,h.ScrollFactor,h.Texture,h.Tint,h.Transform,h.Visible,i],initialize:function(f,u,v,m,x,g,y){x===void 0&&(x=""),y===void 0&&(y=0),r.call(this,f,"BitmapText"),this.font=m;var T=this.scene.sys.cache.bitmapFont.get(m);if(!T)throw new Error("Invalid BitmapText key: "+m);this.fontData=T.data,this._text="",this._fontSize=g||this.fontData.size,this._letterSpacing=0,this._lineSpacing=0,this._align=y,this._bounds=n(),this._dirty=!0,this._maxWidth=0,this.wordWrapCharCode=32,this.charColors=[],this.dropShadowX=0,this.dropShadowY=0,this.dropShadowColor=0,this.dropShadowAlpha=.5,this.fromAtlas=T.fromAtlas,this.setTexture(T.texture,T.frame),this.setPosition(u,v),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(),this.setText(x)},setLeftAlign:function(){return this._align=a.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=a.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=a.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(l){return this._fontSize=l,this._dirty=!0,this},setLetterSpacing:function(l){return l===void 0&&(l=0),this._letterSpacing=l,this._dirty=!0,this},setLineSpacing:function(l){return l===void 0&&(l=0),this.lineSpacing=l,this},setText:function(l){return!l&&l!==0&&(l=""),Array.isArray(l)&&(l=l.join(`
|
|
`)),l!==this.text&&(this._text=l.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},setDropShadow:function(l,f,u,v){return l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=0),v===void 0&&(v=.5),this.dropShadowX=l,this.dropShadowY=f,this.dropShadowColor=u,this.dropShadowAlpha=v,this},setCharacterTint:function(l,f,u,v,m,x,g){l===void 0&&(l=0),f===void 0&&(f=1),u===void 0&&(u=!1),v===void 0&&(v=-1),m===void 0&&(m=v,x=v,g=v);var y=this.text.length;f===-1&&(f=y),l<0&&(l=y+l),l=c(l,0,y-1);for(var T=c(l+f,l,y),C=this.charColors,E=l;E<T;E++){var M=C[E];if(v===-1)C[E]=null;else{var P=u?1:0;M?(M.tintEffect=P,M.tintTL=v,M.tintTR=m,M.tintBL=x,M.tintBR=g):C[E]={tintEffect:P,tintTL:v,tintTR:m,tintBL:x,tintBR:g}}}return this},setWordTint:function(l,f,u,v,m,x,g){f===void 0&&(f=1);for(var y=this.getTextBounds(),T=y.words,C=typeof l=="number",E=0,M=0;M<T.length;M++){var P=T[M];if((C&&M===l||!C&&P.word===l)&&(this.setCharacterTint(P.i,P.word.length,u,v,m,x,g),E++,E===f))return this}return this},getTextBounds:function(l){var f=this._bounds;return(this._dirty||l||this.scaleX!==f.scaleX||this.scaleY!==f.scaleY)&&(n(this,l,!0,f),this._dirty=!1),f},getCharacterAt:function(l,f,u){for(var v=this.getLocalPoint(l,f,null,u),m=this.getTextBounds(),x=m.characters,g=new o,y=0;y<x.length;y++){var T=x[y];if(g.setTo(T.x,T.t,T.r-T.x,T.b),g.contains(v.x,v.y))return T}return null},updateDisplayOrigin:function(){return this._dirty=!0,this.getTextBounds(!1),this},setFont:function(l,f,u){f===void 0&&(f=this._fontSize),u===void 0&&(u=this._align);var v=this.scene.sys.cache.bitmapFont.get(l);return v&&(this.font=l,this.fontData=v.data,this._fontSize=f,this._align=u,this.fromAtlas=v.fromAtlas===!0,this.setTexture(v.texture,v.frame),n(this,!1,!0,this._bounds)),this},setMaxWidth:function(l,f){return this._maxWidth=l,this._dirty=!0,f!==void 0&&(this.wordWrapCharCode=f),this},setDisplaySize:function(l,f){this.setScale(1,1),this.getTextBounds(!1);var u=l/this.width,v=f/this.height;return this.setScale(u,v),this},align:{set:function(l){this._align=l,this._dirty=!0},get:function(){return this._align}},text:{set:function(l){this.setText(l)},get:function(){return this._text}},fontSize:{set:function(l){this._fontSize=l,this._dirty=!0},get:function(){return this._fontSize}},letterSpacing:{set:function(l){this._letterSpacing=l,this._dirty=!0},get:function(){return this._letterSpacing}},lineSpacing:{set:function(l){this._lineSpacing=l,this._dirty=!0},get:function(){return this._lineSpacing}},maxWidth:{set:function(l){this._maxWidth=l,this._dirty=!0},get:function(){return this._maxWidth}},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},displayWidth:{set:function(l){this.setScaleX(1),this.getTextBounds(!1);var f=l/this.width;this.setScaleX(f)},get:function(){return this.width}},displayHeight:{set:function(l){this.setScaleY(1),this.getTextBounds(!1);var f=l/this.height;this.setScaleY(f)},get:function(){return this.height}},toJSON:function(){var l=h.ToJSON(this),f={font:this.font,text:this.text,fontSize:this.fontSize,letterSpacing:this.letterSpacing,lineSpacing:this.lineSpacing,align:this.align};return l.data=f,l},preDestroy:function(){this.charColors.length=0,this._bounds=null,this.fontData=null}});a.ALIGN_LEFT=0,a.ALIGN_CENTER=1,a.ALIGN_RIGHT=2,a.ParseFromAtlas=e,a.ParseXMLBitmapFont=s,p.exports=a}),37289:((p,S,t)=>{var d=t(20926),c=function(h,r,n,e){var s=r._text,o=s.length,i=h.currentContext;if(!(o===0||!d(h,i,r,n,e))){n.addToRenderList(r);var a=r.fromAtlas?r.frame:r.texture.frames.__BASE,l=r.fontData.chars,f=r.fontData.lineHeight,u=r._letterSpacing,v=r._lineSpacing,m=0,x=0,g=0,y=null,T=0,C=0,E=0,M=0,P=0,A=0,R=null,F=0,w=a.source.image,I=a.cutX,U=a.cutY,N=r._fontSize/r.fontData.size,D=r._align,B=0,L=0,G=r.getTextBounds(!1);r.maxWidth>0&&(s=G.wrappedText,o=s.length);var O=r._bounds.lines;D===1?L=(O.longest-O.lengths[0])/2:D===2&&(L=O.longest-O.lengths[0]),i.translate(-r.displayOriginX,-r.displayOriginY);for(var X=n.roundPixels,z=0;z<o;z++){if(g=s.charCodeAt(z),g===10){B++,D===1?L=(O.longest-O.lengths[B])/2:D===2&&(L=O.longest-O.lengths[B]),m=0,x+=f+v,R=null;continue}if(y=l[g],!!y){if(T=I+y.x,C=U+y.y,E=y.width,M=y.height,P=y.xOffset+m,A=y.yOffset+x,R!==null){var V=y.kerning[F];P+=V!==void 0?V:0}P*=N,A*=N,P+=L,m+=y.xAdvance+u+(V!==void 0?V:0),R=y,F=g,!(E===0||M===0||g===32)&&(X&&(P=Math.round(P),A=Math.round(A)),i.save(),i.translate(P,A),i.scale(N,N),i.drawImage(w,T,C,E,M,0,0,E,M),i.restore())}}i.restore()}};p.exports=c}),57336:((p,S,t)=>{var d=t(22186),c=t(25305),h=t(44603),r=t(23568),n=t(35154);h.register("bitmapText",function(e,s){e===void 0&&(e={});var o=n(e,"font",""),i=r(e,"text",""),a=r(e,"size",!1),l=n(e,"align",0),f=new d(this.scene,0,0,o,i,a,l);return s!==void 0&&(e.add=s),c(this.scene,f,e),f})}),34914:((p,S,t)=>{var d=t(22186),c=t(39429);c.register("bitmapText",function(h,r,n,e,s,o){return this.displayList.add(new d(this.scene,h,r,n,e,s,o))})}),18658:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(33590),h=t(37289),p.exports={renderWebGL:c,renderCanvas:h}}),33590:((p,S,t)=>{var d=t(3217),c=t(91296),h=t(70554),r=function(n,e,s,o){var i=e._text,a=i.length;if(a!==0){s.addToRenderList(e);var l=n.pipelines.set(e.pipeline,e),f=c(e,s,o).calc;n.pipelines.preBatch(e);var u=s.roundPixels,v=s.alpha,m=e.charColors,x=e.tintFill,g=h.getTintAppendFloatAlpha,y=g(e.tintTopLeft,v*e._alphaTL),T=g(e.tintTopRight,v*e._alphaTR),C=g(e.tintBottomLeft,v*e._alphaBL),E=g(e.tintBottomRight,v*e._alphaBR),M=e.frame.glTexture,P=l.setGameObject(e),A=e.getTextBounds(!1),R,F,w,I=A.characters,U=e.dropShadowX,N=e.dropShadowY,D=U!==0||N!==0;if(D){var B=e.dropShadowColor,L=e.dropShadowAlpha,G=g(B,v*L*e._alphaTL),O=g(B,v*L*e._alphaTR),X=g(B,v*L*e._alphaBL),z=g(B,v*L*e._alphaBR);for(R=0;R<I.length;R++)F=I[R],w=F.glyph,!(F.code===32||w.width===0||w.height===0)&&d(l,e,F,w,U,N,f,u,G,O,X,z,1,M,P)}for(R=0;R<I.length;R++)if(F=I[R],w=F.glyph,!(F.code===32||w.width===0||w.height===0))if(l.shouldFlush(6)&&(l.flush(),P=l.setGameObject(e)),m[F.i]){var V=m[F.i],Y=V.tintEffect,W=g(V.tintTL,v*e._alphaTL),H=g(V.tintTR,v*e._alphaTR),K=g(V.tintBL,v*e._alphaBL),b=g(V.tintBR,v*e._alphaBR);d(l,e,F,w,0,0,f,u,W,H,K,b,Y,M,P)}else d(l,e,F,w,0,0,f,u,y,T,C,E,x,M,P);n.pipelines.postBatch(e)}};p.exports=r}),6107:((p,S,t)=>{var d=t(48011),c=t(46590),h=t(83419),r=t(31401),n=t(4327),e=t(95643),s=t(73162),o=new h({Extends:e,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Mask,r.Pipeline,r.PostPipeline,r.ScrollFactor,r.Size,r.Texture,r.Transform,r.Visible,d],initialize:function(a,l,f,u,v){e.call(this,a,"Blitter"),this.setTexture(u,v),this.setPosition(l,f),this.initPipeline(),this.initPostPipeline(),this.children=new s,this.renderList=[],this.dirty=!1},create:function(i,a,l,f,u){f===void 0&&(f=!0),u===void 0&&(u=this.children.length),l===void 0?l=this.frame:l instanceof n||(l=this.texture.get(l));var v=new c(this,i,a,l,f);return this.children.addAt(v,u,!1),this.dirty=!0,v},createFromCallback:function(i,a,l,f){for(var u=this.createMultiple(a,l,f),v=0;v<u.length;v++){var m=u[v];i.call(this,m,v)}return u},createMultiple:function(i,a,l){a===void 0&&(a=this.frame.name),l===void 0&&(l=!0),Array.isArray(a)||(a=[a]);var f=[],u=this;return a.forEach(function(v){for(var m=0;m<i;m++)f.push(u.create(0,0,v,l))}),f},childCanRender:function(i){return i.visible&&i.alpha>0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0},preDestroy:function(){this.children.destroy(),this.renderList=[]}});p.exports=o}),72396:(p=>{var S=function(t,d,c,h){var r=d.getRenderList();if(r.length!==0){var n=t.currentContext,e=c.alpha*d.alpha;if(e!==0){c.addToRenderList(d),n.globalCompositeOperation=t.blendModes[d.blendMode],n.imageSmoothingEnabled=!d.frame.source.scaleMode;var s=d.x-c.scrollX*d.scrollFactorX,o=d.y-c.scrollY*d.scrollFactorY;n.save(),h&&h.copyToContext(n);for(var i=c.roundPixels,a=0;a<r.length;a++){var l=r[a],f=l.flipX||l.flipY,u=l.frame,v=u.canvasData,m=u.x,x=u.y,g=1,y=1,T=l.alpha*e;T!==0&&(n.globalAlpha=T,f?(l.flipX&&(g=-1,m-=v.width),l.flipY&&(y=-1,x-=v.height),v.width>0&&v.height>0&&(n.save(),n.translate(l.x+s,l.y+o),n.scale(g,y),n.drawImage(u.source.image,v.x,v.y,v.width,v.height,m,x,v.width,v.height),n.restore())):(i&&(m=Math.round(m),x=Math.round(x)),v.width>0&&v.height>0&&n.drawImage(u.source.image,v.x,v.y,v.width,v.height,m+l.x+s,x+l.y+o,v.width,v.height)))}n.restore()}}};p.exports=S}),9403:((p,S,t)=>{var d=t(6107),c=t(25305),h=t(44603),r=t(23568);h.register("blitter",function(n,e){n===void 0&&(n={});var s=r(n,"key",null),o=r(n,"frame",null),i=new d(this.scene,0,0,s,o);return e!==void 0&&(n.add=e),c(this.scene,i,n),i})}),12709:((p,S,t)=>{var d=t(6107),c=t(39429);c.register("blitter",function(h,r,n,e){return this.displayList.add(new d(this.scene,h,r,n,e))})}),48011:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(99485),h=t(72396),p.exports={renderWebGL:c,renderCanvas:h}}),99485:((p,S,t)=>{var d=t(61340),c=t(70554),h=new d,r=function(n,e,s,o){var i=e.getRenderList(),a=s.alpha*e.alpha;if(!(i.length===0||a===0)){s.addToRenderList(e);var l=n.pipelines.set(this.pipeline,e),f=s.scrollX*e.scrollFactorX,u=s.scrollY*e.scrollFactorY,v=h.copyFrom(s.matrix);o&&(v.multiplyWithOffset(o,-f,-u),f=0,u=0);var m=e.x-f,x=e.y-u,g=-1,y=!1,T=s.roundPixels;n.pipelines.preBatch(e);for(var C=0;C<i.length;C++){var E=i[C],M=E.frame,P=E.alpha*a;if(P!==0){var A=M.width,R=M.height,F=m+E.x+M.x,w=x+E.y+M.y;E.flipX&&(A*=-1,F+=M.width),E.flipY&&(R*=-1,w+=M.height);var I=v.setQuad(F,w,F+A,w+R,T),U=c.getTintAppendFloatAlpha(E.tint,P);if(M.sourceIndex!==g){var N=l.setGameObject(e,M);g=M.sourceIndex}l.batchQuad(e,I[0],I[1],I[2],I[3],I[4],I[5],I[6],I[7],M.u0,M.v0,M.u1,M.v1,U,U,U,U,y,M.glTexture,N)&&(g=-1)}}n.pipelines.postBatch(e)}};p.exports=r}),46590:((p,S,t)=>{var d=t(83419),c=t(4327),h=new d({initialize:function(n,e,s,o,i){this.parent=n,this.x=e,this.y=s,this.frame=o,this.data={},this.tint=16777215,this._visible=i,this._alpha=1,this.flipX=!1,this.flipY=!1,this.hasTransformComponent=!0},setFrame:function(r){return r===void 0?this.frame=this.parent.frame:r instanceof c&&r.texture===this.parent.texture?this.frame=r:this.frame=this.parent.texture.get(r),this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this},reset:function(r,n,e){return this.x=r,this.y=n,this.flipX=!1,this.flipY=!1,this._alpha=1,this._visible=!0,this.parent.dirty=!0,e&&this.setFrame(e),this},setPosition:function(r,n){return this.x=r,this.y=n,this},setFlipX:function(r){return this.flipX=r,this},setFlipY:function(r){return this.flipY=r,this},setFlip:function(r,n){return this.flipX=r,this.flipY=n,this},setVisible:function(r){return this.visible=r,this},setAlpha:function(r){return this.alpha=r,this},setTint:function(r){return this.tint=r,this},destroy:function(){this.parent.dirty=!0,this.parent.children.remove(this),this.parent=void 0,this.frame=void 0,this.data=void 0},visible:{get:function(){return this._visible},set:function(r){this.parent.dirty|=this._visible!==r,this._visible=r}},alpha:{get:function(){return this._alpha},set:function(r){this.parent.dirty|=this._alpha>0!=r>0,this._alpha=r}}});p.exports=h}),16005:((p,S,t)=>{var d=t(45319),c=2,h={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(r,n,e,s){return r===void 0&&(r=1),n===void 0?this.alpha=r:(this._alphaTL=d(r,0,1),this._alphaTR=d(n,0,1),this._alphaBL=d(e,0,1),this._alphaBR=d(s,0,1)),this},alpha:{get:function(){return this._alpha},set:function(r){var n=d(r,0,1);this._alpha=n,this._alphaTL=n,this._alphaTR=n,this._alphaBL=n,this._alphaBR=n,n===0?this.renderFlags&=~c:this.renderFlags|=c}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(r){var n=d(r,0,1);this._alphaTL=n,n!==0&&(this.renderFlags|=c)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(r){var n=d(r,0,1);this._alphaTR=n,n!==0&&(this.renderFlags|=c)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(r){var n=d(r,0,1);this._alphaBL=n,n!==0&&(this.renderFlags|=c)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(r){var n=d(r,0,1);this._alphaBR=n,n!==0&&(this.renderFlags|=c)}}};p.exports=h}),88509:((p,S,t)=>{var d=t(45319),c=2,h={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(r){return r===void 0&&(r=1),this.alpha=r,this},alpha:{get:function(){return this._alpha},set:function(r){var n=d(r,0,1);this._alpha=n,n===0?this.renderFlags&=~c:this.renderFlags|=c}}};p.exports=h}),90065:((p,S,t)=>{var d=t(10312),c={_blendMode:d.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(h){typeof h=="string"&&(h=d[h]),h|=0,h>=-1&&(this._blendMode=h)}},setBlendMode:function(h){return this.blendMode=h,this}};p.exports=c}),94215:(p=>{var S={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,d){return this.width=t,this.height=d,this},setDisplaySize:function(t,d){return this.displayWidth=t,this.displayHeight=d,this}};p.exports=S}),61683:(p=>{var S={texture:null,frame:null,isCropped:!1,setCrop:function(t,d,c,h){if(t===void 0)this.isCropped=!1;else if(this.frame){if(typeof t=="number")this.frame.setCropUVs(this._crop,t,d,c,h,this.flipX,this.flipY);else{var r=t;this.frame.setCropUVs(this._crop,r.x,r.y,r.width,r.height,this.flipX,this.flipY)}this.isCropped=!0}return this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};p.exports=S}),89272:((p,S,t)=>{var d=t(37105),c={_depth:0,depth:{get:function(){return this._depth},set:function(h){this.displayList&&this.displayList.queueDepthSort(),this._depth=h}},setDepth:function(h){return h===void 0&&(h=0),this.depth=h,this},setToTop:function(){var h=this.getDisplayList();return h&&d.BringToTop(h,this),this},setToBack:function(){var h=this.getDisplayList();return h&&d.SendToBack(h,this),this},setAbove:function(h){var r=this.getDisplayList();return r&&h&&d.MoveAbove(r,this,h),this},setBelow:function(h){var r=this.getDisplayList();return r&&h&&d.MoveBelow(r,this,h),this}};p.exports=c}),47059:((p,S,t)=>{var d=t(83419),c=t(66064),h=t(19133),r=new d({initialize:function(e,s){this.gameObject=e,this.isPost=s,this.enabled=!1,this.list=[],this.padding=0},setPadding:function(n){return n===void 0&&(n=0),this.padding=n,this.gameObject},onFXCopy:function(){},onFX:function(){},enable:function(n){if(!this.isPost){var e=this.gameObject.scene.sys.renderer;e&&e.pipelines?(this.gameObject.pipeline=e.pipelines.FX_PIPELINE,n!==void 0&&(this.padding=n),this.enabled=!0):this.enabled=!1}},clear:function(){if(this.isPost)this.gameObject.resetPostPipeline(!0);else{for(var n=this.list,e=0;e<n.length;e++)n[e].destroy();this.list=[]}return this.enabled=!1,this.gameObject},remove:function(n){var e;if(this.isPost){var s=this.gameObject.getPostPipeline(String(n.type));for(Array.isArray(s)||(s=[s]),e=0;e<s.length;e++){var o=s[e];if(o.controller===n){this.gameObject.removePostPipeline(o),n.destroy();break}}}else{var i=this.list;for(e=0;e<i.length;e++)i[e]===n&&(h(i,e),n.destroy())}return this.gameObject},disable:function(n){return n===void 0&&(n=!1),this.isPost||this.gameObject.resetPipeline(),this.enabled=!1,n&&this.clear(),this.gameObject},add:function(n,e){if(this.isPost){var s=String(n.type);this.gameObject.setPostPipeline(s,e);var o=this.gameObject.getPostPipeline(s);if(o)return Array.isArray(o)&&(o=o.pop()),o&&(o.controller=n),n}else return this.enabled||this.enable(),this.list.push(n),n},addGlow:function(n,e,s,o,i,a){return this.add(new c.Glow(this.gameObject,n,e,s,o),{quality:i,distance:a})},addShadow:function(n,e,s,o,i,a,l){return this.add(new c.Shadow(this.gameObject,n,e,s,o,i,a,l))},addPixelate:function(n){return this.add(new c.Pixelate(this.gameObject,n))},addVignette:function(n,e,s,o){return this.add(new c.Vignette(this.gameObject,n,e,s,o))},addShine:function(n,e,s,o){return this.add(new c.Shine(this.gameObject,n,e,s,o))},addBlur:function(n,e,s,o,i,a){return this.add(new c.Blur(this.gameObject,n,e,s,o,i,a))},addGradient:function(n,e,s,o,i,a,l,f){return this.add(new c.Gradient(this.gameObject,n,e,s,o,i,a,l,f))},addBloom:function(n,e,s,o,i,a){return this.add(new c.Bloom(this.gameObject,n,e,s,o,i,a))},addColorMatrix:function(){return this.add(new c.ColorMatrix(this.gameObject))},addCircle:function(n,e,s,o,i){return this.add(new c.Circle(this.gameObject,n,e,s,o,i))},addBarrel:function(n){return this.add(new c.Barrel(this.gameObject,n))},addDisplacement:function(n,e,s){return this.add(new c.Displacement(this.gameObject,n,e,s))},addWipe:function(n,e,s){return this.add(new c.Wipe(this.gameObject,n,e,s))},addReveal:function(n,e,s){return this.add(new c.Wipe(this.gameObject,n,e,s,!0))},addBokeh:function(n,e,s){return this.add(new c.Bokeh(this.gameObject,n,e,s))},addTiltShift:function(n,e,s,o,i,a){return this.add(new c.Bokeh(this.gameObject,n,e,s,!0,o,i,a))},destroy:function(){this.clear(),this.gameObject=null}});p.exports=r}),54434:(p=>{var S={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,d){return this.flipX=t,this.flipY=d,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}};p.exports=S}),8004:((p,S,t)=>{var d=t(87841),c=t(11520),h=t(26099),r={prepareBoundsOutput:function(n,e){if(e===void 0&&(e=!1),this.rotation!==0&&c(n,this.x,this.y,this.rotation),e&&this.parentContainer){var s=this.parentContainer.getBoundsTransformMatrix();s.transformPoint(n.x,n.y,n)}return n},getCenter:function(n,e){return n===void 0&&(n=new h),n.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,n.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(n,e)},getTopLeft:function(n,e){return n||(n=new h),n.x=this.x-this.displayWidth*this.originX,n.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(n,e)},getTopCenter:function(n,e){return n||(n=new h),n.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,n.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(n,e)},getTopRight:function(n,e){return n||(n=new h),n.x=this.x-this.displayWidth*this.originX+this.displayWidth,n.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(n,e)},getLeftCenter:function(n,e){return n||(n=new h),n.x=this.x-this.displayWidth*this.originX,n.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(n,e)},getRightCenter:function(n,e){return n||(n=new h),n.x=this.x-this.displayWidth*this.originX+this.displayWidth,n.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(n,e)},getBottomLeft:function(n,e){return n||(n=new h),n.x=this.x-this.displayWidth*this.originX,n.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(n,e)},getBottomCenter:function(n,e){return n||(n=new h),n.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,n.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(n,e)},getBottomRight:function(n,e){return n||(n=new h),n.x=this.x-this.displayWidth*this.originX+this.displayWidth,n.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(n,e)},getBounds:function(n){n===void 0&&(n=new d);var e,s,o,i,a,l,f,u;if(this.parentContainer){var v=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(n),v.transformPoint(n.x,n.y,n),e=n.x,s=n.y,this.getTopRight(n),v.transformPoint(n.x,n.y,n),o=n.x,i=n.y,this.getBottomLeft(n),v.transformPoint(n.x,n.y,n),a=n.x,l=n.y,this.getBottomRight(n),v.transformPoint(n.x,n.y,n),f=n.x,u=n.y}else this.getTopLeft(n),e=n.x,s=n.y,this.getTopRight(n),o=n.x,i=n.y,this.getBottomLeft(n),a=n.x,l=n.y,this.getBottomRight(n),f=n.x,u=n.y;return n.x=Math.min(e,o,a,f),n.y=Math.min(s,i,l,u),n.width=Math.max(e,o,a,f)-n.x,n.height=Math.max(s,i,l,u)-n.y,n}};p.exports=r}),8573:((p,S,t)=>{var d=t(6858),c=t(80661),h={mask:null,setMask:function(r){return this.mask=r,this},clearMask:function(r){return r===void 0&&(r=!1),r&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(r,n,e,s,o){return r===void 0&&(this.texture||this.shader||this.geom)&&(r=this),new d(this.scene,r,n,e,s,o)},createGeometryMask:function(r){return r===void 0&&(this.type==="Graphics"||this.geom)&&(r=this),new c(this.scene,r)}};p.exports=h}),27387:(p=>{var S={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,d){return t===void 0&&(t=.5),d===void 0&&(d=t),this.originX=t,this.originY=d,this.updateDisplayOrigin()},setOriginFromFrame:function(){return!this.frame||!this.frame.customPivot?this.setOrigin():(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin())},setDisplayOrigin:function(t,d){return t===void 0&&(t=0),d===void 0&&(d=t),this.displayOriginX=t,this.displayOriginY=d,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};p.exports=S}),37640:((p,S,t)=>{var d=t(39506),c=t(57355),h=t(35154),r=t(86353),n=t(26099),e={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:r.PLAYING_FORWARD,setPath:function(s,o){o===void 0&&(o=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=s,o&&this.startFollow(o),this},setRotateToPath:function(s,o){return o===void 0&&(o=0),this.rotateToPath=s,this.pathRotationOffset=o,this},isFollowing:function(){var s=this.pathTween;return s&&s.isPlaying()},startFollow:function(s,o){s===void 0&&(s={}),o===void 0&&(o=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),typeof s=="number"&&(s={duration:s}),s.from=h(s,"from",0),s.to=h(s,"to",1);var a=c(s,"positionOnPath",!1);this.rotateToPath=c(s,"rotateToPath",!1),this.pathRotationOffset=h(s,"rotationOffset",0);var l=h(s,"startAt",o);if(l&&(s.onStart=function(u){var v=u.data[0];v.progress=l,v.elapsed=v.duration*l;var m=v.ease(v.progress);v.current=v.start+(v.end-v.start)*m,v.setTargetValue()}),this.pathOffset||(this.pathOffset=new n(this.x,this.y)),this.pathVector||(this.pathVector=new n),this.pathDelta||(this.pathDelta=new n),this.pathDelta.reset(),s.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(s),this.path.getStartPoint(this.pathOffset),a&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=r.PLAYING_FORWARD,this.rotateToPath){var f=this.path.getPoint(.1);this.rotation=Math.atan2(f.y-this.y,f.x-this.x)+d(this.pathRotationOffset)}return this.pathConfig=s,this},pauseFollow:function(){var s=this.pathTween;return s&&s.isPlaying()&&s.pause(),this},resumeFollow:function(){var s=this.pathTween;return s&&s.isPaused()&&s.resume(),this},stopFollow:function(){var s=this.pathTween;return s&&s.isPlaying()&&s.stop(),this},pathUpdate:function(){var s=this.pathTween;if(s&&s.data){var o=s.data[0],i=this.pathDelta,a=this.pathVector;if(i.copy(a).negate(),o.state===r.COMPLETE){this.path.getPoint(o.end,a),i.add(a),a.add(this.pathOffset),this.setPosition(a.x,a.y);return}else if(o.state!==r.PLAYING_FORWARD&&o.state!==r.PLAYING_BACKWARD)return;this.path.getPoint(s.getValue(),a),i.add(a),a.add(this.pathOffset);var l=this.x,f=this.y;this.setPosition(a.x,a.y);var u=this.x-l,v=this.y-f;if(u===0&&v===0)return;if(o.state!==this._prevDirection){this._prevDirection=o.state;return}this.rotateToPath&&(this.rotation=Math.atan2(v,u)+d(this.pathRotationOffset))}}};p.exports=e}),72699:((p,S,t)=>{var d=t(62644),c={defaultPipeline:null,pipeline:null,pipelineData:null,initPipeline:function(h){this.pipelineData={};var r=this.scene.sys.renderer;if(!r)return!1;var n=r.pipelines;if(n){h===void 0&&(h=n.default);var e=n.get(h);if(e)return this.defaultPipeline=e,this.pipeline=e,!0}return!1},setPipeline:function(h,r,n){var e=this.scene.sys.renderer;if(!e)return this;var s=e.pipelines;if(s){var o=s.get(h);o&&(this.pipeline=o),r&&(this.pipelineData=n?d(r):r)}return this},setPipelineData:function(h,r){var n=this.pipelineData;return r===void 0?delete n[h]:n[h]=r,this},resetPipeline:function(h){return h===void 0&&(h=!1),this.pipeline=this.defaultPipeline,h&&(this.pipelineData={}),this.pipeline!==null},getPipelineName:function(){return this.pipeline===null?null:this.pipeline.name}};p.exports=c}),17581:((p,S,t)=>{var d=t(62644),c=t(47059),h=t(19133),r={hasPostPipeline:!1,postPipelines:null,postPipelineData:null,preFX:null,postFX:null,initPostPipeline:function(n){this.postPipelines=[],this.postPipelineData={},this.postFX=new c(this,!0),n&&(this.preFX=new c(this,!1))},setPostPipeline:function(n,e,s){var o=this.scene.sys.renderer;if(!o)return this;var i=o.pipelines;if(i){Array.isArray(n)||(n=[n]);for(var a=0;a<n.length;a++){var l=i.getPostPipeline(n[a],this,e);l&&this.postPipelines.push(l)}e&&(this.postPipelineData=s?d(e):e)}return this.hasPostPipeline=this.postPipelines.length>0,this},setPostPipelineData:function(n,e){var s=this.postPipelineData;return e===void 0?delete s[n]:s[n]=e,this},getPostPipeline:function(n){for(var e=typeof n=="string",s=this.postPipelines,o=[],i=0;i<s.length;i++){var a=s[i];(e&&a.name===n||!e&&a instanceof n)&&o.push(a)}return o.length===1?o[0]:o},resetPostPipeline:function(n){n===void 0&&(n=!1);for(var e=this.postPipelines,s=0;s<e.length;s++)e[s].destroy();this.postPipelines=[],this.hasPostPipeline=!1,n&&(this.postPipelineData={})},removePostPipeline:function(n){for(var e=typeof n=="string",s=this.postPipelines,o=s.length-1;o>=0;o--){var i=s[o];(e&&i.name===n||!e&&i===n)&&(i.destroy(),h(s,o))}return this.hasPostPipeline=this.postPipelines.length>0,this},clearFX:function(){return this.preFX&&this.preFX.clear(),this.postFX&&this.postFX.clear(),this}};p.exports=r}),80227:(p=>{var S={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,d){return d===void 0&&(d=t),this.scrollFactorX=t,this.scrollFactorY=d,this}};p.exports=S}),16736:(p=>{var S={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){t||(t=this.frame),this.width=t.realWidth,this.height=t.realHeight;var d=this.input;return d&&!d.customHitArea&&(d.hitArea.width=this.width,d.hitArea.height=this.height),this},setSize:function(t,d){return this.width=t,this.height=d,this},setDisplaySize:function(t,d){return this.displayWidth=t,this.displayHeight=d,this}};p.exports=S}),37726:((p,S,t)=>{var d=t(4327),c=8,h={texture:null,frame:null,isCropped:!1,setTexture:function(r,n,e,s){return this.texture=this.scene.sys.textures.get(r),this.setFrame(n,e,s)},setFrame:function(r,n,e){return n===void 0&&(n=!0),e===void 0&&(e=!0),r instanceof d?(this.texture=this.scene.sys.textures.get(r.texture.key),this.frame=r):this.frame=this.texture.get(r),!this.frame.cutWidth||!this.frame.cutHeight?this.renderFlags&=~c:this.renderFlags|=c,this._sizeComponent&&n&&this.setSizeToFrame(),this._originComponent&&e&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};p.exports=h}),79812:((p,S,t)=>{var d=t(4327),c=8,h={texture:null,frame:null,isCropped:!1,setCrop:function(r,n,e,s){if(r===void 0)this.isCropped=!1;else if(this.frame){if(typeof r=="number")this.frame.setCropUVs(this._crop,r,n,e,s,this.flipX,this.flipY);else{var o=r;this.frame.setCropUVs(this._crop,o.x,o.y,o.width,o.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(r,n){return this.texture=this.scene.sys.textures.get(r),this.setFrame(n)},setFrame:function(r,n,e){return n===void 0&&(n=!0),e===void 0&&(e=!0),r instanceof d?(this.texture=this.scene.sys.textures.get(r.texture.key),this.frame=r):this.frame=this.texture.get(r),!this.frame.cutWidth||!this.frame.cutHeight?this.renderFlags&=~c:this.renderFlags|=c,this._sizeComponent&&n&&this.setSizeToFrame(),this._originComponent&&e&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};p.exports=h}),27472:(p=>{var S={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,d,c,h){return t===void 0&&(t=16777215),d===void 0&&(d=t,c=t,h=t),this.tintTopLeft=t,this.tintTopRight=d,this.tintBottomLeft=c,this.tintBottomRight=h,this.tintFill=!1,this},setTintFill:function(t,d,c,h){return this.setTint(t,d,c,h),this.tintFill=!0,this},tint:{get:function(){return this.tintTopLeft},set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){var t=16777215;return this.tintFill||this.tintTopLeft!==t||this.tintTopRight!==t||this.tintBottomLeft!==t||this.tintBottomRight!==t}}};p.exports=S}),53774:(p=>{var S=function(t){var d={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(d.textureKey=t.texture.key,d.frameKey=t.frame.name),d};p.exports=S}),16901:((p,S,t)=>{var d=t(36383),c=t(61340),h=t(85955),r=t(86554),n=t(30954),e=t(26099),s=4,o={hasTransformComponent:!0,_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(i){this._scaleX=i,this._scaleY=i,i===0?this.renderFlags&=~s:this.renderFlags|=s}},scaleX:{get:function(){return this._scaleX},set:function(i){this._scaleX=i,i===0?this.renderFlags&=~s:this._scaleY!==0&&(this.renderFlags|=s)}},scaleY:{get:function(){return this._scaleY},set:function(i){this._scaleY=i,i===0?this.renderFlags&=~s:this._scaleX!==0&&(this.renderFlags|=s)}},angle:{get:function(){return n(this._rotation*d.RAD_TO_DEG)},set:function(i){this.rotation=n(i)*d.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(i){this._rotation=r(i)}},setPosition:function(i,a,l,f){return i===void 0&&(i=0),a===void 0&&(a=i),l===void 0&&(l=0),f===void 0&&(f=0),this.x=i,this.y=a,this.z=l,this.w=f,this},copyPosition:function(i){return i.x!==void 0&&(this.x=i.x),i.y!==void 0&&(this.y=i.y),i.z!==void 0&&(this.z=i.z),i.w!==void 0&&(this.w=i.w),this},setRandomPosition:function(i,a,l,f){return i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=this.scene.sys.scale.width),f===void 0&&(f=this.scene.sys.scale.height),this.x=i+Math.random()*l,this.y=a+Math.random()*f,this},setRotation:function(i){return i===void 0&&(i=0),this.rotation=i,this},setAngle:function(i){return i===void 0&&(i=0),this.angle=i,this},setScale:function(i,a){return i===void 0&&(i=1),a===void 0&&(a=i),this.scaleX=i,this.scaleY=a,this},setX:function(i){return i===void 0&&(i=0),this.x=i,this},setY:function(i){return i===void 0&&(i=0),this.y=i,this},setZ:function(i){return i===void 0&&(i=0),this.z=i,this},setW:function(i){return i===void 0&&(i=0),this.w=i,this},getLocalTransformMatrix:function(i){return i===void 0&&(i=new c),i.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(i,a){i===void 0&&(i=new c);var l=this.parentContainer;if(!l)return this.getLocalTransformMatrix(i);var f=!1;for(a||(a=new c,f=!0),i.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);l;)a.applyITRS(l.x,l.y,l._rotation,l._scaleX,l._scaleY),a.multiply(i,i),l=l.parentContainer;return f&&a.destroy(),i},getLocalPoint:function(i,a,l,f){l||(l=new e),f||(f=this.scene.sys.cameras.main);var u=f.scrollX,v=f.scrollY,m=i+u*this.scrollFactorX-u,x=a+v*this.scrollFactorY-v;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(m,x,l):h(m,x,this.x,this.y,this.rotation,this.scaleX,this.scaleY,l),this._originComponent&&(l.x+=this._displayOriginX,l.y+=this._displayOriginY),l},getWorldPoint:function(i,a,l){i===void 0&&(i=new e);var f=this.parentContainer;if(!f)return i.x=this.x,i.y=this.y,i;var u=this.getWorldTransformMatrix(a,l);return i.x=u.tx,i.y=u.ty,i},getParentRotation:function(){for(var i=0,a=this.parentContainer;a;)i+=a.rotation,a=a.parentContainer;return i}};p.exports=o}),61340:((p,S,t)=>{var d=t(83419),c=t(36383),h=t(26099),r=new d({initialize:function(e,s,o,i,a,l){e===void 0&&(e=1),s===void 0&&(s=0),o===void 0&&(o=0),i===void 0&&(i=1),a===void 0&&(a=0),l===void 0&&(l=0),this.matrix=new Float32Array([e,s,o,i,a,l,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0},this.quad=new Float32Array(8)},a:{get:function(){return this.matrix[0]},set:function(n){this.matrix[0]=n}},b:{get:function(){return this.matrix[1]},set:function(n){this.matrix[1]=n}},c:{get:function(){return this.matrix[2]},set:function(n){this.matrix[2]=n}},d:{get:function(){return this.matrix[3]},set:function(n){this.matrix[3]=n}},e:{get:function(){return this.matrix[4]},set:function(n){this.matrix[4]=n}},f:{get:function(){return this.matrix[5]},set:function(n){this.matrix[5]=n}},tx:{get:function(){return this.matrix[4]},set:function(n){this.matrix[4]=n}},ty:{get:function(){return this.matrix[5]},set:function(n){this.matrix[5]=n}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var n=this.matrix,e=n[0],s=n[1],o=n[2],i=n[3];return e||s?s>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):o||i?c.TAU-(i>0?Math.acos(-o/this.scaleY):-Math.acos(o/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var n=this.matrix;return n[0]=1,n[1]=0,n[2]=0,n[3]=1,n[4]=0,n[5]=0,this},translate:function(n,e){var s=this.matrix;return s[4]=s[0]*n+s[2]*e+s[4],s[5]=s[1]*n+s[3]*e+s[5],this},scale:function(n,e){var s=this.matrix;return s[0]*=n,s[1]*=n,s[2]*=e,s[3]*=e,this},rotate:function(n){var e=Math.sin(n),s=Math.cos(n),o=this.matrix,i=o[0],a=o[1],l=o[2],f=o[3];return o[0]=i*s+l*e,o[1]=a*s+f*e,o[2]=i*-e+l*s,o[3]=a*-e+f*s,this},multiply:function(n,e){var s=this.matrix,o=n.matrix,i=s[0],a=s[1],l=s[2],f=s[3],u=s[4],v=s[5],m=o[0],x=o[1],g=o[2],y=o[3],T=o[4],C=o[5],E=e===void 0?s:e.matrix;return E[0]=m*i+x*l,E[1]=m*a+x*f,E[2]=g*i+y*l,E[3]=g*a+y*f,E[4]=T*i+C*l+u,E[5]=T*a+C*f+v,E},multiplyWithOffset:function(n,e,s){var o=this.matrix,i=n.matrix,a=o[0],l=o[1],f=o[2],u=o[3],v=o[4],m=o[5],x=e*a+s*f+v,g=e*l+s*u+m,y=i[0],T=i[1],C=i[2],E=i[3],M=i[4],P=i[5];return o[0]=y*a+T*f,o[1]=y*l+T*u,o[2]=C*a+E*f,o[3]=C*l+E*u,o[4]=M*a+P*f+x,o[5]=M*l+P*u+g,this},transform:function(n,e,s,o,i,a){var l=this.matrix,f=l[0],u=l[1],v=l[2],m=l[3],x=l[4],g=l[5];return l[0]=n*f+e*v,l[1]=n*u+e*m,l[2]=s*f+o*v,l[3]=s*u+o*m,l[4]=i*f+a*v+x,l[5]=i*u+a*m+g,this},transformPoint:function(n,e,s){s===void 0&&(s={x:0,y:0});var o=this.matrix,i=o[0],a=o[1],l=o[2],f=o[3],u=o[4],v=o[5];return s.x=n*i+e*l+u,s.y=n*a+e*f+v,s},invert:function(){var n=this.matrix,e=n[0],s=n[1],o=n[2],i=n[3],a=n[4],l=n[5],f=e*i-s*o;return n[0]=i/f,n[1]=-s/f,n[2]=-o/f,n[3]=e/f,n[4]=(o*l-i*a)/f,n[5]=-(e*l-s*a)/f,this},copyFrom:function(n){var e=this.matrix;return e[0]=n.a,e[1]=n.b,e[2]=n.c,e[3]=n.d,e[4]=n.e,e[5]=n.f,this},copyFromArray:function(n){var e=this.matrix;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],this},copyToContext:function(n){var e=this.matrix;return n.transform(e[0],e[1],e[2],e[3],e[4],e[5]),n},setToContext:function(n){return n.setTransform(this.a,this.b,this.c,this.d,this.e,this.f),n},copyToArray:function(n){var e=this.matrix;return n===void 0?n=[e[0],e[1],e[2],e[3],e[4],e[5]]:(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5]),n},setTransform:function(n,e,s,o,i,a){var l=this.matrix;return l[0]=n,l[1]=e,l[2]=s,l[3]=o,l[4]=i,l[5]=a,this},decomposeMatrix:function(){var n=this.decomposedMatrix,e=this.matrix,s=e[0],o=e[1],i=e[2],a=e[3],l=s*a-o*i;if(n.translateX=e[4],n.translateY=e[5],s||o){var f=Math.sqrt(s*s+o*o);n.rotation=o>0?Math.acos(s/f):-Math.acos(s/f),n.scaleX=f,n.scaleY=l/f}else if(i||a){var u=Math.sqrt(i*i+a*a);n.rotation=Math.PI*.5-(a>0?Math.acos(-i/u):-Math.acos(i/u)),n.scaleX=l/u,n.scaleY=u}else n.rotation=0,n.scaleX=0,n.scaleY=0;return n},applyITRS:function(n,e,s,o,i){var a=this.matrix,l=Math.sin(s),f=Math.cos(s);return a[4]=n,a[5]=e,a[0]=f*o,a[1]=l*o,a[2]=-l*i,a[3]=f*i,this},applyInverse:function(n,e,s){s===void 0&&(s=new h);var o=this.matrix,i=o[0],a=o[1],l=o[2],f=o[3],u=o[4],v=o[5],m=1/(i*f+l*-a);return s.x=f*m*n+-l*m*e+(v*l-u*f)*m,s.y=i*m*e+-a*m*n+(-v*i+u*a)*m,s},setQuad:function(n,e,s,o,i,a){i===void 0&&(i=!1),a===void 0&&(a=this.quad);var l=this.matrix,f=l[0],u=l[1],v=l[2],m=l[3],x=l[4],g=l[5],y=n*f+e*v+x,T=n*u+e*m+g,C=n*f+o*v+x,E=n*u+o*m+g,M=s*f+o*v+x,P=s*u+o*m+g,A=s*f+e*v+x,R=s*u+e*m+g;if(i){var F=Math.floor(y+.5),w=Math.floor(T+.5),I=F-y,U=w-T;a[0]=F,a[1]=w,a[2]=C+I,a[3]=E+U,a[4]=M+I,a[5]=P+U,a[6]=A+I,a[7]=R+U}else a[0]=y,a[1]=T,a[2]=C,a[3]=E,a[4]=M,a[5]=P,a[6]=A,a[7]=R;return a},getX:function(n,e){return n*this.a+e*this.c+this.e},getY:function(n,e){return n*this.b+e*this.d+this.f},getXRound:function(n,e,s){var o=this.getX(n,e);return s&&(o=Math.floor(o+.5)),o},getYRound:function(n,e,s){var o=this.getY(n,e);return s&&(o=Math.floor(o+.5)),o},getCSSMatrix:function(){var n=this.matrix;return"matrix("+n[0]+","+n[1]+","+n[2]+","+n[3]+","+n[4]+","+n[5]+")"},destroy:function(){this.matrix=null,this.quad=null,this.decomposedMatrix=null}});p.exports=r}),59715:(p=>{var S=1,t={_visible:!0,visible:{get:function(){return this._visible},set:function(d){d?(this._visible=!0,this.renderFlags|=S):(this._visible=!1,this.renderFlags&=~S)}},setVisible:function(d){return this.visible=d,this}};p.exports=t}),31401:((p,S,t)=>{p.exports={Alpha:t(16005),AlphaSingle:t(88509),BlendMode:t(90065),ComputedSize:t(94215),Crop:t(61683),Depth:t(89272),Flip:t(54434),FX:t(47059),GetBounds:t(8004),Mask:t(8573),Origin:t(27387),PathFollower:t(37640),Pipeline:t(72699),PostPipeline:t(17581),ScrollFactor:t(80227),Size:t(16736),Texture:t(37726),TextureCrop:t(79812),Tint:t(27472),ToJSON:t(53774),Transform:t(16901),TransformMatrix:t(61340),Visible:t(59715)}}),31559:((p,S,t)=>{var d=t(37105),c=t(10312),h=t(83419),r=t(31401),n=t(51708),e=t(95643),s=t(87841),o=t(29959),i=t(36899),a=t(26099),l=new r.TransformMatrix,f=new h({Extends:e,Mixins:[r.AlphaSingle,r.BlendMode,r.ComputedSize,r.Depth,r.Mask,r.PostPipeline,r.Transform,r.Visible,o],initialize:function(v,m,x,g){e.call(this,v,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new r.TransformMatrix,this._sortKey="",this._sysEvents=v.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPostPipeline(),this.setPosition(m,x),this.setBlendMode(c.SKIP_CHECK),g&&this.add(g)},originX:{get:function(){return .5}},originY:{get:function(){return .5}},displayOriginX:{get:function(){return this.width*.5}},displayOriginY:{get:function(){return this.height*.5}},setExclusive:function(u){return u===void 0&&(u=!0),this.exclusive=u,this},getBounds:function(u){if(u===void 0&&(u=new s),u.setTo(this.x,this.y,0,0),this.parentContainer){var v=this.parentContainer.getBoundsTransformMatrix(),m=v.transformPoint(this.x,this.y);u.setTo(m.x,m.y,0,0)}if(this.list.length>0){var x=this.list,g=new s,y=!1;u.setEmpty();for(var T=0;T<x.length;T++){var C=x[T];C.getBounds&&(C.getBounds(g),y?i(g,u,u):(u.setTo(g.x,g.y,g.width,g.height),y=!0))}}return u},addHandler:function(u){u.once(n.DESTROY,this.onChildDestroyed,this),this.exclusive&&(u.parentContainer&&u.parentContainer.remove(u),u.parentContainer=this,u.removeFromDisplayList(),u.addedToScene())},removeHandler:function(u){u.off(n.DESTROY,this.remove,this),this.exclusive&&(u.parentContainer=null,u.removedFromScene(),u.addToDisplayList())},pointToContainer:function(u,v){v===void 0&&(v=new a),this.parentContainer?this.parentContainer.pointToContainer(u,v):(v.x=u.x,v.y=u.y);var m=l;return m.applyITRS(this.x,this.y,this.rotation,this.scaleX,this.scaleY),m.invert(),m.transformPoint(u.x,u.y,v),v},getBoundsTransformMatrix:function(){return this.getWorldTransformMatrix(l,this.localTransform)},add:function(u){return d.Add(this.list,u,this.maxSize,this.addHandler,this),this},addAt:function(u,v){return d.AddAt(this.list,u,v,this.maxSize,this.addHandler,this),this},getAt:function(u){return this.list[u]},getIndex:function(u){return this.list.indexOf(u)},sort:function(u,v){return u?(v===void 0&&(v=function(m,x){return m[u]-x[u]}),d.StableSort(this.list,v),this):this},getByName:function(u){return d.GetFirst(this.list,"name",u)},getRandom:function(u,v){return d.GetRandom(this.list,u,v)},getFirst:function(u,v,m,x){return d.GetFirst(this.list,u,v,m,x)},getAll:function(u,v,m,x){return d.GetAll(this.list,u,v,m,x)},count:function(u,v,m,x){return d.CountAllMatching(this.list,u,v,m,x)},swap:function(u,v){return d.Swap(this.list,u,v),this},moveTo:function(u,v){return d.MoveTo(this.list,u,v),this},moveAbove:function(u,v){return d.MoveAbove(this.list,u,v),this},moveBelow:function(u,v){return d.MoveBelow(this.list,u,v),this},remove:function(u,v){var m=d.Remove(this.list,u,this.removeHandler,this);if(v&&m){Array.isArray(m)||(m=[m]);for(var x=0;x<m.length;x++)m[x].destroy()}return this},removeAt:function(u,v){var m=d.RemoveAt(this.list,u,this.removeHandler,this);return v&&m&&m.destroy(),this},removeBetween:function(u,v,m){var x=d.RemoveBetween(this.list,u,v,this.removeHandler,this);if(m)for(var g=0;g<x.length;g++)x[g].destroy();return this},removeAll:function(u){var v=this.list;if(u){for(var m=0;m<v.length;m++)v[m]&&v[m].scene&&(v[m].off(n.DESTROY,this.onChildDestroyed,this),v[m].destroy());this.list=[]}else d.RemoveBetween(v,0,v.length,this.removeHandler,this);return this},bringToTop:function(u){return d.BringToTop(this.list,u),this},sendToBack:function(u){return d.SendToBack(this.list,u),this},moveUp:function(u){return d.MoveUp(this.list,u),this},moveDown:function(u){return d.MoveDown(this.list,u),this},reverse:function(){return this.list.reverse(),this},shuffle:function(){return d.Shuffle(this.list),this},replace:function(u,v,m){var x=d.Replace(this.list,u,v);return x&&(this.addHandler(v),this.removeHandler(u),m&&u.destroy()),this},exists:function(u){return this.list.indexOf(u)>-1},setAll:function(u,v,m,x){return d.SetAll(this.list,u,v,m,x),this},each:function(u,v){var m=[null],x,g=this.list.slice(),y=g.length;for(x=2;x<arguments.length;x++)m.push(arguments[x]);for(x=0;x<y;x++)m[0]=g[x],u.apply(v,m);return this},iterate:function(u,v){var m=[null],x;for(x=2;x<arguments.length;x++)m.push(arguments[x]);for(x=0;x<this.list.length;x++)m[0]=this.list[x],u.apply(v,m);return this},setScrollFactor:function(u,v,m){return v===void 0&&(v=u),m===void 0&&(m=!1),this.scrollFactorX=u,this.scrollFactorY=v,m&&(d.SetAll(this.list,"scrollFactorX",u),d.SetAll(this.list,"scrollFactorY",v)),this},length:{get:function(){return this.list.length}},first:{get:function(){return this.position=0,this.list.length>0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position<this.list.length?(this.position++,this.list[this.position]):null}},previous:{get:function(){return this.position>0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.list=[]},onChildDestroyed:function(u){d.Remove(this.list,u),this.exclusive&&(u.parentContainer=null,u.removedFromScene())}});p.exports=f}),53584:(p=>{var S=function(t,d,c,h){c.addToRenderList(d);var r=d.list;if(r.length!==0){var n=d.localTransform;h?(n.loadIdentity(),n.multiply(h),n.translate(d.x,d.y),n.rotate(d.rotation),n.scale(d.scaleX,d.scaleY)):n.applyITRS(d.x,d.y,d.rotation,d.scaleX,d.scaleY);var e=d.blendMode!==-1;e||t.setBlendMode(0);var s=d._alpha,o=d.scrollFactorX,i=d.scrollFactorY;d.mask&&d.mask.preRenderCanvas(t,null,c);for(var a=0;a<r.length;a++){var l=r[a];if(l.willRender(c)){var f=l.alpha,u=l.scrollFactorX,v=l.scrollFactorY;!e&&l.blendMode!==t.currentBlendMode&&t.setBlendMode(l.blendMode),l.setScrollFactor(u*o,v*i),l.setAlpha(f*s),l.renderCanvas(t,l,c,n),l.setAlpha(f),l.setScrollFactor(u,v)}}d.mask&&d.mask.postRenderCanvas(t)}};p.exports=S}),77143:((p,S,t)=>{var d=t(25305),c=t(31559),h=t(44603),r=t(23568),n=t(95540);h.register("container",function(e,s){e===void 0&&(e={});var o=r(e,"x",0),i=r(e,"y",0),a=n(e,"children",null),l=new c(this.scene,o,i,a);return s!==void 0&&(e.add=s),d(this.scene,l,e),l})}),24961:((p,S,t)=>{var d=t(31559),c=t(39429);c.register("container",function(h,r,n){return this.displayList.add(new d(this.scene,h,r,n))})}),29959:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(72249),h=t(53584),p.exports={renderWebGL:c,renderCanvas:h}}),72249:(p=>{var S=function(t,d,c,h){c.addToRenderList(d);var r=d.list,n=r.length;if(n!==0){var e=d.localTransform;h?(e.loadIdentity(),e.multiply(h),e.translate(d.x,d.y),e.rotate(d.rotation),e.scale(d.scaleX,d.scaleY)):e.applyITRS(d.x,d.y,d.rotation,d.scaleX,d.scaleY),t.pipelines.preBatch(d);var s=d.blendMode!==-1;s||t.setBlendMode(0);for(var o=d.alpha,i=d.scrollFactorX,a=d.scrollFactorY,l=0;l<n;l++){var f=r[l];if(f.willRender(c)){var u,v,m,x;if(f.alphaTopLeft!==void 0)u=f.alphaTopLeft,v=f.alphaTopRight,m=f.alphaBottomLeft,x=f.alphaBottomRight;else{var g=f.alpha;u=g,v=g,m=g,x=g}var y=f.scrollFactorX,T=f.scrollFactorY;!s&&f.blendMode!==t.currentBlendMode&&t.setBlendMode(f.blendMode);var C=f.mask;C&&C.preRenderWebGL(t,f,c);var E=f.type;E!==t.currentType&&(t.newType=!0,t.currentType=E),t.nextTypeMatch=l<n-1?r[l+1].type===t.currentType:!1,f.setScrollFactor(y*i,T*a),f.setAlpha(u*o,v*o,m*o,x*o),f.renderWebGL(t,f,c,e,d),f.setAlpha(u,v,m,x),f.setScrollFactor(y,T),C&&C.postRenderWebGL(t,c),t.newType=!1}}t.pipelines.postBatch(d)}};p.exports=S}),47407:(p=>{p.exports=["normal","multiply","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}),3069:((p,S,t)=>{var d=t(83419),c=t(31401),h=t(441),r=t(95643),n=t(41212),e=t(35846),s=t(44594),o=t(61369),i=new d({Extends:r,Mixins:[c.AlphaSingle,c.BlendMode,c.Depth,c.Origin,c.ScrollFactor,c.Transform,c.Visible,h],initialize:function(l,f,u,v,m,x){if(r.call(this,l,"DOMElement"),this.parent=l.sys.game.domContainer,!this.parent)throw new Error("No DOM Container set in game config");this.cache=l.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new o,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(f,u),typeof v=="string"?v[0]==="#"?this.setElement(v.substr(1),m,x):this.createElement(v,m,x):v&&this.setElement(v,m,x),l.sys.events.on(s.SLEEP,this.handleSceneEvent,this),l.sys.events.on(s.WAKE,this.handleSceneEvent,this),l.sys.events.on(s.PRE_RENDER,this.preRender,this)},handleSceneEvent:function(a){var l=this.node,f=l.style;l&&(f.display=a.settings.visible?"block":"none")},setSkew:function(a,l){return a===void 0&&(a=0),l===void 0&&(l=a),this.skewX=a,this.skewY=l,this},setPerspective:function(a){return this.parent.style.perspective=a+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(a){this.parent.style.perspective=a+"px"}},addListener:function(a){if(this.node){a=a.split(" ");for(var l=0;l<a.length;l++)this.node.addEventListener(a[l],this.handler,!1)}return this},removeListener:function(a){if(this.node){a=a.split(" ");for(var l=0;l<a.length;l++)this.node.removeEventListener(a[l],this.handler)}return this},dispatchNativeEvent:function(a){this.emit(a.type,a)},createElement:function(a,l,f){return this.setElement(document.createElement(a),l,f)},setElement:function(a,l,f){this.removeElement();var u;if(typeof a=="string"?(a[0]==="#"&&(a=a.substr(1)),u=document.getElementById(a)):typeof a=="object"&&a.nodeType===1&&(u=a),!u)return this;if(this.node=u,l&&n(l))for(var v in l)u.style[v]=l[v];else typeof l=="string"&&(u.style=l);return u.style.zIndex="0",u.style.display="inline",u.style.position="absolute",u.phaser=this,this.parent.appendChild(u),f&&(u.innerText=f),this.updateSize()},createFromCache:function(a,l){var f=this.cache.get(a);return f&&this.createFromHTML(f,l),this},createFromHTML:function(a,l){l===void 0&&(l="div"),this.removeElement();var f=document.createElement(l);return this.node=f,f.style.zIndex="0",f.style.display="inline",f.style.position="absolute",f.phaser=this,this.parent.appendChild(f),f.innerHTML=a,this.updateSize()},removeElement:function(){return this.node&&(e(this.node),this.node=null),this},updateSize:function(){var a=this.node;return this.width=a.clientWidth,this.height=a.clientHeight,this.displayWidth=this.width*this.scaleX,this.displayHeight=this.height*this.scaleY,this},getChildByProperty:function(a,l){if(this.node){for(var f=this.node.querySelectorAll("*"),u=0;u<f.length;u++)if(f[u][a]===l)return f[u]}return null},getChildByID:function(a){return this.getChildByProperty("id",a)},getChildByName:function(a){return this.getChildByProperty("name",a)},setClassName:function(a){return this.node&&(this.node.className=a,this.updateSize()),this},setText:function(a){return this.node&&(this.node.innerText=a,this.updateSize()),this},setHTML:function(a){return this.node&&(this.node.innerHTML=a,this.updateSize()),this},preRender:function(){var a=this.parentContainer,l=this.node;l&&a&&!a.willRender()&&(l.style.display="none")},willRender:function(){return!0},preDestroy:function(){this.removeElement(),this.scene.sys.events.off(s.SLEEP,this.handleSceneEvent,this),this.scene.sys.events.off(s.WAKE,this.handleSceneEvent,this),this.scene.sys.events.off(s.PRE_RENDER,this.preRender,this)}});p.exports=i}),49381:((p,S,t)=>{var d=t(47407),c=t(95643),h=t(61340),r=new h,n=new h,e=new h,s=function(o,i,a,l){if(i.node){var f=i.node.style,u=i.scene.sys.settings;if(!f||!u.visible||c.RENDER_MASK!==i.renderFlags||i.cameraFilter!==0&&i.cameraFilter&a.id||i.parentContainer&&!i.parentContainer.willRender()){f.display="none";return}var v=i.parentContainer,m=a.alpha*i.alpha;v&&(m*=v.alpha);var x=r,g=n,y=e,T=0,C=0,E="0%",M="0%";l?(T=i.width*i.scaleX*i.originX,C=i.height*i.scaleY*i.originY,g.applyITRS(i.x-T,i.y-C,i.rotation,i.scaleX,i.scaleY),x.copyFrom(a.matrix),x.multiplyWithOffset(l,-a.scrollX*i.scrollFactorX,-a.scrollY*i.scrollFactorY),g.e=i.x-T,g.f=i.y-C,x.multiply(g,y)):(T=i.width*i.originX,C=i.height*i.originY,g.applyITRS(i.x,i.y,i.rotation,i.scaleX,i.scaleY),x.copyFrom(a.matrix),E=100*i.originX+"%",M=100*i.originY+"%",g.e-=a.scrollX*i.scrollFactorX,g.f-=a.scrollY*i.scrollFactorY,x.multiply(g,y),y.e-=T,y.f-=C),i.transformOnly||(f.display="block",f.opacity=m,f.zIndex=i._depth,f.pointerEvents=i.pointerEvents,f.mixBlendMode=d[i._blendMode]),f.transform=y.getCSSMatrix()+" skew("+i.skewX+"rad, "+i.skewY+"rad) rotate3d("+i.rotate3d.x+","+i.rotate3d.y+","+i.rotate3d.z+","+i.rotate3d.w+i.rotate3dAngle+")",f.transformOrigin=E+" "+M}};p.exports=s}),2611:((p,S,t)=>{var d=t(3069),c=t(39429);c.register("dom",function(h,r,n,e,s){var o=new d(this.scene,h,r,n,e,s);return this.displayList.add(o),o})}),441:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(49381),h=t(49381),p.exports={renderWebGL:c,renderCanvas:h}}),62980:(p=>{p.exports="addedtoscene"}),41337:(p=>{p.exports="destroy"}),44947:(p=>{p.exports="removedfromscene"}),49358:(p=>{p.exports="complete"}),35163:(p=>{p.exports="created"}),97249:(p=>{p.exports="error"}),19483:(p=>{p.exports="locked"}),56059:(p=>{p.exports="loop"}),26772:(p=>{p.exports="metadata"}),64437:(p=>{p.exports="playing"}),83411:(p=>{p.exports="play"}),75780:(p=>{p.exports="seeked"}),67799:(p=>{p.exports="seeking"}),63500:(p=>{p.exports="stalled"}),55541:(p=>{p.exports="stop"}),53208:(p=>{p.exports="textureready"}),4992:(p=>{p.exports="unlocked"}),12:(p=>{p.exports="unsupported"}),51708:((p,S,t)=>{p.exports={ADDED_TO_SCENE:t(62980),DESTROY:t(41337),REMOVED_FROM_SCENE:t(44947),VIDEO_COMPLETE:t(49358),VIDEO_CREATED:t(35163),VIDEO_ERROR:t(97249),VIDEO_LOCKED:t(19483),VIDEO_LOOP:t(56059),VIDEO_METADATA:t(26772),VIDEO_PLAY:t(83411),VIDEO_PLAYING:t(64437),VIDEO_SEEKED:t(75780),VIDEO_SEEKING:t(67799),VIDEO_STALLED:t(63500),VIDEO_STOP:t(55541),VIDEO_TEXTURE:t(53208),VIDEO_UNLOCKED:t(4992),VIDEO_UNSUPPORTED:t(12)}}),42421:((p,S,t)=>{var d=t(83419),c=t(31401),h=t(95643),r=t(64993),n=new d({Extends:h,Mixins:[c.Alpha,c.BlendMode,c.Depth,c.Flip,c.Origin,c.ScrollFactor,c.Size,c.Texture,c.Tint,c.Transform,c.Visible,r],initialize:function(s){h.call(this,s,"Extern")},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(){},render:function(){}});p.exports=n}),70217:(()=>{}),56315:((p,S,t)=>{var d=t(42421),c=t(39429);c.register("extern",function(){var h=new d(this.scene);return this.displayList.add(h),h})}),64993:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(80287),h=t(70217),p.exports={renderWebGL:c,renderCanvas:h}}),80287:((p,S,t)=>{var d=t(91296),c=function(h,r,n,e){h.pipelines.clear();var s=d(r,n,e).calc;r.render.call(r,h,n,s),h.pipelines.rebind()};p.exports=c}),85592:(p=>{p.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18,GRADIENT_FILL_STYLE:21,GRADIENT_LINE_STYLE:22}}),43831:((p,S,t)=>{var d=t(71911),c=t(83419),h=t(85592),r=t(31401),n=t(8497),e=t(95643),s=t(95540),o=t(35154),i=t(36383),a=t(84503),l=new c({Extends:e,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Mask,r.Pipeline,r.PostPipeline,r.Transform,r.Visible,r.ScrollFactor,a],initialize:function(u,v){var m=o(v,"x",0),x=o(v,"y",0);e.call(this,u,"Graphics"),this.setPosition(m,x),this.initPipeline(),this.initPostPipeline(),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.lineStyle(1,0,0),this.fillStyle(0,0),this.setDefaultStyles(v)},setDefaultStyles:function(f){return o(f,"lineStyle",null)&&(this.defaultStrokeWidth=o(f,"lineStyle.width",1),this.defaultStrokeColor=o(f,"lineStyle.color",16777215),this.defaultStrokeAlpha=o(f,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),o(f,"fillStyle",null)&&(this.defaultFillColor=o(f,"fillStyle.color",16777215),this.defaultFillAlpha=o(f,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(f,u,v){return v===void 0&&(v=1),this.commandBuffer.push(h.LINE_STYLE,f,u,v),this._lineWidth=f,this},fillStyle:function(f,u){return u===void 0&&(u=1),this.commandBuffer.push(h.FILL_STYLE,f,u),this},fillGradientStyle:function(f,u,v,m,x,g,y,T){return x===void 0&&(x=1),g===void 0&&(g=x),y===void 0&&(y=x),T===void 0&&(T=x),this.commandBuffer.push(h.GRADIENT_FILL_STYLE,x,g,y,T,f,u,v,m),this},lineGradientStyle:function(f,u,v,m,x,g){return g===void 0&&(g=1),this.commandBuffer.push(h.GRADIENT_LINE_STYLE,f,g,u,v,m,x),this},beginPath:function(){return this.commandBuffer.push(h.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(h.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(h.FILL_PATH),this},fill:function(){return this.commandBuffer.push(h.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(h.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(h.STROKE_PATH),this},fillCircleShape:function(f){return this.fillCircle(f.x,f.y,f.radius)},strokeCircleShape:function(f){return this.strokeCircle(f.x,f.y,f.radius)},fillCircle:function(f,u,v){return this.beginPath(),this.arc(f,u,v,0,i.PI2),this.fillPath(),this},strokeCircle:function(f,u,v){return this.beginPath(),this.arc(f,u,v,0,i.PI2),this.strokePath(),this},fillRectShape:function(f){return this.fillRect(f.x,f.y,f.width,f.height)},strokeRectShape:function(f){return this.strokeRect(f.x,f.y,f.width,f.height)},fillRect:function(f,u,v,m){return this.commandBuffer.push(h.FILL_RECT,f,u,v,m),this},strokeRect:function(f,u,v,m){var x=this._lineWidth/2,g=f-x,y=f+x;return this.beginPath(),this.moveTo(f,u),this.lineTo(f,u+m),this.strokePath(),this.beginPath(),this.moveTo(f+v,u),this.lineTo(f+v,u+m),this.strokePath(),this.beginPath(),this.moveTo(g,u),this.lineTo(y+v,u),this.strokePath(),this.beginPath(),this.moveTo(g,u+m),this.lineTo(y+v,u+m),this.strokePath(),this},fillRoundedRect:function(f,u,v,m,x){x===void 0&&(x=20);var g=x,y=x,T=x,C=x;typeof x!="number"&&(g=s(x,"tl",20),y=s(x,"tr",20),T=s(x,"bl",20),C=s(x,"br",20));var E=g>=0,M=y>=0,P=T>=0,A=C>=0;return g=Math.abs(g),y=Math.abs(y),T=Math.abs(T),C=Math.abs(C),this.beginPath(),this.moveTo(f+g,u),this.lineTo(f+v-y,u),M?this.arc(f+v-y,u+y,y,-i.TAU,0):this.arc(f+v,u,y,Math.PI,i.TAU,!0),this.lineTo(f+v,u+m-C),A?this.arc(f+v-C,u+m-C,C,0,i.TAU):this.arc(f+v,u+m,C,-i.TAU,Math.PI,!0),this.lineTo(f+T,u+m),P?this.arc(f+T,u+m-T,T,i.TAU,Math.PI):this.arc(f,u+m,T,0,-i.TAU,!0),this.lineTo(f,u+g),E?this.arc(f+g,u+g,g,-Math.PI,-i.TAU):this.arc(f,u,g,i.TAU,0,!0),this.fillPath(),this},strokeRoundedRect:function(f,u,v,m,x){x===void 0&&(x=20);var g=x,y=x,T=x,C=x,E=Math.min(v,m)/2;typeof x!="number"&&(g=s(x,"tl",20),y=s(x,"tr",20),T=s(x,"bl",20),C=s(x,"br",20));var M=g>=0,P=y>=0,A=T>=0,R=C>=0;return g=Math.min(Math.abs(g),E),y=Math.min(Math.abs(y),E),T=Math.min(Math.abs(T),E),C=Math.min(Math.abs(C),E),this.beginPath(),this.moveTo(f+g,u),this.lineTo(f+v-y,u),this.moveTo(f+v-y,u),P?this.arc(f+v-y,u+y,y,-i.TAU,0):this.arc(f+v,u,y,Math.PI,i.TAU,!0),this.lineTo(f+v,u+m-C),this.moveTo(f+v,u+m-C),R?this.arc(f+v-C,u+m-C,C,0,i.TAU):this.arc(f+v,u+m,C,-i.TAU,Math.PI,!0),this.lineTo(f+T,u+m),this.moveTo(f+T,u+m),A?this.arc(f+T,u+m-T,T,i.TAU,Math.PI):this.arc(f,u+m,T,0,-i.TAU,!0),this.lineTo(f,u+g),this.moveTo(f,u+g),M?this.arc(f+g,u+g,g,-Math.PI,-i.TAU):this.arc(f,u,g,i.TAU,0,!0),this.strokePath(),this},fillPointShape:function(f,u){return this.fillPoint(f.x,f.y,u)},fillPoint:function(f,u,v){return!v||v<1?v=1:(f-=v/2,u-=v/2),this.commandBuffer.push(h.FILL_RECT,f,u,v,v),this},fillTriangleShape:function(f){return this.fillTriangle(f.x1,f.y1,f.x2,f.y2,f.x3,f.y3)},strokeTriangleShape:function(f){return this.strokeTriangle(f.x1,f.y1,f.x2,f.y2,f.x3,f.y3)},fillTriangle:function(f,u,v,m,x,g){return this.commandBuffer.push(h.FILL_TRIANGLE,f,u,v,m,x,g),this},strokeTriangle:function(f,u,v,m,x,g){return this.commandBuffer.push(h.STROKE_TRIANGLE,f,u,v,m,x,g),this},strokeLineShape:function(f){return this.lineBetween(f.x1,f.y1,f.x2,f.y2)},lineBetween:function(f,u,v,m){return this.beginPath(),this.moveTo(f,u),this.lineTo(v,m),this.strokePath(),this},lineTo:function(f,u){return this.commandBuffer.push(h.LINE_TO,f,u),this},moveTo:function(f,u){return this.commandBuffer.push(h.MOVE_TO,f,u),this},strokePoints:function(f,u,v,m){u===void 0&&(u=!1),v===void 0&&(v=!1),m===void 0&&(m=f.length),this.beginPath(),this.moveTo(f[0].x,f[0].y);for(var x=1;x<m;x++)this.lineTo(f[x].x,f[x].y);return u&&this.lineTo(f[0].x,f[0].y),v&&this.closePath(),this.strokePath(),this},fillPoints:function(f,u,v,m){u===void 0&&(u=!1),v===void 0&&(v=!1),m===void 0&&(m=f.length),this.beginPath(),this.moveTo(f[0].x,f[0].y);for(var x=1;x<m;x++)this.lineTo(f[x].x,f[x].y);return u&&this.lineTo(f[0].x,f[0].y),v&&this.closePath(),this.fillPath(),this},strokeEllipseShape:function(f,u){u===void 0&&(u=32);var v=f.getPoints(u);return this.strokePoints(v,!0)},strokeEllipse:function(f,u,v,m,x){x===void 0&&(x=32);var g=new n(f,u,v,m),y=g.getPoints(x);return this.strokePoints(y,!0)},fillEllipseShape:function(f,u){u===void 0&&(u=32);var v=f.getPoints(u);return this.fillPoints(v,!0)},fillEllipse:function(f,u,v,m,x){x===void 0&&(x=32);var g=new n(f,u,v,m),y=g.getPoints(x);return this.fillPoints(y,!0)},arc:function(f,u,v,m,x,g,y){return g===void 0&&(g=!1),y===void 0&&(y=0),this.commandBuffer.push(h.ARC,f,u,v,m,x,g,y),this},slice:function(f,u,v,m,x,g,y){return g===void 0&&(g=!1),y===void 0&&(y=0),this.commandBuffer.push(h.BEGIN_PATH),this.commandBuffer.push(h.MOVE_TO,f,u),this.commandBuffer.push(h.ARC,f,u,v,m,x,g,y),this.commandBuffer.push(h.CLOSE_PATH),this},save:function(){return this.commandBuffer.push(h.SAVE),this},restore:function(){return this.commandBuffer.push(h.RESTORE),this},translateCanvas:function(f,u){return this.commandBuffer.push(h.TRANSLATE,f,u),this},scaleCanvas:function(f,u){return this.commandBuffer.push(h.SCALE,f,u),this},rotateCanvas:function(f){return this.commandBuffer.push(h.ROTATE,f),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(f,u,v){var m=this.scene.sys,x=m.game.renderer;u===void 0&&(u=m.scale.width),v===void 0&&(v=m.scale.height),l.TargetCamera.setScene(this.scene),l.TargetCamera.setViewport(0,0,u,v),l.TargetCamera.scrollX=this.x,l.TargetCamera.scrollY=this.y;var g,y,T={willReadFrequently:!0};if(typeof f=="string")if(m.textures.exists(f)){g=m.textures.get(f);var C=g.getSourceImage();C instanceof HTMLCanvasElement&&(y=C.getContext("2d",T))}else g=m.textures.createCanvas(f,u,v),y=g.getSourceImage().getContext("2d",T);else f instanceof HTMLCanvasElement&&(y=f.getContext("2d",T));return y&&(this.renderCanvas(x,this,l.TargetCamera,null,y,!1),g&&g.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});l.TargetCamera=new d,p.exports=l}),32768:((p,S,t)=>{var d=t(85592),c=t(20926),h=function(r,n,e,s,o,i){var a=n.commandBuffer,l=a.length,f=o||r.currentContext;if(!(l===0||!c(r,f,n,e,s))){e.addToRenderList(n);var u=1,v=1,m=0,x=0,g=1,y=0,T=0,C=0;f.beginPath();for(var E=0;E<l;++E){var M=a[E];switch(M){case d.ARC:f.arc(a[E+1],a[E+2],a[E+3],a[E+4],a[E+5],a[E+6]),E+=7;break;case d.LINE_STYLE:g=a[E+1],m=a[E+2],u=a[E+3],y=(m&16711680)>>>16,T=(m&65280)>>>8,C=m&255,f.strokeStyle="rgba("+y+","+T+","+C+","+u+")",f.lineWidth=g,E+=3;break;case d.FILL_STYLE:x=a[E+1],v=a[E+2],y=(x&16711680)>>>16,T=(x&65280)>>>8,C=x&255,f.fillStyle="rgba("+y+","+T+","+C+","+v+")",E+=2;break;case d.BEGIN_PATH:f.beginPath();break;case d.CLOSE_PATH:f.closePath();break;case d.FILL_PATH:i||f.fill();break;case d.STROKE_PATH:i||f.stroke();break;case d.FILL_RECT:i?f.rect(a[E+1],a[E+2],a[E+3],a[E+4]):f.fillRect(a[E+1],a[E+2],a[E+3],a[E+4]),E+=4;break;case d.FILL_TRIANGLE:f.beginPath(),f.moveTo(a[E+1],a[E+2]),f.lineTo(a[E+3],a[E+4]),f.lineTo(a[E+5],a[E+6]),f.closePath(),i||f.fill(),E+=6;break;case d.STROKE_TRIANGLE:f.beginPath(),f.moveTo(a[E+1],a[E+2]),f.lineTo(a[E+3],a[E+4]),f.lineTo(a[E+5],a[E+6]),f.closePath(),i||f.stroke(),E+=6;break;case d.LINE_TO:f.lineTo(a[E+1],a[E+2]),E+=2;break;case d.MOVE_TO:f.moveTo(a[E+1],a[E+2]),E+=2;break;case d.LINE_FX_TO:f.lineTo(a[E+1],a[E+2]),E+=5;break;case d.MOVE_FX_TO:f.moveTo(a[E+1],a[E+2]),E+=5;break;case d.SAVE:f.save();break;case d.RESTORE:f.restore();break;case d.TRANSLATE:f.translate(a[E+1],a[E+2]),E+=2;break;case d.SCALE:f.scale(a[E+1],a[E+2]),E+=2;break;case d.ROTATE:f.rotate(a[E+1]),E+=1;break;case d.GRADIENT_FILL_STYLE:E+=5;break;case d.GRADIENT_LINE_STYLE:E+=6;break}}f.restore()}};p.exports=h}),87079:((p,S,t)=>{var d=t(44603),c=t(43831);d.register("graphics",function(h,r){h===void 0&&(h={}),r!==void 0&&(h.add=r);var n=new c(this.scene,h);return h.add&&this.scene.sys.displayList.add(n),n})}),1201:((p,S,t)=>{var d=t(43831),c=t(39429);c.register("graphics",function(h){return this.displayList.add(new d(this.scene,h))})}),84503:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(77545),h=t(32768),h=t(32768),p.exports={renderWebGL:c,renderCanvas:h}}),77545:((p,S,t)=>{var d=t(85592),c=t(91296),h=t(61340),r=t(70554),n=function(a,l,f){this.x=a,this.y=l,this.width=f},e=function(a,l,f){this.points=[],this.pointsLength=1,this.points[0]=new n(a,l,f)},s=[],o=new h,i=function(a,l,f,u){if(l.commandBuffer.length!==0){f.addToRenderList(l);var v=a.pipelines.set(l.pipeline,l);a.pipelines.preBatch(l);for(var m=c(l,f,u).calc,x=o.loadIdentity(),g=l.commandBuffer,y=f.alpha*l.alpha,T=1,C=v.fillTint,E=v.strokeTint,M=0,P=0,A=0,R=.01,F=Math.PI*2,w,I=[],U=0,N=!0,D=null,B=r.getTintAppendFloatAlpha,L=0;L<g.length;L++)switch(w=g[L],w){case d.BEGIN_PATH:{I.length=0,D=null,N=!0;break}case d.CLOSE_PATH:{N=!1,D&&D.points.length&&D.points.push(D.points[0]);break}case d.FILL_PATH:{for(U=0;U<I.length;U++)v.batchFillPath(I[U].points,x,m);break}case d.STROKE_PATH:{for(U=0;U<I.length;U++)v.batchStrokePath(I[U].points,T,N,x,m);break}case d.LINE_STYLE:{T=g[++L];var G=g[++L],O=g[++L]*y,X=B(G,O);E.TL=X,E.TR=X,E.BL=X,E.BR=X;break}case d.FILL_STYLE:{var z=g[++L],V=g[++L]*y,Y=B(z,V);C.TL=Y,C.TR=Y,C.BL=Y,C.BR=Y;break}case d.GRADIENT_FILL_STYLE:{var W=g[++L]*y,H=g[++L]*y,K=g[++L]*y,b=g[++L]*y;C.TL=B(g[++L],W),C.TR=B(g[++L],H),C.BL=B(g[++L],K),C.BR=B(g[++L],b);break}case d.GRADIENT_LINE_STYLE:{T=g[++L];var J=g[++L]*y;E.TL=B(g[++L],J),E.TR=B(g[++L],J),E.BL=B(g[++L],J),E.BR=B(g[++L],J);break}case d.ARC:{var $=0,Z=g[++L],q=g[++L],_=g[++L],tt=g[++L],Q=g[++L],j=g[++L],k=g[++L];for(Q-=tt,j?Q<-F?Q=-F:Q>0&&(Q=-F+Q%F):Q>F?Q=F:Q<0&&(Q=F+Q%F),D===null&&(D=new e(Z+Math.cos(tt)*_,q+Math.sin(tt)*_,T),I.push(D),$+=R);$<1+k;)A=Q*$+tt,M=Z+Math.cos(A)*_,P=q+Math.sin(A)*_,D.points.push(new n(M,P,T)),$+=R;A=Q+tt,M=Z+Math.cos(A)*_,P=q+Math.sin(A)*_,D.points.push(new n(M,P,T));break}case d.FILL_RECT:{v.batchFillRect(g[++L],g[++L],g[++L],g[++L],x,m);break}case d.FILL_TRIANGLE:{v.batchFillTriangle(g[++L],g[++L],g[++L],g[++L],g[++L],g[++L],x,m);break}case d.STROKE_TRIANGLE:{v.batchStrokeTriangle(g[++L],g[++L],g[++L],g[++L],g[++L],g[++L],T,x,m);break}case d.LINE_TO:{D!==null?D.points.push(new n(g[++L],g[++L],T)):(D=new e(g[++L],g[++L],T),I.push(D));break}case d.MOVE_TO:{D=new e(g[++L],g[++L],T),I.push(D);break}case d.SAVE:{s.push(x.copyToArray());break}case d.RESTORE:{x.copyFromArray(s.pop());break}case d.TRANSLATE:{Z=g[++L],q=g[++L],x.translate(Z,q);break}case d.SCALE:{Z=g[++L],q=g[++L],x.scale(Z,q);break}case d.ROTATE:{x.rotate(g[++L]);break}}a.pipelines.postBatch(l)}};p.exports=i}),26479:((p,S,t)=>{var d=t(61061),c=t(83419),h=t(51708),r=t(50792),n=t(46710),e=t(95540),s=t(35154),o=t(97022),i=t(41212),a=t(88492),l=t(35072),f=t(68287),u=new c({Extends:r,initialize:function(m,x,g){r.call(this),g?x&&!Array.isArray(x)&&(x=[x]):Array.isArray(x)?i(x[0])&&(g=x,x=null):i(x)&&(g=x,x=null),this.scene=m,this.children=new l,this.isParent=!0,this.type="Group",this.classType=e(g,"classType",f),this.name=e(g,"name",""),this.active=e(g,"active",!0),this.maxSize=e(g,"maxSize",-1),this.defaultKey=e(g,"defaultKey",null),this.defaultFrame=e(g,"defaultFrame",null),this.runChildUpdate=e(g,"runChildUpdate",!1),this.createCallback=e(g,"createCallback",null),this.removeCallback=e(g,"removeCallback",null),this.createMultipleCallback=e(g,"createMultipleCallback",null),this.internalCreateCallback=e(g,"internalCreateCallback",null),this.internalRemoveCallback=e(g,"internalRemoveCallback",null),x&&this.addMultiple(x),g&&this.createMultiple(g),this.on(h.ADDED_TO_SCENE,this.addedToScene,this),this.on(h.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},create:function(v,m,x,g,y,T){if(v===void 0&&(v=0),m===void 0&&(m=0),x===void 0&&(x=this.defaultKey),g===void 0&&(g=this.defaultFrame),y===void 0&&(y=!0),T===void 0&&(T=!0),this.isFull())return null;var C=new this.classType(this.scene,v,m,x,g);return C.addToDisplayList(this.scene.sys.displayList),C.addToUpdateList(),C.visible=y,C.setActive(T),this.add(C),C},createMultiple:function(v){if(this.isFull())return[];Array.isArray(v)||(v=[v]);var m=[];if(v[0].key)for(var x=0;x<v.length;x++){var g=this.createFromConfig(v[x]);m=m.concat(g)}return m},createFromConfig:function(v){if(this.isFull())return[];this.classType=e(v,"classType",this.classType);var m=e(v,"key",void 0),x=e(v,"frame",null),g=e(v,"visible",!0),y=e(v,"active",!0),T=[];if(m===void 0)return T;Array.isArray(m)||(m=[m]),Array.isArray(x)||(x=[x]);var C=e(v,"repeat",0),E=e(v,"randomKey",!1),M=e(v,"randomFrame",!1),P=e(v,"yoyo",!1),A=e(v,"quantity",!1),R=e(v,"frameQuantity",1),F=e(v,"max",0),w=a(m,x,{max:F,qty:A||R,random:E,randomB:M,repeat:C,yoyo:P});v.createCallback&&(this.createCallback=v.createCallback),v.removeCallback&&(this.removeCallback=v.removeCallback),v.internalCreateCallback&&(this.internalCreateCallback=v.internalCreateCallback),v.internalRemoveCallback&&(this.internalRemoveCallback=v.internalRemoveCallback);for(var I=0;I<w.length;I++){var U=this.create(0,0,w[I].a,w[I].b,g,y);if(!U)break;T.push(U)}if(o(v,"setXY")){var N=s(v,"setXY.x",0),D=s(v,"setXY.y",0),B=s(v,"setXY.stepX",0),L=s(v,"setXY.stepY",0);d.SetXY(T,N,D,B,L)}if(o(v,"setRotation")){var G=s(v,"setRotation.value",0),O=s(v,"setRotation.step",0);d.SetRotation(T,G,O)}if(o(v,"setScale")){var X=s(v,"setScale.x",1),z=s(v,"setScale.y",X),V=s(v,"setScale.stepX",0),Y=s(v,"setScale.stepY",0);d.SetScale(T,X,z,V,Y)}if(o(v,"setOrigin")){var W=s(v,"setOrigin.x",.5),H=s(v,"setOrigin.y",W),K=s(v,"setOrigin.stepX",0),b=s(v,"setOrigin.stepY",0);d.SetOrigin(T,W,H,K,b)}if(o(v,"setAlpha")){var J=s(v,"setAlpha.value",1),$=s(v,"setAlpha.step",0);d.SetAlpha(T,J,$)}if(o(v,"setDepth")){var Z=s(v,"setDepth.value",0),q=s(v,"setDepth.step",0);d.SetDepth(T,Z,q)}if(o(v,"setScrollFactor")){var _=s(v,"setScrollFactor.x",1),tt=s(v,"setScrollFactor.y",_),Q=s(v,"setScrollFactor.stepX",0),j=s(v,"setScrollFactor.stepY",0);d.SetScrollFactor(T,_,tt,Q,j)}var k=e(v,"hitArea",null),et=e(v,"hitAreaCallback",null);k&&d.SetHitArea(T,k,et);var nt=e(v,"gridAlign",!1);return nt&&d.GridAlign(T,nt),this.createMultipleCallback&&this.createMultipleCallback.call(this,T),T},preUpdate:function(v,m){if(!(!this.runChildUpdate||this.children.size===0))for(var x=this.children.entries.slice(),g=0;g<x.length;g++){var y=x[g];y.active&&y.update(v,m)}},add:function(v,m){return m===void 0&&(m=!1),this.isFull()?this:(this.children.set(v),this.internalCreateCallback&&this.internalCreateCallback.call(this,v),this.createCallback&&this.createCallback.call(this,v),m&&(v.addToDisplayList(this.scene.sys.displayList),v.addToUpdateList()),v.on(h.DESTROY,this.remove,this),this)},addMultiple:function(v,m){if(m===void 0&&(m=!1),Array.isArray(v))for(var x=0;x<v.length;x++)this.add(v[x],m);return this},remove:function(v,m,x){return m===void 0&&(m=!1),x===void 0&&(x=!1),this.children.contains(v)?(this.children.delete(v),this.internalRemoveCallback&&this.internalRemoveCallback.call(this,v),this.removeCallback&&this.removeCallback.call(this,v),v.off(h.DESTROY,this.remove,this),x?v.destroy():m&&(v.removeFromDisplayList(),v.removeFromUpdateList()),this):this},clear:function(v,m){v===void 0&&(v=!1),m===void 0&&(m=!1);for(var x=this.children,g=0;g<x.size;g++){var y=x.entries[g];y.off(h.DESTROY,this.remove,this),m?y.destroy():v&&(y.removeFromDisplayList(),y.removeFromUpdateList())}return this.children.clear(),this},contains:function(v){return this.children.contains(v)},getChildren:function(){return this.children.entries},getLength:function(){return this.children.size},getMatching:function(v,m,x,g){return n(this.children.entries,v,m,x,g)},getFirst:function(v,m,x,g,y,T,C){return this.getHandler(!0,1,v,m,x,g,y,T,C)},getFirstNth:function(v,m,x,g,y,T,C,E){return this.getHandler(!0,v,m,x,g,y,T,C,E)},getLast:function(v,m,x,g,y,T,C){return this.getHandler(!1,1,v,m,x,g,y,T,C)},getLastNth:function(v,m,x,g,y,T,C,E){return this.getHandler(!1,v,m,x,g,y,T,C,E)},getHandler:function(v,m,x,g,y,T,C,E,M){x===void 0&&(x=!1),g===void 0&&(g=!1);var P,A,R=0,F=this.children.entries;if(v)for(A=0;A<F.length;A++)if(P=F[A],P.active===x){if(R++,R===m)break}else P=null;else for(A=F.length-1;A>=0;A--)if(P=F[A],P.active===x){if(R++,R===m)break}else P=null;return P?(typeof y=="number"&&(P.x=y),typeof T=="number"&&(P.y=T),P):g?this.create(y,T,C,E,M):null},get:function(v,m,x,g,y){return this.getFirst(!1,!0,v,m,x,g,y)},getFirstAlive:function(v,m,x,g,y,T){return this.getFirst(!0,v,m,x,g,y,T)},getFirstDead:function(v,m,x,g,y,T){return this.getFirst(!1,v,m,x,g,y,T)},playAnimation:function(v,m){return d.PlayAnimation(this.children.entries,v,m),this},isFull:function(){return this.maxSize===-1?!1:this.children.size>=this.maxSize},countActive:function(v){v===void 0&&(v=!0);for(var m=0,x=0;x<this.children.size;x++)this.children.entries[x].active===v&&m++;return m},getTotalUsed:function(){return this.countActive()},getTotalFree:function(){var v=this.getTotalUsed(),m=this.maxSize===-1?999999999999:this.maxSize;return m-v},setActive:function(v){return this.active=v,this},setName:function(v){return this.name=v,this},propertyValueSet:function(v,m,x,g,y){return d.PropertyValueSet(this.children.entries,v,m,x,g,y),this},propertyValueInc:function(v,m,x,g,y){return d.PropertyValueInc(this.children.entries,v,m,x,g,y),this},setX:function(v,m){return d.SetX(this.children.entries,v,m),this},setY:function(v,m){return d.SetY(this.children.entries,v,m),this},setXY:function(v,m,x,g){return d.SetXY(this.children.entries,v,m,x,g),this},incX:function(v,m){return d.IncX(this.children.entries,v,m),this},incY:function(v,m){return d.IncY(this.children.entries,v,m),this},incXY:function(v,m,x,g){return d.IncXY(this.children.entries,v,m,x,g),this},shiftPosition:function(v,m,x){return d.ShiftPosition(this.children.entries,v,m,x),this},angle:function(v,m){return d.Angle(this.children.entries,v,m),this},rotate:function(v,m){return d.Rotate(this.children.entries,v,m),this},rotateAround:function(v,m){return d.RotateAround(this.children.entries,v,m),this},rotateAroundDistance:function(v,m,x){return d.RotateAroundDistance(this.children.entries,v,m,x),this},setAlpha:function(v,m){return d.SetAlpha(this.children.entries,v,m),this},setTint:function(v,m,x,g){return d.SetTint(this.children.entries,v,m,x,g),this},setOrigin:function(v,m,x,g){return d.SetOrigin(this.children.entries,v,m,x,g),this},scaleX:function(v,m){return d.ScaleX(this.children.entries,v,m),this},scaleY:function(v,m){return d.ScaleY(this.children.entries,v,m),this},scaleXY:function(v,m,x,g){return d.ScaleXY(this.children.entries,v,m,x,g),this},setDepth:function(v,m){return d.SetDepth(this.children.entries,v,m),this},setBlendMode:function(v){return d.SetBlendMode(this.children.entries,v),this},setHitArea:function(v,m){return d.SetHitArea(this.children.entries,v,m),this},shuffle:function(){return d.Shuffle(this.children.entries),this},kill:function(v){this.children.contains(v)&&v.setActive(!1)},killAndHide:function(v){this.children.contains(v)&&(v.setActive(!1),v.setVisible(!1))},setVisible:function(v,m,x){return d.SetVisible(this.children.entries,v,m,x),this},toggleVisible:function(){return d.ToggleVisible(this.children.entries),this},destroy:function(v,m){v===void 0&&(v=!1),m===void 0&&(m=!1),!(!this.scene||this.ignoreDestroy)&&(this.emit(h.DESTROY,this),this.removeAllListeners(),this.scene.sys.updateList.remove(this),this.clear(m,v),this.scene=void 0,this.children=void 0)}});p.exports=u}),94975:((p,S,t)=>{var d=t(44603),c=t(26479);d.register("group",function(h){return new c(this.scene,null,h)})}),3385:((p,S,t)=>{var d=t(26479),c=t(39429);c.register("group",function(h,r){return this.updateList.add(new d(this.scene,h,r))})}),88571:((p,S,t)=>{var d=t(83419),c=t(31401),h=t(95643),r=t(59819),n=new d({Extends:h,Mixins:[c.Alpha,c.BlendMode,c.Depth,c.Flip,c.GetBounds,c.Mask,c.Origin,c.Pipeline,c.PostPipeline,c.ScrollFactor,c.Size,c.TextureCrop,c.Tint,c.Transform,c.Visible,r],initialize:function(s,o,i,a,l){h.call(this,s,"Image"),this._crop=this.resetCropObject(),this.setTexture(a,l),this.setPosition(o,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)}});p.exports=n}),40652:(p=>{var S=function(t,d,c,h){c.addToRenderList(d),t.batchSprite(d,d.frame,c,h)};p.exports=S}),82459:((p,S,t)=>{var d=t(25305),c=t(44603),h=t(23568),r=t(88571);c.register("image",function(n,e){n===void 0&&(n={});var s=h(n,"key",null),o=h(n,"frame",null),i=new r(this.scene,0,0,s,o);return e!==void 0&&(n.add=e),d(this.scene,i,n),i})}),2117:((p,S,t)=>{var d=t(88571),c=t(39429);c.register("image",function(h,r,n,e){return this.displayList.add(new d(this.scene,h,r,n,e))})}),59819:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(99517),h=t(40652),p.exports={renderWebGL:c,renderCanvas:h}}),99517:(p=>{var S=function(t,d,c,h){c.addToRenderList(d),this.pipeline.batchSprite(d,c,h)};p.exports=S}),77856:((p,S,t)=>{var d={Events:t(51708),DisplayList:t(8050),GameObjectCreator:t(44603),GameObjectFactory:t(39429),UpdateList:t(45027),Components:t(31401),GetCalcMatrix:t(91296),BuildGameObject:t(25305),BuildGameObjectAnimation:t(13059),GameObject:t(95643),BitmapText:t(22186),Blitter:t(6107),Bob:t(46590),Container:t(31559),DOMElement:t(3069),DynamicBitmapText:t(2638),Extern:t(42421),Graphics:t(43831),Group:t(26479),Image:t(88571),Layer:t(93595),Particles:t(18404),PathFollower:t(1159),RenderTexture:t(591),RetroFont:t(196),Rope:t(77757),Sprite:t(68287),Text:t(50171),GetTextSize:t(14220),MeasureText:t(79557),TextStyle:t(35762),TileSprite:t(20839),Zone:t(41481),Video:t(18471),Shape:t(17803),Arc:t(23629),Curve:t(89),Ellipse:t(19921),Grid:t(30479),IsoBox:t(61475),IsoTriangle:t(16933),Line:t(57847),Polygon:t(24949),Rectangle:t(74561),Star:t(55911),Triangle:t(36931),Factories:{Blitter:t(12709),Container:t(24961),DOMElement:t(2611),DynamicBitmapText:t(72566),Extern:t(56315),Graphics:t(1201),Group:t(3385),Image:t(2117),Layer:t(20005),Particles:t(676),PathFollower:t(90145),RenderTexture:t(60505),Rope:t(96819),Sprite:t(46409),StaticBitmapText:t(34914),Text:t(68005),TileSprite:t(91681),Zone:t(84175),Video:t(89025),Arc:t(42563),Curve:t(40511),Ellipse:t(1543),Grid:t(34137),IsoBox:t(3933),IsoTriangle:t(49803),Line:t(2481),Polygon:t(64827),Rectangle:t(87959),Star:t(93697),Triangle:t(45245)},Creators:{Blitter:t(9403),Container:t(77143),DynamicBitmapText:t(11164),Graphics:t(87079),Group:t(94975),Image:t(82459),Layer:t(25179),Particles:t(92730),RenderTexture:t(34495),Rope:t(26209),Sprite:t(15567),StaticBitmapText:t(57336),Text:t(71259),TileSprite:t(14167),Zone:t(95261),Video:t(11511)}};d.Shader=t(20071),d.Mesh=t(4703),d.NineSlice=t(28103),d.PointLight=t(80321),d.Plane=t(33663),d.Factories.Shader=t(74177),d.Factories.Mesh=t(9225),d.Factories.NineSlice=t(47521),d.Factories.PointLight=t(71255),d.Factories.Plane=t(30985),d.Creators.Shader=t(54935),d.Creators.Mesh=t(20527),d.Creators.NineSlice=t(28279),d.Creators.PointLight=t(39829),d.Creators.Plane=t(56015),d.Light=t(41432),d.LightsManager=t(61356),d.LightsPlugin=t(88992),p.exports=d}),93595:((p,S,t)=>{var d=t(10312),c=t(83419),h=t(31401),r=t(53774),n=t(45893),e=t(50792),s=t(51708),o=t(73162),i=t(33963),a=t(44594),l=t(19186),f=new c({Extends:o,Mixins:[h.AlphaSingle,h.BlendMode,h.Depth,h.Mask,h.PostPipeline,h.Visible,e,i],initialize:function(v,m){o.call(this,v),e.call(this),this.scene=v,this.displayList=null,this.type="Layer",this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.systems=v.sys,this.events=v.sys.events,this.sortChildrenFlag=!1,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.initPostPipeline(),this.clearAlpha(),this.setBlendMode(d.SKIP_CHECK),m&&this.add(m),v.sys.queueDepthSort()},setActive:function(u){return this.active=u,this},setName:function(u){return this.name=u,this},setState:function(u){return this.state=u,this},setDataEnabled:function(){return this.data||(this.data=new n(this)),this},setData:function(u,v){return this.data||(this.data=new n(this)),this.data.set(u,v),this},incData:function(u,v){return this.data||(this.data=new n(this)),this.data.inc(u,v),this},toggleData:function(u){return this.data||(this.data=new n(this)),this.data.toggle(u),this},getData:function(u){return this.data||(this.data=new n(this)),this.data.get(u)},setInteractive:function(){return this},disableInteractive:function(){return this},removeInteractive:function(){return this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return r(this)},willRender:function(u){return!(this.renderFlags!==15||this.list.length===0||this.cameraFilter!==0&&this.cameraFilter&u.id)},getIndexList:function(){for(var u=this,v=this.parentContainer,m=[];v&&(m.unshift(v.getIndex(u)),u=v,v.parentContainer);)v=v.parentContainer;return m.unshift(this.displayList.getIndex(u)),m},addChildCallback:function(u){var v=u.displayList;v&&v!==this&&u.removeFromDisplayList(),u.displayList||(this.queueDepthSort(),u.displayList=this,u.emit(s.ADDED_TO_SCENE,u,this.scene),this.events.emit(a.ADDED_TO_SCENE,u,this.scene))},removeChildCallback:function(u){this.queueDepthSort(),u.displayList=null,u.emit(s.REMOVED_FROM_SCENE,u,this.scene),this.events.emit(a.REMOVED_FROM_SCENE,u,this.scene)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(l(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(u,v){return u._depth-v._depth},getChildren:function(){return this.list},addToDisplayList:function(u){return u===void 0&&(u=this.scene.sys.displayList),this.displayList&&this.displayList!==u&&this.removeFromDisplayList(),u.exists(this)||(this.displayList=u,u.add(this,!0),u.queueDepthSort(),this.emit(s.ADDED_TO_SCENE,this,this.scene),u.events.emit(a.ADDED_TO_SCENE,this,this.scene)),this},removeFromDisplayList:function(){var u=this.displayList||this.scene.sys.displayList;return u.exists(this)&&(u.remove(this,!0),u.queueDepthSort(),this.displayList=null,this.emit(s.REMOVED_FROM_SCENE,this,this.scene),u.events.emit(a.REMOVED_FROM_SCENE,this,this.scene)),this},getDisplayList:function(){var u=null;return this.parentContainer?u=this.parentContainer.list:this.displayList&&(u=this.displayList.list),u},destroy:function(u){if(!(!this.scene||this.ignoreDestroy)){this.emit(s.DESTROY,this);for(var v=this.list;v.length;)v[0].destroy(u);this.removeAllListeners(),this.resetPostPipeline(!0),this.displayList&&(this.displayList.remove(this,!0,!1),this.displayList.queueDepthSort()),this.data&&(this.data.destroy(),this.data=void 0),this.active=!1,this.visible=!1,this.list=void 0,this.scene=void 0,this.displayList=void 0,this.systems=void 0,this.events=void 0}}});p.exports=f}),2956:(p=>{var S=function(t,d,c){var h=d.list;if(h.length!==0){d.depthSort();var r=d.blendMode!==-1;r||t.setBlendMode(0);var n=d._alpha;d.mask&&d.mask.preRenderCanvas(t,null,c);for(var e=0;e<h.length;e++){var s=h[e];if(s.willRender(c)){var o=s.alpha;!r&&s.blendMode!==t.currentBlendMode&&t.setBlendMode(s.blendMode),s.setAlpha(o*n),s.renderCanvas(t,s,c),s.setAlpha(o)}}d.mask&&d.mask.postRenderCanvas(t)}};p.exports=S}),25179:((p,S,t)=>{var d=t(25305),c=t(93595),h=t(44603),r=t(23568);h.register("layer",function(n,e){n===void 0&&(n={});var s=r(n,"children",null),o=new c(this.scene,s);return e!==void 0&&(n.add=e),d(this.scene,o,n),o})}),20005:((p,S,t)=>{var d=t(93595),c=t(39429);c.register("layer",function(h){return this.displayList.add(new d(this.scene,h))})}),33963:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(15869),h=t(2956),p.exports={renderWebGL:c,renderCanvas:h}}),15869:(p=>{var S=function(t,d,c){var h=d.list,r=h.length;if(r!==0){d.depthSort(),t.pipelines.preBatch(d);var n=d.blendMode!==-1;n||t.setBlendMode(0);for(var e=d.alpha,s=0;s<r;s++){var o=h[s];if(o.willRender(c)){var i,a,l,f;if(o.alphaTopLeft!==void 0)i=o.alphaTopLeft,a=o.alphaTopRight,l=o.alphaBottomLeft,f=o.alphaBottomRight;else{var u=o.alpha;i=u,a=u,l=u,f=u}!n&&o.blendMode!==t.currentBlendMode&&t.setBlendMode(o.blendMode);var v=o.mask;v&&v.preRenderWebGL(t,o,c);var m=o.type;m!==t.currentType&&(t.newType=!0,t.currentType=m),t.nextTypeMatch=s<r-1?h[s+1].type===t.currentType:!1,o.setAlpha(i*e,a*e,l*e,f*e),o.renderWebGL(t,o,c),o.setAlpha(i,a,l,f),v&&v.postRenderWebGL(t,c),t.newType=!1}}t.pipelines.postBatch(d)}};p.exports=S}),41432:((p,S,t)=>{var d=t(96503),c=t(83419),h=t(31401),r=t(51767),n=t(70554),e=new c({Extends:d,Mixins:[h.Origin,h.ScrollFactor,h.Visible],initialize:function(o,i,a,l,f,u,v){d.call(this,o,i,a),this.color=new r(l,f,u),this.intensity=v,this.renderFlags=15,this.cameraFilter=0,this.setScrollFactor(1,1),this.setOrigin(),this.setDisplayOrigin(a)},displayWidth:{get:function(){return this.diameter},set:function(s){this.diameter=s}},displayHeight:{get:function(){return this.diameter},set:function(s){this.diameter=s}},width:{get:function(){return this.diameter},set:function(s){this.diameter=s}},height:{get:function(){return this.diameter},set:function(s){this.diameter=s}},willRender:function(s){return!(e.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&s.id)},setColor:function(s){var o=n.getFloatsFromUintRGB(s);return this.color.set(o[0],o[1],o[2]),this},setIntensity:function(s){return this.intensity=s,this},setRadius:function(s){return this.radius=s,this}});e.RENDER_MASK=15,p.exports=e}),61356:((p,S,t)=>{var d=t(81491),c=t(83419),h=t(20339),r=t(41432),n=t(80321),e=t(51767),s=t(19133),o=t(19186),i=t(70554),a=new c({initialize:function(){this.lights=[],this.ambientColor=new e(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(l,f,u,v,m,x){return this.systems.displayList.add(new n(this.scene,l,f,u,v,m,x))},enable:function(){return this.maxLights===-1&&(this.maxLights=this.systems.renderer.config.maxLights),this.active=!0,this},disable:function(){return this.active=!1,this},getLights:function(l){for(var f=this.lights,u=l.worldView,v=[],m=0;m<f.length;m++){var x=f[m];x.willRender(l)&&d(x,u)&&v.push({light:x,distance:h(x.x,x.y,u.centerX,u.centerY)})}return v.length>this.maxLights&&(o(v,this.sortByDistance),v=v.slice(0,this.maxLights)),this.visibleLights=v.length,v},sortByDistance:function(l,f){return l.distance>=f.distance},setAmbientColor:function(l){var f=i.getFloatsFromUintRGB(l);return this.ambientColor.set(f[0],f[1],f[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(l,f,u,v,m){l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=128),v===void 0&&(v=16777215),m===void 0&&(m=1);var x=i.getFloatsFromUintRGB(v),g=new r(l,f,u,x[0],x[1],x[2],m);return this.lights.push(g),g},removeLight:function(l){var f=this.lights.indexOf(l);return f>=0&&s(this.lights,f),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});p.exports=a}),88992:((p,S,t)=>{var d=t(83419),c=t(61356),h=t(37277),r=t(44594),n=new d({Extends:c,initialize:function(s){this.scene=s,this.systems=s.sys,s.sys.settings.isBooted||s.sys.events.once(r.BOOT,this.boot,this),c.call(this)},boot:function(){var e=this.systems.events;e.on(r.SHUTDOWN,this.shutdown,this),e.on(r.DESTROY,this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});h.register("LightsPlugin",n,"lights"),p.exports=n}),4703:((p,S,t)=>{var d=t(83419),c=t(31401),h=t(39506),r=t(83997),n=t(95643),e=t(34684),s=t(92515),o=t(91296),i=t(37867),a=t(29807),l=t(43396),f=t(19186),u=t(25836),v=t(39318),m=new d({Extends:n,Mixins:[c.AlphaSingle,c.BlendMode,c.Depth,c.Mask,c.Pipeline,c.PostPipeline,c.ScrollFactor,c.Size,c.Texture,c.Transform,c.Visible,a],initialize:function(g,y,T,C,E,M,P,A,R,F,w,I){y===void 0&&(y=0),T===void 0&&(T=0),C===void 0&&(C="__WHITE"),n.call(this,g,"Mesh"),this.faces=[],this.vertices=[],this.tintFill=!1,this.debugCallback=null,this.debugGraphic=null,this.hideCCW=!0,this.modelPosition=new u,this.modelScale=new u(1,1,1),this.modelRotation=new u,this.dirtyCache=[0,0,0,0,0,0,0,0,0,0,0,0],this.transformMatrix=new i,this.viewPosition=new u,this.viewMatrix=new i,this.projectionMatrix=new i,this.totalRendered=0,this.totalFrame=0,this.ignoreDirtyCache=!1,this.fov,this.displayOriginX=0,this.displayOriginY=0;var U=g.sys.renderer;this.setPosition(y,T),this.setTexture(C,E),this.setSize(U.width,U.height),this.initPipeline(),this.initPostPipeline(),this.setPerspective(U.width,U.height),M&&this.addVertices(M,P,A,R,F,w,I)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},panX:function(x){return this.viewPosition.addScale(u.LEFT,x),this.dirtyCache[10]=1,this},panY:function(x){return this.viewPosition.y+=u.DOWN.y*x,this.dirtyCache[10]=1,this},panZ:function(x){return this.viewPosition.z+=x,this.dirtyCache[10]=1,this},setPerspective:function(x,g,y,T,C){return y===void 0&&(y=45),T===void 0&&(T=.01),C===void 0&&(C=1e3),this.fov=y,this.projectionMatrix.perspective(h(y),x/g,T,C),this.dirtyCache[10]=1,this.dirtyCache[11]=0,this},setOrtho:function(x,g,y,T){return x===void 0&&(x=this.scene.sys.renderer.getAspectRatio()),g===void 0&&(g=1),y===void 0&&(y=-1e3),T===void 0&&(T=1e3),this.fov=0,this.projectionMatrix.ortho(-x,x,-g,g,y,T),this.dirtyCache[10]=1,this.dirtyCache[11]=1,this},clear:function(){return this.faces.forEach(function(x){x.destroy()}),this.faces=[],this.vertices=[],this},addVerticesFromObj:function(x,g,y,T,C,E,M,P,A){var R=this.scene.sys.cache.obj.get(x),F;return R&&(F=e(R,this,g,y,T,C,E,M,P,A)),(!F||F.verts.length===0)&&console.warn("Mesh.addVerticesFromObj data empty:",x),this},sortByDepth:function(x,g){return x.depth-g.depth},depthSort:function(){return f(this.faces,this.sortByDepth),this},addVertex:function(x,g,y,T,C,E,M){var P=new v(x,g,y,T,C,E,M);return this.vertices.push(P),P},addFace:function(x,g,y){var T=new r(x,g,y);return this.faces.push(T),this.dirtyCache[9]=-1,T},addVertices:function(x,g,y,T,C,E,M){var P=s(x,g,y,T,C,E,M);return P?(this.faces=this.faces.concat(P.faces),this.vertices=this.vertices.concat(P.vertices)):console.warn("Mesh.addVertices data empty or invalid"),this.dirtyCache[9]=-1,this},getFaceCount:function(){return this.faces.length},getVertexCount:function(){return this.vertices.length},getFace:function(x){return this.faces[x]},hasFaceAt:function(x,g,y){y===void 0&&(y=this.scene.sys.cameras.main);for(var T=o(this,y).calc,C=this.faces,E=0;E<C.length;E++){var M=C[E];if(M.contains(x,g,T))return!0}return!1},getFaceAt:function(x,g,y){y===void 0&&(y=this.scene.sys.cameras.main);for(var T=o(this,y).calc,C=this.faces,E=[],M=0;M<C.length;M++){var P=C[M];P.contains(x,g,T)&&E.push(P)}return f(E,this.sortByDepth)},setDebug:function(x,g){return this.debugGraphic=x,!x&&!g?this.debugCallback=null:g?this.debugCallback=g:this.debugCallback=this.renderDebug,this},isDirty:function(){var x=this.modelPosition,g=this.modelRotation,y=this.modelScale,T=this.dirtyCache,C=x.x,E=x.y,M=x.z,P=g.x,A=g.y,R=g.z,F=y.x,w=y.y,I=y.z,U=this.getFaceCount(),N=T[0],D=T[1],B=T[2],L=T[3],G=T[4],O=T[5],X=T[6],z=T[7],V=T[8],Y=T[9];return T[0]=C,T[1]=E,T[2]=M,T[3]=P,T[4]=A,T[5]=R,T[6]=F,T[7]=w,T[8]=I,T[9]=U,N!==C||D!==E||B!==M||L!==P||G!==A||O!==R||X!==F||z!==w||V!==I||Y!==U},preUpdate:function(){this.totalRendered=this.totalFrame,this.totalFrame=0;var x=this.dirtyCache;if(!(!this.ignoreDirtyCache&&!x[10]&&!this.isDirty())){var g=this.width,y=this.height,T=this.viewMatrix,C=this.viewPosition;x[10]&&(T.identity(),T.translate(C),T.invert(),x[10]=0);var E=this.transformMatrix;E.setWorldMatrix(this.modelRotation,this.modelPosition,this.modelScale,this.viewMatrix,this.projectionMatrix);for(var M=C.z,P=this.faces,A=0;A<P.length;A++)P[A].transformCoordinatesLocal(E,g,y,M);this.depthSort()}},renderDebug:function(x,g){for(var y=x.debugGraphic,T=0;T<g.length;T++){var C=g[T],E=C.vertex1.tx,M=C.vertex1.ty,P=C.vertex2.tx,A=C.vertex2.ty,R=C.vertex3.tx,F=C.vertex3.ty;y.strokeTriangle(E,M,P,A,R,F)}},preDestroy:function(){this.clear(),this.debugCallback=null,this.debugGraphic=null},clearTint:function(){return this.setTint()},setInteractive:function(x){x===void 0&&(x={});var g=(function(y,T,C){for(var E=this.faces,M=0;M<E.length;M++){var P=E[M];if(P.contains(T,C))return!0}return!1}).bind(this);return this.scene.sys.input.enable(this,x,g),this},setTint:function(x){x===void 0&&(x=16777215);for(var g=this.vertices,y=0;y<g.length;y++)g[y].color=x;return this},uvScroll:function(x,g){for(var y=this.faces,T=0;T<y.length;T++)y[T].scrollUV(x,g);return this},uvScale:function(x,g){for(var y=this.faces,T=0;T<y.length;T++)y[T].scaleUV(x,g);return this},tint:{set:function(x){this.setTint(x)}},rotateX:{get:function(){return l(this.modelRotation.x)},set:function(x){this.modelRotation.x=h(x)}},rotateY:{get:function(){return l(this.modelRotation.y)},set:function(x){this.modelRotation.y=h(x)}},rotateZ:{get:function(){return l(this.modelRotation.z)},set:function(x){this.modelRotation.z=h(x)}}});p.exports=m}),36488:(p=>{var S=function(){};p.exports=S}),20527:((p,S,t)=>{var d=t(25305),c=t(44603),h=t(23568),r=t(35154),n=t(4703);c.register("mesh",function(e,s){e===void 0&&(e={});var o=h(e,"key",null),i=h(e,"frame",null),a=r(e,"vertices",[]),l=r(e,"uvs",[]),f=r(e,"indicies",[]),u=r(e,"containsZ",!1),v=r(e,"normals",[]),m=r(e,"colors",16777215),x=r(e,"alphas",1),g=new n(this.scene,0,0,o,i,a,l,f,u,v,m,x);return s!==void 0&&(e.add=s),d(this.scene,g,e),g})}),9225:((p,S,t)=>{var d=t(4703),c=t(39429);c.register("mesh",function(h,r,n,e,s,o,i,a,l,f,u){return this.displayList.add(new d(this.scene,h,r,n,e,s,o,i,a,l,f,u))})}),29807:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(48833),h=t(36488),p.exports={renderWebGL:c,renderCanvas:h}}),48833:((p,S,t)=>{var d=t(91296),c=function(h,r,n,e){var s=r.faces,o=s.length;if(o!==0){n.addToRenderList(r);var i=h.pipelines.set(r.pipeline,r),a=d(r,n,e).calc;h.pipelines.preBatch(r);for(var l=i.setGameObject(r),f=i.vertexViewF32,u=i.vertexViewU32,v=i.vertexCount*i.currentShader.vertexComponentCount-1,m=r.tintFill,x=[],g=r.debugCallback,y=a.a,T=a.b,C=a.c,E=a.d,M=a.e,P=a.f,A=r.viewPosition.z,R=r.hideCCW,F=n.roundPixels,w=n.alpha*r.alpha,I=0,U=0;U<o;U++){var N=s[U];N.isInView(n,R,A,w,y,T,C,E,M,P,F)&&(i.shouldFlush(3)&&(i.flush(),l=i.setGameObject(r),v=i.vertexCount*i.currentShader.vertexComponentCount-1),v=N.load(f,u,v,l,m),I++,i.vertexCount+=3,i.currentBatch.count=i.vertexCount-i.currentBatch.start,g&&x.push(N))}r.totalFrame+=I,g&&g.call(r,r,x),h.pipelines.postBatch(r)}};p.exports=c}),28103:((p,S,t)=>{var d=t(83419),c=t(31401),h=t(95643),r=t(78023),n=t(39318),e=new d({Extends:h,Mixins:[c.AlphaSingle,c.BlendMode,c.Depth,c.GetBounds,c.Mask,c.Origin,c.Pipeline,c.PostPipeline,c.ScrollFactor,c.Texture,c.Transform,c.Visible,r],initialize:function(o,i,a,l,f,u,v,m,x,g,y){h.call(this,o,"NineSlice"),this._width,this._height,this._originX=.5,this._originY=.5,this._sizeComponent=!0,this.vertices=[],this.leftWidth,this.rightWidth,this.topHeight,this.bottomHeight,this.tint=16777215,this.tintFill=!1;var T=o.textures.getFrame(l,f);this.is3Slice=!g&&!y,T&&T.scale9&&(this.is3Slice=T.is3Slice);for(var C=this.is3Slice?18:54,E=0;E<C;E++)this.vertices.push(new n);this.setPosition(i,a),this.setTexture(l,f),this.setSlices(u,v,m,x,g,y,!1),this.updateDisplayOrigin(),this.initPipeline(),this.initPostPipeline()},setSlices:function(s,o,i,a,l,f,u){i===void 0&&(i=10),a===void 0&&(a=10),l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=!1);var v=this.frame,m=!1;if(this.is3Slice&&u&&l!==0&&f!==0&&(m=!0),m)console.warn("Cannot change 9 slice to 3 slice");else{if(v&&v.scale9&&!u){var x=v.data.scale9Borders,g=x.x,y=x.y;i=g,a=v.width-x.w-g,l=y,f=v.height-x.h-y,s===void 0&&(s=v.width),o===void 0&&(o=v.height)}else s===void 0&&(s=256),o===void 0&&(o=256);this._width=s,this._height=o,this.leftWidth=i,this.rightWidth=a,this.topHeight=l,this.bottomHeight=f,this.is3Slice&&(o=v.height,this._height=o,this.topHeight=o,this.bottomHeight=0),this.updateVertices(),this.updateUVs()}return this},updateUVs:function(){var s=this.leftWidth,o=this.rightWidth,i=this.topHeight,a=this.bottomHeight,l=this.frame.width,f=this.frame.height;this.updateQuadUVs(0,0,0,s/l,i/f),this.updateQuadUVs(6,s/l,0,1-o/l,i/f),this.updateQuadUVs(12,1-o/l,0,1,i/f),this.is3Slice||(this.updateQuadUVs(18,0,i/f,s/l,1-a/f),this.updateQuadUVs(24,s/l,i/f,1-o/l,1-a/f),this.updateQuadUVs(30,1-o/l,i/f,1,1-a/f),this.updateQuadUVs(36,0,1-a/f,s/l,1),this.updateQuadUVs(42,s/l,1-a/f,1-o/l,1),this.updateQuadUVs(48,1-o/l,1-a/f,1,1))},updateVertices:function(){var s=this.leftWidth,o=this.rightWidth,i=this.topHeight,a=this.bottomHeight,l=this.width,f=this.height;this.updateQuad(0,-.5,.5,-.5+s/l,.5-i/f),this.updateQuad(6,-.5+s/l,.5,.5-o/l,.5-i/f),this.updateQuad(12,.5-o/l,.5,.5,.5-i/f),this.is3Slice||(this.updateQuad(18,-.5,.5-i/f,-.5+s/l,-.5+a/f),this.updateQuad(24,-.5+s/l,.5-i/f,.5-o/l,-.5+a/f),this.updateQuad(30,.5-o/l,.5-i/f,.5,-.5+a/f),this.updateQuad(36,-.5,-.5+a/f,-.5+s/l,-.5),this.updateQuad(42,-.5+s/l,-.5+a/f,.5-o/l,-.5),this.updateQuad(48,.5-o/l,-.5+a/f,.5,-.5))},updateQuad:function(s,o,i,a,l){var f=this.width,u=this.height,v=this.originX,m=this.originY,x=this.vertices;x[s+0].resize(o,i,f,u,v,m),x[s+1].resize(o,l,f,u,v,m),x[s+2].resize(a,i,f,u,v,m),x[s+3].resize(o,l,f,u,v,m),x[s+4].resize(a,l,f,u,v,m),x[s+5].resize(a,i,f,u,v,m)},updateQuadUVs:function(s,o,i,a,l){var f=this.vertices,u=this.frame,v=u.u0,m=u.v0,x=u.u1,g=u.v1;if(v!==0||x!==1){var y=x-v;o=v+o*y,a=v+a*y}if(m!==0||g!==1){var T=g-m;i=m+i*T,l=m+l*T}f[s+0].setUVs(o,i),f[s+1].setUVs(o,l),f[s+2].setUVs(a,i),f[s+3].setUVs(o,l),f[s+4].setUVs(a,l),f[s+5].setUVs(a,i)},clearTint:function(){return this.setTint(16777215),this},setTint:function(s){return s===void 0&&(s=16777215),this.tint=s,this.tintFill=!1,this},setTintFill:function(s){return this.setTint(s),this.tintFill=!0,this},isTinted:{get:function(){return this.tint!==16777215}},width:{get:function(){return this._width},set:function(s){this._width=Math.max(s,this.leftWidth+this.rightWidth),this.updateVertices()}},height:{get:function(){return this._height},set:function(s){this.is3Slice||(this._height=Math.max(s,this.topHeight+this.bottomHeight),this.updateVertices())}},displayWidth:{get:function(){return this.scaleX*this.width},set:function(s){this.scaleX=s/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(s){this.scaleY=s/this.height}},setSize:function(s,o){this.width=s,this.height=o,this.updateDisplayOrigin();var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=this.width,i.hitArea.height=this.height),this},setDisplaySize:function(s,o){return this.displayWidth=s,this.displayHeight=o,this},originX:{get:function(){return this._originX},set:function(s){this._originX=s,this.updateVertices()}},originY:{get:function(){return this._originY},set:function(s){this._originY=s,this.updateVertices()}},setOrigin:function(s,o){return s===void 0&&(s=.5),o===void 0&&(o=s),this._originX=s,this._originY=o,this.updateVertices(),this.updateDisplayOrigin()},setSizeToFrame:function(){if(this.is3Slice){var s=this.frame.height;this._height=s,this.topHeight=s,this.bottomHeight=0}return this.updateUVs(),this},preDestroy:function(){this.vertices=[]}});p.exports=e}),28279:((p,S,t)=>{var d=t(25305),c=t(44603),h=t(23568),r=t(35154),n=t(28103);c.register("nineslice",function(e,s){e===void 0&&(e={});var o=h(e,"key",null),i=h(e,"frame",null),a=r(e,"width",256),l=r(e,"height",256),f=r(e,"leftWidth",10),u=r(e,"rightWidth",10),v=r(e,"topHeight",0),m=r(e,"bottomHeight",0),x=new n(this.scene,0,0,o,i,a,l,f,u,v,m);return s!==void 0&&(e.add=s),d(this.scene,x,e),x})}),47521:((p,S,t)=>{var d=t(28103),c=t(39429);c.register("nineslice",function(h,r,n,e,s,o,i,a,l,f){return this.displayList.add(new d(this.scene,h,r,n,e,s,o,i,a,l,f))})}),78023:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(52230),p.exports={renderWebGL:c,renderCanvas:h}}),52230:((p,S,t)=>{var d=t(91296),c=t(70554),h=function(r,n,e,s){var o=n.vertices,i=o.length;if(i!==0){e.addToRenderList(n);var a=r.pipelines.set(n.pipeline,n),l=d(n,e,s,!1).calc;r.pipelines.preBatch(n);var f=a.setGameObject(n),u=a.vertexViewF32,v=a.vertexViewU32,m=a.vertexCount*a.currentShader.vertexComponentCount-1,x=e.roundPixels,g=n.tintFill,y=e.alpha*n.alpha,T=c.getTintAppendFloatAlpha(n.tint,y),C=a.vertexAvailable(),E=-1;C<i&&(E=C);for(var M=0;M<i;M++){var P=o[M];M===E&&(a.flush(),f=a.setGameObject(n),m=0),u[++m]=l.getXRound(P.vx,P.vy,x),u[++m]=l.getYRound(P.vx,P.vy,x),u[++m]=P.u,u[++m]=P.v,u[++m]=f,u[++m]=g,v[++m]=T,a.vertexCount++,a.currentBatch.count=a.vertexCount-a.currentBatch.start}r.pipelines.postBatch(n)}};p.exports=h}),76472:((p,S,t)=>{var d=t(83419),c=t(44777),h=t(37589),r=t(6113),n=t(91389),e=t(90664),s=new d({Extends:c,initialize:function(i){c.call(this,i,null,!1),this.active=!1,this.easeName="Linear",this.r=[],this.g=[],this.b=[]},getMethod:function(){return this.propertyValue===null?0:9},setMethods:function(){var o=this.propertyValue,i=o,a=this.defaultEmit,l=this.defaultUpdate;if(this.method===9){this.start=o[0],this.ease=r("Linear"),this.interpolation=n("linear"),a=this.easedValueEmit,l=this.easeValueUpdate,i=o[0],this.active=!0,this.r.length=0,this.g.length=0,this.b.length=0;for(var f=0;f<o.length;f++){var u=e(o[f]);this.r.push(u.r),this.g.push(u.g),this.b.push(u.b)}}return this.onEmit=a,this.onUpdate=l,this.current=i,this},setEase:function(o){this.easeName=o,this.ease=r(o)},easedValueEmit:function(){return this.current=this.start,this.start},easeValueUpdate:function(o,i,a){var l=this.ease(a),f=this.interpolation(this.r,l),u=this.interpolation(this.g,l),v=this.interpolation(this.b,l),m=h(f,u,v);return this.current=m,m}});p.exports=s}),44777:((p,S,t)=>{var d=t(30976),c=t(45319),h=t(83419),r=t(99472),n=t(6113),e=t(95540),s=t(91389),o=t(77720),i=t(15994),a=new h({initialize:function(f,u,v){v===void 0&&(v=!1),this.propertyKey=f,this.propertyValue=u,this.defaultValue=u,this.steps=0,this.counter=0,this.yoyo=!1,this.direction=0,this.start=0,this.current=0,this.end=0,this.ease=null,this.interpolation=null,this.emitOnly=v,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.active=!0,this.method=0,this._onEmit,this._onUpdate},loadConfig:function(l,f){l===void 0&&(l={}),f&&(this.propertyKey=f),this.propertyValue=e(l,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(l){var f;switch(this.method){case 1:case 3:case 8:f=l;break;case 2:this.propertyValue.indexOf(l)>=0&&(f=l);break;case 4:var u=(this.end-this.start)/this.steps;f=o(l,u),this.counter=f;break;case 5:case 6:case 7:f=c(l,this.start,this.end);break;case 9:f=this.start[0];break}return this.current=f,this},getMethod:function(){var l=this.propertyValue;if(l===null)return 0;var f=typeof l;if(f==="number")return 1;if(Array.isArray(l))return 2;if(f==="function")return 3;if(f==="object"){if(this.hasBoth(l,"start","end"))return this.has(l,"steps")?4:5;if(this.hasBoth(l,"min","max"))return 6;if(this.has(l,"random"))return 7;if(this.hasEither(l,"onEmit","onUpdate"))return 8;if(this.hasEither(l,"values","interpolation"))return 9}return 0},setMethods:function(){var l=this.propertyValue,f=l,u=this.defaultEmit,v=this.defaultUpdate;switch(this.method){case 1:u=this.staticValueEmit;break;case 2:u=this.randomStaticValueEmit,f=l[0];break;case 3:this._onEmit=l,u=this.proxyEmit,f=this.defaultValue;break;case 4:this.start=l.start,this.end=l.end,this.steps=l.steps,this.counter=this.start,this.yoyo=this.has(l,"yoyo")?l.yoyo:!1,this.direction=0,u=this.steppedEmit,f=this.start;break;case 5:this.start=l.start,this.end=l.end;var m=this.has(l,"ease")?l.ease:"Linear";this.ease=n(m,l.easeParams),u=this.has(l,"random")&&l.random?this.randomRangedValueEmit:this.easedValueEmit,v=this.easeValueUpdate,f=this.start;break;case 6:this.start=l.min,this.end=l.max,u=this.has(l,"int")&&l.int?this.randomRangedIntEmit:this.randomRangedValueEmit,f=this.start;break;case 7:var x=l.random;Array.isArray(x)&&(this.start=x[0],this.end=x[1]),u=this.randomRangedIntEmit,f=this.start;break;case 8:this._onEmit=this.has(l,"onEmit")?l.onEmit:this.defaultEmit,this._onUpdate=this.has(l,"onUpdate")?l.onUpdate:this.defaultUpdate,u=this.proxyEmit,v=this.proxyUpdate,f=this.defaultValue;break;case 9:this.start=l.values;var g=this.has(l,"ease")?l.ease:"Linear";this.ease=n(g,l.easeParams),this.interpolation=s(l.interpolation),u=this.easedValueEmit,v=this.easeValueUpdate,f=this.start[0];break}return this.onEmit=u,this.onUpdate=v,this.current=f,this},has:function(l,f){return l.hasOwnProperty(f)},hasBoth:function(l,f,u){return l.hasOwnProperty(f)&&l.hasOwnProperty(u)},hasEither:function(l,f,u){return l.hasOwnProperty(f)||l.hasOwnProperty(u)},defaultEmit:function(){return this.defaultValue},defaultUpdate:function(l,f,u,v){return v},proxyEmit:function(l,f,u){var v=this._onEmit(l,f,u);return this.current=v,v},proxyUpdate:function(l,f,u,v){var m=this._onUpdate(l,f,u,v);return this.current=m,m},staticValueEmit:function(){return this.current},staticValueUpdate:function(){return this.current},randomStaticValueEmit:function(){var l=Math.floor(Math.random()*this.propertyValue.length);return this.current=this.propertyValue[l],this.current},randomRangedValueEmit:function(l,f){var u=r(this.start,this.end);return l&&l.data[f]&&(l.data[f].min=u,l.data[f].max=this.end),this.current=u,u},randomRangedIntEmit:function(l,f){var u=d(this.start,this.end);return l&&l.data[f]&&(l.data[f].min=u,l.data[f].max=this.end),this.current=u,u},steppedEmit:function(){var l=this.counter,f=l,u=(this.end-this.start)/this.steps;if(this.yoyo){var v;this.direction===0?(f+=u,f>=this.end&&(v=f-this.end,f=this.end-v,this.direction=1)):(f-=u,f<=this.start&&(v=this.start-f,f=this.start+v,this.direction=0)),this.counter=f}else this.counter=i(f+u,this.start,this.end);return this.current=l,l},easedValueEmit:function(l,f){if(l&&l.data[f]){var u=l.data[f];u.min=this.start,u.max=this.end}return this.current=this.start,this.start},easeValueUpdate:function(l,f,u){var v=l.data[f],m,x=this.ease(u);return this.interpolation?m=this.interpolation(this.start,x):m=(v.max-v.min)*x+v.min,this.current=m,m},destroy:function(){this.propertyValue=null,this.defaultValue=null,this.ease=null,this.interpolation=null,this._onEmit=null,this._onUpdate=null}});p.exports=a}),24502:((p,S,t)=>{var d=t(83419),c=t(95540),h=t(20286),r=new d({Extends:h,initialize:function(e,s,o,i,a){if(typeof e=="object"){var l=e;e=c(l,"x",0),s=c(l,"y",0),o=c(l,"power",0),i=c(l,"epsilon",100),a=c(l,"gravity",50)}else e===void 0&&(e=0),s===void 0&&(s=0),o===void 0&&(o=0),i===void 0&&(i=100),a===void 0&&(a=50);h.call(this,e,s,!0),this._gravity=a,this._power=o*a,this._epsilon=i*i},update:function(n,e){var s=this.x-n.x,o=this.y-n.y,i=s*s+o*o;if(i!==0){var a=Math.sqrt(i);i<this._epsilon&&(i=this._epsilon);var l=this._power*e/(i*a)*100;n.velocityX+=s*l,n.velocityY+=o*l}},epsilon:{get:function(){return Math.sqrt(this._epsilon)},set:function(n){this._epsilon=n*n}},power:{get:function(){return this._power/this._gravity},set:function(n){this._power=n*this._gravity}},gravity:{get:function(){return this._gravity},set:function(n){var e=this.power;this._gravity=n,this.power=e}}});p.exports=r}),56480:((p,S,t)=>{var d=t(9674),c=t(45319),h=t(83419),r=t(39506),n=t(87841),e=t(11520),s=t(26099),o=new h({initialize:function(a){this.emitter=a,this.texture=null,this.frame=null,this.x=0,this.y=0,this.worldPosition=new s,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.tint=16777215,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.holdCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1},x:{min:0,max:0},y:{min:0,max:0},accelerationX:{min:0,max:0},accelerationY:{min:0,max:0},maxVelocityX:{min:0,max:0},maxVelocityY:{min:0,max:0},moveToX:{min:0,max:0},moveToY:{min:0,max:0},bounce:{min:0,max:0}},this.isCropped=!1,this.scene=a.scene,this.anims=null,this.emitter.anims.length>0&&(this.anims=new d(this)),this.bounds=new n},emit:function(i,a,l,f,u,v){return this.emitter.emit(i,a,l,f,u,v)},isAlive:function(){return this.lifeCurrent>0},kill:function(){this.lifeCurrent=0},setPosition:function(i,a){i===void 0&&(i=0),a===void 0&&(a=0),this.x=i,this.y=a},fire:function(i,a){var l=this.emitter,f=l.ops,u=l.getAnim();if(u?this.anims.play(u):(this.frame=l.getFrame(),this.texture=this.frame.texture),!this.frame)throw new Error("Particle has no texture frame");if(l.getEmitZone(this),i===void 0?this.x+=f.x.onEmit(this,"x"):f.x.steps>0?this.x+=i+f.x.onEmit(this,"x"):this.x+=i,a===void 0?this.y+=f.y.onEmit(this,"y"):f.y.steps>0?this.y+=a+f.y.onEmit(this,"y"):this.y+=a,this.life=f.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0,this.delayCurrent=f.delay.onEmit(this,"delay"),this.holdCurrent=f.hold.onEmit(this,"hold"),this.scaleX=f.scaleX.onEmit(this,"scaleX"),this.scaleY=f.scaleY.active?f.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=f.rotate.onEmit(this,"rotate"),this.rotation=r(this.angle),l.worldMatrix.transformPoint(this.x,this.y,this.worldPosition),this.delayCurrent===0&&l.getDeathZone(this))return this.lifeCurrent=0,!1;var v=f.speedX.onEmit(this,"speedX"),m=f.speedY.active?f.speedY.onEmit(this,"speedY"):v;if(l.radial){var x=r(f.angle.onEmit(this,"angle"));this.velocityX=Math.cos(x)*Math.abs(v),this.velocityY=Math.sin(x)*Math.abs(m)}else if(l.moveTo){var g=f.moveToX.onEmit(this,"moveToX"),y=f.moveToY.onEmit(this,"moveToY"),T=this.life/1e3;this.velocityX=(g-this.x)/T,this.velocityY=(y-this.y)/T}else this.velocityX=v,this.velocityY=m;return l.acceleration&&(this.accelerationX=f.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=f.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=f.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=f.maxVelocityY.onEmit(this,"maxVelocityY"),this.bounce=f.bounce.onEmit(this,"bounce"),this.alpha=f.alpha.onEmit(this,"alpha"),f.color.active?this.tint=f.color.onEmit(this,"tint"):this.tint=f.tint.onEmit(this,"tint"),!0},update:function(i,a,l){if(this.lifeCurrent<=0)return this.holdCurrent>0?(this.holdCurrent-=i,this.holdCurrent<=0):!0;if(this.delayCurrent>0)return this.delayCurrent-=i,!1;this.anims&&this.anims.update(0,i);var f=this.emitter,u=f.ops,v=1-this.lifeCurrent/this.life;if(this.lifeT=v,this.x=u.x.onUpdate(this,"x",v,this.x),this.y=u.y.onUpdate(this,"y",v,this.y),f.moveTo){var m=u.moveToX.onUpdate(this,"moveToX",v,f.moveToX),x=u.moveToY.onUpdate(this,"moveToY",v,f.moveToY),g=this.lifeCurrent/1e3;this.velocityX=(m-this.x)/g,this.velocityY=(x-this.y)/g}return this.computeVelocity(f,i,a,l,v),this.scaleX=u.scaleX.onUpdate(this,"scaleX",v,this.scaleX),u.scaleY.active?this.scaleY=u.scaleY.onUpdate(this,"scaleY",v,this.scaleY):this.scaleY=this.scaleX,this.angle=u.rotate.onUpdate(this,"rotate",v,this.angle),this.rotation=r(this.angle),f.getDeathZone(this)?(this.lifeCurrent=0,!0):(this.alpha=c(u.alpha.onUpdate(this,"alpha",v,this.alpha),0,1),u.color.active?this.tint=u.color.onUpdate(this,"color",v,this.tint):this.tint=u.tint.onUpdate(this,"tint",v,this.tint),this.lifeCurrent-=i,this.lifeCurrent<=0&&this.holdCurrent<=0)},computeVelocity:function(i,a,l,f,u){var v=i.ops,m=this.velocityX,x=this.velocityY,g=v.accelerationX.onUpdate(this,"accelerationX",u,this.accelerationX),y=v.accelerationY.onUpdate(this,"accelerationY",u,this.accelerationY),T=v.maxVelocityX.onUpdate(this,"maxVelocityX",u,this.maxVelocityX),C=v.maxVelocityY.onUpdate(this,"maxVelocityY",u,this.maxVelocityY);this.bounce=v.bounce.onUpdate(this,"bounce",u,this.bounce),m+=i.gravityX*l+g*l,x+=i.gravityY*l+y*l,m=c(m,-T,T),x=c(x,-C,C),this.velocityX=m,this.velocityY=x,this.x+=m*l,this.y+=x*l,i.worldMatrix.transformPoint(this.x,this.y,this.worldPosition);for(var E=0;E<f.length;E++){var M=f[E];M.active&&M.update(this,a,l,u)}},setSizeToFrame:function(){},getBounds:function(i){i===void 0&&(i=this.emitter.getWorldTransformMatrix());var a=Math.abs(i.scaleX)*this.scaleX,l=Math.abs(i.scaleY)*this.scaleY,f=this.x,u=this.y,v=this.rotation,m=this.frame.width*a/2,x=this.frame.height*l/2,g=this.bounds,y=new s(f-m,u-x),T=new s(f+m,u-x),C=new s(f-m,u+x),E=new s(f+m,u+x);return v!==0&&(e(y,f,u,v),e(T,f,u,v),e(C,f,u,v),e(E,f,u,v)),i.transformPoint(y.x,y.y,y),i.transformPoint(T.x,T.y,T),i.transformPoint(C.x,C.y,C),i.transformPoint(E.x,E.y,E),g.x=Math.min(y.x,T.x,C.x,E.x),g.y=Math.min(y.y,T.y,C.y,E.y),g.width=Math.max(y.x,T.x,C.x,E.x)-g.x,g.height=Math.max(y.y,T.y,C.y,E.y)-g.y,g},destroy:function(){this.anims&&this.anims.destroy(),this.anims=null,this.emitter=null,this.texture=null,this.frame=null,this.scene=null}});p.exports=o}),69601:((p,S,t)=>{var d=t(83419),c=t(20286),h=t(87841),r=new d({Extends:c,initialize:function(e,s,o,i,a,l,f,u){a===void 0&&(a=!0),l===void 0&&(l=!0),f===void 0&&(f=!0),u===void 0&&(u=!0),c.call(this,e,s,!0),this.bounds=new h(e,s,o,i),this.collideLeft=a,this.collideRight=l,this.collideTop=f,this.collideBottom=u},update:function(n){var e=this.bounds,s=-n.bounce,o=n.worldPosition;o.x<e.x&&this.collideLeft?(n.x+=e.x-o.x,n.velocityX*=s):o.x>e.right&&this.collideRight&&(n.x-=o.x-e.right,n.velocityX*=s),o.y<e.y&&this.collideTop?(n.y+=e.y-o.y,n.velocityY*=s):o.y>e.bottom&&this.collideBottom&&(n.y-=o.y-e.bottom,n.velocityY*=s)}});p.exports=r}),31600:((p,S,t)=>{var d=t(83419),c=t(31401),h=t(53774),r=t(43459),n=t(26388),e=t(19909),s=t(76472),o=t(44777),i=t(20696),a=t(95643),l=t(95540),f=t(26546),u=t(24502),v=t(69036),m=t(1985),x=t(97022),g=t(86091),y=t(73162),T=t(20074),C=t(269),E=t(56480),M=t(69601),P=t(68875),A=t(87841),R=t(59996),F=t(72905),w=t(90668),I=t(19186),U=t(61340),N=t(26099),D=t(15994),B=["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"],L=["accelerationX","accelerationY","alpha","angle","bounce","color","delay","hold","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],G=new d({Extends:a,Mixins:[c.AlphaSingle,c.BlendMode,c.Depth,c.Mask,c.Pipeline,c.PostPipeline,c.ScrollFactor,c.Texture,c.Transform,c.Visible,w],initialize:function(X,z,V,Y,W){a.call(this,X,"ParticleEmitter"),this.particleClass=E,this.config=null,this.ops={accelerationX:new o("accelerationX",0),accelerationY:new o("accelerationY",0),alpha:new o("alpha",1),angle:new o("angle",{min:0,max:360},!0),bounce:new o("bounce",0),color:new s("color"),delay:new o("delay",0,!0),hold:new o("hold",0,!0),lifespan:new o("lifespan",1e3,!0),maxVelocityX:new o("maxVelocityX",1e4),maxVelocityY:new o("maxVelocityY",1e4),moveToX:new o("moveToX",0),moveToY:new o("moveToY",0),quantity:new o("quantity",1,!0),rotate:new o("rotate",0),scaleX:new o("scaleX",1),scaleY:new o("scaleY",1),speedX:new o("speedX",0,!0),speedY:new o("speedY",0,!0),tint:new o("tint",16777215),x:new o("x",0),y:new o("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 N,this.trackVisible=!1,this.frames=[],this.randomFrame=!0,this.frameQuantity=1,this.anims=[],this.randomAnim=!0,this.animQuantity=1,this.dead=[],this.alive=[],this.counters=new Float32Array(10),this.skipping=!1,this.worldMatrix=new U,this.sortProperty="",this.sortOrderAsc=!0,this.sortCallback=this.depthSortCallback,this.processors=new y(this),this.tintFill=!1,this.initPipeline(),this.initPostPipeline(),this.setPosition(z,V),this.setTexture(Y),W&&this.setConfig(W)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},setConfig:function(O){if(!O)return this;this.config=O;var X=0,z="",V=this.ops;for(X=0;X<L.length;X++)z=L[X],V[z].loadConfig(O);for(X=0;X<B.length;X++)z=B[X],x(O,z)&&(this[z]=l(O,z));if(this.acceleration=this.accelerationX!==0||this.accelerationY!==0,this.moveTo=v(O,["moveToX","moveToY"]),x(O,"speed")&&(V.speedX.loadConfig(O,"speed"),V.speedY.active=!1),(m(O,["speedX","speedY"])||this.moveTo)&&(this.radial=!1),x(O,"scale")&&(V.scaleX.loadConfig(O,"scale"),V.scaleY.active=!1),x(O,"callbackScope")){var Y=l(O,"callbackScope",null);this.emitCallbackScope=Y,this.deathCallbackScope=Y}if(x(O,"emitZone")&&this.addEmitZone(O.emitZone),x(O,"deathZone")&&this.addDeathZone(O.deathZone),x(O,"bounds")){var W=this.addParticleBounds(O.bounds);W.collideLeft=l(O,"collideLeft",!0),W.collideRight=l(O,"collideRight",!0),W.collideTop=l(O,"collideTop",!0),W.collideBottom=l(O,"collideBottom",!0)}return x(O,"followOffset")&&this.followOffset.setFromObject(l(O,"followOffset",0)),x(O,"texture")&&this.setTexture(O.texture),x(O,"frame")?this.setEmitterFrame(O.frame):x(O,"anim")&&this.setAnim(O.anim),x(O,"reserve")&&this.reserve(O.reserve),x(O,"advance")&&this.fastForward(O.advance),this.resetCounters(this.frequency,this.emitting),this.emitting&&this.emit(i.START,this),this},updateConfig:function(O){return O&&(this.config?this.setConfig(C(this.config,O)):this.setConfig(O)),this},toJSON:function(){var O=h(this),X=0,z="";for(X=0;X<B.length;X++)z=B[X],O[z]=this[z];var V=this.ops;for(X=0;X<L.length;X++)z=L[X],V[z]&&(O[z]=V[z].toJSON());return V.speedY.active||(delete O.speedX,O.speed=V.speedX.toJSON()),this.scaleX===this.scaleY&&(delete O.scaleX,delete O.scaleY,O.scale=V.scaleX.toJSON()),O},resetCounters:function(O,X){var z=this.counters;z.fill(0),z[0]=O,X&&(z[5]=1)},startFollow:function(O,X,z,V){return X===void 0&&(X=0),z===void 0&&(z=0),V===void 0&&(V=!1),this.follow=O,this.followOffset.set(X,z),this.trackVisible=V,this},stopFollow:function(){return this.follow=null,this.followOffset.set(0,0),this.trackVisible=!1,this},getFrame:function(){var O=this.frames,X=O.length,z;return X===1?z=O[0]:this.randomFrame?z=f(O):(z=O[this.currentFrame],this.frameCounter++,this.frameCounter===this.frameQuantity&&(this.frameCounter=0,this.currentFrame++,this.currentFrame===X&&(this.currentFrame=0))),this.texture.get(z)},setEmitterFrame:function(O,X,z){X===void 0&&(X=!0),z===void 0&&(z=1),this.randomFrame=X,this.frameQuantity=z,this.currentFrame=0;var V=typeof O;if(this.frames.length=0,Array.isArray(O))this.frames=this.frames.concat(O);else if(V==="string"||V==="number")this.frames.push(O);else if(V==="object"){var Y=O;O=l(Y,"frames",null),O&&(this.frames=this.frames.concat(O));var W=l(Y,"cycle",!1);this.randomFrame=!W,this.frameQuantity=l(Y,"quantity",z)}return this.frames.length===1&&(this.frameQuantity=1,this.randomFrame=!1),this},getAnim:function(){var O=this.anims,X=O.length;if(X===0)return null;if(X===1)return O[0];if(this.randomAnim)return f(O);var z=O[this.currentAnim];return this.animCounter++,this.animCounter>=this.animQuantity&&(this.animCounter=0,this.currentAnim=D(this.currentAnim+1,0,X)),z},setAnim:function(O,X,z){X===void 0&&(X=!0),z===void 0&&(z=1),this.randomAnim=X,this.animQuantity=z,this.currentAnim=0;var V=typeof O;if(this.anims.length=0,Array.isArray(O))this.anims=this.anims.concat(O);else if(V==="string")this.anims.push(O);else if(V==="object"){var Y=O;O=l(Y,"anims",null),O&&(this.anims=this.anims.concat(O));var W=l(Y,"cycle",!1);this.randomAnim=!W,this.animQuantity=l(Y,"quantity",z)}return this.anims.length===1&&(this.animQuantity=1,this.randomAnim=!1),this},setRadial:function(O){return O===void 0&&(O=!0),this.radial=O,this},addParticleBounds:function(O,X,z,V,Y,W,H,K){if(typeof O=="object"){var b=O;O=b.x,X=b.y,z=x(b,"w")?b.w:b.width,V=x(b,"h")?b.h:b.height}return this.addParticleProcessor(new M(O,X,z,V,Y,W,H,K))},setParticleSpeed:function(O,X){return X===void 0&&(X=O),this.ops.speedX.onChange(O),O===X?this.ops.speedY.active=!1:this.ops.speedY.onChange(X),this.radial=!0,this},setParticleScale:function(O,X){return O===void 0&&(O=1),X===void 0&&(X=O),this.ops.scaleX.onChange(O),this.ops.scaleY.onChange(X),this},setParticleGravity:function(O,X){return this.gravityX=O,this.gravityY=X,this},setParticleAlpha:function(O){return this.ops.alpha.onChange(O),this},setParticleTint:function(O){return this.ops.tint.onChange(O),this},setEmitterAngle:function(O){return this.ops.angle.onChange(O),this},setParticleLifespan:function(O){return this.ops.lifespan.onChange(O),this},setQuantity:function(O){return this.quantity=O,this},setFrequency:function(O,X){return this.frequency=O,this.flowCounter=O>0?O:0,X&&(this.quantity=X),this},addDeathZone:function(O){Array.isArray(O)||(O=[O]);for(var X,z=[],V=0;V<O.length;V++)if(X=O[V],X instanceof n)z.push(X);else if(typeof X.contains=="function")X=new n(X,!0),z.push(X);else{var Y=l(X,"type","onEnter"),W=l(X,"source",null);if(W&&typeof W.contains=="function"){var H=Y==="onEnter";X=new n(W,H),z.push(X)}}return this.deathZones=this.deathZones.concat(z),z},removeDeathZone:function(O){return F(this.deathZones,O),this},clearDeathZones:function(){return this.deathZones.length=0,this},addEmitZone:function(O){Array.isArray(O)||(O=[O]);for(var X,z=[],V=0;V<O.length;V++)if(X=O[V],X instanceof P||X instanceof e)z.push(X);else{var Y=l(X,"source",null);if(Y){var W=l(X,"type","random");if(W==="random"&&typeof Y.getRandomPoint=="function")X=new P(Y),z.push(X);else if(W==="edge"&&typeof Y.getPoints=="function"){var H=l(X,"quantity",1),K=l(X,"stepRate",0),b=l(X,"yoyo",!1),J=l(X,"seamless",!0),$=l(X,"total",-1);X=new e(Y,H,K,b,J,$),z.push(X)}}}return this.emitZones=this.emitZones.concat(z),z},removeEmitZone:function(O){return F(this.emitZones,O),this.zoneIndex=0,this},clearEmitZones:function(){return this.emitZones.length=0,this.zoneIndex=0,this},getEmitZone:function(O){var X=this.emitZones,z=X.length;if(z!==0){var V=X[this.zoneIndex];V.getPoint(O),V.total>-1&&(this.zoneTotal++,this.zoneTotal===V.total&&(this.zoneTotal=0,this.zoneIndex++,this.zoneIndex===z&&(this.zoneIndex=0)))}},getDeathZone:function(O){for(var X=this.deathZones,z=0;z<X.length;z++){var V=X[z];if(V.willKill(O))return this.emit(i.DEATH_ZONE,this,O,V),!0}return!1},setEmitZone:function(O){var X;return isFinite(O)?X=O:X=this.emitZones.indexOf(O),X>=0&&(this.zoneIndex=X),this},addParticleProcessor:function(O){return this.processors.exists(O)||(O.emitter&&O.emitter.removeParticleProcessor(O),this.processors.add(O),O.emitter=this),O},removeParticleProcessor:function(O){return this.processors.exists(O)&&(this.processors.remove(O,!0),O.emitter=null),O},getProcessors:function(){return this.processors.getAll("active",!0)},createGravityWell:function(O){return this.addParticleProcessor(new u(O))},reserve:function(O){var X=this.dead;if(this.maxParticles>0){var z=this.getParticleCount();z+O>this.maxParticles&&(O=this.maxParticles-(z+O))}for(var V=0;V<O;V++)X.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(O,X){return O===void 0?(this.emitCallback=null,this.emitCallbackScope=null):typeof O=="function"&&(this.emitCallback=O,X&&(this.emitCallbackScope=X)),this},onParticleDeath:function(O,X){return O===void 0?(this.deathCallback=null,this.deathCallbackScope=null):typeof O=="function"&&(this.deathCallback=O,X&&(this.deathCallbackScope=X)),this},killAll:function(){for(var O=this.dead,X=this.alive;X.length>0;)O.push(X.pop());return this},forEachAlive:function(O,X){for(var z=this.alive,V=z.length,Y=0;Y<V;Y++)O.call(X,z[Y],this);return this},forEachDead:function(O,X){for(var z=this.dead,V=z.length,Y=0;Y<V;Y++)O.call(X,z[Y],this);return this},start:function(O,X){return O===void 0&&(O=0),this.emitting||(O>0&&this.fastForward(O),this.emitting=!0,this.resetCounters(this.frequency,!0),X!==void 0&&(this.duration=Math.abs(X)),this.emit(i.START,this)),this},stop:function(O){return O===void 0&&(O=!1),this.emitting&&(this.emitting=!1,O&&this.killAll(),this.emit(i.STOP,this)),this},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},setSortProperty:function(O,X){return O===void 0&&(O=""),X===void 0&&(X=this.true),this.sortProperty=O,this.sortOrderAsc=X,this.sortCallback=this.depthSortCallback,this},setSortCallback:function(O){return this.sortProperty!==""?O=this.depthSortCallback:O=null,this.sortCallback=O,this},depthSort:function(){return I(this.alive,this.sortCallback.bind(this)),this},depthSortCallback:function(O,X){var z=this.sortProperty;return this.sortOrderAsc?O[z]-X[z]:X[z]-O[z]},flow:function(O,X,z){return X===void 0&&(X=1),this.emitting=!1,this.frequency=O,this.quantity=X,z!==void 0&&(this.stopAfter=z),this.start()},explode:function(O,X,z){this.frequency=-1,this.resetCounters(-1,!0);var V=this.emitParticle(O,X,z);return this.emit(i.EXPLODE,this,V),V},emitParticleAt:function(O,X,z){return this.emitParticle(z,O,X)},emitParticle:function(O,X,z){if(!this.atLimit()){O===void 0&&(O=this.ops.quantity.onEmit());for(var V=this.dead,Y=this.stopAfter,W=this.follow?this.follow.x+this.followOffset.x:X,H=this.follow?this.follow.y+this.followOffset.y:z,K=0;K<O;K++){var b=V.pop();if(b||(b=new this.particleClass(this)),b.fire(W,H)?(this.particleBringToTop?this.alive.push(b):this.alive.unshift(b),this.emitCallback&&this.emitCallback.call(this.emitCallbackScope,b,this)):this.dead.push(b),Y>0&&(this.stopCounter++,this.stopCounter>=Y)||this.atLimit())break}return b}},fastForward:function(O,X){X===void 0&&(X=1e3/60);var z=0;for(this.skipping=!0;z<Math.abs(O);)this.preUpdate(0,X),z+=X;return this.skipping=!1,this},preUpdate:function(O,X){X*=this.timeScale;var z=X/1e3;this.trackVisible&&(this.visible=this.follow.visible),this.getWorldTransformMatrix(this.worldMatrix);var V=this.getProcessors(),Y=this.alive,W=this.dead,H=0,K=[],b=Y.length;for(H=0;H<b;H++){var J=Y[H];J.update(X,z,V)&&K.push({index:H,particle:J})}if(b=K.length,b>0){var $=this.deathCallback,Z=this.deathCallbackScope;for(H=b-1;H>=0;H--){var q=K[H];Y.splice(q.index,1),W.push(q.particle),$&&$.call(Z,q.particle),q.particle.setPosition()}}if(!this.emitting&&!this.skipping){this.completeFlag===1&&Y.length===0&&(this.completeFlag=0,this.emit(i.COMPLETE,this));return}if(this.frequency===0)this.emitParticle();else if(this.frequency>0)for(this.flowCounter-=X;this.flowCounter<=0;)this.emitParticle(),this.flowCounter+=this.frequency;this.skipping||(this.duration>0&&(this.elapsed+=X,this.elapsed>=this.duration&&this.stop()),this.stopAfter>0&&this.stopCounter>=this.stopAfter&&this.stop())},overlap:function(O){for(var X=this.getWorldTransformMatrix(),z=this.alive,V=z.length,Y=[],W=0;W<V;W++){var H=z[W];R(O,H.getBounds(X))&&Y.push(H)}return Y},getBounds:function(O,X,z,V){O===void 0&&(O=0),X===void 0&&(X=0),z===void 0&&(z=1e3/60),V===void 0&&(V=new A);var Y=this.getWorldTransformMatrix(),W,H,K=this.alive,b=!1;if(V.setTo(0,0,0,0),X>0){var J=0;for(this.skipping=!0;J<Math.abs(X);){for(this.preUpdate(0,z),W=0;W<K.length;W++)H=K[W].getBounds(Y),b?T(V,H):(b=!0,r(H,V));J+=z}this.skipping=!1}else for(W=0;W<K.length;W++)H=K[W].getBounds(Y),b?T(V,H):(b=!0,r(H,V));return O>0&&g(V,O,O),V},createEmitter:function(){throw new Error("createEmitter removed. See ParticleEmitter docs for info")},particleX:{get:function(){return this.ops.x.current},set:function(O){this.ops.x.onChange(O)}},particleY:{get:function(){return this.ops.y.current},set:function(O){this.ops.y.onChange(O)}},accelerationX:{get:function(){return this.ops.accelerationX.current},set:function(O){this.ops.accelerationX.onChange(O)}},accelerationY:{get:function(){return this.ops.accelerationY.current},set:function(O){this.ops.accelerationY.onChange(O)}},maxVelocityX:{get:function(){return this.ops.maxVelocityX.current},set:function(O){this.ops.maxVelocityX.onChange(O)}},maxVelocityY:{get:function(){return this.ops.maxVelocityY.current},set:function(O){this.ops.maxVelocityY.onChange(O)}},speed:{get:function(){return this.ops.speedX.current},set:function(O){this.ops.speedX.onChange(O),this.ops.speedY.onChange(O)}},speedX:{get:function(){return this.ops.speedX.current},set:function(O){this.ops.speedX.onChange(O)}},speedY:{get:function(){return this.ops.speedY.current},set:function(O){this.ops.speedY.onChange(O)}},moveToX:{get:function(){return this.ops.moveToX.current},set:function(O){this.ops.moveToX.onChange(O)}},moveToY:{get:function(){return this.ops.moveToY.current},set:function(O){this.ops.moveToY.onChange(O)}},bounce:{get:function(){return this.ops.bounce.current},set:function(O){this.ops.bounce.onChange(O)}},particleScaleX:{get:function(){return this.ops.scaleX.current},set:function(O){this.ops.scaleX.onChange(O)}},particleScaleY:{get:function(){return this.ops.scaleY.current},set:function(O){this.ops.scaleY.onChange(O)}},particleColor:{get:function(){return this.ops.color.current},set:function(O){this.ops.color.onChange(O)}},colorEase:{get:function(){return this.ops.color.easeName},set:function(O){this.ops.color.setEase(O)}},particleTint:{get:function(){return this.ops.tint.current},set:function(O){this.ops.tint.onChange(O)}},particleAlpha:{get:function(){return this.ops.alpha.current},set:function(O){this.ops.alpha.onChange(O)}},lifespan:{get:function(){return this.ops.lifespan.current},set:function(O){this.ops.lifespan.onChange(O)}},particleAngle:{get:function(){return this.ops.angle.current},set:function(O){this.ops.angle.onChange(O)}},particleRotate:{get:function(){return this.ops.rotate.current},set:function(O){this.ops.rotate.onChange(O)}},quantity:{get:function(){return this.ops.quantity.current},set:function(O){this.ops.quantity.onChange(O)}},delay:{get:function(){return this.ops.delay.current},set:function(O){this.ops.delay.onChange(O)}},hold:{get:function(){return this.ops.hold.current},set:function(O){this.ops.hold.onChange(O)}},flowCounter:{get:function(){return this.counters[0]},set:function(O){this.counters[0]=O}},frameCounter:{get:function(){return this.counters[1]},set:function(O){this.counters[1]=O}},animCounter:{get:function(){return this.counters[2]},set:function(O){this.counters[2]=O}},elapsed:{get:function(){return this.counters[3]},set:function(O){this.counters[3]=O}},stopCounter:{get:function(){return this.counters[4]},set:function(O){this.counters[4]=O}},completeFlag:{get:function(){return this.counters[5]},set:function(O){this.counters[5]=O}},zoneIndex:{get:function(){return this.counters[6]},set:function(O){this.counters[6]=O}},zoneTotal:{get:function(){return this.counters[7]},set:function(O){this.counters[7]=O}},currentFrame:{get:function(){return this.counters[8]},set:function(O){this.counters[8]=O}},currentAnim:{get:function(){return this.counters[9]},set:function(O){this.counters[9]=O}},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 O,X=this.ops;for(O=0;O<L.length;O++){var z=L[O];X[z].destroy()}for(O=0;O<this.alive.length;O++)this.alive[O].destroy();for(O=0;O<this.dead.length;O++)this.dead[O].destroy();this.ops=null,this.alive=[],this.dead=[],this.worldMatrix.destroy()}});p.exports=G}),9871:((p,S,t)=>{var d=t(59996),c=t(61340),h=new c,r=new c,n=new c,e=new c,s=function(o,i,a,l){var f=h,u=r,v=n,m=e;l?(m.loadIdentity(),m.multiply(l),m.translate(i.x,i.y),m.rotate(i.rotation),m.scale(i.scaleX,i.scaleY)):m.applyITRS(i.x,i.y,i.rotation,i.scaleX,i.scaleY);var x=o.currentContext,g=a.roundPixels,y=a.alpha,T=i.alpha,C=i.alive,E=C.length,M=i.viewBounds;if(!(!i.visible||E===0||M&&!d(M,a.worldView))){i.sortCallback&&i.depthSort(),a.addToRenderList(i);var P=i.scrollFactorX,A=i.scrollFactorY;x.save(),x.globalCompositeOperation=o.blendModes[i.blendMode];for(var R=0;R<E;R++){var F=C[R],w=F.alpha*T*y;if(!(w<=0||F.scaleX===0||F.scaleY===0)){v.applyITRS(F.x,F.y,F.rotation,F.scaleX,F.scaleY),f.copyFrom(a.matrix),f.multiplyWithOffset(m,-a.scrollX*P,-a.scrollY*A),v.e=F.x,v.f=F.y,f.multiply(v,u);var I=F.frame,U=I.canvasData;if(U.width>0&&U.height>0){var N=-I.halfWidth,D=-I.halfHeight;x.globalAlpha=w,x.save(),u.setToContext(x),g&&(N=Math.round(N),D=Math.round(D)),x.imageSmoothingEnabled=!I.source.scaleMode,x.drawImage(I.source.image,U.x,U.y,U.width,U.height,N,D,U.width,U.height),x.restore()}}}x.restore()}};p.exports=s}),92730:((p,S,t)=>{var d=t(25305),c=t(44603),h=t(23568),r=t(95540),n=t(31600);c.register("particles",function(e,s){e===void 0&&(e={});var o=h(e,"key",null),i=r(e,"config",null),a=new n(this.scene,0,0,o);return s!==void 0&&(e.add=s),d(this.scene,a,e),i&&a.setConfig(i),a})}),676:((p,S,t)=>{var d=t(39429),c=t(31600);d.register("particles",function(h,r,n,e){return h!==void 0&&typeof h=="string"&&console.warn("ParticleEmitterManager was removed in Phaser 3.60. See documentation for details"),this.displayList.add(new c(this.scene,h,r,n,e))})}),90668:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(21188),h=t(9871),p.exports={renderWebGL:c,renderCanvas:h}}),21188:((p,S,t)=>{var d=t(59996),c=t(61340),h=t(70554),r=new c,n=new c,e=new c,s=new c,o=function(i,a,l,f){var u=i.pipelines.set(a.pipeline),v=r,m=n,x=e,g=s;f?(g.loadIdentity(),g.multiply(f),g.translate(a.x,a.y),g.rotate(a.rotation),g.scale(a.scaleX,a.scaleY)):g.applyITRS(a.x,a.y,a.rotation,a.scaleX,a.scaleY);var y=h.getTintAppendFloatAlpha,T=l.alpha,C=a.alpha;i.pipelines.preBatch(a);var E=a.alive,M=E.length,P=a.viewBounds;if(!(M===0||P&&!d(P,l.worldView))){a.sortCallback&&a.depthSort(),l.addToRenderList(a),v.copyFrom(l.matrix),v.multiplyWithOffset(g,-l.scrollX*a.scrollFactorX,-l.scrollY*a.scrollFactorY),i.setBlendMode(a.blendMode),a.mask&&(a.mask.preRenderWebGL(i,a,l),i.pipelines.set(a.pipeline));for(var A=a.tintFill,R,F,w=0;w<M;w++){var I=E[w],U=I.alpha*C*T;if(!(U<=0||I.scaleX===0||I.scaleY===0)){x.applyITRS(I.x,I.y,I.rotation,I.scaleX,I.scaleY),x.e=I.x,x.f=I.y,v.multiply(x,m);var N=I.frame;N.glTexture!==F&&(F=N.glTexture,R=u.setGameObject(a,N));var D=-N.halfWidth,B=-N.halfHeight,L=m.setQuad(D,B,D+N.width,B+N.height),G=y(I.tint,U);u.shouldFlush(6)&&(u.flush(),R=u.setGameObject(a,N)),u.batchQuad(a,L[0],L[1],L[2],L[3],L[4],L[5],L[6],L[7],N.u0,N.v0,N.u1,N.v1,G,G,G,G,A,F,R)}}a.mask&&a.mask.postRenderWebGL(i,l),i.pipelines.postBatch(a)}};p.exports=o}),20286:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r,n,e){r===void 0&&(r=0),n===void 0&&(n=0),e===void 0&&(e=!0),this.emitter,this.x=r,this.y=n,this.active=e},update:function(){},destroy:function(){this.emitter=null}});p.exports=c}),9774:(p=>{p.exports="complete"}),812:(p=>{p.exports="deathzone"}),30522:(p=>{p.exports="explode"}),96695:(p=>{p.exports="start"}),18677:(p=>{p.exports="stop"}),20696:((p,S,t)=>{p.exports={COMPLETE:t(9774),DEATH_ZONE:t(812),EXPLODE:t(30522),START:t(96695),STOP:t(18677)}}),18404:((p,S,t)=>{p.exports={EmitterColorOp:t(76472),EmitterOp:t(44777),Events:t(20696),GravityWell:t(24502),Particle:t(56480),ParticleBounds:t(69601),ParticleEmitter:t(31600),ParticleProcessor:t(20286),Zones:t(21024)}}),26388:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r,n){this.source=r,this.killOnEnter=n},willKill:function(h){var r=h.worldPosition,n=this.source.contains(r.x,r.y);return n&&this.killOnEnter||!n&&!this.killOnEnter}});p.exports=c}),19909:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r,n,e,s,o,i){s===void 0&&(s=!1),o===void 0&&(o=!0),i===void 0&&(i=-1),this.source=r,this.points=[],this.quantity=n,this.stepRate=e,this.yoyo=s,this.counter=-1,this.seamless=o,this._length=0,this._direction=0,this.total=i,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var h=this.points[0],r=this.points[this.points.length-1];h.x===r.x&&h.y===r.y&&this.points.pop()}var n=this._length;return this._length=this.points.length,this._length<n&&this.counter>this._length&&(this.counter=this._length-1),this},changeSource:function(h){return this.source=h,this.updateSource()},getPoint:function(h){this._direction===0?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,this.counter===-1&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var r=this.points[this.counter];r&&(h.x=r.x,h.y=r.y)}});p.exports=c}),68875:((p,S,t)=>{var d=t(83419),c=t(26099),h=new d({initialize:function(n){this.source=n,this._tempVec=new c,this.total=-1},getPoint:function(r){var n=this._tempVec;this.source.getRandomPoint(n),r.x=n.x,r.y=n.y}});p.exports=h}),21024:((p,S,t)=>{p.exports={DeathZone:t(26388),EdgeZone:t(19909),RandomZone:t(68875)}}),1159:((p,S,t)=>{var d=t(83419),c=t(31401),h=t(68287),r=new d({Extends:h,Mixins:[c.PathFollower],initialize:function(e,s,o,i,a,l){h.call(this,e,o,i,a,l),this.path=s},preUpdate:function(n,e){this.anims.update(n,e),this.pathUpdate(n)}});p.exports=r}),90145:((p,S,t)=>{var d=t(39429),c=t(1159);d.register("follower",function(h,r,n,e,s){var o=new c(this.scene,h,r,n,e,s);return this.displayList.add(o),this.updateList.add(o),o})}),33663:((p,S,t)=>{var d=t(9674),c=t(83419),h=t(48803),r=t(90664),n=t(4703),e=t(45650),s=new c({Extends:n,initialize:function(i,a,l,f,u,v,m,x){f||(f="__DEFAULT"),n.call(this,i,a,l,f,u),this.type="Plane",this.anims=new d(this),this.gridWidth,this.gridHeight,this.isTiled,this._checkerboard=null,this.hideCCW=!1,this.setGridSize(v,m,x),this.setSizeToFrame(!1),this.setViewHeight()},originX:{get:function(){return .5}},originY:{get:function(){return .5}},setGridSize:function(o,i,a){o===void 0&&(o=8),i===void 0&&(i=8),a===void 0&&(a=!1);var l=!1;return a&&(l=!0),this.gridWidth=o,this.gridHeight=i,this.isTiled=a,this.clear(),h({mesh:this,widthSegments:o,heightSegments:i,isOrtho:!1,tile:a,flipY:l}),this},setSizeToFrame:function(o){o===void 0&&(o=!0);var i=this.frame;if(this.setPerspective(this.width/i.width,this.height/i.height),this._checkerboard&&this._checkerboard!==this.texture&&this.removeCheckerboard(),!o)return this;var a=this.gridWidth,l=this.gridHeight,f=this.vertices,u=i.u0,v=i.u1,m=i.v0,x=i.v1,g,y,T=0;if(this.isTiled)for(m=i.v1,x=i.v0,y=0;y<l;y++)for(g=0;g<a;g++)f[T++].setUVs(u,x),f[T++].setUVs(u,m),f[T++].setUVs(v,x),f[T++].setUVs(u,m),f[T++].setUVs(v,m),f[T++].setUVs(v,x);else{var C=a+1,E=l+1,M=v-u,P=x-m,A=[];for(y=0;y<E;y++)for(g=0;g<C;g++){var R=u+M*(g/a),F=m+P*(y/l);A.push(R,F)}for(y=0;y<l;y++)for(g=0;g<a;g++){var w=(g+C*y)*2,I=(g+C*(y+1))*2,U=(g+1+C*(y+1))*2,N=(g+1+C*y)*2;f[T++].setUVs(A[w],A[w+1]),f[T++].setUVs(A[I],A[I+1]),f[T++].setUVs(A[N],A[N+1]),f[T++].setUVs(A[I],A[I+1]),f[T++].setUVs(A[U],A[U+1]),f[T++].setUVs(A[N],A[N+1])}}return this},setViewHeight:function(o){o===void 0&&(o=this.frame.height);var i=this.fov*(Math.PI/180);this.viewPosition.z=this.height/o/Math.tan(i/2),this.dirtyCache[10]=1},createCheckerboard:function(o,i,a,l,f){o===void 0&&(o=16777215),i===void 0&&(i=255),a===void 0&&(a=255),l===void 0&&(l=255),f===void 0&&(f=128);for(var u=r(o),v=r(i),m=[],x=0;x<16;x++)for(var g=0;g<16;g++)x<8&&g<8||x>7&&g>7?m.push(u.r,u.g,u.b,a):m.push(v.r,v.g,v.b,l);var y=this.scene.sys.textures.addUint8Array(e(),new Uint8Array(m),16,16);return this.removeCheckerboard(),this.setTexture(y),this.setSizeToFrame(),this.setViewHeight(f),this},removeCheckerboard:function(){this._checkerboard&&(this._checkerboard.destroy(),this._checkerboard=null)},play:function(o,i){return this.anims.play(o,i)},playReverse:function(o,i){return this.anims.playReverse(o,i)},playAfterDelay:function(o,i){return this.anims.playAfterDelay(o,i)},playAfterRepeat:function(o,i){return this.anims.playAfterRepeat(o,i)},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)},preUpdate:function(o,i){n.prototype.preUpdate.call(this,o,i),this.anims.update(o,i)},preDestroy:function(){this.clear(),this.removeCheckerboard(),this.anims.destroy(),this.anims=void 0,this.debugCallback=null,this.debugGraphic=null}});p.exports=s}),56015:((p,S,t)=>{var d=t(25305),c=t(13059),h=t(44603),r=t(23568),n=t(35154),e=t(33663);h.register("plane",function(s,o){s===void 0&&(s={});var i=r(s,"key",null),a=r(s,"frame",null),l=n(s,"width",8),f=n(s,"height",8),u=n(s,"tile",!1),v=new e(this.scene,0,0,i,a,l,f,u);o!==void 0&&(s.add=o);var m=n(s,"checkerboard",null);if(m){var x=n(m,"color1",16777215),g=n(m,"color2",255),y=n(m,"alpha1",255),T=n(m,"alpha2",255),C=n(m,"height",128);v.createCheckerboard(x,g,y,T,C)}return d(this.scene,v,s),c(v,s),v})}),30985:((p,S,t)=>{var d=t(33663),c=t(39429);c.register("plane",function(h,r,n,e,s,o,i){return this.displayList.add(new d(this.scene,h,r,n,e,s,o,i))})}),80321:((p,S,t)=>{var d=t(83419),c=t(31401),h=t(95643),r=t(30100),n=t(36060),e=t(67277),s=new d({Extends:h,Mixins:[c.AlphaSingle,c.BlendMode,c.Depth,c.Mask,c.Pipeline,c.PostPipeline,c.ScrollFactor,c.Transform,c.Visible,e],initialize:function(i,a,l,f,u,v,m){f===void 0&&(f=16777215),u===void 0&&(u=128),v===void 0&&(v=1),m===void 0&&(m=.1),h.call(this,i,"PointLight"),this.initPipeline(n.POINTLIGHT_PIPELINE),this.initPostPipeline(),this.setPosition(a,l),this.color=r(f),this.intensity=v,this.attenuation=m,this.width=u*2,this.height=u*2,this._radius=u},radius:{get:function(){return this._radius},set:function(o){this._radius=o,this.width=o*2,this.height=o*2}},originX:{get:function(){return .5}},originY:{get:function(){return .5}},displayOriginX:{get:function(){return this._radius}},displayOriginY:{get:function(){return this._radius}}});p.exports=s}),39829:((p,S,t)=>{var d=t(25305),c=t(44603),h=t(23568),r=t(80321);c.register("pointlight",function(n,e){n===void 0&&(n={});var s=h(n,"color",16777215),o=h(n,"radius",128),i=h(n,"intensity",1),a=h(n,"attenuation",.1),l=new r(this.scene,0,0,s,o,i,a);return e!==void 0&&(n.add=e),d(this.scene,l,n),l})}),71255:((p,S,t)=>{var d=t(39429),c=t(80321);d.register("pointlight",function(h,r,n,e,s,o){return this.displayList.add(new c(this.scene,h,r,n,e,s,o))})}),67277:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(57787),p.exports={renderWebGL:c,renderCanvas:h}}),57787:((p,S,t)=>{var d=t(91296),c=function(h,r,n,e){n.addToRenderList(r);var s=h.pipelines.set(r.pipeline),o=d(r,n,e).calc,i=r.width,a=r.height,l=-r._radius,f=-r._radius,u=l+i,v=f+a,m=o.getX(0,0),x=o.getY(0,0),g=o.getX(l,f),y=o.getY(l,f),T=o.getX(l,v),C=o.getY(l,v),E=o.getX(u,v),M=o.getY(u,v),P=o.getX(u,f),A=o.getY(u,f);h.pipelines.preBatch(r),s.batchPointLight(r,n,g,y,T,C,E,M,P,A,m,x),h.pipelines.postBatch(r)};p.exports=c}),591:((p,S,t)=>{var d=t(83419),c=t(81320),h=t(88571),r=new d({Extends:h,initialize:function(e,s,o,i,a,l){s===void 0&&(s=0),o===void 0&&(o=0),i===void 0&&(i=32),a===void 0&&(a=32),l===void 0&&(l=!0);var f=new c(e.sys.textures,"",i,a,l);h.call(this,e,s,o,f),this.type="RenderTexture",this.camera=this.texture.camera,this._saved=!1},setSize:function(n,e){this.width=n,this.height=e,this.updateDisplayOrigin();var s=this.input;return s&&!s.customHitArea&&(s.hitArea.width=n,s.hitArea.height=e),this},resize:function(n,e,s){return this.texture.setSize(n,e,s),this.setSize(this.texture.width,this.texture.height),this},saveTexture:function(n){var e=this.texture;return e.key=n,e.manager.addDynamicTexture(e)&&(this._saved=!0),e},fill:function(n,e,s,o,i,a){return this.texture.fill(n,e,s,o,i,a),this},clear:function(){return this.texture.clear(),this},stamp:function(n,e,s,o,i){return this.texture.stamp(n,e,s,o,i),this},erase:function(n,e,s){return this.texture.erase(n,e,s),this},draw:function(n,e,s,o,i){return this.texture.draw(n,e,s,o,i),this},drawFrame:function(n,e,s,o,i,a){return this.texture.drawFrame(n,e,s,o,i,a),this},repeat:function(n,e,s,o,i,a,l,f,u){return this.texture.repeat(n,e,s,o,i,a,l,f,u),this},beginDraw:function(){return this.texture.beginDraw(),this},batchDraw:function(n,e,s,o,i){return this.texture.batchDraw(n,e,s,o,i),this},batchDrawFrame:function(n,e,s,o,i,a){return this.texture.batchDrawFrame(n,e,s,o,i,a),this},endDraw:function(n){return this.texture.endDraw(n),this},snapshotArea:function(n,e,s,o,i,a,l){return this.texture.snapshotArea(n,e,s,o,i,a,l),this},snapshot:function(n,e,s){return this.snapshotArea(0,0,this.width,this.height,n,e,s)},snapshotPixel:function(n,e,s){return this.snapshotArea(n,e,1,1,s,"pixel")},preDestroy:function(){this.camera=null,this._saved||this.texture.destroy()}});p.exports=r}),34495:((p,S,t)=>{var d=t(25305),c=t(44603),h=t(23568),r=t(591);c.register("renderTexture",function(n,e){n===void 0&&(n={});var s=h(n,"x",0),o=h(n,"y",0),i=h(n,"width",32),a=h(n,"height",32),l=new r(this.scene,s,o,i,a);return e!==void 0&&(n.add=e),d(this.scene,l,n),l})}),60505:((p,S,t)=>{var d=t(39429),c=t(591);d.register("renderTexture",function(h,r,n,e){return this.displayList.add(new c(this.scene,h,r,n,e))})}),77757:((p,S,t)=>{var d=t(9674),c=t(83419),h=t(31401),r=t(95643),n=t(36060),e=t(38745),s=t(26099),o=new c({Extends:r,Mixins:[h.AlphaSingle,h.BlendMode,h.Depth,h.Flip,h.Mask,h.Pipeline,h.PostPipeline,h.Size,h.Texture,h.Transform,h.Visible,h.ScrollFactor,e],initialize:function(a,l,f,u,v,m,x,g,y){u===void 0&&(u="__DEFAULT"),m===void 0&&(m=2),x===void 0&&(x=!0),r.call(this,a,"Rope"),this.anims=new d(this),this.points=m,this.vertices,this.uv,this.colors,this.alphas,this.tintFill=u==="__DEFAULT",this.dirty=!1,this.horizontal=x,this._flipX=!1,this._flipY=!1,this._perp=new s,this.debugCallback=null,this.debugGraphic=null,this.setTexture(u,v),this.setPosition(l,f),this.setSizeToFrame(),this.initPipeline(n.ROPE_PIPELINE),this.initPostPipeline(),Array.isArray(m)&&this.resizeArrays(m.length),this.setPoints(m,g,y),this.updateVertices()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(i,a){var l=this.anims.currentFrame;this.anims.update(i,a),this.anims.currentFrame!==l&&(this.updateUVs(),this.updateVertices())},play:function(i,a,l){return this.anims.play(i,a,l),this},setDirty:function(){return this.dirty=!0,this},setHorizontal:function(i,a,l){return i===void 0&&(i=this.points.length),this.horizontal?this:(this.horizontal=!0,this.setPoints(i,a,l))},setVertical:function(i,a,l){return i===void 0&&(i=this.points.length),this.horizontal?(this.horizontal=!1,this.setPoints(i,a,l)):this},setTintFill:function(i){return i===void 0&&(i=!1),this.tintFill=i,this},setAlphas:function(i,a){var l=this.points.length;if(l<1)return this;var f=this.alphas;i===void 0?i=[1]:!Array.isArray(i)&&a===void 0&&(i=[i]);var u,v=0;if(a!==void 0)for(u=0;u<l;u++)v=u*2,f[v]=i,f[v+1]=a;else if(i.length===l)for(u=0;u<l;u++)v=u*2,f[v]=i[u],f[v+1]=i[u];else{var m=i[0];for(u=0;u<l;u++)v=u*2,i.length>v&&(m=i[v]),f[v]=m,i.length>v+1&&(m=i[v+1]),f[v+1]=m}return this},setColors:function(i){var a=this.points.length;if(a<1)return this;var l=this.colors;i===void 0?i=[16777215]:Array.isArray(i)||(i=[i]);var f,u=0;if(i.length===a)for(f=0;f<a;f++)u=f*2,l[u]=i[f],l[u+1]=i[f];else{var v=i[0];for(f=0;f<a;f++)u=f*2,i.length>u&&(v=i[u]),l[u]=v,i.length>u+1&&(v=i[u+1]),l[u+1]=v}return this},setPoints:function(i,a,l){if(i===void 0&&(i=2),typeof i=="number"){var f=i;f<2&&(f=2),i=[];var u,v,m;if(this.horizontal)for(m=-this.frame.halfWidth,v=this.frame.width/(f-1),u=0;u<f;u++)i.push({x:m+u*v,y:0});else for(m=-this.frame.halfHeight,v=this.frame.height/(f-1),u=0;u<f;u++)i.push({x:0,y:m+u*v})}var x=i.length,g=this.points.length;return x<1?(console.warn("Rope: Not enough points given"),this):(x===1&&(i.unshift({x:0,y:0}),x++),g!==x&&this.resizeArrays(x),this.dirty=!0,this.points=i,this.updateUVs(),a!=null&&this.setColors(a),l!=null&&this.setAlphas(l),this)},updateUVs:function(){for(var i=this.uv,a=this.points.length,l=this.frame.u0,f=this.frame.v0,u=this.frame.u1,v=this.frame.v1,m=(u-l)/(a-1),x=(v-f)/(a-1),g=0;g<a;g++){var y=g*4,T,C,E,M;this.horizontal?(this._flipX?(T=u-g*m,E=u-g*m):(T=l+g*m,E=l+g*m),this._flipY?(C=v,M=f):(C=f,M=v)):(this._flipX?(T=l,E=u):(T=u,E=l),this._flipY?(C=v-g*x,M=v-g*x):(C=f+g*x,M=f+g*x)),i[y+0]=T,i[y+1]=C,i[y+2]=E,i[y+3]=M}return this},resizeArrays:function(i){var a=this.colors,l=this.alphas;this.vertices=new Float32Array(i*4),this.uv=new Float32Array(i*4),a=new Uint32Array(i*2),l=new Float32Array(i*2);for(var f=0;f<i*2;f++)a[f]=16777215,l[f]=1;return this.colors=a,this.alphas=l,this.dirty=!0,this},updateVertices:function(){var i=this._perp,a=this.points,l=this.vertices,f=a.length;if(this.dirty=!1,!(f<1)){for(var u,v=a[0],m=this.horizontal?this.frame.halfHeight:this.frame.halfWidth,x=0;x<f;x++){var g=a[x],y=x*4;x<f-1?u=a[x+1]:u=g,i.x=u.y-v.y,i.y=-(u.x-v.x);var T=i.length();i.x/=T,i.y/=T,i.x*=m,i.y*=m,l[y]=g.x+i.x,l[y+1]=g.y+i.y,l[y+2]=g.x-i.x,l[y+3]=g.y-i.y,v=g}return this}},setDebug:function(i,a){return this.debugGraphic=i,!i&&!a?this.debugCallback=null:a?this.debugCallback=a:this.debugCallback=this.renderDebugVerts,this},renderDebugVerts:function(i,a,l){var f=i.debugGraphic,u=l[0],v=l[1],m=l[2],x=l[3];f.lineBetween(u,v,m,x);for(var g=4;g<a;g+=4){var y=l[g+0],T=l[g+1],C=l[g+2],E=l[g+3];f.lineBetween(u,v,y,T),f.lineBetween(m,x,C,E),f.lineBetween(m,x,y,T),f.lineBetween(y,T,C,E),u=y,v=T,m=C,x=E}},preDestroy:function(){this.anims.destroy(),this.anims=void 0,this.points=null,this.vertices=null,this.uv=null,this.colors=null,this.alphas=null,this.debugCallback=null,this.debugGraphic=null},flipX:{get:function(){return this._flipX},set:function(i){return this._flipX=i,this.updateUVs()}},flipY:{get:function(){return this._flipY},set:function(i){return this._flipY=i,this.updateUVs()}}});p.exports=o}),95262:(p=>{var S=function(){};p.exports=S}),26209:((p,S,t)=>{var d=t(25305),c=t(44603),h=t(23568),r=t(35154),n=t(77757);c.register("rope",function(e,s){e===void 0&&(e={});var o=h(e,"key",null),i=h(e,"frame",null),a=h(e,"horizontal",!0),l=r(e,"points",void 0),f=r(e,"colors",void 0),u=r(e,"alphas",void 0),v=new n(this.scene,0,0,o,i,l,a,f,u);return s!==void 0&&(e.add=s),d(this.scene,v,e),v})}),96819:((p,S,t)=>{var d=t(77757),c=t(39429);c.register("rope",function(h,r,n,e,s,o,i,a){return this.displayList.add(new d(this.scene,h,r,n,e,s,o,i,a))})}),38745:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(20439),h=t(95262),p.exports={renderWebGL:c,renderCanvas:h}}),20439:((p,S,t)=>{var d=t(91296),c=t(70554),h=function(r,n,e,s){e.addToRenderList(n);var o=r.pipelines.set(n.pipeline,n),i=d(n,e,s).calc,a=n.vertices,l=n.uv,f=n.colors,u=n.alphas,v=n.alpha,m=c.getTintAppendFloatAlpha,x=e.roundPixels,g=a.length,y=Math.floor(g*.5);o.flush(),r.pipelines.preBatch(n);var T=o.setGameObject(n),C=o.vertexViewF32,E=o.vertexViewU32,M=o.vertexCount*o.currentShader.vertexComponentCount-1,P=0,A=n.tintFill;n.dirty&&n.updateVertices();for(var R=n.debugCallback,F=[],w=0;w<g;w+=2){var I=a[w+0],U=a[w+1],N=I*i.a+U*i.c+i.e,D=I*i.b+U*i.d+i.f;x&&(N=Math.round(N),D=Math.round(D)),C[++M]=N,C[++M]=D,C[++M]=l[w+0],C[++M]=l[w+1],C[++M]=T,C[++M]=A,E[++M]=m(f[P],e.alpha*(u[P]*v)),P++,R&&(F[w+0]=N,F[w+1]=D)}R&&R.call(n,n,g,F),o.vertexCount+=y,o.currentBatch.count=o.vertexCount-o.currentBatch.start,r.pipelines.postBatch(n)};p.exports=h}),20071:((p,S,t)=>{var d=t(83419),c=t(31401),h=t(95643),r=t(95540),n=t(79291),e=t(61622),s=t(25479),o=t(61340),i=t(95428),a=t(92503),l=new d({Extends:h,Mixins:[c.ComputedSize,c.Depth,c.GetBounds,c.Mask,c.Origin,c.ScrollFactor,c.Transform,c.Visible,s],initialize:function(u,v,m,x,g,y,T,C){m===void 0&&(m=0),x===void 0&&(x=0),g===void 0&&(g=128),y===void 0&&(y=128),h.call(this,u,"Shader"),this.blendMode=-1,this.shader;var E=u.sys.renderer;this.renderer=E,this.gl=E.gl,this.vertexData=new ArrayBuffer(6*(Float32Array.BYTES_PER_ELEMENT*2)),this.vertexBuffer=E.createVertexBuffer(this.vertexData.byteLength,this.gl.STREAM_DRAW),this._deferSetShader=null,this._deferProjOrtho=null,this.program=null,this.bytes=new Uint8Array(this.vertexData),this.vertexViewF32=new Float32Array(this.vertexData),this._tempMatrix1=new o,this._tempMatrix2=new o,this._tempMatrix3=new o,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=E.width,this._rendererHeight=E.height,this._textureCount=0,this.framebuffer=null,this.glTexture=null,this.renderToTexture=!1,this.texture=null,this.setPosition(m,x),this.setSize(g,y),this.setOrigin(.5,.5),this.setShader(v,T,C),this.renderer.on(a.RESTORE_WEBGL,this.onContextRestored,this)},willRender:function(f){return this.renderToTexture?!0:!(h.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&f.id)},setRenderToTexture:function(f,u){if(!this.renderToTexture){var v=this.width,m=this.height,x=this.renderer;this.glTexture=x.createTextureFromSource(null,v,m,0),this.framebuffer=x.createFramebuffer(v,m,this.glTexture,!1),this._rendererWidth=v,this._rendererHeight=m,this.renderToTexture=!0,this.projOrtho(0,this.width,this.height,0),f&&(this.texture=this.scene.sys.textures.addGLTexture(f,this.glTexture))}return this.shader&&(x.pipelines.clear(),this.load(),this.flush(),x.pipelines.rebind()),this},setShader:function(f,u,v){if(this.renderer.contextLost)return this._deferSetShader={key:f,textures:u,textureData:v},this;if(u===void 0&&(u=[]),typeof f=="string"){var m=this.scene.sys.cache.shader;if(!m.has(f))return console.warn("Shader missing: "+f),this;this.shader=m.get(f)}else this.shader=f;var x=this.gl,g=this.renderer;this.program&&g.deleteProgram(this.program);var y=g.createProgram(this.shader.vertexSrc,this.shader.fragmentSrc);x.uniformMatrix4fv(x.getUniformLocation(y.webGLProgram,"uViewMatrix"),!1,this.viewMatrix),x.uniformMatrix4fv(x.getUniformLocation(y.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),x.uniform2f(x.getUniformLocation(y.webGLProgram,"uResolution"),this.width,this.height),this.program=y;var T=new Date,C={resolution:{type:"2f",value:{x:this.width,y:this.height}},time:{type:"1f",value:0},mouse:{type:"2f",value:{x:this.width/2,y:this.height/2}},date:{type:"4fv",value:[T.getFullYear(),T.getMonth(),T.getDate(),T.getHours()*60*60+T.getMinutes()*60+T.getSeconds()]},sampleRate:{type:"1f",value:44100},iChannel0:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel1:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel2:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel3:{type:"sampler2D",value:null,textureData:{repeat:!0}}};this.shader.uniforms?this.uniforms=n(!0,{},this.shader.uniforms,C):this.uniforms=C;for(var E=0;E<4;E++)u[E]&&this.setSampler2D("iChannel"+E,u[E],E,v);return this.initUniforms(),this.projOrtho(0,this._rendererWidth,this._rendererHeight,0),this},setPointer:function(f){return this.pointer=f,this},projOrtho:function(f,u,v,m){if(this.renderer.contextLost){this._deferProjOrtho={left:f,right:u,bottom:v,top:m};return}var x=-1e3,g=1e3,y=1/(f-u),T=1/(v-m),C=1/(x-g),E=this.projectionMatrix;E[0]=-2*y,E[5]=-2*T,E[10]=2*C,E[12]=(f+u)*y,E[13]=(m+v)*T,E[14]=(g+x)*C;var M=this.program,P=this.gl,A=this.renderer;A.setProgram(M),P.uniformMatrix4fv(P.getUniformLocation(M.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),this._rendererWidth=u,this._rendererHeight=v},initUniforms:function(){var f=this.renderer.glFuncMap,u=this.program;this._textureCount=0;for(var v in this.uniforms){var m=this.uniforms[v],x=m.type,g=f[x];m.uniformLocation=this.renderer.createUniformLocation(u,v),x!=="sampler2D"&&(m.glMatrix=g.matrix,m.glValueLength=g.length,m.glFunc=g.func)}},setSampler2DBuffer:function(f,u,v,m,x,g){x===void 0&&(x=0),g===void 0&&(g={});var y=this.uniforms[f];return y.value=u,g.width=v,g.height=m,y.textureData=g,this._textureCount=x,this.initSampler2D(y),this},setSampler2D:function(f,u,v,m){v===void 0&&(v=0);var x=this.scene.sys.textures;if(x.exists(u)){var g=x.getFrame(u);if(g.glTexture&&g.glTexture.isRenderTexture)return this.setSampler2DBuffer(f,g.glTexture,g.width,g.height,v,m);var y=this.uniforms[f],T=g.source;y.textureKey=u,y.source=T.image,y.value=g.glTexture,T.isGLTexture&&(m||(m={}),m.width=T.width,m.height=T.height),m&&(y.textureData=m),this._textureCount=v,this.initSampler2D(y)}return this},setUniform:function(f,u){return e(this.uniforms,f,u),this},getUniform:function(f){return r(this.uniforms,f,null)},setChannel0:function(f,u){return this.setSampler2D("iChannel0",f,0,u)},setChannel1:function(f,u){return this.setSampler2D("iChannel1",f,1,u)},setChannel2:function(f,u){return this.setSampler2D("iChannel2",f,2,u)},setChannel3:function(f,u){return this.setSampler2D("iChannel3",f,3,u)},initSampler2D:function(f){if(f.value){var u=f.textureData;if(u&&!f.value.isRenderTexture){var v=this.gl,m=f.value,x=v[r(u,"magFilter","linear").toUpperCase()],g=v[r(u,"minFilter","linear").toUpperCase()],y=v[r(u,"wrapS","repeat").toUpperCase()],T=v[r(u,"wrapT","repeat").toUpperCase()],C=v[r(u,"format","rgba").toUpperCase()],E=r(u,"flipY",!1),M=r(u,"width",m.width),P=r(u,"height",m.height),A=r(u,"source",m.pixels);u.repeat&&(y=v.REPEAT,T=v.REPEAT),u.width&&(A=null),m.update(A,M,P,E,y,T,g,x,C)}this.renderer.setProgram(this.program),this._textureCount++}},syncUniforms:function(){var f=this.gl,u=this.uniforms,v,m,x,g,y,T=0;for(var C in u)v=u[C],x=v.glFunc,m=v.glValueLength,g=v.uniformLocation,y=v.value,y!==null&&(m===1?v.glMatrix?x.call(f,g.webGLUniformLocation,v.transpose,y):x.call(f,g.webGLUniformLocation,y):m===2?x.call(f,g.webGLUniformLocation,y.x,y.y):m===3?x.call(f,g.webGLUniformLocation,y.x,y.y,y.z):m===4?x.call(f,g.webGLUniformLocation,y.x,y.y,y.z,y.w):v.type==="sampler2D"&&(f.activeTexture(f.TEXTURE0+T),f.bindTexture(f.TEXTURE_2D,y.webGLTexture),f.uniform1i(g.webGLUniformLocation,T),T++))},load:function(f){var u=this.gl,v=this.width,m=this.height,x=this.renderer,g=this.program,y=this.viewMatrix;if(!this.renderToTexture){var T=-this._displayOriginX,C=-this._displayOriginY;y[0]=f[0],y[1]=f[1],y[4]=f[2],y[5]=f[3],y[8]=f[4],y[9]=f[5],y[12]=y[0]*T+y[4]*C,y[13]=y[1]*T+y[5]*C}u.useProgram(g.webGLProgram),u.uniformMatrix4fv(u.getUniformLocation(g.webGLProgram,"uViewMatrix"),!1,y),u.uniformMatrix4fv(u.getUniformLocation(g.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),u.uniform2f(u.getUniformLocation(g.webGLProgram,"uResolution"),this.width,this.height);var E=this.uniforms,M=E.resolution;M.value.x=v,M.value.y=m,E.time.value=x.game.loop.getDuration();var P=this.pointer;if(P){var A=E.mouse,R=P.x/v,F=1-P.y/m;A.value.x=R.toFixed(2),A.value.y=F.toFixed(2)}this.syncUniforms()},flush:function(){var f=this.width,u=this.height,v=this.program,m=this.gl,x=this.vertexBuffer,g=this.renderer,y=Float32Array.BYTES_PER_ELEMENT*2;this.renderToTexture&&(g.setFramebuffer(this.framebuffer),m.clearColor(0,0,0,0),m.clear(m.COLOR_BUFFER_BIT)),m.bindBuffer(m.ARRAY_BUFFER,x.webGLBuffer);var T=m.getAttribLocation(v.webGLProgram,"inPosition");T!==-1&&(m.enableVertexAttribArray(T),m.vertexAttribPointer(T,2,m.FLOAT,!1,y,0));var C=this.vertexViewF32;C[3]=u,C[4]=f,C[5]=u,C[8]=f,C[9]=u,C[10]=f;var E=6;m.bufferSubData(m.ARRAY_BUFFER,0,this.bytes.subarray(0,E*y)),m.drawArrays(m.TRIANGLES,0,E),this.renderToTexture&&g.setFramebuffer(null,!1)},setAlpha:function(){},setBlendMode:function(){},onContextRestored:function(){if(this._deferSetShader!==null){var f=this._deferSetShader.key,u=this._deferSetShader.textures,v=this._deferSetShader.textureData;this._deferSetShader=null,this.setShader(f,u,v)}if(this._deferProjOrtho!==null){var m=this._deferProjOrtho.left,x=this._deferProjOrtho.right,g=this._deferProjOrtho.bottom,y=this._deferProjOrtho.top;this._deferProjOrtho=null,this.projOrtho(m,x,g,y)}},preDestroy:function(){var f=this.renderer;f.off(a.RESTORE_WEBGL,this.onContextRestored,this),f.deleteProgram(this.program),f.deleteBuffer(this.vertexBuffer),this.renderToTexture&&(f.deleteFramebuffer(this.framebuffer),this.texture.destroy(),this.framebuffer=null,this.glTexture=null,this.texture=null),i(this.uniforms,function(u){f.deleteUniformLocation(u.uniformLocation),u.uniformLocation=null})}});p.exports=l}),80464:(p=>{var S=function(){};p.exports=S}),54935:((p,S,t)=>{var d=t(25305),c=t(44603),h=t(23568),r=t(20071);c.register("shader",function(n,e){n===void 0&&(n={});var s=h(n,"key",null),o=h(n,"x",0),i=h(n,"y",0),a=h(n,"width",128),l=h(n,"height",128),f=new r(this.scene,s,o,i,a,l);return e!==void 0&&(n.add=e),d(this.scene,f,n),f})}),74177:((p,S,t)=>{var d=t(20071),c=t(39429);c.register("shader",function(h,r,n,e,s,o,i){return this.displayList.add(new d(this.scene,h,r,n,e,s,o,i))})}),25479:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(19257),h=t(80464),p.exports={renderWebGL:c,renderCanvas:h}}),19257:((p,S,t)=>{var d=t(91296),c=function(h,r,n,e){if(r.shader){if(n.addToRenderList(r),h.pipelines.clear(),r.renderToTexture)r.load(),r.flush();else{var s=d(r,n,e).calc;(h.width!==r._rendererWidth||h.height!==r._rendererHeight)&&r.projOrtho(0,h.width,h.height,0),r.load(s.matrix),r.flush()}h.pipelines.rebind()}};p.exports=c}),10441:((p,S,t)=>{var d=t(70554),c=function(h,r,n,e,s,o){for(var i=d.getTintAppendFloatAlpha(n.fillColor,n.fillAlpha*e),a=n.pathData,l=n.pathIndexes,f=0;f<l.length;f+=3){var u=l[f]*2,v=l[f+1]*2,m=l[f+2]*2,x=a[u+0]-s,g=a[u+1]-o,y=a[v+0]-s,T=a[v+1]-o,C=a[m+0]-s,E=a[m+1]-o,M=r.getX(x,g),P=r.getY(x,g),A=r.getX(y,T),R=r.getY(y,T),F=r.getX(C,E),w=r.getY(C,E);h.batchTri(n,M,P,A,R,F,w,0,0,1,1,i,i,i,2)}};p.exports=c}),65960:(p=>{var S=function(t,d,c,h){var r=c||d.fillColor,n=h||d.fillAlpha,e=(r&16711680)>>>16,s=(r&65280)>>>8,o=r&255;t.fillStyle="rgba("+e+","+s+","+o+","+n+")"};p.exports=S}),75177:(p=>{var S=function(t,d,c,h){var r=c||d.strokeColor,n=h||d.strokeAlpha,e=(r&16711680)>>>16,s=(r&65280)>>>8,o=r&255;t.strokeStyle="rgba("+e+","+s+","+o+","+n+")",t.lineWidth=d.lineWidth};p.exports=S}),17803:((p,S,t)=>{var d=t(83419),c=t(31401),h=t(95643),r=t(23031),n=new d({Extends:h,Mixins:[c.AlphaSingle,c.BlendMode,c.Depth,c.GetBounds,c.Mask,c.Origin,c.Pipeline,c.PostPipeline,c.ScrollFactor,c.Transform,c.Visible],initialize:function(s,o,i){o===void 0&&(o="Shape"),h.call(this,s,o),this.geom=i,this.pathData=[],this.pathIndexes=[],this.fillColor=16777215,this.fillAlpha=1,this.strokeColor=16777215,this.strokeAlpha=1,this.lineWidth=1,this.isFilled=!1,this.isStroked=!1,this.closePath=!0,this._tempLine=new r,this.width=0,this.height=0,this.initPipeline(),this.initPostPipeline()},setFillStyle:function(e,s){return s===void 0&&(s=1),e===void 0?this.isFilled=!1:(this.fillColor=e,this.fillAlpha=s,this.isFilled=!0),this},setStrokeStyle:function(e,s,o){return o===void 0&&(o=1),e===void 0?this.isStroked=!1:(this.lineWidth=e,this.strokeColor=s,this.strokeAlpha=o,this.isStroked=!0),this},setClosePath:function(e){return this.closePath=e,this},setSize:function(e,s){return this.width=e,this.height=s,this},setDisplaySize:function(e,s){return this.displayWidth=e,this.displayHeight=s,this},preDestroy:function(){this.geom=null,this._tempLine=null,this.pathData=[],this.pathIndexes=[]},displayWidth:{get:function(){return this.scaleX*this.width},set:function(e){this.scaleX=e/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(e){this.scaleY=e/this.height}}});p.exports=n}),34682:((p,S,t)=>{var d=t(70554),c=function(h,r,n,e,s){var o=h.strokeTint,i=d.getTintAppendFloatAlpha(r.strokeColor,r.strokeAlpha*n);o.TL=i,o.TR=i,o.BL=i,o.BR=i;var a=r.pathData,l=a.length-1,f=r.lineWidth,u=f/2,v=a[0]-e,m=a[1]-s;r.closePath||(l-=2);for(var x=2;x<l;x+=2){var g=a[x]-e,y=a[x+1]-s;h.batchLine(v,m,g,y,u,u,f,x-2,r.closePath?x===l-1:!1),v=g,m=y}};p.exports=c}),23629:((p,S,t)=>{var d=t(13609),c=t(83419),h=t(39506),r=t(94811),n=t(96503),e=t(36383),s=t(17803),o=new c({Extends:s,Mixins:[d],initialize:function(a,l,f,u,v,m,x,g,y){l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=128),v===void 0&&(v=0),m===void 0&&(m=360),x===void 0&&(x=!1),s.call(this,a,"Arc",new n(0,0,u)),this._startAngle=v,this._endAngle=m,this._anticlockwise=x,this._iterations=.01,this.setPosition(l,f);var T=this.geom.radius*2;this.setSize(T,T),g!==void 0&&this.setFillStyle(g,y),this.updateDisplayOrigin(),this.updateData()},iterations:{get:function(){return this._iterations},set:function(i){this._iterations=i,this.updateData()}},radius:{get:function(){return this.geom.radius},set:function(i){this.geom.radius=i;var a=i*2;this.setSize(a,a),this.updateDisplayOrigin(),this.updateData()}},startAngle:{get:function(){return this._startAngle},set:function(i){this._startAngle=i,this.updateData()}},endAngle:{get:function(){return this._endAngle},set:function(i){this._endAngle=i,this.updateData()}},anticlockwise:{get:function(){return this._anticlockwise},set:function(i){this._anticlockwise=i,this.updateData()}},setRadius:function(i){return this.radius=i,this},setIterations:function(i){return i===void 0&&(i=.01),this.iterations=i,this},setStartAngle:function(i,a){return this._startAngle=i,a!==void 0&&(this._anticlockwise=a),this.updateData()},setEndAngle:function(i,a){return this._endAngle=i,a!==void 0&&(this._anticlockwise=a),this.updateData()},updateData:function(){var i=this._iterations,a=i,l=this.geom.radius,f=h(this._startAngle),u=h(this._endAngle),v=this._anticlockwise,m=l,x=l;u-=f,v?u<-e.PI2?u=-e.PI2:u>0&&(u=-e.PI2+u%e.PI2):u>e.PI2?u=e.PI2:u<0&&(u=e.PI2+u%e.PI2);for(var g=[m+Math.cos(f)*l,x+Math.sin(f)*l],y;a<1;)y=u*a+f,g.push(m+Math.cos(y)*l,x+Math.sin(y)*l),a+=i;return y=u+f,g.push(m+Math.cos(y)*l,x+Math.sin(y)*l),g.push(m+Math.cos(f)*l,x+Math.sin(f)*l),this.pathIndexes=r(g),this.pathData=g,this}});p.exports=o}),42542:((p,S,t)=>{var d=t(39506),c=t(65960),h=t(75177),r=t(20926),n=function(e,s,o,i){o.addToRenderList(s);var a=e.currentContext;if(r(e,a,s,o,i)){var l=s.radius;a.beginPath(),a.arc(l-s.originX*(l*2),l-s.originY*(l*2),l,d(s._startAngle),d(s._endAngle),s.anticlockwise),s.closePath&&a.closePath(),s.isFilled&&(c(a,s),a.fill()),s.isStroked&&(h(a,s),a.stroke()),a.restore()}};p.exports=n}),42563:((p,S,t)=>{var d=t(23629),c=t(39429);c.register("arc",function(h,r,n,e,s,o,i,a){return this.displayList.add(new d(this.scene,h,r,n,e,s,o,i,a))}),c.register("circle",function(h,r,n,e,s){return this.displayList.add(new d(this.scene,h,r,n,0,360,!1,e,s))})}),13609:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(41447),h=t(42542),p.exports={renderWebGL:c,renderCanvas:h}}),41447:((p,S,t)=>{var d=t(91296),c=t(10441),h=t(34682),r=function(n,e,s,o){s.addToRenderList(e);var i=n.pipelines.set(e.pipeline),a=d(e,s,o),l=i.calcMatrix.copyFrom(a.calc),f=e._displayOriginX,u=e._displayOriginY,v=s.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&c(i,l,e,v,f,u),e.isStroked&&h(i,e,v,f,u),n.pipelines.postBatch(e)};p.exports=r}),89:((p,S,t)=>{var d=t(83419),c=t(33141),h=t(94811),r=t(87841),n=t(17803),e=new d({Extends:n,Mixins:[c],initialize:function(o,i,a,l,f,u){i===void 0&&(i=0),a===void 0&&(a=0),n.call(this,o,"Curve",l),this._smoothness=32,this._curveBounds=new r,this.closePath=!1,this.setPosition(i,a),f!==void 0&&this.setFillStyle(f,u),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(s){this._smoothness=s,this.updateData()}},setSmoothness:function(s){return this._smoothness=s,this.updateData()},updateData:function(){var s=this._curveBounds,o=this._smoothness;this.geom.getBounds(s,o),this.setSize(s.width,s.height),this.updateDisplayOrigin();for(var i=[],a=this.geom.getPoints(o),l=0;l<a.length;l++)i.push(a[l].x,a[l].y);return i.push(a[0].x,a[0].y),this.pathIndexes=h(i),this.pathData=i,this}});p.exports=e}),3170:((p,S,t)=>{var d=t(65960),c=t(75177),h=t(20926),r=function(n,e,s,o){s.addToRenderList(e);var i=n.currentContext;if(h(n,i,e,s,o)){var a=e._displayOriginX+e._curveBounds.x,l=e._displayOriginY+e._curveBounds.y,f=e.pathData,u=f.length-1,v=f[0]-a,m=f[1]-l;i.beginPath(),i.moveTo(v,m),e.closePath||(u-=2);for(var x=2;x<u;x+=2){var g=f[x]-a,y=f[x+1]-l;i.lineTo(g,y)}e.closePath&&i.closePath(),e.isFilled&&(d(i,e),i.fill()),e.isStroked&&(c(i,e),i.stroke()),i.restore()}};p.exports=r}),40511:((p,S,t)=>{var d=t(39429),c=t(89);d.register("curve",function(h,r,n,e,s){return this.displayList.add(new c(this.scene,h,r,n,e,s))})}),33141:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(53987),h=t(3170),p.exports={renderWebGL:c,renderCanvas:h}}),53987:((p,S,t)=>{var d=t(10441),c=t(91296),h=t(34682),r=function(n,e,s,o){s.addToRenderList(e);var i=n.pipelines.set(e.pipeline),a=c(e,s,o),l=i.calcMatrix.copyFrom(a.calc),f=e._displayOriginX+e._curveBounds.x,u=e._displayOriginY+e._curveBounds.y,v=s.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&d(i,l,e,v,f,u),e.isStroked&&h(i,e,v,f,u),n.pipelines.postBatch(e)};p.exports=r}),19921:((p,S,t)=>{var d=t(83419),c=t(94811),h=t(54205),r=t(8497),n=t(17803),e=new d({Extends:n,Mixins:[h],initialize:function(o,i,a,l,f,u,v){i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=128),f===void 0&&(f=128),n.call(this,o,"Ellipse",new r(l/2,f/2,l,f)),this._smoothness=64,this.setPosition(i,a),this.width=l,this.height=f,u!==void 0&&this.setFillStyle(u,v),this.updateDisplayOrigin(),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(s){this._smoothness=s,this.updateData()}},setSize:function(s,o){return this.width=s,this.height=o,this.geom.setPosition(s/2,o/2),this.geom.setSize(s,o),this.updateDisplayOrigin(),this.updateData()},setSmoothness:function(s){return this._smoothness=s,this.updateData()},updateData:function(){for(var s=[],o=this.geom.getPoints(this._smoothness),i=0;i<o.length;i++)s.push(o[i].x,o[i].y);return s.push(o[0].x,o[0].y),this.pathIndexes=c(s),this.pathData=s,this}});p.exports=e}),7930:((p,S,t)=>{var d=t(65960),c=t(75177),h=t(20926),r=function(n,e,s,o){s.addToRenderList(e);var i=n.currentContext;if(h(n,i,e,s,o)){var a=e._displayOriginX,l=e._displayOriginY,f=e.pathData,u=f.length-1,v=f[0]-a,m=f[1]-l;i.beginPath(),i.moveTo(v,m),e.closePath||(u-=2);for(var x=2;x<u;x+=2){var g=f[x]-a,y=f[x+1]-l;i.lineTo(g,y)}i.closePath(),e.isFilled&&(d(i,e),i.fill()),e.isStroked&&(c(i,e),i.stroke()),i.restore()}};p.exports=r}),1543:((p,S,t)=>{var d=t(19921),c=t(39429);c.register("ellipse",function(h,r,n,e,s,o){return this.displayList.add(new d(this.scene,h,r,n,e,s,o))})}),54205:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(19467),h=t(7930),p.exports={renderWebGL:c,renderCanvas:h}}),19467:((p,S,t)=>{var d=t(10441),c=t(91296),h=t(34682),r=function(n,e,s,o){s.addToRenderList(e);var i=n.pipelines.set(e.pipeline),a=c(e,s,o),l=i.calcMatrix.copyFrom(a.calc),f=e._displayOriginX,u=e._displayOriginY,v=s.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&d(i,l,e,v,f,u),e.isStroked&&h(i,e,v,f,u),n.pipelines.postBatch(e)};p.exports=r}),30479:((p,S,t)=>{var d=t(83419),c=t(17803),h=t(26015),r=new d({Extends:c,Mixins:[h],initialize:function(e,s,o,i,a,l,f,u,v,m,x){s===void 0&&(s=0),o===void 0&&(o=0),i===void 0&&(i=128),a===void 0&&(a=128),l===void 0&&(l=32),f===void 0&&(f=32),c.call(this,e,"Grid",null),this.cellWidth=l,this.cellHeight=f,this.showCells=!0,this.outlineFillColor=0,this.outlineFillAlpha=0,this.showOutline=!0,this.showAltCells=!1,this.altFillColor,this.altFillAlpha,this.setPosition(s,o),this.setSize(i,a),this.setFillStyle(u,v),m!==void 0&&this.setOutlineStyle(m,x),this.updateDisplayOrigin()},setFillStyle:function(n,e){return e===void 0&&(e=1),n===void 0?this.showCells=!1:(this.fillColor=n,this.fillAlpha=e,this.showCells=!0),this},setAltFillStyle:function(n,e){return e===void 0&&(e=1),n===void 0?this.showAltCells=!1:(this.altFillColor=n,this.altFillAlpha=e,this.showAltCells=!0),this},setOutlineStyle:function(n,e){return e===void 0&&(e=1),n===void 0?this.showOutline=!1:(this.outlineFillColor=n,this.outlineFillAlpha=e,this.showOutline=!0),this}});p.exports=r}),49912:((p,S,t)=>{var d=t(65960),c=t(75177),h=t(20926),r=function(n,e,s,o){s.addToRenderList(e);var i=n.currentContext;if(h(n,i,e,s,o)){var a=-e._displayOriginX,l=-e._displayOriginY,f=s.alpha*e.alpha,u=e.width,v=e.height,m=e.cellWidth,x=e.cellHeight,g=Math.ceil(u/m),y=Math.ceil(v/x),T=m,C=x,E=m-(g*m-u),M=x-(y*x-v),P=e.showCells,A=e.showAltCells,R=e.showOutline,F=0,w=0,I=0,U=0,N=0;if(R&&(T--,C--,E===m&&E--,M===x&&M--),P&&e.fillAlpha>0)for(d(i,e),w=0;w<y;w++)for(A&&(I=w%2),F=0;F<g;F++){if(A&&I){I=0;continue}I++,U=F<g-1?T:E,N=w<y-1?C:M,i.fillRect(a+F*m,l+w*x,U,N)}if(A&&e.altFillAlpha>0)for(d(i,e,e.altFillColor,e.altFillAlpha*f),w=0;w<y;w++)for(A&&(I=w%2),F=0;F<g;F++){if(A&&!I){I=1;continue}I=0,U=F<g-1?T:E,N=w<y-1?C:M,i.fillRect(a+F*m,l+w*x,U,N)}if(R&&e.outlineFillAlpha>0){for(c(i,e,e.outlineFillColor,e.outlineFillAlpha*f),F=1;F<g;F++){var D=F*m;i.beginPath(),i.moveTo(D+a,l),i.lineTo(D+a,v+l),i.stroke()}for(w=1;w<y;w++){var B=w*x;i.beginPath(),i.moveTo(a,B+l),i.lineTo(a+u,B+l),i.stroke()}}i.restore()}};p.exports=r}),34137:((p,S,t)=>{var d=t(39429),c=t(30479);d.register("grid",function(h,r,n,e,s,o,i,a,l,f){return this.displayList.add(new c(this.scene,h,r,n,e,s,o,i,a,l,f))})}),26015:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(46161),h=t(49912),p.exports={renderWebGL:c,renderCanvas:h}}),46161:((p,S,t)=>{var d=t(91296),c=t(70554),h=function(r,n,e,s){e.addToRenderList(n);var o=r.pipelines.set(n.pipeline),i=d(n,e,s),a=o.calcMatrix.copyFrom(i.calc);a.translate(-n._displayOriginX,-n._displayOriginY);var l=e.alpha*n.alpha,f=n.width,u=n.height,v=n.cellWidth,m=n.cellHeight,x=Math.ceil(f/v),g=Math.ceil(u/m),y=v,T=m,C=v-(x*v-f),E=m-(g*m-u),M,P,A=n.showCells,R=n.showAltCells,F=n.showOutline,w=0,I=0,U=0,N=0,D=0;if(F&&(y--,T--,C===v&&C--,E===m&&E--),r.pipelines.preBatch(n),A&&n.fillAlpha>0)for(M=o.fillTint,P=c.getTintAppendFloatAlpha(n.fillColor,n.fillAlpha*l),M.TL=P,M.TR=P,M.BL=P,M.BR=P,I=0;I<g;I++)for(R&&(U=I%2),w=0;w<x;w++){if(R&&U){U=0;continue}U++,N=w<x-1?y:C,D=I<g-1?T:E,o.batchFillRect(w*v,I*m,N,D)}if(R&&n.altFillAlpha>0)for(M=o.fillTint,P=c.getTintAppendFloatAlpha(n.altFillColor,n.altFillAlpha*l),M.TL=P,M.TR=P,M.BL=P,M.BR=P,I=0;I<g;I++)for(R&&(U=I%2),w=0;w<x;w++){if(R&&!U){U=1;continue}U=0,N=w<x-1?y:C,D=I<g-1?T:E,o.batchFillRect(w*v,I*m,N,D)}if(F&&n.outlineFillAlpha>0){var B=o.strokeTint,L=c.getTintAppendFloatAlpha(n.outlineFillColor,n.outlineFillAlpha*l);for(B.TL=L,B.TR=L,B.BL=L,B.BR=L,w=1;w<x;w++){var G=w*v;o.batchLine(G,0,G,u,n.lineWidth,n.lineWidth,1,0,!1)}for(I=1;I<g;I++){var O=I*m;o.batchLine(0,O,f,O,n.lineWidth,n.lineWidth,1,0,!1)}}r.pipelines.postBatch(n)};p.exports=h}),61475:((p,S,t)=>{var d=t(99651),c=t(83419),h=t(17803),r=new c({Extends:h,Mixins:[d],initialize:function(e,s,o,i,a,l,f,u){s===void 0&&(s=0),o===void 0&&(o=0),i===void 0&&(i=48),a===void 0&&(a=32),l===void 0&&(l=15658734),f===void 0&&(f=10066329),u===void 0&&(u=13421772),h.call(this,e,"IsoBox",null),this.projection=4,this.fillTop=l,this.fillLeft=f,this.fillRight=u,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(s,o),this.setSize(i,a),this.updateDisplayOrigin()},setProjection:function(n){return this.projection=n,this},setFaces:function(n,e,s){return n===void 0&&(n=!0),e===void 0&&(e=!0),s===void 0&&(s=!0),this.showTop=n,this.showLeft=e,this.showRight=s,this},setFillStyle:function(n,e,s){return this.fillTop=n,this.fillLeft=e,this.fillRight=s,this.isFilled=!0,this}});p.exports=r}),11508:((p,S,t)=>{var d=t(65960),c=t(20926),h=function(r,n,e,s){e.addToRenderList(n);var o=r.currentContext;if(c(r,o,n,e,s)&&n.isFilled){var i=n.width,a=n.height,l=i/2,f=i/n.projection;n.showTop&&(d(o,n,n.fillTop),o.beginPath(),o.moveTo(-l,-a),o.lineTo(0,-f-a),o.lineTo(l,-a),o.lineTo(l,-1),o.lineTo(0,f-1),o.lineTo(-l,-1),o.lineTo(-l,-a),o.fill()),n.showLeft&&(d(o,n,n.fillLeft),o.beginPath(),o.moveTo(-l,0),o.lineTo(0,f),o.lineTo(0,f-a),o.lineTo(-l,-a),o.lineTo(-l,0),o.fill()),n.showRight&&(d(o,n,n.fillRight),o.beginPath(),o.moveTo(l,0),o.lineTo(0,f),o.lineTo(0,f-a),o.lineTo(l,-a),o.lineTo(l,0),o.fill()),o.restore()}};p.exports=h}),3933:((p,S,t)=>{var d=t(39429),c=t(61475);d.register("isobox",function(h,r,n,e,s,o,i){return this.displayList.add(new c(this.scene,h,r,n,e,s,o,i))})}),99651:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(68149),h=t(11508),p.exports={renderWebGL:c,renderCanvas:h}}),68149:((p,S,t)=>{var d=t(91296),c=t(70554),h=function(r,n,e,s){e.addToRenderList(n);var o=r.pipelines.set(n.pipeline),i=d(n,e,s),a=o.calcMatrix.copyFrom(i.calc),l=n.width,f=n.height,u=l/2,v=l/n.projection,m=e.alpha*n.alpha;if(n.isFilled){var x,g,y,T,C,E,M,P,A;r.pipelines.preBatch(n),n.showTop&&(x=c.getTintAppendFloatAlpha(n.fillTop,m),g=a.getX(-u,-f),y=a.getY(-u,-f),T=a.getX(0,-v-f),C=a.getY(0,-v-f),E=a.getX(u,-f),M=a.getY(u,-f),P=a.getX(0,v-f),A=a.getY(0,v-f),o.batchQuad(n,g,y,T,C,E,M,P,A,0,0,1,1,x,x,x,x,2)),n.showLeft&&(x=c.getTintAppendFloatAlpha(n.fillLeft,m),g=a.getX(-u,0),y=a.getY(-u,0),T=a.getX(0,v),C=a.getY(0,v),E=a.getX(0,v-f),M=a.getY(0,v-f),P=a.getX(-u,-f),A=a.getY(-u,-f),o.batchQuad(n,g,y,T,C,E,M,P,A,0,0,1,1,x,x,x,x,2)),n.showRight&&(x=c.getTintAppendFloatAlpha(n.fillRight,m),g=a.getX(u,0),y=a.getY(u,0),T=a.getX(0,v),C=a.getY(0,v),E=a.getX(0,v-f),M=a.getY(0,v-f),P=a.getX(u,-f),A=a.getY(u,-f),o.batchQuad(n,g,y,T,C,E,M,P,A,0,0,1,1,x,x,x,x,2)),r.pipelines.postBatch(n)}};p.exports=h}),16933:((p,S,t)=>{var d=t(83419),c=t(60561),h=t(17803),r=new d({Extends:h,Mixins:[c],initialize:function(e,s,o,i,a,l,f,u,v){s===void 0&&(s=0),o===void 0&&(o=0),i===void 0&&(i=48),a===void 0&&(a=32),l===void 0&&(l=!1),f===void 0&&(f=15658734),u===void 0&&(u=10066329),v===void 0&&(v=13421772),h.call(this,e,"IsoTriangle",null),this.projection=4,this.fillTop=f,this.fillLeft=u,this.fillRight=v,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=l,this.isFilled=!0,this.setPosition(s,o),this.setSize(i,a),this.updateDisplayOrigin()},setProjection:function(n){return this.projection=n,this},setReversed:function(n){return this.isReversed=n,this},setFaces:function(n,e,s){return n===void 0&&(n=!0),e===void 0&&(e=!0),s===void 0&&(s=!0),this.showTop=n,this.showLeft=e,this.showRight=s,this},setFillStyle:function(n,e,s){return this.fillTop=n,this.fillLeft=e,this.fillRight=s,this.isFilled=!0,this}});p.exports=r}),79590:((p,S,t)=>{var d=t(65960),c=t(20926),h=function(r,n,e,s){e.addToRenderList(n);var o=r.currentContext;if(c(r,o,n,e,s)&&n.isFilled){var i=n.width,a=n.height,l=i/2,f=i/n.projection,u=n.isReversed;n.showTop&&u&&(d(o,n,n.fillTop),o.beginPath(),o.moveTo(-l,-a),o.lineTo(0,-f-a),o.lineTo(l,-a),o.lineTo(0,f-a),o.fill()),n.showLeft&&(d(o,n,n.fillLeft),o.beginPath(),u?(o.moveTo(-l,-a),o.lineTo(0,f),o.lineTo(0,f-a)):(o.moveTo(-l,0),o.lineTo(0,f),o.lineTo(0,f-a)),o.fill()),n.showRight&&(d(o,n,n.fillRight),o.beginPath(),u?(o.moveTo(l,-a),o.lineTo(0,f),o.lineTo(0,f-a)):(o.moveTo(l,0),o.lineTo(0,f),o.lineTo(0,f-a)),o.fill()),o.restore()}};p.exports=h}),49803:((p,S,t)=>{var d=t(39429),c=t(16933);d.register("isotriangle",function(h,r,n,e,s,o,i,a){return this.displayList.add(new c(this.scene,h,r,n,e,s,o,i,a))})}),60561:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(51503),h=t(79590),p.exports={renderWebGL:c,renderCanvas:h}}),51503:((p,S,t)=>{var d=t(91296),c=t(70554),h=function(r,n,e,s){e.addToRenderList(n);var o=r.pipelines.set(n.pipeline),i=d(n,e,s),a=o.calcMatrix.copyFrom(i.calc),l=n.width,f=n.height,u=l/2,v=l/n.projection,m=n.isReversed,x=e.alpha*n.alpha;if(n.isFilled){r.pipelines.preBatch(n);var g,y,T,C,E,M,P;if(n.showTop&&m){g=c.getTintAppendFloatAlpha(n.fillTop,x),y=a.getX(-u,-f),T=a.getY(-u,-f),C=a.getX(0,-v-f),E=a.getY(0,-v-f),M=a.getX(u,-f),P=a.getY(u,-f);var A=a.getX(0,v-f),R=a.getY(0,v-f);o.batchQuad(n,y,T,C,E,M,P,A,R,0,0,1,1,g,g,g,g,2)}n.showLeft&&(g=c.getTintAppendFloatAlpha(n.fillLeft,x),m?(y=a.getX(-u,-f),T=a.getY(-u,-f),C=a.getX(0,v),E=a.getY(0,v),M=a.getX(0,v-f),P=a.getY(0,v-f)):(y=a.getX(-u,0),T=a.getY(-u,0),C=a.getX(0,v),E=a.getY(0,v),M=a.getX(0,v-f),P=a.getY(0,v-f)),o.batchTri(n,y,T,C,E,M,P,0,0,1,1,g,g,g,2)),n.showRight&&(g=c.getTintAppendFloatAlpha(n.fillRight,x),m?(y=a.getX(u,-f),T=a.getY(u,-f),C=a.getX(0,v),E=a.getY(0,v),M=a.getX(0,v-f),P=a.getY(0,v-f)):(y=a.getX(u,0),T=a.getY(u,0),C=a.getX(0,v),E=a.getY(0,v),M=a.getX(0,v-f),P=a.getY(0,v-f)),o.batchTri(n,y,T,C,E,M,P,0,0,1,1,g,g,g,2)),r.pipelines.postBatch(n)}};p.exports=h}),57847:((p,S,t)=>{var d=t(83419),c=t(17803),h=t(23031),r=t(36823),n=new d({Extends:c,Mixins:[r],initialize:function(s,o,i,a,l,f,u,v,m){o===void 0&&(o=0),i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=0),f===void 0&&(f=128),u===void 0&&(u=0),c.call(this,s,"Line",new h(a,l,f,u));var x=Math.max(1,this.geom.right-this.geom.left),g=Math.max(1,this.geom.bottom-this.geom.top);this.lineWidth=1,this._startWidth=1,this._endWidth=1,this.setPosition(o,i),this.setSize(x,g),v!==void 0&&this.setStrokeStyle(1,v,m),this.updateDisplayOrigin()},setLineWidth:function(e,s){return s===void 0&&(s=e),this._startWidth=e,this._endWidth=s,this.lineWidth=e,this},setTo:function(e,s,o,i){return this.geom.setTo(e,s,o,i),this}});p.exports=n}),17440:((p,S,t)=>{var d=t(75177),c=t(20926),h=function(r,n,e,s){e.addToRenderList(n);var o=r.currentContext;if(c(r,o,n,e,s)){var i=n._displayOriginX,a=n._displayOriginY;n.isStroked&&(d(o,n),o.beginPath(),o.moveTo(n.geom.x1-i,n.geom.y1-a),o.lineTo(n.geom.x2-i,n.geom.y2-a),o.stroke()),o.restore()}};p.exports=h}),2481:((p,S,t)=>{var d=t(39429),c=t(57847);d.register("line",function(h,r,n,e,s,o,i,a){return this.displayList.add(new c(this.scene,h,r,n,e,s,o,i,a))})}),36823:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(77385),h=t(17440),p.exports={renderWebGL:c,renderCanvas:h}}),77385:((p,S,t)=>{var d=t(91296),c=t(70554),h=function(r,n,e,s){e.addToRenderList(n);var o=r.pipelines.set(n.pipeline),i=d(n,e,s);o.calcMatrix.copyFrom(i.calc);var a=n._displayOriginX,l=n._displayOriginY,f=e.alpha*n.alpha;if(r.pipelines.preBatch(n),n.isStroked){var u=o.strokeTint,v=c.getTintAppendFloatAlpha(n.strokeColor,n.strokeAlpha*f);u.TL=v,u.TR=v,u.BL=v,u.BR=v,o.batchLine(n.geom.x1-a,n.geom.y1-l,n.geom.x2-a,n.geom.y2-l,n._startWidth/2,n._endWidth/2,1,0,!1,i.sprite,i.camera)}r.pipelines.postBatch(n)};p.exports=h}),24949:((p,S,t)=>{var d=t(90273),c=t(83419),h=t(94811),r=t(13829),n=t(25717),e=t(17803),s=t(5469),o=new c({Extends:e,Mixins:[d],initialize:function(a,l,f,u,v,m){l===void 0&&(l=0),f===void 0&&(f=0),e.call(this,a,"Polygon",new n(u));var x=r(this.geom);this.setPosition(l,f),this.setSize(x.width,x.height),v!==void 0&&this.setFillStyle(v,m),this.updateDisplayOrigin(),this.updateData()},smooth:function(i){i===void 0&&(i=1);for(var a=0;a<i;a++)s(this.geom);return this.updateData()},setTo:function(i){this.geom.setTo(i);var a=r(this.geom);return this.setSize(a.width,a.height),this.updateDisplayOrigin(),this.updateData()},updateData:function(){for(var i=[],a=this.geom.points,l=0;l<a.length;l++)i.push(a[l].x,a[l].y);return i.push(a[0].x,a[0].y),this.pathIndexes=h(i),this.pathData=i,this}});p.exports=o}),38710:((p,S,t)=>{var d=t(65960),c=t(75177),h=t(20926),r=function(n,e,s,o){s.addToRenderList(e);var i=n.currentContext;if(h(n,i,e,s,o)){var a=e._displayOriginX,l=e._displayOriginY,f=e.pathData,u=f.length-1,v=f[0]-a,m=f[1]-l;i.beginPath(),i.moveTo(v,m),e.closePath||(u-=2);for(var x=2;x<u;x+=2){var g=f[x]-a,y=f[x+1]-l;i.lineTo(g,y)}e.closePath&&i.closePath(),e.isFilled&&(d(i,e),i.fill()),e.isStroked&&(c(i,e),i.stroke()),i.restore()}};p.exports=r}),64827:((p,S,t)=>{var d=t(39429),c=t(24949);d.register("polygon",function(h,r,n,e,s){return this.displayList.add(new c(this.scene,h,r,n,e,s))})}),90273:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(73695),h=t(38710),p.exports={renderWebGL:c,renderCanvas:h}}),73695:((p,S,t)=>{var d=t(10441),c=t(91296),h=t(34682),r=function(n,e,s,o){s.addToRenderList(e);var i=n.pipelines.set(e.pipeline),a=c(e,s,o),l=i.calcMatrix.copyFrom(a.calc),f=e._displayOriginX,u=e._displayOriginY,v=s.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&d(i,l,e,v,f,u),e.isStroked&&h(i,e,v,f,u),n.pipelines.postBatch(e)};p.exports=r}),74561:((p,S,t)=>{var d=t(83419),c=t(94811),h=t(87841),r=t(17803),n=t(95597),e=new d({Extends:r,Mixins:[n],initialize:function(o,i,a,l,f,u,v){i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=128),f===void 0&&(f=128),r.call(this,o,"Rectangle",new h(0,0,l,f)),this.radius=20,this.isRounded=!1,this.setPosition(i,a),this.setSize(l,f),u!==void 0&&this.setFillStyle(u,v),this.updateDisplayOrigin(),this.updateData()},setRounded:function(s){return s===void 0&&(s=16),this.radius=s,this.isRounded=s>0,this.updateRoundedData()},setSize:function(s,o){this.width=s,this.height=o,this.geom.setSize(s,o),this.updateData(),this.updateDisplayOrigin();var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=s,i.hitArea.height=o),this},updateData:function(){if(this.isRounded)return this.updateRoundedData();var s=[],o=this.geom,i=this._tempLine;return o.getLineA(i),s.push(i.x1,i.y1,i.x2,i.y2),o.getLineB(i),s.push(i.x2,i.y2),o.getLineC(i),s.push(i.x2,i.y2),o.getLineD(i),s.push(i.x2,i.y2),this.pathData=s,this},updateRoundedData:function(){var s=[],o=this.width/2,i=this.height/2,a=Math.min(o,i),l=Math.min(this.radius,a),f=o,u=i,v=Math.max(1,Math.floor(l/5));return this.arcTo(s,f-o+l,u-i+l,l,Math.PI,Math.PI*1.5,v),s.push(f+o-l,u-i),this.arcTo(s,f+o-l,u-i+l,l,Math.PI*1.5,Math.PI*2,v),s.push(f+o,u+i-l),this.arcTo(s,f+o-l,u+i-l,l,0,Math.PI*.5,v),s.push(f-o+l,u+i),this.arcTo(s,f-o+l,u+i-l,l,Math.PI*.5,Math.PI,v),s.push(f-o,u-i+l),this.pathIndexes=c(s),this.pathData=s,this},arcTo:function(s,o,i,a,l,f,u){for(var v=(f-l)/u,m=0;m<=u;m++){var x=l+v*m;s.push(o+Math.cos(x)*a,i+Math.sin(x)*a)}}});p.exports=e}),48682:((p,S,t)=>{var d=t(65960),c=t(75177),h=t(20926),r=function(e,s,o,i,a,l){var f=Math.min(i/2,a/2),u=Math.min(l,f);if(u===0){e.rect(s,o,i,a);return}e.moveTo(s+u,o),e.lineTo(s+i-u,o),e.arcTo(s+i,o,s+i,o+u,u),e.lineTo(s+i,o+a-u),e.arcTo(s+i,o+a,s+i-u,o+a,u),e.lineTo(s+u,o+a),e.arcTo(s,o+a,s,o+a-u,u),e.lineTo(s,o+u),e.arcTo(s,o,s+u,o,u),e.closePath()},n=function(e,s,o,i){o.addToRenderList(s);var a=e.currentContext;if(h(e,a,s,o,i)){var l=s._displayOriginX,f=s._displayOriginY;s.isFilled&&(d(a,s),s.isRounded?(a.beginPath(),r(a,-l,-f,s.width,s.height,s.radius),a.fill()):a.fillRect(-l,-f,s.width,s.height)),s.isStroked&&(c(a,s),a.beginPath(),s.isRounded?r(a,-l,-f,s.width,s.height,s.radius):a.rect(-l,-f,s.width,s.height),a.stroke()),a.restore()}};p.exports=n}),87959:((p,S,t)=>{var d=t(39429),c=t(74561);d.register("rectangle",function(h,r,n,e,s,o){return this.displayList.add(new c(this.scene,h,r,n,e,s,o))})}),95597:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(52059),h=t(48682),p.exports={renderWebGL:c,renderCanvas:h}}),52059:((p,S,t)=>{var d=t(10441),c=t(91296),h=t(34682),r=t(70554),n=function(e,s,o,i){o.addToRenderList(s);var a=e.pipelines.set(s.pipeline),l=c(s,o,i);a.calcMatrix.copyFrom(l.calc);var f=s._displayOriginX,u=s._displayOriginY,v=o.alpha*s.alpha;if(e.pipelines.preBatch(s),s.isRounded&&s.isFilled)d(a,l.calc,s,v,f,u);else if(s.isFilled){var m=a.fillTint,x=r.getTintAppendFloatAlpha(s.fillColor,s.fillAlpha*v);m.TL=x,m.TR=x,m.BL=x,m.BR=x,a.batchFillRect(-f,-u,s.width,s.height)}s.isStroked&&h(a,s,v,f,u),e.pipelines.postBatch(s)};p.exports=n}),55911:((p,S,t)=>{var d=t(81991),c=t(83419),h=t(94811),r=t(17803),n=new c({Extends:r,Mixins:[d],initialize:function(s,o,i,a,l,f,u,v){o===void 0&&(o=0),i===void 0&&(i=0),a===void 0&&(a=5),l===void 0&&(l=32),f===void 0&&(f=64),r.call(this,s,"Star",null),this._points=a,this._innerRadius=l,this._outerRadius=f,this.setPosition(o,i),this.setSize(f*2,f*2),u!==void 0&&this.setFillStyle(u,v),this.updateDisplayOrigin(),this.updateData()},setPoints:function(e){return this._points=e,this.updateData()},setInnerRadius:function(e){return this._innerRadius=e,this.updateData()},setOuterRadius:function(e){return this._outerRadius=e,this.updateData()},points:{get:function(){return this._points},set:function(e){this._points=e,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(e){this._innerRadius=e,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(e){this._outerRadius=e,this.updateData()}},updateData:function(){var e=[],s=this._points,o=this._innerRadius,i=this._outerRadius,a=Math.PI/2*3,l=Math.PI/s,f=i,u=i;e.push(f,u+-i);for(var v=0;v<s;v++)e.push(f+Math.cos(a)*i,u+Math.sin(a)*i),a+=l,e.push(f+Math.cos(a)*o,u+Math.sin(a)*o),a+=l;return e.push(f,u+-i),this.pathIndexes=h(e),this.pathData=e,this}});p.exports=n}),64272:((p,S,t)=>{var d=t(65960),c=t(75177),h=t(20926),r=function(n,e,s,o){s.addToRenderList(e);var i=n.currentContext;if(h(n,i,e,s,o)){var a=e._displayOriginX,l=e._displayOriginY,f=e.pathData,u=f.length-1,v=f[0]-a,m=f[1]-l;i.beginPath(),i.moveTo(v,m),e.closePath||(u-=2);for(var x=2;x<u;x+=2){var g=f[x]-a,y=f[x+1]-l;i.lineTo(g,y)}i.closePath(),e.isFilled&&(d(i,e),i.fill()),e.isStroked&&(c(i,e),i.stroke()),i.restore()}};p.exports=r}),93697:((p,S,t)=>{var d=t(55911),c=t(39429);c.register("star",function(h,r,n,e,s,o,i){return this.displayList.add(new d(this.scene,h,r,n,e,s,o,i))})}),81991:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(57017),h=t(64272),p.exports={renderWebGL:c,renderCanvas:h}}),57017:((p,S,t)=>{var d=t(10441),c=t(91296),h=t(34682),r=function(n,e,s,o){s.addToRenderList(e);var i=n.pipelines.set(e.pipeline),a=c(e,s,o),l=i.calcMatrix.copyFrom(a.calc),f=e._displayOriginX,u=e._displayOriginY,v=s.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&d(i,l,e,v,f,u),e.isStroked&&h(i,e,v,f,u),n.pipelines.postBatch(e)};p.exports=r}),36931:((p,S,t)=>{var d=t(83419),c=t(17803),h=t(16483),r=t(96195),n=new d({Extends:c,Mixins:[r],initialize:function(s,o,i,a,l,f,u,v,m,x,g){o===void 0&&(o=0),i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=128),f===void 0&&(f=64),u===void 0&&(u=0),v===void 0&&(v=128),m===void 0&&(m=128),c.call(this,s,"Triangle",new h(a,l,f,u,v,m));var y=this.geom.right-this.geom.left,T=this.geom.bottom-this.geom.top;this.setPosition(o,i),this.setSize(y,T),x!==void 0&&this.setFillStyle(x,g),this.updateDisplayOrigin(),this.updateData()},setTo:function(e,s,o,i,a,l){return this.geom.setTo(e,s,o,i,a,l),this.updateData()},updateData:function(){var e=[],s=this.geom,o=this._tempLine;return s.getLineA(o),e.push(o.x1,o.y1,o.x2,o.y2),s.getLineB(o),e.push(o.x2,o.y2),s.getLineC(o),e.push(o.x2,o.y2),this.pathData=e,this}});p.exports=n}),85172:((p,S,t)=>{var d=t(65960),c=t(75177),h=t(20926),r=function(n,e,s,o){s.addToRenderList(e);var i=n.currentContext;if(h(n,i,e,s,o)){var a=e._displayOriginX,l=e._displayOriginY,f=e.geom.x1-a,u=e.geom.y1-l,v=e.geom.x2-a,m=e.geom.y2-l,x=e.geom.x3-a,g=e.geom.y3-l;i.beginPath(),i.moveTo(f,u),i.lineTo(v,m),i.lineTo(x,g),i.closePath(),e.isFilled&&(d(i,e),i.fill()),e.isStroked&&(c(i,e),i.stroke()),i.restore()}};p.exports=r}),45245:((p,S,t)=>{var d=t(39429),c=t(36931);d.register("triangle",function(h,r,n,e,s,o,i,a,l,f){return this.displayList.add(new c(this.scene,h,r,n,e,s,o,i,a,l,f))})}),96195:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(83253),h=t(85172),p.exports={renderWebGL:c,renderCanvas:h}}),83253:((p,S,t)=>{var d=t(91296),c=t(34682),h=t(70554),r=function(n,e,s,o){s.addToRenderList(e);var i=n.pipelines.set(e.pipeline),a=d(e,s,o);i.calcMatrix.copyFrom(a.calc);var l=e._displayOriginX,f=e._displayOriginY,u=s.alpha*e.alpha;if(n.pipelines.preBatch(e),e.isFilled){var v=i.fillTint,m=h.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*u);v.TL=m,v.TR=m,v.BL=m,v.BR=m;var x=e.geom.x1-l,g=e.geom.y1-f,y=e.geom.x2-l,T=e.geom.y2-f,C=e.geom.x3-l,E=e.geom.y3-f;i.batchFillTriangle(x,g,y,T,C,E,a.sprite,a.camera)}e.isStroked&&c(i,e,u,l,f),n.pipelines.postBatch(e)};p.exports=r}),68287:((p,S,t)=>{var d=t(9674),c=t(83419),h=t(31401),r=t(95643),n=t(92751),e=new c({Extends:r,Mixins:[h.Alpha,h.BlendMode,h.Depth,h.Flip,h.GetBounds,h.Mask,h.Origin,h.Pipeline,h.PostPipeline,h.ScrollFactor,h.Size,h.TextureCrop,h.Tint,h.Transform,h.Visible,n],initialize:function(o,i,a,l,f){r.call(this,o,"Sprite"),this._crop=this.resetCropObject(),this.anims=new d(this),this.setTexture(l,f),this.setPosition(i,a),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(s,o){this.anims.update(s,o)},play:function(s,o){return this.anims.play(s,o)},playReverse:function(s,o){return this.anims.playReverse(s,o)},playAfterDelay:function(s,o){return this.anims.playAfterDelay(s,o)},playAfterRepeat:function(s,o){return this.anims.playAfterRepeat(s,o)},chain:function(s){return this.anims.chain(s)},stop:function(){return this.anims.stop()},stopAfterDelay:function(s){return this.anims.stopAfterDelay(s)},stopAfterRepeat:function(s){return this.anims.stopAfterRepeat(s)},stopOnFrame:function(s){return this.anims.stopOnFrame(s)},toJSON:function(){return h.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});p.exports=e}),76552:(p=>{var S=function(t,d,c,h){c.addToRenderList(d),t.batchSprite(d,d.frame,c,h)};p.exports=S}),15567:((p,S,t)=>{var d=t(25305),c=t(13059),h=t(44603),r=t(23568),n=t(68287);h.register("sprite",function(e,s){e===void 0&&(e={});var o=r(e,"key",null),i=r(e,"frame",null),a=new n(this.scene,0,0,o,i);return s!==void 0&&(e.add=s),d(this.scene,a,e),c(a,e),a})}),46409:((p,S,t)=>{var d=t(39429),c=t(68287);d.register("sprite",function(h,r,n,e){return this.displayList.add(new c(this.scene,h,r,n,e))})}),92751:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(9409),h=t(76552),p.exports={renderWebGL:c,renderCanvas:h}}),9409:(p=>{var S=function(t,d,c,h){c.addToRenderList(d),d.pipeline.batchSprite(d,c,h)};p.exports=S}),14220:(p=>{var S=function(t,d,c){var h=t.canvas,r=t.context,n=t.style,e=[],s=0,o=c.length;n.maxLines>0&&n.maxLines<c.length&&(o=n.maxLines),n.syncFont(h,r);for(var i=t.letterSpacing,a=0;a<o;a++){var l=n.strokeThickness;if(i===0)l+=r.measureText(c[a]).width;else{for(var f=c[a],u=0;u<f.length;u++)l+=r.measureText(f[u]).width;f.length>1&&(l+=i*(f.length-1))}n.wordWrap&&(l-=r.measureText(" ").width),e[a]=Math.ceil(l),s=Math.max(s,e[a])}var v=d.fontSize+n.strokeThickness,m=v*o,x=t.lineSpacing;return o>1&&(m+=x*(o-1)),{width:s,height:m,lines:o,lineWidths:e,lineSpacing:x,lineHeight:v}};p.exports=S}),79557:((p,S,t)=>{var d=t(27919),c=function(h){var r=d.create(this),n=r.getContext("2d",{willReadFrequently:!0});h.syncFont(r,n);var e=n.measureText(h.testString);if("actualBoundingBoxAscent"in e){var s=e.actualBoundingBoxAscent,o=e.actualBoundingBoxDescent;return d.remove(r),{ascent:s,descent:o,fontSize:s+o}}var i=Math.ceil(e.width*h.baselineX),a=i,l=2*a;a=a*h.baselineY|0,r.width=i,r.height=l,n.fillStyle="#f00",n.fillRect(0,0,i,l),n.font=h._font,n.textBaseline="alphabetic",n.fillStyle="#000",n.fillText(h.testString,0,a);var f={ascent:0,descent:0,fontSize:0},u=n.getImageData(0,0,i,l);if(!u)return f.ascent=a,f.descent=a+6,f.fontSize=f.ascent+f.descent,d.remove(r),f;var v=u.data,m=v.length,x=i*4,g,y,T=0,C=!1;for(g=0;g<a;g++){for(y=0;y<x;y+=4)if(v[T+y]!==255){C=!0;break}if(!C)T+=x;else break}for(f.ascent=a-g,T=m-x,C=!1,g=l;g>a;g--){for(y=0;y<x;y+=4)if(v[T+y]!==255){C=!0;break}if(!C)T-=x;else break}return f.descent=g-a,f.fontSize=f.ascent+f.descent,d.remove(r),f};p.exports=c}),50171:((p,S,t)=>{var d=t(40366),c=t(27919),h=t(83419),r=t(31401),n=t(95643),e=t(14220),s=t(35154),o=t(35846),i=t(61771),a=t(35762),l=t(45650),f=new h({Extends:n,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Crop,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.PostPipeline,r.ScrollFactor,r.Tint,r.Transform,r.Visible,i],initialize:function(v,m,x,g,y){m===void 0&&(m=0),x===void 0&&(x=0),n.call(this,v,"Text"),this.renderer=v.sys.renderer,this.setPosition(m,x),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(!0),this.canvas=c.create(this),this.context,this.style=new a(this,y),this.autoRound=!0,this.splitRegExp=/(?:\r\n|\r|\n)/,this._text=void 0,this.padding={left:0,right:0,top:0,bottom:0},this.width=1,this.height=1,this.lineSpacing=0,this.letterSpacing=0,this.style.resolution===0&&(this.style.resolution=1),this._crop=this.resetCropObject(),this._textureKey=l(),this.texture=v.sys.textures.addCanvas(this._textureKey,this.canvas),this.context=this.texture.context,this.frame=this.texture.get(),this.frame.source.resolution=this.style.resolution,this.renderer&&this.renderer.gl&&(this.renderer.deleteTexture(this.frame.source.glTexture),this.frame.source.glTexture=null),this.initRTL(),this.setText(g),y&&y.padding&&this.setPadding(y.padding),y&&y.lineSpacing&&this.setLineSpacing(y.lineSpacing),y&&y.letterSpacing&&this.setLetterSpacing(y.letterSpacing)},initRTL:function(){if(!this.style.rtl){this.canvas.dir="ltr",this.context.direction="ltr";return}this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",d(this.canvas,this.scene.sys.canvas),this.originX=1},runWordWrap:function(u){var v=this.style;if(v.wordWrapCallback){var m=v.wordWrapCallback.call(v.wordWrapCallbackScope,u,this);return Array.isArray(m)&&(m=m.join(`
|
|
`)),m}else return v.wordWrapWidth?v.wordWrapUseAdvanced?this.advancedWordWrap(u,this.context,this.style.wordWrapWidth):this.basicWordWrap(u,this.context,this.style.wordWrapWidth):u},advancedWordWrap:function(u,v,m){for(var x="",g=u.replace(/ +/gi," ").split(this.splitRegExp),y=g.length,T=0;T<y;T++){var C=g[T],E="";C=C.replace(/^ *|\s*$/gi,"");var M=C.length*this.letterSpacing,P=v.measureText(C).width+M;if(P<m){x+=C+`
|
|
`;continue}for(var A=m,R=C.split(" "),F=0;F<R.length;F++){var w=R[F],I=w+" ",U=I.length*this.letterSpacing,N=v.measureText(I).width+U;if(N>A){if(F===0){for(var D=I;D.length;){D=D.slice(0,-1);var B=D.length*this.letterSpacing;if(N=v.measureText(D).width+B,N<=A)break}if(!D.length)throw new Error("wordWrapWidth < a single character");var L=w.substr(D.length);R[F]=L,E+=D}var G=R[F].length?F:F+1,O=R.slice(G).join(" ").replace(/[ \n]*$/gi,"");g.splice(T+1,0,O),y=g.length;break}else E+=I,A-=N}x+=E.replace(/[ \n]*$/gi,"")+`
|
|
`}return x=x.replace(/[\s|\n]*$/gi,""),x},basicWordWrap:function(u,v,m){for(var x="",g=u.split(this.splitRegExp),y=g.length-1,T=v.measureText(" ").width,C=0;C<=y;C++){for(var E=m,M=g[C].split(" "),P=M.length-1,A=0;A<=P;A++){var R=M[A],F=R.length*this.letterSpacing,w=v.measureText(R).width+F,I=w;A<P&&(I+=T),I>E&&A>0&&(x+=`
|
|
`,E=m),x+=R,A<P?(x+=" ",E-=I):E-=w}C<y&&(x+=`
|
|
`)}return x},getWrappedText:function(u){u===void 0&&(u=this._text),this.style.syncFont(this.canvas,this.context);var v=this.runWordWrap(u);return v.split(this.splitRegExp)},setText:function(u){return!u&&u!==0&&(u=""),Array.isArray(u)&&(u=u.join(`
|
|
`)),u!==this._text&&(this._text=u.toString(),this.updateText()),this},appendText:function(u,v){v===void 0&&(v=!0),!u&&u!==0&&(u=""),Array.isArray(u)&&(u=u.join(`
|
|
`)),u=u.toString();var m=this._text.concat(v?`
|
|
`+u:u);return m!==this._text&&(this._text=m,this.updateText()),this},setStyle:function(u){return this.style.setStyle(u)},setFont:function(u){return this.style.setFont(u)},setFontFamily:function(u){return this.style.setFontFamily(u)},setFontSize:function(u){return this.style.setFontSize(u)},setFontStyle:function(u){return this.style.setFontStyle(u)},setFixedSize:function(u,v){return this.style.setFixedSize(u,v)},setBackgroundColor:function(u){return this.style.setBackgroundColor(u)},setFill:function(u){return this.style.setFill(u)},setColor:function(u){return this.style.setColor(u)},setStroke:function(u,v){return this.style.setStroke(u,v)},setShadow:function(u,v,m,x,g,y){return this.style.setShadow(u,v,m,x,g,y)},setShadowOffset:function(u,v){return this.style.setShadowOffset(u,v)},setShadowColor:function(u){return this.style.setShadowColor(u)},setShadowBlur:function(u){return this.style.setShadowBlur(u)},setShadowStroke:function(u){return this.style.setShadowStroke(u)},setShadowFill:function(u){return this.style.setShadowFill(u)},setWordWrapWidth:function(u,v){return this.style.setWordWrapWidth(u,v)},setWordWrapCallback:function(u,v){return this.style.setWordWrapCallback(u,v)},setAlign:function(u){return this.style.setAlign(u)},setResolution:function(u){return this.style.setResolution(u)},setLineSpacing:function(u){return this.lineSpacing=u,this.updateText()},setLetterSpacing:function(u){return this.letterSpacing=u,this.updateText()},setPadding:function(u,v,m,x){if(typeof u=="object"){var g=u,y=s(g,"x",null);y!==null?(u=y,m=y):(u=s(g,"left",0),m=s(g,"right",u));var T=s(g,"y",null);T!==null?(v=T,x=T):(v=s(g,"top",0),x=s(g,"bottom",v))}else u===void 0&&(u=0),v===void 0&&(v=u),m===void 0&&(m=u),x===void 0&&(x=v);return this.padding.left=u,this.padding.top=v,this.padding.right=m,this.padding.bottom=x,this.updateText()},setMaxLines:function(u){return this.style.setMaxLines(u)},setRTL:function(u){u===void 0&&(u=!0);var v=this.style;return v.rtl===u?this:(v.rtl=u,u?(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",d(this.canvas,this.scene.sys.canvas)):(this.canvas.dir="ltr",this.context.direction="ltr"),v.align==="left"?v.align="right":v.align==="right"&&(v.align="left"),this)},updateText:function(){var u=this.canvas,v=this.context,m=this.style,x=m.resolution,g=m.metrics;m.syncFont(u,v);var y=this._text;(m.wordWrapWidth||m.wordWrapCallback)&&(y=this.runWordWrap(this._text));var T=y.split(this.splitRegExp),C=e(this,g,T),E=this.padding,M;m.fixedWidth===0?(this.width=C.width+E.left+E.right,M=C.width):(this.width=m.fixedWidth,M=this.width-E.left-E.right,M<C.width&&(M=C.width)),m.fixedHeight===0?this.height=C.height+E.top+E.bottom:this.height=m.fixedHeight;var P=this.width,A=this.height;this.updateDisplayOrigin(),P*=x,A*=x,P=Math.max(P,1),A=Math.max(A,1),u.width!==P||u.height!==A?(u.width=P,u.height=A,this.frame.setSize(P,A),m.syncFont(u,v),m.rtl&&(v.direction="rtl")):v.clearRect(0,0,P,A),v.save(),v.scale(x,x),m.backgroundColor&&(v.fillStyle=m.backgroundColor,v.fillRect(0,0,P,A)),m.syncStyle(u,v),v.translate(E.left,E.top);for(var R,F,w=0;w<C.lines;w++){if(R=m.strokeThickness/2,F=m.strokeThickness/2+w*C.lineHeight+g.ascent,w>0&&(F+=C.lineSpacing*w),m.rtl)R=P-R-E.left-E.right;else if(m.align==="right")R+=M-C.lineWidths[w];else if(m.align==="center")R+=(M-C.lineWidths[w])/2;else if(m.align==="justify"){var I=.85;if(C.lineWidths[w]/C.width>=I){var U=C.width-C.lineWidths[w],N=v.measureText(" ").width,D=T[w].trim(),B=D.split(" ");U+=(T[w].length-D.length)*N;for(var L=Math.floor(U/N),G=0;L>0;)B[G]+=" ",G=(G+1)%(B.length-1||1),--L;T[w]=B.join(" ")}}this.autoRound&&(R=Math.round(R),F=Math.round(F));var O=this.letterSpacing;if(m.strokeThickness&&O===0&&(m.syncShadow(v,m.shadowStroke),v.strokeText(T[w],R,F)),m.color)if(m.syncShadow(v,m.shadowFill),O!==0)for(var X=0,z=T[w].split(""),V=0;V<z.length;V++)m.strokeThickness&&(m.syncShadow(v,m.shadowStroke),v.strokeText(z[V],R+X,F),m.syncShadow(v,m.shadowFill)),v.fillText(z[V],R+X,F),X+=v.measureText(z[V]).width+O;else v.fillText(T[w],R,F)}v.restore(),this.renderer&&this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(u,this.frame.source.glTexture,!0));var Y=this.input;return Y&&!Y.customHitArea&&(Y.hitArea.width=this.width,Y.hitArea.height=this.height),this},getTextMetrics:function(){return this.style.getTextMetrics()},text:{get:function(){return this._text},set:function(u){this.setText(u)}},toJSON:function(){var u=r.ToJSON(this),v={autoRound:this.autoRound,text:this._text,style:this.style.toJSON(),padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return u.data=v,u},preDestroy:function(){o(this.canvas),c.remove(this.canvas);var u=this.texture;u&&u.destroy()}});p.exports=f}),79724:(p=>{var S=function(t,d,c,h){d.width===0||d.height===0||(c.addToRenderList(d),t.batchSprite(d,d.frame,c,h))};p.exports=S}),71259:((p,S,t)=>{var d=t(25305),c=t(44603),h=t(23568),r=t(50171);c.register("text",function(n,e){n===void 0&&(n={});var s=h(n,"text",""),o=h(n,"style",null),i=h(n,"padding",null);i!==null&&(o.padding=i);var a=new r(this.scene,0,0,s,o);return e!==void 0&&(n.add=e),d(this.scene,a,n),a.autoRound=h(n,"autoRound",!0),a.resolution=h(n,"resolution",1),a})}),68005:((p,S,t)=>{var d=t(50171),c=t(39429);c.register("text",function(h,r,n,e){return this.displayList.add(new d(this.scene,h,r,n,e))})}),61771:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(34397),h=t(79724),p.exports={renderWebGL:c,renderCanvas:h}}),35762:((p,S,t)=>{var d=t(83419),c=t(23568),h=t(35154),r=t(79557),n={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],resolution:["resolution",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},e=new d({initialize:function(o,i){this.parent=o,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.resolution,this.rtl,this.testString,this.baselineX,this.baselineY,this.wordWrapWidth,this.wordWrapCallback,this.wordWrapCallbackScope,this.wordWrapUseAdvanced,this._font,this.setStyle(i,!1,!0)},setStyle:function(s,o,i){o===void 0&&(o=!0),i===void 0&&(i=!1);for(var a in n){var l=i?n[a][1]:this[a];a==="wordWrapCallback"||a==="wordWrapCallbackScope"?this[a]=h(s,n[a][0],l):s&&a==="fontSize"&&typeof s.fontSize=="number"?this[a]=s.fontSize.toString()+"px":this[a]=c(s,n[a][0],l)}var f=h(s,"font",null);f!==null&&this.setFont(f,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var u=h(s,"fill",null);u!==null&&(this.color=u);var v=h(s,"metrics",!1);return v?this.metrics={ascent:h(v,"ascent",0),descent:h(v,"descent",0),fontSize:h(v,"fontSize",0)}:(o||!this.metrics)&&(this.metrics=r(this)),o?this.parent.updateText():this.parent},syncFont:function(s,o){o.font=this._font},syncStyle:function(s,o){o.textBaseline="alphabetic",o.fillStyle=this.color,o.strokeStyle=this.stroke,o.lineWidth=this.strokeThickness,o.lineCap="round",o.lineJoin="round"},syncShadow:function(s,o){o?(s.shadowOffsetX=this.shadowOffsetX,s.shadowOffsetY=this.shadowOffsetY,s.shadowColor=this.shadowColor,s.shadowBlur=this.shadowBlur):(s.shadowOffsetX=0,s.shadowOffsetY=0,s.shadowColor=0,s.shadowBlur=0)},update:function(s){return s&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=r(this)),this.parent.updateText()},setFont:function(s,o){o===void 0&&(o=!0);var i=s,a="",l="";if(typeof s!="string")i=h(s,"fontFamily","Courier"),a=h(s,"fontSize","16px"),l=h(s,"fontStyle","");else{var f=s.split(" "),u=0;l=f.length>2?f[u++]:"",a=f[u++]||"16px",i=f[u++]||"Courier"}return(i!==this.fontFamily||a!==this.fontSize||l!==this.fontStyle)&&(this.fontFamily=i,this.fontSize=a,this.fontStyle=l,o&&this.update(!0)),this.parent},setFontFamily:function(s){return this.fontFamily!==s&&(this.fontFamily=s,this.update(!0)),this.parent},setFontStyle:function(s){return this.fontStyle!==s&&(this.fontStyle=s,this.update(!0)),this.parent},setFontSize:function(s){return typeof s=="number"&&(s=s.toString()+"px"),this.fontSize!==s&&(this.fontSize=s,this.update(!0)),this.parent},setTestString:function(s){return this.testString=s,this.update(!0)},setFixedSize:function(s,o){return this.fixedWidth=s,this.fixedHeight=o,s&&(this.parent.width=s),o&&(this.parent.height=o),this.update(!1)},setBackgroundColor:function(s){return this.backgroundColor=s,this.update(!1)},setFill:function(s){return this.color=s,this.update(!1)},setColor:function(s){return this.color=s,this.update(!1)},setResolution:function(s){return this.resolution=s,this.update(!1)},setStroke:function(s,o){return o===void 0&&(o=this.strokeThickness),s===void 0&&this.strokeThickness!==0?(this.strokeThickness=0,this.update(!0)):(this.stroke!==s||this.strokeThickness!==o)&&(this.stroke=s,this.strokeThickness=o,this.update(!0)),this.parent},setShadow:function(s,o,i,a,l,f){return s===void 0&&(s=0),o===void 0&&(o=0),i===void 0&&(i="#000"),a===void 0&&(a=0),l===void 0&&(l=!1),f===void 0&&(f=!0),this.shadowOffsetX=s,this.shadowOffsetY=o,this.shadowColor=i,this.shadowBlur=a,this.shadowStroke=l,this.shadowFill=f,this.update(!1)},setShadowOffset:function(s,o){return s===void 0&&(s=0),o===void 0&&(o=s),this.shadowOffsetX=s,this.shadowOffsetY=o,this.update(!1)},setShadowColor:function(s){return s===void 0&&(s="#000"),this.shadowColor=s,this.update(!1)},setShadowBlur:function(s){return s===void 0&&(s=0),this.shadowBlur=s,this.update(!1)},setShadowStroke:function(s){return this.shadowStroke=s,this.update(!1)},setShadowFill:function(s){return this.shadowFill=s,this.update(!1)},setWordWrapWidth:function(s,o){return o===void 0&&(o=!1),this.wordWrapWidth=s,this.wordWrapUseAdvanced=o,this.update(!1)},setWordWrapCallback:function(s,o){return o===void 0&&(o=null),this.wordWrapCallback=s,this.wordWrapCallbackScope=o,this.update(!1)},setAlign:function(s){return s===void 0&&(s="left"),this.align=s,this.update(!1)},setMaxLines:function(s){return s===void 0&&(s=0),this.maxLines=s,this.update(!1)},getTextMetrics:function(){var s=this.metrics;return{ascent:s.ascent,descent:s.descent,fontSize:s.fontSize}},toJSON:function(){var s={};for(var o in n)s[o]=this[o];return s.metrics=this.getTextMetrics(),s},destroy:function(){this.parent=void 0}});p.exports=e}),34397:((p,S,t)=>{var d=t(70554),c=function(h,r,n,e){if(!(r.width===0||r.height===0)){n.addToRenderList(r);var s=r.frame,o=s.width,i=s.height,a=d.getTintAppendFloatAlpha,l=h.pipelines.set(r.pipeline,r),f=l.setTexture2D(s.glTexture,r);l.batchTexture(r,s.glTexture,o,i,r.x,r.y,o/r.style.resolution,i/r.style.resolution,r.scaleX,r.scaleY,r.rotation,r.flipX,r.flipY,r.scrollFactorX,r.scrollFactorY,r.displayOriginX,r.displayOriginY,0,0,o,i,a(r.tintTopLeft,n.alpha*r._alphaTL),a(r.tintTopRight,n.alpha*r._alphaTR),a(r.tintBottomLeft,n.alpha*r._alphaBL),a(r.tintBottomRight,n.alpha*r._alphaBR),r.tintFill,0,0,n,e,!1,f)}};p.exports=c}),20839:((p,S,t)=>{var d=t(27919),c=t(83419),h=t(31401),r=t(95643),n=t(98439),e=t(68703),s=t(56295),o=t(45650),i=t(26099),a=8,l=new c({Extends:r,Mixins:[h.Alpha,h.BlendMode,h.ComputedSize,h.Crop,h.Depth,h.Flip,h.GetBounds,h.Mask,h.Origin,h.Pipeline,h.PostPipeline,h.ScrollFactor,h.Tint,h.Transform,h.Visible,s],initialize:function(u,v,m,x,g,y,T){var C=u.sys.renderer;r.call(this,u,"TileSprite");var E=u.sys.textures.get(y),M=E.get(T);M.source.compressionAlgorithm&&(console.warn("TileSprite cannot use compressed texture"),E=u.sys.textures.get("__MISSING"),M=E.get()),E.type==="DynamicTexture"&&(console.warn("TileSprite cannot use Dynamic Texture"),E=u.sys.textures.get("__MISSING"),M=E.get()),!x||!g?(x=x||M.width,g=g||M.height):(x=Math.floor(x),g=Math.floor(g)),this._tilePosition=new i,this._tileScale=new i(1,1),this.dirty=!1,this.renderer=C,this.canvas=d.create(this,x,g),this.context=this.canvas.getContext("2d",{willReadFrequently:!1}),this.displayTexture=E,this.displayFrame=M,this._crop=this.resetCropObject(),this._textureKey=o(),this.texture=u.sys.textures.addCanvas(this._textureKey,this.canvas),this.frame=this.texture.get(),this.potWidth=n(M.width),this.potHeight=n(M.height),this.fillCanvas=d.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d",{willReadFrequently:!1}),this.fillPattern=null,this.setPosition(v,m),this.setSize(x,g),this.setFrame(T),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)},setTexture:function(f,u){return this.displayTexture=this.scene.sys.textures.get(f),this.setFrame(u)},setFrame:function(f){var u=this.displayTexture.get(f);return this.potWidth=n(u.width),this.potHeight=n(u.height),this.canvas.width=0,!u.cutWidth||!u.cutHeight?this.renderFlags&=~a:this.renderFlags|=a,this.displayFrame=u,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(f,u){return f!==void 0&&(this.tilePositionX=f),u!==void 0&&(this.tilePositionY=u),this},setTileScale:function(f,u){return f===void 0&&(f=this.tileScaleX),u===void 0&&(u=f),this.tileScaleX=f,this.tileScaleY=u,this},updateTileTexture:function(){if(!(!this.dirty||!this.renderer)){var f=this.displayFrame;if(f.source.isRenderTexture||f.source.isGLTexture){console.warn("TileSprites can only use Image or Canvas based textures"),this.dirty=!1;return}var u=this.fillContext,v=this.fillCanvas,m=this.potWidth,x=this.potHeight;(!this.renderer||!this.renderer.gl)&&(m=f.cutWidth,x=f.cutHeight),u.clearRect(0,0,m,x),v.width=m,v.height=x,u.drawImage(f.source.image,f.cutX,f.cutY,f.cutWidth,f.cutHeight,0,0,m,x),this.renderer&&this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(v,this.fillPattern):this.fillPattern=u.createPattern(v,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var f=this.canvas;if((f.width!==this.width||f.height!==this.height)&&(f.width=this.width,f.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl){this.dirty=!1;return}var u=this.context;this.scene.sys.game.config.antialias||e.disable(u);var v=this._tileScale.x,m=this._tileScale.y,x=this._tilePosition.x,g=this._tilePosition.y;u.clearRect(0,0,this.width,this.height),u.save(),u.scale(v,m),u.translate(-x,-g),u.fillStyle=this.fillPattern,u.fillRect(x,g,this.width/v,this.height/m),u.restore(),this.dirty=!1},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),d.remove(this.canvas),d.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null;var f=this.texture;f&&f.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(f){this._tilePosition.x=f,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(f){this._tilePosition.y=f,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(f){this._tileScale.x=f,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(f){this._tileScale.y=f,this.dirty=!0}}});p.exports=l}),46992:(p=>{var S=function(t,d,c,h){d.updateCanvas(),c.addToRenderList(d),t.batchSprite(d,d.frame,c,h)};p.exports=S}),14167:((p,S,t)=>{var d=t(25305),c=t(44603),h=t(23568),r=t(20839);c.register("tileSprite",function(n,e){n===void 0&&(n={});var s=h(n,"x",0),o=h(n,"y",0),i=h(n,"width",512),a=h(n,"height",512),l=h(n,"key",""),f=h(n,"frame",""),u=new r(this.scene,s,o,i,a,l,f);return e!==void 0&&(n.add=e),d(this.scene,u,n),u})}),91681:((p,S,t)=>{var d=t(20839),c=t(39429);c.register("tileSprite",function(h,r,n,e,s,o){return this.displayList.add(new d(this.scene,h,r,n,e,s,o))})}),56295:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(18553),h=t(46992),p.exports={renderWebGL:c,renderCanvas:h}}),18553:((p,S,t)=>{var d=t(70554),c=function(h,r,n,e){r.updateCanvas();var s=r.width,o=r.height;if(!(s===0||o===0)){n.addToRenderList(r);var i=d.getTintAppendFloatAlpha,a=h.pipelines.set(r.pipeline,r),l=a.setTexture2D(r.fillPattern,r);a.batchTexture(r,r.fillPattern,r.displayFrame.width*r.tileScaleX,r.displayFrame.height*r.tileScaleY,r.x,r.y,s,o,r.scaleX,r.scaleY,r.rotation,r.flipX,r.flipY,r.scrollFactorX,r.scrollFactorY,r.originX*s,r.originY*o,0,0,s,o,i(r.tintTopLeft,n.alpha*r._alphaTL),i(r.tintTopRight,n.alpha*r._alphaTR),i(r.tintBottomLeft,n.alpha*r._alphaBL),i(r.tintBottomRight,n.alpha*r._alphaBR),r.tintFill,r.tilePositionX%r.displayFrame.width/r.displayFrame.width,r.tilePositionY%r.displayFrame.height/r.displayFrame.height,n,e,!1,l)}};p.exports=c}),18471:((p,S,t)=>{var d=t(45319),c=t(83419),h=t(31401),r=t(51708),n=t(8443),e=t(95643),s=t(36383),o=t(14463),i=t(45650),a=t(10247),l=new c({Extends:e,Mixins:[h.Alpha,h.BlendMode,h.ComputedSize,h.Depth,h.Flip,h.GetBounds,h.Mask,h.Origin,h.Pipeline,h.PostPipeline,h.ScrollFactor,h.TextureCrop,h.Tint,h.Transform,h.Visible,a],initialize:function(u,v,m,x){e.call(this,u,"Video"),this.video,this.videoTexture,this.videoTextureSource,this.snapshotTexture,this.flipY=!1,this._key=i(),this.touchLocked=!1,this.playWhenUnlocked=!1,this.frameReady=!1,this.isStalled=!1,this.failedPlayAttempts=0,this.metadata,this.retry=0,this.retryInterval=500,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={ended:this.completeHandler.bind(this),legacy:this.legacyPlayHandler.bind(this),playing:this.playingHandler.bind(this),seeked:this.seekedHandler.bind(this),seeking:this.seekingHandler.bind(this),stalled:this.stalledHandler.bind(this),suspend:this.stalledHandler.bind(this),waiting:this.stalledHandler.bind(this)},this._loadCallbackHandler=this.loadErrorHandler.bind(this),this._metadataCallbackHandler=this.metadataHandler.bind(this),this._crop=this.resetCropObject(),this.markers={},this._markerIn=0,this._markerOut=0,this._playingMarker=!1,this._lastUpdate=0,this.cacheKey="",this.isSeeking=!1,this._playCalled=!1,this._getFrame=!1,this._rfvCallbackId=0;var g=u.sys.game;this._device=g.device.video,this.setPosition(v,m),this.setSize(256,256),this.initPipeline(),this.initPostPipeline(!0),g.events.on(n.PAUSE,this.globalPause,this),g.events.on(n.RESUME,this.globalResume,this);var y=u.sys.sound;y&&y.on(o.GLOBAL_MUTE,this.globalMute,this),x&&this.load(x)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},load:function(f){var u=this.scene.sys.cache.video.get(f);return u?(this.cacheKey=f,this.loadHandler(u.url,u.noAudio,u.crossOrigin)):console.warn("No video in cache for key: "+f),this},changeSource:function(f,u,v,m,x){u===void 0&&(u=!0),v===void 0&&(v=!1),this.cacheKey!==f&&(this.load(f),u&&this.play(v,m,x))},getVideoKey:function(){return this.cacheKey},loadURL:function(f,u,v){u===void 0&&(u=!1);var m=this._device.getVideoURL(f);return m?(this.cacheKey="",this.loadHandler(m.url,u,v)):console.warn("No supported video format found for "+f),this},loadMediaStream:function(f,u,v){return this.loadHandler(null,u,v,f)},loadHandler:function(f,u,v,m){u||(u=!1);var x=this.video;if(x?(this.removeLoadEventHandlers(),this.stop()):(x=document.createElement("video"),x.controls=!1,x.setAttribute("playsinline","playsinline"),x.setAttribute("preload","auto"),x.setAttribute("disablePictureInPicture","true")),u?(x.muted=!0,x.defaultMuted=!0,x.setAttribute("autoplay","autoplay")):(x.muted=!1,x.defaultMuted=!1,x.removeAttribute("autoplay")),v?x.setAttribute("crossorigin",v):x.removeAttribute("crossorigin"),m)if("srcObject"in x)try{x.srcObject=m}catch(y){if(y.name!=="TypeError")throw y;x.src=URL.createObjectURL(m)}else x.src=URL.createObjectURL(m);else x.src=f;this.retry=0,this.video=x,this._playCalled=!1,x.load(),this.addLoadEventHandlers();var g=this.scene.sys.textures.get(this._key);return this.setTexture(g),this},requestVideoFrame:function(f,u){var v=this.video;if(v){var m=u.width,x=u.height,g=this.videoTexture,y=this.videoTextureSource,T=!g||y.source!==v;T?(this._codePaused=v.paused,this._codeMuted=v.muted,g?(y.source=v,y.width=m,y.height=x,g.get().setSize(m,x)):(g=this.scene.sys.textures.create(this._key,v,m,x),g.add("__BASE",0,0,0,m,x),this.setTexture(g),this.videoTexture=g,this.videoTextureSource=g.source[0],this.videoTextureSource.setFlipY(this.flipY),this.emit(r.VIDEO_TEXTURE,this,g)),this.setSizeToFrame(),this.updateDisplayOrigin()):y.update(),this.isStalled=!1,this.metadata=u;var C=u.mediaTime;T&&(this._lastUpdate=C,this.emit(r.VIDEO_CREATED,this,m,x),this.frameReady||(this.frameReady=!0,this.emit(r.VIDEO_PLAY,this))),this._playingMarker?C>=this._markerOut&&(v.loop?(v.currentTime=this._markerIn,this.emit(r.VIDEO_LOOP,this)):(this.stop(!1),this.emit(r.VIDEO_COMPLETE,this))):C<this._lastUpdate&&this.emit(r.VIDEO_LOOP,this),this._lastUpdate=C,this._getFrame?(this.removeEventHandlers(),v.pause(),this._getFrame=!1):this._rfvCallbackId=this.video.requestVideoFrameCallback(this.requestVideoFrame.bind(this))}},play:function(f,u,v){u===void 0&&(u=-1),v===void 0&&(v=s.MAX_SAFE_INTEGER);var m=this.video;return!m||this.isPlaying()?(m||console.warn("Video not loaded"),this):(f===void 0&&(f=m.loop),m.loop=f,this._markerIn=u,this._markerOut=v,this._playingMarker=u>-1&&v>u&&v<s.MAX_SAFE_INTEGER,this._playCalled||(this._getFrame=!1,this._rfvCallbackId=m.requestVideoFrameCallback(this.requestVideoFrame.bind(this)),this._playCalled=!0,this.createPlayPromise()),this)},getFirstFrame:function(){var f=this.video;return!f||this.isPlaying()?(f||console.warn("Video not loaded"),this):(this._playCalled||(this._getFrame=!0,this._rfvCallbackId=f.requestVideoFrameCallback(this.requestVideoFrame.bind(this)),this.createPlayPromise()),this)},addLoadEventHandlers:function(){var f=this.video;f&&(f.addEventListener("error",this._loadCallbackHandler),f.addEventListener("abort",this._loadCallbackHandler),f.addEventListener("loadedmetadata",this._metadataCallbackHandler))},removeLoadEventHandlers:function(){var f=this.video;f&&(f.removeEventListener("error",this._loadCallbackHandler),f.removeEventListener("abort",this._loadCallbackHandler))},addEventHandlers:function(){var f=this.video;if(f){var u=this._callbacks;for(var v in u)f.addEventListener(v,u[v])}},removeEventHandlers:function(){var f=this.video;if(f){var u=this._callbacks;for(var v in u)f.removeEventListener(v,u[v])}},createPlayPromise:function(f){f===void 0&&(f=!0);var u=this.video,v=u.play();if(v!==void 0){var m=this.playSuccess.bind(this),x=this.playError.bind(this);if(!f){var g=this;x=function(){g.failedPlayAttempts++}}v.then(m).catch(x)}else u.addEventListener("playing",this._callbacks.legacy),f||this.failedPlayAttempts++},addMarker:function(f,u,v){return!isNaN(u)&&u>=0&&!isNaN(v)&&v>u&&(this.markers[f]=[u,v]),this},playMarker:function(f,u){var v=this.markers[f];return v&&this.play(u,v[0],v[1]),this},removeMarker:function(f){return delete this.markers[f],this},snapshot:function(f,u){return f===void 0&&(f=this.width),u===void 0&&(u=this.height),this.snapshotArea(0,0,this.width,this.height,f,u)},snapshotArea:function(f,u,v,m,x,g){f===void 0&&(f=0),u===void 0&&(u=0),v===void 0&&(v=this.width),m===void 0&&(m=this.height),x===void 0&&(x=v),g===void 0&&(g=m);var y=this.video,T=this.snapshotTexture;return T?(T.setSize(x,g),y&&T.context.drawImage(y,f,u,v,m,0,0,x,g)):(T=this.scene.sys.textures.createCanvas(i(),x,g),this.snapshotTexture=T,y&&T.context.drawImage(y,f,u,v,m,0,0,x,g)),T.update()},saveSnapshotTexture:function(f){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,f):this.snapshotTexture=this.scene.sys.textures.createCanvas(f,this.width,this.height),this.snapshotTexture},playSuccess:function(){if(this._playCalled){this.addEventHandlers(),this._codePaused=!1,this.touchLocked&&(this.touchLocked=!1,this.emit(r.VIDEO_UNLOCKED,this));var f=this.scene.sys.sound;f&&f.mute&&this.setMute(!0),this._markerIn>-1&&(this.video.currentTime=this._markerIn)}},playError:function(f){var u=f.name;u==="NotAllowedError"?(this.touchLocked=!0,this.playWhenUnlocked=!0,this.failedPlayAttempts=1,this.emit(r.VIDEO_LOCKED,this)):u==="NotSupportedError"?(this.stop(!1),this.emit(r.VIDEO_UNSUPPORTED,this,f)):(this.stop(!1),this.emit(r.VIDEO_ERROR,this,f))},legacyPlayHandler:function(){var f=this.video;f&&(this.playSuccess(),f.removeEventListener("playing",this._callbacks.legacy))},playingHandler:function(){this.isStalled=!1,this.emit(r.VIDEO_PLAYING,this)},loadErrorHandler:function(f){this.stop(!1),this.emit(r.VIDEO_ERROR,this,f)},metadataHandler:function(f){this.emit(r.VIDEO_METADATA,this,f)},setSizeToFrame:function(f){f||(f=this.frame),this.width=f.realWidth,this.height=f.realHeight,this.scaleX!==1&&(this.scaleX=this.displayWidth/this.width),this.scaleY!==1&&(this.scaleY=this.displayHeight/this.height);var u=this.input;return u&&!u.customHitArea&&(u.hitArea.width=this.width,u.hitArea.height=this.height),this},stalledHandler:function(f){this.isStalled=!0,this.emit(r.VIDEO_STALLED,this,f)},completeHandler:function(){this._playCalled=!1,this.emit(r.VIDEO_COMPLETE,this)},preUpdate:function(f,u){var v=this.video;!v||!this._playCalled||this.touchLocked&&this.playWhenUnlocked&&(this.retry+=u,this.retry>=this.retryInterval&&(this.createPlayPromise(!1),this.retry=0))},seekTo:function(f){var u=this.video;if(u){var v=u.duration;if(v!==1/0&&!isNaN(v)){var m=v*f;this.setCurrentTime(m)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(f){var u=this.video;if(u){if(typeof f=="string"){var v=f[0],m=parseFloat(f.substr(1));v==="+"?f=u.currentTime+m:v==="-"&&(f=u.currentTime-m)}u.currentTime=f}return this},seekingHandler:function(){this.isSeeking=!0,this.emit(r.VIDEO_SEEKING,this)},seekedHandler:function(){this.isSeeking=!1,this.emit(r.VIDEO_SEEKED,this)},getProgress:function(){var f=this.video;if(f){var u=f.duration;if(u!==1/0&&!isNaN(u))return f.currentTime/u}return-1},getDuration:function(){return this.video?this.video.duration:0},setMute:function(f){f===void 0&&(f=!0),this._codeMuted=f;var u=this.video;return u&&(u.muted=this._systemMuted?!0:f),this},isMuted:function(){return this._codeMuted},globalMute:function(f,u){this._systemMuted=u;var v=this.video;v&&(v.muted=this._codeMuted?!0:u)},globalPause:function(){this._systemPaused=!0,this.video&&!this.video.ended&&(this.removeEventHandlers(),this.video.pause())},globalResume:function(){this._systemPaused=!1,this.video&&!this._codePaused&&!this.video.ended&&this.createPlayPromise()},setPaused:function(f){f===void 0&&(f=!0);var u=this.video;return this._codePaused=f,u&&!u.ended&&(f?u.paused||(this.removeEventHandlers(),u.pause()):f||(this._playCalled?u.paused&&!this._systemPaused&&this.createPlayPromise():this.play())),this},pause:function(){return this.setPaused(!0)},resume:function(){return this.setPaused(!1)},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(f){return f===void 0&&(f=1),this.video&&(this.video.volume=d(f,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(f){return this.video&&(this.video.playbackRate=f),this},getLoop:function(){return this.video?this.video.loop:!1},setLoop:function(f){return f===void 0&&(f=!0),this.video&&(this.video.loop=f),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(f,u){return u===void 0&&(u=!1),this.videoTexture&&(this.scene.sys.textures.renameTexture(this._key,f),this.videoTextureSource.setFlipY(u)),this._key=f,this.flipY=u,!!this.videoTexture},stop:function(f){f===void 0&&(f=!0);var u=this.video;return u&&(this.removeEventHandlers(),u.cancelVideoFrameCallback(this._rfvCallbackId),u.pause()),this.retry=0,this._playCalled=!1,f&&this.emit(r.VIDEO_STOP,this),this},removeVideoElement:function(){var f=this.video;if(f){for(f.parentNode&&f.parentNode.removeChild(f);f.hasChildNodes();)f.removeChild(f.firstChild);f.removeAttribute("autoplay"),f.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(!1),this.removeLoadEventHandlers(),this.removeVideoElement();var f=this.scene.sys.game.events;f.off(n.PAUSE,this.globalPause,this),f.off(n.RESUME,this.globalResume,this);var u=this.scene.sys.sound;u&&u.off(o.GLOBAL_MUTE,this.globalMute,this)}});p.exports=l}),58352:(p=>{var S=function(t,d,c,h){d.videoTexture&&(c.addToRenderList(d),t.batchSprite(d,d.frame,c,h))};p.exports=S}),11511:((p,S,t)=>{var d=t(25305),c=t(44603),h=t(23568),r=t(18471);c.register("video",function(n,e){n===void 0&&(n={});var s=h(n,"key",null),o=new r(this.scene,0,0,s);return e!==void 0&&(n.add=e),d(this.scene,o,n),o})}),89025:((p,S,t)=>{var d=t(18471),c=t(39429);c.register("video",function(h,r,n){return this.displayList.add(new d(this.scene,h,r,n))})}),10247:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(29849),h=t(58352),p.exports={renderWebGL:c,renderCanvas:h}}),29849:(p=>{var S=function(t,d,c,h){d.videoTexture&&(c.addToRenderList(d),d.pipeline.batchSprite(d,c,h))};p.exports=S}),41481:((p,S,t)=>{var d=t(10312),c=t(96503),h=t(87902),r=t(83419),n=t(31401),e=t(95643),s=t(87841),o=t(37303),i=new r({Extends:e,Mixins:[n.Depth,n.GetBounds,n.Origin,n.Transform,n.ScrollFactor,n.Visible],initialize:function(l,f,u,v,m){v===void 0&&(v=1),m===void 0&&(m=v),e.call(this,l,"Zone"),this.setPosition(f,u),this.width=v,this.height=m,this.blendMode=d.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(a){this.scaleX=a/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(a){this.scaleY=a/this.height}},setSize:function(a,l,f){f===void 0&&(f=!0),this.width=a,this.height=l,this.updateDisplayOrigin();var u=this.input;return f&&u&&!u.customHitArea&&(u.hitArea.width=a,u.hitArea.height=l),this},setDisplaySize:function(a,l){return this.displayWidth=a,this.displayHeight=l,this},setCircleDropZone:function(a){return this.setDropZone(new c(0,0,a),h)},setRectangleDropZone:function(a,l){return this.setDropZone(new s(0,0,a,l),o)},setDropZone:function(a,l){return this.input||this.setInteractive(a,l,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(a,l,f){f.addToRenderList(l)},renderWebGL:function(a,l,f){f.addToRenderList(l)}});p.exports=i}),95261:((p,S,t)=>{var d=t(44603),c=t(23568),h=t(41481);d.register("zone",function(r){var n=c(r,"x",0),e=c(r,"y",0),s=c(r,"width",1),o=c(r,"height",s);return new h(this.scene,n,e,s,o)})}),84175:((p,S,t)=>{var d=t(41481),c=t(39429);c.register("zone",function(h,r,n,e){return this.displayList.add(new d(this.scene,h,r,n,e))})}),95166:(p=>{var S=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0};p.exports=S}),96503:((p,S,t)=>{var d=t(83419),c=t(87902),h=t(26241),r=t(79124),n=t(23777),e=t(28176),s=new d({initialize:function(i,a,l){i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=0),this.type=n.CIRCLE,this.x=i,this.y=a,this._radius=l,this._diameter=l*2},contains:function(o,i){return c(this,o,i)},getPoint:function(o,i){return h(this,o,i)},getPoints:function(o,i,a){return r(this,o,i,a)},getRandomPoint:function(o){return e(this,o)},setTo:function(o,i,a){return this.x=o,this.y=i,this._radius=a,this._diameter=a*2,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(o,i){return i===void 0&&(i=o),this.x=o,this.y=i,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(o){this._radius=o,this._diameter=o*2}},diameter:{get:function(){return this._diameter},set:function(o){this._diameter=o,this._radius=o*.5}},left:{get:function(){return this.x-this._radius},set:function(o){this.x=o+this._radius}},right:{get:function(){return this.x+this._radius},set:function(o){this.x=o-this._radius}},top:{get:function(){return this.y-this._radius},set:function(o){this.y=o+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(o){this.y=o-this._radius}}});p.exports=s}),71562:(p=>{var S=function(t){return 2*(Math.PI*t.radius)};p.exports=S}),92110:((p,S,t)=>{var d=t(2141),c=function(h,r,n){return n===void 0&&(n=new d),n.x=h.x+h.radius*Math.cos(r),n.y=h.y+h.radius*Math.sin(r),n};p.exports=c}),42250:((p,S,t)=>{var d=t(96503),c=function(h){return new d(h.x,h.y,h.radius)};p.exports=c}),87902:(p=>{var S=function(t,d,c){if(t.radius>0&&d>=t.left&&d<=t.right&&c>=t.top&&c<=t.bottom){var h=(t.x-d)*(t.x-d),r=(t.y-c)*(t.y-c);return h+r<=t.radius*t.radius}else return!1};p.exports=S}),5698:((p,S,t)=>{var d=t(87902),c=function(h,r){return d(h,r.x,r.y)};p.exports=c}),70588:((p,S,t)=>{var d=t(87902),c=function(h,r){return d(h,r.x,r.y)&&d(h,r.right,r.y)&&d(h,r.x,r.bottom)&&d(h,r.right,r.bottom)};p.exports=c}),26394:(p=>{var S=function(t,d){return d.setTo(t.x,t.y,t.radius)};p.exports=S}),76278:(p=>{var S=function(t,d){return t.x===d.x&&t.y===d.y&&t.radius===d.radius};p.exports=S}),2074:((p,S,t)=>{var d=t(87841),c=function(h,r){return r===void 0&&(r=new d),r.x=h.left,r.y=h.top,r.width=h.diameter,r.height=h.diameter,r};p.exports=c}),26241:((p,S,t)=>{var d=t(92110),c=t(62945),h=t(36383),r=t(2141),n=function(e,s,o){o===void 0&&(o=new r);var i=c(s,0,h.PI2);return d(e,i,o)};p.exports=n}),79124:((p,S,t)=>{var d=t(71562),c=t(92110),h=t(62945),r=t(36383),n=function(e,s,o,i){i===void 0&&(i=[]),!s&&o>0&&(s=d(e)/o);for(var a=0;a<s;a++){var l=h(a/s,0,r.PI2);i.push(c(e,l))}return i};p.exports=n}),50884:(p=>{var S=function(t,d,c){return t.x+=d,t.y+=c,t};p.exports=S}),39212:(p=>{var S=function(t,d){return t.x+=d.x,t.y+=d.y,t};p.exports=S}),28176:((p,S,t)=>{var d=t(2141),c=function(h,r){r===void 0&&(r=new d);var n=2*Math.PI*Math.random(),e=Math.random()+Math.random(),s=e>1?2-e:e,o=s*Math.cos(n),i=s*Math.sin(n);return r.x=h.x+o*h.radius,r.y=h.y+i*h.radius,r};p.exports=c}),88911:((p,S,t)=>{var d=t(96503);d.Area=t(95166),d.Circumference=t(71562),d.CircumferencePoint=t(92110),d.Clone=t(42250),d.Contains=t(87902),d.ContainsPoint=t(5698),d.ContainsRect=t(70588),d.CopyFrom=t(26394),d.Equals=t(76278),d.GetBounds=t(2074),d.GetPoint=t(26241),d.GetPoints=t(79124),d.Offset=t(50884),d.OffsetPoint=t(39212),d.Random=t(28176),p.exports=d}),23777:(p=>{var S={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6};p.exports=S}),78874:(p=>{var S=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI};p.exports=S}),92990:(p=>{var S=function(t){var d=t.width/2,c=t.height/2,h=Math.pow(d-c,2)/Math.pow(d+c,2);return Math.PI*(d+c)*(1+3*h/(10+Math.sqrt(4-3*h)))};p.exports=S}),79522:((p,S,t)=>{var d=t(2141),c=function(h,r,n){n===void 0&&(n=new d);var e=h.width/2,s=h.height/2;return n.x=h.x+e*Math.cos(r),n.y=h.y+s*Math.sin(r),n};p.exports=c}),58102:((p,S,t)=>{var d=t(8497),c=function(h){return new d(h.x,h.y,h.width,h.height)};p.exports=c}),81154:(p=>{var S=function(t,d,c){if(t.width<=0||t.height<=0)return!1;var h=(d-t.x)/t.width,r=(c-t.y)/t.height;return h*=h,r*=r,h+r<.25};p.exports=S}),46662:((p,S,t)=>{var d=t(81154),c=function(h,r){return d(h,r.x,r.y)};p.exports=c}),1632:((p,S,t)=>{var d=t(81154),c=function(h,r){return d(h,r.x,r.y)&&d(h,r.right,r.y)&&d(h,r.x,r.bottom)&&d(h,r.right,r.bottom)};p.exports=c}),65534:(p=>{var S=function(t,d){return d.setTo(t.x,t.y,t.width,t.height)};p.exports=S}),8497:((p,S,t)=>{var d=t(83419),c=t(81154),h=t(90549),r=t(48320),n=t(23777),e=t(24820),s=new d({initialize:function(i,a,l,f){i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=0),f===void 0&&(f=0),this.type=n.ELLIPSE,this.x=i,this.y=a,this.width=l,this.height=f},contains:function(o,i){return c(this,o,i)},getPoint:function(o,i){return h(this,o,i)},getPoints:function(o,i,a){return r(this,o,i,a)},getRandomPoint:function(o){return e(this,o)},setTo:function(o,i,a,l){return this.x=o,this.y=i,this.width=a,this.height=l,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(o,i){return i===void 0&&(i=o),this.x=o,this.y=i,this},setSize:function(o,i){return i===void 0&&(i=o),this.width=o,this.height=i,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(o){this.x=o+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(o){this.x=o-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(o){this.y=o+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(o){this.y=o-this.height/2}}});p.exports=s}),36146:(p=>{var S=function(t,d){return t.x===d.x&&t.y===d.y&&t.width===d.width&&t.height===d.height};p.exports=S}),23694:((p,S,t)=>{var d=t(87841),c=function(h,r){return r===void 0&&(r=new d),r.x=h.left,r.y=h.top,r.width=h.width,r.height=h.height,r};p.exports=c}),90549:((p,S,t)=>{var d=t(79522),c=t(62945),h=t(36383),r=t(2141),n=function(e,s,o){o===void 0&&(o=new r);var i=c(s,0,h.PI2);return d(e,i,o)};p.exports=n}),48320:((p,S,t)=>{var d=t(92990),c=t(79522),h=t(62945),r=t(36383),n=function(e,s,o,i){i===void 0&&(i=[]),!s&&o>0&&(s=d(e)/o);for(var a=0;a<s;a++){var l=h(a/s,0,r.PI2);i.push(c(e,l))}return i};p.exports=n}),73424:(p=>{var S=function(t,d,c){return t.x+=d,t.y+=c,t};p.exports=S}),44808:(p=>{var S=function(t,d){return t.x+=d.x,t.y+=d.y,t};p.exports=S}),24820:((p,S,t)=>{var d=t(2141),c=function(h,r){r===void 0&&(r=new d);var n=Math.random()*Math.PI*2,e=Math.sqrt(Math.random());return r.x=h.x+e*Math.cos(n)*h.width/2,r.y=h.y+e*Math.sin(n)*h.height/2,r};p.exports=c}),49203:((p,S,t)=>{var d=t(8497);d.Area=t(78874),d.Circumference=t(92990),d.CircumferencePoint=t(79522),d.Clone=t(58102),d.Contains=t(81154),d.ContainsPoint=t(46662),d.ContainsRect=t(1632),d.CopyFrom=t(65534),d.Equals=t(36146),d.GetBounds=t(23694),d.GetPoint=t(90549),d.GetPoints=t(48320),d.Offset=t(73424),d.OffsetPoint=t(44808),d.Random=t(24820),p.exports=d}),55738:((p,S,t)=>{var d=t(23777),c=t(79291),h={Circle:t(88911),Ellipse:t(49203),Intersects:t(91865),Line:t(2529),Mesh:t(73090),Point:t(43711),Polygon:t(58423),Rectangle:t(93232),Triangle:t(84435)};h=c(!1,h,d),p.exports=h}),2044:((p,S,t)=>{var d=t(20339),c=function(h,r){return d(h.x,h.y,r.x,r.y)<=h.radius+r.radius};p.exports=c}),81491:(p=>{var S=function(t,d){var c=d.width/2,h=d.height/2,r=Math.abs(t.x-d.x-c),n=Math.abs(t.y-d.y-h),e=c+t.radius,s=h+t.radius;if(r>e||n>s)return!1;if(r<=c||n<=h)return!0;var o=r-c,i=n-h,a=o*o,l=i*i,f=t.radius*t.radius;return a+l<=f};p.exports=S}),63376:((p,S,t)=>{var d=t(2141),c=t(2044),h=function(r,n,e){if(e===void 0&&(e=[]),c(r,n)){var s=r.x,o=r.y,i=r.radius,a=n.x,l=n.y,f=n.radius,u,v,m,x,g;if(o===l)g=(f*f-i*i-a*a+s*s)/(2*(s-a)),u=1,v=-2*l,m=a*a+g*g-2*a*g+l*l-f*f,x=v*v-4*u*m,x===0?e.push(new d(g,-v/(2*u))):x>0&&(e.push(new d(g,(-v+Math.sqrt(x))/(2*u))),e.push(new d(g,(-v-Math.sqrt(x))/(2*u))));else{var y=(s-a)/(o-l),T=(f*f-i*i-a*a+s*s-l*l+o*o)/(2*(o-l));u=y*y+1,v=2*o*y-2*T*y-2*s,m=s*s+o*o+T*T-i*i-2*o*T,x=v*v-4*u*m,x===0?(g=-v/(2*u),e.push(new d(g,T-g*y))):x>0&&(g=(-v+Math.sqrt(x))/(2*u),e.push(new d(g,T-g*y)),g=(-v-Math.sqrt(x))/(2*u),e.push(new d(g,T-g*y)))}}return e};p.exports=h}),97439:((p,S,t)=>{var d=t(4042),c=t(81491),h=function(r,n,e){if(e===void 0&&(e=[]),c(r,n)){var s=n.getLineA(),o=n.getLineB(),i=n.getLineC(),a=n.getLineD();d(s,r,e),d(o,r,e),d(i,r,e),d(a,r,e)}return e};p.exports=h}),4042:((p,S,t)=>{var d=t(2141),c=t(80462),h=function(r,n,e){if(e===void 0&&(e=[]),c(r,n)){var s=r.x1,o=r.y1,i=r.x2,a=r.y2,l=n.x,f=n.y,u=n.radius,v=i-s,m=a-o,x=s-l,g=o-f,y=v*v+m*m,T=2*(v*x+m*g),C=x*x+g*g-u*u,E=T*T-4*y*C,M,P;if(E===0){var A=-T/(2*y);M=s+A*v,P=o+A*m,A>=0&&A<=1&&e.push(new d(M,P))}else if(E>0){var R=(-T-Math.sqrt(E))/(2*y);M=s+R*v,P=o+R*m,R>=0&&R<=1&&e.push(new d(M,P));var F=(-T+Math.sqrt(E))/(2*y);M=s+F*v,P=o+F*m,F>=0&&F<=1&&e.push(new d(M,P))}}return e};p.exports=h}),36100:((p,S,t)=>{var d=t(25836),c=function(h,r,n,e){n===void 0&&(n=!1);var s=h.x1,o=h.y1,i=h.x2,a=h.y2,l=r.x1,f=r.y1,u=r.x2,v=r.y2,m=i-s,x=a-o,g=u-l,y=v-f,T=m*y-x*g;if(T===0)return null;var C,E,M;if(n){if(C=(m*(f-o)+x*(s-l))/(g*x-y*m),m!==0)E=(l+g*C-s)/m;else if(x!==0)E=(f+y*C-o)/x;else return null;if(E<0||C<0||C>1)return null;M=E}else{if(C=((l-s)*y-(f-o)*g)/T,E=((o-f)*m-(s-l)*x)/T,C<0||C>1||E<0||E>1)return null;M=C}return e===void 0&&(e=new d),e.set(s+m*M,o+x*M,M)};p.exports=c}),3073:((p,S,t)=>{var d=t(36100),c=t(23031),h=t(25836),r=new c,n=new h,e=function(s,o,i,a){i===void 0&&(i=!1),a===void 0&&(a=new h);var l=!1;a.set(),n.set();for(var f=o[o.length-1],u=0;u<o.length;u++){var v=o[u];r.setTo(f.x,f.y,v.x,v.y),f=v,d(s,r,i,n)&&(!l||n.z<a.z)&&(a.copy(n),l=!0)}return l?a:null};p.exports=e}),56362:((p,S,t)=>{var d=t(25836),c=t(61369),h=t(3073),r=new d,n=function(e,s,o,i){i===void 0&&(i=new c),Array.isArray(s)||(s=[s]);var a=!1;i.set(),r.set();for(var l=0;l<s.length;l++)h(e,s[l].points,o,r)&&(!a||r.z<i.z)&&(i.set(r.x,r.y,r.z,l),a=!0);return a?i:null};p.exports=n}),60646:((p,S,t)=>{var d=t(2141),c=t(76112),h=t(92773),r=function(n,e,s){if(s===void 0&&(s=[]),h(n,e))for(var o=e.getLineA(),i=e.getLineB(),a=e.getLineC(),l=e.getLineD(),f=[new d,new d,new d,new d],u=[c(o,n,f[0]),c(i,n,f[1]),c(a,n,f[2]),c(l,n,f[3])],v=0;v<4;v++)u[v]&&s.push(f[v]);return s};p.exports=r}),71147:((p,S,t)=>{var d=t(61369),c=t(56362),h=t(23031),r=new h;function n(o,i,a,l,f){var u=Math.cos(o),v=Math.sin(o);r.setTo(i,a,i+u,a+v);var m=c(r,l,!0);m&&f.push(new d(m.x,m.y,o,m.w))}function e(o,i){return o.z-i.z}var s=function(o,i,a){Array.isArray(a)||(a=[a]);for(var l=[],f=[],u=0;u<a.length;u++)for(var v=a[u].points,m=0;m<v.length;m++){var x=Math.atan2(v[m].y-i,v[m].x-o);f.indexOf(x)===-1&&(n(x,o,i,a,l),n(x-1e-5,o,i,a,l),n(x+1e-5,o,i,a,l),f.push(x))}return l.sort(e)};p.exports=s}),68389:((p,S,t)=>{var d=t(87841),c=t(59996),h=function(r,n,e){return e===void 0&&(e=new d),c(r,n)&&(e.x=Math.max(r.x,n.x),e.y=Math.max(r.y,n.y),e.width=Math.min(r.right,n.right)-e.x,e.height=Math.min(r.bottom,n.bottom)-e.y),e};p.exports=h}),52784:((p,S,t)=>{var d=t(60646),c=t(59996),h=function(r,n,e){if(e===void 0&&(e=[]),c(r,n)){var s=r.getLineA(),o=r.getLineB(),i=r.getLineC(),a=r.getLineD();d(s,n,e),d(o,n,e),d(i,n,e),d(a,n,e)}return e};p.exports=h}),26341:((p,S,t)=>{var d=t(89265),c=t(60646),h=function(r,n,e){if(e===void 0&&(e=[]),d(r,n)){var s=n.getLineA(),o=n.getLineB(),i=n.getLineC();c(s,r,e),c(o,r,e),c(i,r,e)}return e};p.exports=h}),38720:((p,S,t)=>{var d=t(4042),c=t(67636),h=function(r,n,e){if(e===void 0&&(e=[]),c(r,n)){var s=r.getLineA(),o=r.getLineB(),i=r.getLineC();d(s,n,e),d(o,n,e),d(i,n,e)}return e};p.exports=h}),13882:((p,S,t)=>{var d=t(2141),c=t(2822),h=t(76112),r=function(n,e,s){if(s===void 0&&(s=[]),c(n,e))for(var o=n.getLineA(),i=n.getLineB(),a=n.getLineC(),l=[new d,new d,new d],f=[h(o,e,l[0]),h(i,e,l[1]),h(a,e,l[2])],u=0;u<3;u++)f[u]&&s.push(l[u]);return s};p.exports=r}),75636:((p,S,t)=>{var d=t(82944),c=t(13882),h=function(r,n,e){if(e===void 0&&(e=[]),d(r,n)){var s=n.getLineA(),o=n.getLineB(),i=n.getLineC();c(r,s,e),c(r,o,e),c(r,i,e)}return e};p.exports=h}),80462:((p,S,t)=>{var d=t(87902),c=t(2141),h=new c,r=function(n,e,s){if(s===void 0&&(s=h),d(e,n.x1,n.y1))return s.x=n.x1,s.y=n.y1,!0;if(d(e,n.x2,n.y2))return s.x=n.x2,s.y=n.y2,!0;var o=n.x2-n.x1,i=n.y2-n.y1,a=e.x-n.x1,l=e.y-n.y1,f=o*o+i*i,u=o,v=i;if(f>0){var m=(a*o+l*i)/f;u*=m,v*=m}s.x=n.x1+u,s.y=n.y1+v;var x=u*u+v*v;return x<=f&&u*o+v*i>=0&&d(e,s.x,s.y)};p.exports=r}),76112:(p=>{var S=function(t,d,c){var h=t.x1,r=t.y1,n=t.x2,e=t.y2,s=d.x1,o=d.y1,i=d.x2,a=d.y2;if(h===n&&r===e||s===i&&o===a)return!1;var l=(a-o)*(n-h)-(i-s)*(e-r);if(l===0)return!1;var f=((i-s)*(r-o)-(a-o)*(h-s))/l,u=((n-h)*(r-o)-(e-r)*(h-s))/l;return f<0||f>1||u<0||u>1?!1:(c&&(c.x=h+f*(n-h),c.y=r+f*(e-r)),!0)};p.exports=S}),92773:(p=>{var S=function(t,d){var c=t.x1,h=t.y1,r=t.x2,n=t.y2,e=d.x,s=d.y,o=d.right,i=d.bottom,a=0;if(c>=e&&c<=o&&h>=s&&h<=i||r>=e&&r<=o&&n>=s&&n<=i)return!0;if(c<e&&r>=e){if(a=h+(n-h)*(e-c)/(r-c),a>s&&a<=i)return!0}else if(c>o&&r<=o&&(a=h+(n-h)*(o-c)/(r-c),a>=s&&a<=i))return!0;if(h<s&&n>=s){if(a=c+(r-c)*(s-h)/(n-h),a>=e&&a<=o)return!0}else if(h>i&&n<=i&&(a=c+(r-c)*(i-h)/(n-h),a>=e&&a<=o))return!0;return!1};p.exports=S}),16204:(p=>{var S=function(t,d,c){c===void 0&&(c=1);var h=d.x1,r=d.y1,n=d.x2,e=d.y2,s=t.x,o=t.y,i=(n-h)*(n-h)+(e-r)*(e-r);if(i===0)return!1;var a=((s-h)*(n-h)+(o-r)*(e-r))/i;if(a<0)return Math.sqrt((h-s)*(h-s)+(r-o)*(r-o))<=c;if(a>=0&&a<=1){var l=((r-o)*(n-h)-(h-s)*(e-r))/i;return Math.abs(l)*Math.sqrt(i)<=c}else return Math.sqrt((n-s)*(n-s)+(e-o)*(e-o))<=c};p.exports=S}),14199:((p,S,t)=>{var d=t(16204),c=function(h,r){if(!d(h,r))return!1;var n=Math.min(r.x1,r.x2),e=Math.max(r.x1,r.x2),s=Math.min(r.y1,r.y2),o=Math.max(r.y1,r.y2);return h.x>=n&&h.x<=e&&h.y>=s&&h.y<=o};p.exports=c}),59996:(p=>{var S=function(t,d){return t.width<=0||t.height<=0||d.width<=0||d.height<=0?!1:!(t.right<d.x||t.bottom<d.y||t.x>d.right||t.y>d.bottom)};p.exports=S}),89265:((p,S,t)=>{var d=t(76112),c=t(37303),h=t(48653),r=t(77493),n=function(e,s){if(s.left>e.right||s.right<e.left||s.top>e.bottom||s.bottom<e.top)return!1;var o=s.getLineA(),i=s.getLineB(),a=s.getLineC();if(c(e,o.x1,o.y1)||c(e,o.x2,o.y2)||c(e,i.x1,i.y1)||c(e,i.x2,i.y2)||c(e,a.x1,a.y1)||c(e,a.x2,a.y2))return!0;var l=e.getLineA(),f=e.getLineB(),u=e.getLineC(),v=e.getLineD();if(d(o,l)||d(o,f)||d(o,u)||d(o,v)||d(i,l)||d(i,f)||d(i,u)||d(i,v)||d(a,l)||d(a,f)||d(a,u)||d(a,v))return!0;var m=r(e),x=h(s,m,!0);return x.length>0};p.exports=n}),84411:(p=>{var S=function(t,d,c,h,r,n){return n===void 0&&(n=0),!(d>t.right+n||c<t.left-n||h>t.bottom+n||r<t.top-n)};p.exports=S}),67636:((p,S,t)=>{var d=t(80462),c=t(10690),h=function(r,n){return r.left>n.right||r.right<n.left||r.top>n.bottom||r.bottom<n.top?!1:!!(c(r,n.x,n.y)||d(r.getLineA(),n)||d(r.getLineB(),n)||d(r.getLineC(),n))};p.exports=h}),2822:((p,S,t)=>{var d=t(76112),c=function(h,r){return!!(h.contains(r.x1,r.y1)||h.contains(r.x2,r.y2)||d(h.getLineA(),r)||d(h.getLineB(),r)||d(h.getLineC(),r))};p.exports=c}),82944:((p,S,t)=>{var d=t(48653),c=t(71694),h=t(76112),r=function(n,e){if(n.left>e.right||n.right<e.left||n.top>e.bottom||n.bottom<e.top)return!1;var s=n.getLineA(),o=n.getLineB(),i=n.getLineC(),a=e.getLineA(),l=e.getLineB(),f=e.getLineC();if(h(s,a)||h(s,l)||h(s,f)||h(o,a)||h(o,l)||h(o,f)||h(i,a)||h(i,l)||h(i,f))return!0;var u=c(n),v=d(e,u,!0);return v.length>0||(u=c(e),v=d(n,u,!0),v.length>0)};p.exports=r}),91865:((p,S,t)=>{p.exports={CircleToCircle:t(2044),CircleToRectangle:t(81491),GetCircleToCircle:t(63376),GetCircleToRectangle:t(97439),GetLineToCircle:t(4042),GetLineToLine:t(36100),GetLineToPoints:t(3073),GetLineToPolygon:t(56362),GetLineToRectangle:t(60646),GetRaysFromPointToPolygon:t(71147),GetRectangleIntersection:t(68389),GetRectangleToRectangle:t(52784),GetRectangleToTriangle:t(26341),GetTriangleToCircle:t(38720),GetTriangleToLine:t(13882),GetTriangleToTriangle:t(75636),LineToCircle:t(80462),LineToLine:t(76112),LineToRectangle:t(92773),PointToLine:t(16204),PointToLineSegment:t(14199),RectangleToRectangle:t(59996),RectangleToTriangle:t(89265),RectangleToValues:t(84411),TriangleToCircle:t(67636),TriangleToLine:t(2822),TriangleToTriangle:t(82944)}}),91938:(p=>{var S=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)};p.exports=S}),84993:(p=>{var S=function(t,d,c){d===void 0&&(d=1),c===void 0&&(c=[]);var h=Math.round(t.x1),r=Math.round(t.y1),n=Math.round(t.x2),e=Math.round(t.y2),s=Math.abs(n-h),o=Math.abs(e-r),i=h<n?1:-1,a=r<e?1:-1,l=s-o;c.push({x:h,y:r});for(var f=1;!(h===n&&r===e);){var u=l<<1;u>-o&&(l-=o,h+=i),u<s&&(l+=s,r+=a),f%d===0&&c.push({x:h,y:r}),f++}return c};p.exports=S}),36469:(p=>{var S=function(t,d,c){var h=d-(t.x1+t.x2)/2,r=c-(t.y1+t.y2)/2;return t.x1+=h,t.y1+=r,t.x2+=h,t.y2+=r,t};p.exports=S}),31116:((p,S,t)=>{var d=t(23031),c=function(h){return new d(h.x1,h.y1,h.x2,h.y2)};p.exports=c}),59944:(p=>{var S=function(t,d){return d.setTo(t.x1,t.y1,t.x2,t.y2)};p.exports=S}),59220:(p=>{var S=function(t,d){return t.x1===d.x1&&t.y1===d.y1&&t.x2===d.x2&&t.y2===d.y2};p.exports=S}),78177:((p,S,t)=>{var d=t(35001),c=function(h,r,n){n===void 0&&(n=r);var e=d(h),s=h.x2-h.x1,o=h.y2-h.y1;return r&&(h.x1=h.x1-s/e*r,h.y1=h.y1-o/e*r),n&&(h.x2=h.x2+s/e*n,h.y2=h.y2+o/e*n),h};p.exports=c}),26708:((p,S,t)=>{var d=t(52816),c=t(6113),h=t(2141),r=function(n,e,s,o,i){o===void 0&&(o=0),i===void 0&&(i=[]);var a=[],l=n.x1,f=n.y1,u=n.x2-l,v=n.y2-f,m=c(e,i),x,g,y=s-1;for(x=0;x<y;x++)g=m(x/y),a.push(new h(l+u*g,f+v*g));if(g=m(1),a.push(new h(l+u*g,f+v*g)),o>0){var T=a[0],C=[T];for(x=1;x<a.length-1;x++){var E=a[x];d(T,E)>=o&&(C.push(E),T=E)}var M=a[a.length-1];return d(T,M)<o&&C.pop(),C.push(M),C}else return a};p.exports=r}),32125:((p,S,t)=>{var d=t(2141),c=function(h,r){return r===void 0&&(r=new d),r.x=(h.x1+h.x2)/2,r.y=(h.y1+h.y2)/2,r};p.exports=c}),99569:((p,S,t)=>{var d=t(2141),c=function(h,r,n){n===void 0&&(n=new d);var e=h.x1,s=h.y1,o=h.x2,i=h.y2,a=(o-e)*(o-e)+(i-s)*(i-s);if(a===0)return n;var l=((r.x-e)*(o-e)+(r.y-s)*(i-s))/a;return n.x=e+l*(o-e),n.y=s+l*(i-s),n};p.exports=c}),34638:((p,S,t)=>{var d=t(36383),c=t(91938),h=t(2141),r=function(n,e){e===void 0&&(e=new h);var s=c(n)-d.TAU;return e.x=Math.cos(s),e.y=Math.sin(s),e};p.exports=r}),13151:((p,S,t)=>{var d=t(2141),c=function(h,r,n){return n===void 0&&(n=new d),n.x=h.x1+(h.x2-h.x1)*r,n.y=h.y1+(h.y2-h.y1)*r,n};p.exports=c}),15258:((p,S,t)=>{var d=t(35001),c=t(2141),h=function(r,n,e,s){s===void 0&&(s=[]),!n&&e>0&&(n=d(r)/e);for(var o=r.x1,i=r.y1,a=r.x2,l=r.y2,f=0;f<n;f++){var u=f/n,v=o+(a-o)*u,m=i+(l-i)*u;s.push(new c(v,m))}return s};p.exports=h}),26408:(p=>{var S=function(t,d){var c=t.x1,h=t.y1,r=t.x2,n=t.y2,e=(r-c)*(r-c)+(n-h)*(n-h);if(e===0)return!1;var s=((h-d.y)*(r-c)-(c-d.x)*(n-h))/e;return Math.abs(s)*Math.sqrt(e)};p.exports=S}),98770:(p=>{var S=function(t){return Math.abs(t.y1-t.y2)};p.exports=S}),35001:(p=>{var S=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))};p.exports=S}),23031:((p,S,t)=>{var d=t(83419),c=t(13151),h=t(15258),r=t(23777),n=t(65822),e=t(26099),s=new d({initialize:function(i,a,l,f){i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=0),f===void 0&&(f=0),this.type=r.LINE,this.x1=i,this.y1=a,this.x2=l,this.y2=f},getPoint:function(o,i){return c(this,o,i)},getPoints:function(o,i,a){return h(this,o,i,a)},getRandomPoint:function(o){return n(this,o)},setTo:function(o,i,a,l){return o===void 0&&(o=0),i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=0),this.x1=o,this.y1=i,this.x2=a,this.y2=l,this},setFromObjects:function(o,i){return this.x1=o.x,this.y1=o.y,this.x2=i.x,this.y2=i.y,this},getPointA:function(o){return o===void 0&&(o=new e),o.set(this.x1,this.y1),o},getPointB:function(o){return o===void 0&&(o=new e),o.set(this.x2,this.y2),o},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(o){this.x1<=this.x2?this.x1=o:this.x2=o}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(o){this.x1>this.x2?this.x1=o:this.x2=o}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(o){this.y1<=this.y2?this.y1=o:this.y2=o}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(o){this.y1>this.y2?this.y1=o:this.y2=o}}});p.exports=s}),64795:((p,S,t)=>{var d=t(36383),c=t(15994),h=t(91938),r=function(n){var e=h(n)-d.TAU;return c(e,-Math.PI,Math.PI)};p.exports=r}),52616:((p,S,t)=>{var d=t(36383),c=t(91938),h=function(r){return Math.cos(c(r)-d.TAU)};p.exports=h}),87231:((p,S,t)=>{var d=t(36383),c=t(91938),h=function(r){return Math.sin(c(r)-d.TAU)};p.exports=h}),89662:(p=>{var S=function(t,d,c){return t.x1+=d,t.y1+=c,t.x2+=d,t.y2+=c,t};p.exports=S}),71165:(p=>{var S=function(t){return-((t.x2-t.x1)/(t.y2-t.y1))};p.exports=S}),65822:((p,S,t)=>{var d=t(2141),c=function(h,r){r===void 0&&(r=new d);var n=Math.random();return r.x=h.x1+n*(h.x2-h.x1),r.y=h.y1+n*(h.y2-h.y1),r};p.exports=c}),69777:((p,S,t)=>{var d=t(91938),c=t(64795),h=function(r,n){return 2*c(n)-Math.PI-d(r)};p.exports=h}),39706:((p,S,t)=>{var d=t(64400),c=function(h,r){var n=(h.x1+h.x2)/2,e=(h.y1+h.y2)/2;return d(h,n,e,r)};p.exports=c}),82585:((p,S,t)=>{var d=t(64400),c=function(h,r,n){return d(h,r.x,r.y,n)};p.exports=c}),64400:(p=>{var S=function(t,d,c,h){var r=Math.cos(h),n=Math.sin(h),e=t.x1-d,s=t.y1-c;return t.x1=e*r-s*n+d,t.y1=e*n+s*r+c,e=t.x2-d,s=t.y2-c,t.x2=e*r-s*n+d,t.y2=e*n+s*r+c,t};p.exports=S}),62377:(p=>{var S=function(t,d,c,h,r){return t.x1=d,t.y1=c,t.x2=d+Math.cos(h)*r,t.y2=c+Math.sin(h)*r,t};p.exports=S}),71366:(p=>{var S=function(t){return(t.y2-t.y1)/(t.x2-t.x1)};p.exports=S}),10809:(p=>{var S=function(t){return Math.abs(t.x1-t.x2)};p.exports=S}),2529:((p,S,t)=>{var d=t(23031);d.Angle=t(91938),d.BresenhamPoints=t(84993),d.CenterOn=t(36469),d.Clone=t(31116),d.CopyFrom=t(59944),d.Equals=t(59220),d.Extend=t(78177),d.GetEasedPoints=t(26708),d.GetMidPoint=t(32125),d.GetNearestPoint=t(99569),d.GetNormal=t(34638),d.GetPoint=t(13151),d.GetPoints=t(15258),d.GetShortestDistance=t(26408),d.Height=t(98770),d.Length=t(35001),d.NormalAngle=t(64795),d.NormalX=t(52616),d.NormalY=t(87231),d.Offset=t(89662),d.PerpSlope=t(71165),d.Random=t(65822),d.ReflectAngle=t(69777),d.Rotate=t(39706),d.RotateAroundPoint=t(82585),d.RotateAroundXY=t(64400),d.SetToAngle=t(62377),d.Slope=t(71366),d.Width=t(10809),p.exports=d}),83997:((p,S,t)=>{var d=t(83419),c=t(87841),h=t(26099);function r(e,s,o,i){var a=e-o,l=s-i,f=a*a+l*l;return Math.sqrt(f)}var n=new d({initialize:function(s,o,i){this.vertex1=s,this.vertex2=o,this.vertex3=i,this.bounds=new c,this._inCenter=new h},getInCenter:function(e){e===void 0&&(e=!0);var s=this.vertex1,o=this.vertex2,i=this.vertex3,a,l,f,u,v,m;e?(a=s.x,l=s.y,f=o.x,u=o.y,v=i.x,m=i.y):(a=s.vx,l=s.vy,f=o.vx,u=o.vy,v=i.vx,m=i.vy);var x=r(v,m,f,u),g=r(a,l,v,m),y=r(f,u,a,l),T=x+g+y;return this._inCenter.set((a*x+f*g+v*y)/T,(l*x+u*g+m*y)/T)},contains:function(e,s,o){var i=this.vertex1,a=this.vertex2,l=this.vertex3,f=i.vx,u=i.vy,v=a.vx,m=a.vy,x=l.vx,g=l.vy;if(o){var y=o.a,T=o.b,C=o.c,E=o.d,M=o.e,P=o.f;f=i.vx*y+i.vy*C+M,u=i.vx*T+i.vy*E+P,v=a.vx*y+a.vy*C+M,m=a.vx*T+a.vy*E+P,x=l.vx*y+l.vy*C+M,g=l.vx*T+l.vy*E+P}var A=x-f,R=g-u,F=v-f,w=m-u,I=e-f,U=s-u,N=A*A+R*R,D=A*F+R*w,B=A*I+R*U,L=F*F+w*w,G=F*I+w*U,O=N*L-D*D,X=O===0?0:1/O,z=(L*B-D*G)*X,V=(N*G-D*B)*X;return z>=0&&V>=0&&z+V<1},isCounterClockwise:function(e){var s=this.vertex1,o=this.vertex2,i=this.vertex3,a=(o.vx-s.vx)*(i.vy-s.vy)-(o.vy-s.vy)*(i.vx-s.vx);return e<=0?a>=0:a<0},load:function(e,s,o,i,a){return o=this.vertex1.load(e,s,o,i,a),o=this.vertex2.load(e,s,o,i,a),o=this.vertex3.load(e,s,o,i,a),o},transformCoordinatesLocal:function(e,s,o,i){return this.vertex1.transformCoordinatesLocal(e,s,o,i),this.vertex2.transformCoordinatesLocal(e,s,o,i),this.vertex3.transformCoordinatesLocal(e,s,o,i),this},updateBounds:function(){var e=this.vertex1,s=this.vertex2,o=this.vertex3,i=this.bounds;return i.x=Math.min(e.vx,s.vx,o.vx),i.y=Math.min(e.vy,s.vy,o.vy),i.width=Math.max(e.vx,s.vx,o.vx)-i.x,i.height=Math.max(e.vy,s.vy,o.vy)-i.y,this},isInView:function(e,s,o,i,a,l,f,u,v,m,x){this.update(i,a,l,f,u,v,m,x);var g=this.vertex1,y=this.vertex2,T=this.vertex3;if(g.ta<=0&&y.ta<=0&&T.ta<=0||s&&!this.isCounterClockwise(o))return!1;var C=this.bounds;C.x=Math.min(g.tx,y.tx,T.tx),C.y=Math.min(g.ty,y.ty,T.ty),C.width=Math.max(g.tx,y.tx,T.tx)-C.x,C.height=Math.max(g.ty,y.ty,T.ty)-C.y;var E=e.x+e.width,M=e.y+e.height;return C.width<=0||C.height<=0||e.width<=0||e.height<=0?!1:!(C.right<e.x||C.bottom<e.y||C.x>E||C.y>M)},scrollUV:function(e,s){return this.vertex1.scrollUV(e,s),this.vertex2.scrollUV(e,s),this.vertex3.scrollUV(e,s),this},scaleUV:function(e,s){return this.vertex1.scaleUV(e,s),this.vertex2.scaleUV(e,s),this.vertex3.scaleUV(e,s),this},setColor:function(e){return this.vertex1.color=e,this.vertex2.color=e,this.vertex3.color=e,this},update:function(e,s,o,i,a,l,f,u){return this.vertex1.update(s,o,i,a,l,f,u,e),this.vertex2.update(s,o,i,a,l,f,u,e),this.vertex3.update(s,o,i,a,l,f,u,e),this},translate:function(e,s){s===void 0&&(s=0);var o=this.vertex1,i=this.vertex2,a=this.vertex3;return o.x+=e,o.y+=s,i.x+=e,i.y+=s,a.x+=e,a.y+=s,this},x:{get:function(){return this.getInCenter().x},set:function(e){var s=this.getInCenter();this.translate(e-s.x,0)}},y:{get:function(){return this.getInCenter().y},set:function(e){var s=this.getInCenter();this.translate(0,e-s.y)}},alpha:{get:function(){var e=this.vertex1,s=this.vertex2,o=this.vertex3;return(e.alpha+s.alpha+o.alpha)/3},set:function(e){this.vertex1.alpha=e,this.vertex2.alpha=e,this.vertex3.alpha=e}},depth:{get:function(){var e=this.vertex1,s=this.vertex2,o=this.vertex3;return(e.vz+s.vz+o.vz)/3}},destroy:function(){this.vertex1=null,this.vertex2=null,this.vertex3=null}});p.exports=n}),48803:((p,S,t)=>{var d=t(83997),c=t(95540),h=t(37867),r=t(25836),n=t(39318),e=new r,s=new r,o=new h,i=function(a){var l=c(a,"mesh"),f=c(a,"texture",null),u=c(a,"frame"),v=c(a,"width",1),m=c(a,"height",v),x=c(a,"widthSegments",1),g=c(a,"heightSegments",x),y=c(a,"x",0),T=c(a,"y",0),C=c(a,"z",0),E=c(a,"rotateX",0),M=c(a,"rotateY",0),P=c(a,"rotateZ",0),A=c(a,"zIsUp",!0),R=c(a,"isOrtho",l?l.dirtyCache[11]:!1),F=c(a,"colors",[16777215]),w=c(a,"alphas",[1]),I=c(a,"tile",!1),U=c(a,"flipY",!1),N=c(a,"width",null),D={faces:[],verts:[]};e.set(y,T,C),s.set(E,M,P),o.fromRotationXYTranslation(s,e,A);var B;if(!f&&l)f=l.texture,u||(B=l.frame);else if(l&&typeof f=="string")f=l.scene.sys.textures.get(f);else if(!f)return D;B||(B=f.get(u)),!N&&R&&f&&l&&(v=B.width/l.height,m=B.height/l.height);var L=v/2,G=m/2,O=Math.floor(x),X=Math.floor(g),z=O+1,V=X+1,Y=v/O,W=m/X,H=[],K=[],b,J,$=0,Z=1,q=0,_=1;B&&($=B.u0,Z=B.u1,U?(q=B.v1,_=B.v0):(q=B.v0,_=B.v1));var tt=Z-$,Q=_-q;for(J=0;J<V;J++){var j=J*W-G;for(b=0;b<z;b++){var k=b*Y-L;K.push(k,-j);var et=$+tt*(b/O),nt=q+Q*(J/X);H.push(et,nt)}}Array.isArray(F)||(F=[F]),Array.isArray(w)||(w=[w]);var lt=0,it=0;for(J=0;J<X;J++)for(b=0;b<O;b++){var st=(b+z*J)*2,ft=(b+z*(J+1))*2,ct=(b+1+z*(J+1))*2,rt=(b+1+z*J)*2,dt=F[it],vt=w[lt],pt=new n(K[st],K[st+1],0,H[st],H[st+1],dt,vt).transformMat4(o),yt=new n(K[ft],K[ft+1],0,H[ft],H[ft+1],dt,vt).transformMat4(o),Tt=new n(K[rt],K[rt+1],0,H[rt],H[rt+1],dt,vt).transformMat4(o),St=new n(K[ft],K[ft+1],0,H[ft],H[ft+1],dt,vt).transformMat4(o),Ct=new n(K[ct],K[ct+1],0,H[ct],H[ct+1],dt,vt).transformMat4(o),Et=new n(K[rt],K[rt+1],0,H[rt],H[rt+1],dt,vt).transformMat4(o);I&&(pt.setUVs($,_),yt.setUVs($,q),Tt.setUVs(Z,_),St.setUVs($,q),Ct.setUVs(Z,q),Et.setUVs(Z,_)),it++,it===F.length&&(it=0),lt++,lt===w.length&&(lt=0),D.verts.push(pt,yt,Tt,St,Ct,Et),D.faces.push(new d(pt,yt,Tt),new d(St,Ct,Et))}return l&&(l.faces=l.faces.concat(D.faces),l.vertices=l.vertices.concat(D.verts)),D};p.exports=i}),34684:((p,S,t)=>{var d=t(83997),c=t(37867),h=t(25836),r=t(39318),n=new h,e=new h,s=new c,o=function(i,a,l,f,u,v,m,x,g,y){l===void 0&&(l=1),f===void 0&&(f=0),u===void 0&&(u=0),v===void 0&&(v=0),m===void 0&&(m=0),x===void 0&&(x=0),g===void 0&&(g=0),y===void 0&&(y=!0);var T={faces:[],verts:[]},C=i.materials;n.set(f,u,v),e.set(m,x,g),s.fromRotationXYTranslation(e,n,y);for(var E=0;E<i.models.length;E++)for(var M=i.models[E],P=M.vertices,A=M.textureCoords,R=M.faces,F=0;F<R.length;F++){var w=R[F],I=w.vertices[0],U=w.vertices[1],N=w.vertices[2],D=P[I.vertexIndex],B=P[U.vertexIndex],L=P[N.vertexIndex],G=I.textureCoordsIndex,O=U.textureCoordsIndex,X=N.textureCoordsIndex,z=G===-1?{u:0,v:1}:A[G],V=O===-1?{u:0,v:0}:A[O],Y=X===-1?{u:1,v:1}:A[X],W=16777215;w.material!==""&&C[w.material]&&(W=C[w.material]);var H=new r(D.x*l,D.y*l,D.z*l,z.u,z.v,W).transformMat4(s),K=new r(B.x*l,B.y*l,B.z*l,V.u,V.v,W).transformMat4(s),b=new r(L.x*l,L.y*l,L.z*l,Y.u,Y.v,W).transformMat4(s);T.verts.push(H,K,b),T.faces.push(new d(H,K,b))}return a&&(a.faces=a.faces.concat(T.faces),a.vertices=a.vertices.concat(T.verts)),T};p.exports=o}),92515:((p,S,t)=>{var d=t(83997),c=t(39318),h=function(r,n,e,s,o,i,a,l){if(s===void 0&&(s=!1),i===void 0&&(i=16777215),a===void 0&&(a=1),l===void 0&&(l=!1),r.length!==n.length&&!s){console.warn("GenerateVerts: vertices and uvs count not equal");return}var f={faces:[],vertices:[]},u,v,m,x,g,y,T,C,E,M,P,A=s?3:2,R=Array.isArray(i),F=Array.isArray(a);if(Array.isArray(e)&&e.length>0)for(u=0;u<e.length;u++){var w=e[u],I=e[u]*2,U=e[u]*A;v=r[U],m=r[U+1],x=s?r[U+2]:0,g=n[I],y=n[I+1],l&&(y=1-y),T=R?i[w]:i,C=F?a[w]:a,E=0,M=0,P=0,o&&(E=o[U],M=o[U+1],P=s?o[U+2]:0),f.vertices.push(new c(v,m,x,g,y,T,C,E,M,P))}else{var N=0,D=0;for(u=0;u<r.length;u+=A)v=r[u],m=r[u+1],x=s?r[u+2]:0,g=n[N],y=n[N+1],T=R?i[D]:i,C=F?a[D]:a,E=0,M=0,P=0,o&&(E=o[u],M=o[u+1],P=s?o[u+2]:0),f.vertices.push(new c(v,m,x,g,y,T,C,E,M,P)),N+=2,D++}for(u=0;u<f.vertices.length;u+=3){var B=f.vertices[u],L=f.vertices[u+1],G=f.vertices[u+2];f.faces.push(new d(B,L,G))}return f};p.exports=h}),85048:(p=>{var S=!0,t="untitled",d="",c="";function h(v){var m=v.indexOf("#");return m>-1?v.substring(0,m):v}function r(v){return v.models.length===0&&v.models.push({faces:[],name:t,textureCoords:[],vertexNormals:[],vertices:[]}),d="",v.models[v.models.length-1]}function n(v,m){var x=v.length>=2?v[1]:t;m.models.push({faces:[],name:x,textureCoords:[],vertexNormals:[],vertices:[]}),d=""}function e(v){v.length===2&&(d=v[1])}function s(v,m){var x=v.length,g=x>=2?parseFloat(v[1]):0,y=x>=3?parseFloat(v[2]):0,T=x>=4?parseFloat(v[3]):0;r(m).vertices.push({x:g,y,z:T})}function o(v,m){var x=v.length,g=x>=2?parseFloat(v[1]):0,y=x>=3?parseFloat(v[2]):0,T=x>=4?parseFloat(v[3]):0;isNaN(g)&&(g=0),isNaN(y)&&(y=0),isNaN(T)&&(T=0),S&&(y=1-y),r(m).textureCoords.push({u:g,v:y,w:T})}function i(v,m){var x=v.length,g=x>=2?parseFloat(v[1]):0,y=x>=3?parseFloat(v[2]):0,T=x>=4?parseFloat(v[3]):0;r(m).vertexNormals.push({x:g,y,z:T})}function a(v,m){var x=v.length-1;if(!(x<3)){for(var g={group:d,material:c,vertices:[]},y=0;y<x;y++){var T=v[y+1],C=T.split("/"),E=C.length;if(!(E<1||E>3)){var M=0,P=0,A=0;M=parseInt(C[0],10),E>1&&C[1]!==""&&(P=parseInt(C[1],10)),E>2&&(A=parseInt(C[2],10)),M!==0&&(M<0&&(M=r(m).vertices.length+1+M),P-=1,M-=1,A-=1,g.vertices.push({textureCoordsIndex:P,vertexIndex:M,vertexNormalIndex:A}))}}r(m).faces.push(g)}}function l(v,m){v.length>=2&&m.materialLibraries.push(v[1])}function f(v){v.length>=2&&(c=v[1])}var u=function(v,m){m===void 0&&(m=!0),S=m;var x={materials:{},materialLibraries:[],models:[]};d="",c="";for(var g=v.split(`
|
|
`),y=0;y<g.length;y++){var T=h(g[y]),C=T.replace(/\s\s+/g," ").trim().split(" ");switch(C[0].toLowerCase()){case"o":n(C,x);break;case"g":e(C);break;case"v":s(C,x);break;case"vt":o(C,x);break;case"vn":i(C,x);break;case"f":a(C,x);break;case"mtllib":l(C,x);break;case"usemtl":f(C);break}}return x};p.exports=u}),61485:((p,S,t)=>{var d=t(37589),c=function(h){for(var r={},n=h.split(`
|
|
`),e="",s=0;s<n.length;s++){var o=n[s].trim();if(!(o.indexOf("#")===0||o==="")){var i=o.replace(/\s\s+/g," ").trim().split(" ");switch(i[0].toLowerCase()){case"newmtl":{e=i[1];break}case"kd":{var a=Math.floor(i[1]*255),l=i.length>=2?Math.floor(i[2]*255):a,f=i.length>=3?Math.floor(i[3]*255):a;r[e]=d(a,l,f);break}}}}return r};p.exports=c}),92570:(p=>{var S=function(t,d,c,h){var r,n;if(c===void 0&&h===void 0){var e=t.getInCenter();r=e.x,n=e.y}var s=Math.cos(d),o=Math.sin(d),i=t.vertex1,a=t.vertex2,l=t.vertex3,f=i.x-r,u=i.y-n;i.set(f*s-u*o+r,f*o+u*s+n),f=a.x-r,u=a.y-n,a.set(f*s-u*o+r,f*o+u*s+n),f=l.x-r,u=l.y-n,l.set(f*s-u*o+r,f*o+u*s+n)};p.exports=S}),39318:((p,S,t)=>{var d=t(83419),c=t(70554),h=t(25836),r=new d({Extends:h,initialize:function(e,s,o,i,a,l,f,u,v,m){l===void 0&&(l=16777215),f===void 0&&(f=1),u===void 0&&(u=0),v===void 0&&(v=0),m===void 0&&(m=0),h.call(this,e,s,o),this.vx=0,this.vy=0,this.vz=0,this.nx=u,this.ny=v,this.nz=m,this.u=i,this.v=a,this.color=l,this.alpha=f,this.tx=0,this.ty=0,this.ta=0,this.tu=i,this.tv=a},setUVs:function(n,e){return this.u=n,this.v=e,this.tu=n,this.tv=e,this},scrollUV:function(n,e){return this.tu+=n,this.tv+=e,this},scaleUV:function(n,e){return this.tu=this.u*n,this.tv=this.v*e,this},transformCoordinatesLocal:function(n,e,s,o){var i=this.x,a=this.y,l=this.z,f=n.val,u=i*f[0]+a*f[4]+l*f[8]+f[12],v=i*f[1]+a*f[5]+l*f[9]+f[13],m=i*f[2]+a*f[6]+l*f[10]+f[14],x=i*f[3]+a*f[7]+l*f[11]+f[15];this.vx=u/x*e,this.vy=-(v/x)*s,o<=0?this.vz=m/x:this.vz=-(m/x)},resize:function(n,e,s,o,i,a){return this.x=n,this.y=e,this.vx=this.x*s,this.vy=-this.y*o,this.vz=0,i<.5?this.vx+=s*(.5-i):i>.5&&(this.vx-=s*(i-.5)),a<.5?this.vy+=o*(.5-a):a>.5&&(this.vy-=o*(a-.5)),this},update:function(n,e,s,o,i,a,l,f){var u=this.vx*n+this.vy*s+i,v=this.vx*e+this.vy*o+a;return l&&(u=Math.round(u),v=Math.round(v)),this.tx=u,this.ty=v,this.ta=this.alpha*f,this},load:function(n,e,s,o,i){return n[++s]=this.tx,n[++s]=this.ty,n[++s]=this.tu,n[++s]=this.tv,n[++s]=o,n[++s]=i,e[++s]=c.getTintAppendFloatAlpha(this.color,this.ta),s}});p.exports=r}),73090:((p,S,t)=>{var d={Face:t(83997),GenerateGridVerts:t(48803),GenerateObjVerts:t(34684),GenerateVerts:t(92515),ParseObj:t(85048),ParseObjMaterial:t(61485),RotateFace:t(92570),Vertex:t(39318)};p.exports=d}),96550:(p=>{var S=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))};p.exports=S}),99706:((p,S,t)=>{var d=t(2141),c=function(h){return new d(h.x,h.y)};p.exports=c}),68010:(p=>{var S=function(t,d){return d.setTo(t.x,t.y)};p.exports=S}),27814:(p=>{var S=function(t,d){return t.x===d.x&&t.y===d.y};p.exports=S}),73565:(p=>{var S=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))};p.exports=S}),87555:((p,S,t)=>{var d=t(2141),c=function(h,r){if(r===void 0&&(r=new d),!Array.isArray(h))throw new Error("GetCentroid points argument must be an array");var n=h.length;if(n<1)throw new Error("GetCentroid points array must not be empty");if(n===1)r.x=h[0].x,r.y=h[0].y;else{for(var e=0;e<n;e++)r.x+=h[e].x,r.y+=h[e].y;r.x/=n,r.y/=n}return r};p.exports=c}),28793:(p=>{var S=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)};p.exports=S}),44405:(p=>{var S=function(t){return t.x*t.x+t.y*t.y};p.exports=S}),20873:((p,S,t)=>{var d=t(87841),c=function(h,r){r===void 0&&(r=new d);for(var n=Number.NEGATIVE_INFINITY,e=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,i=0;i<h.length;i++){var a=h[i];a.x>n&&(n=a.x),a.x<e&&(e=a.x),a.y>s&&(s=a.y),a.y<o&&(o=a.y)}return r.x=e,r.y=o,r.width=n-e,r.height=s-o,r};p.exports=c}),26152:((p,S,t)=>{var d=t(2141),c=function(h,r,n,e){return n===void 0&&(n=0),e===void 0&&(e=new d),e.x=h.x+(r.x-h.x)*n,e.y=h.y+(r.y-h.y)*n,e};p.exports=c}),55767:(p=>{var S=function(t){return t.setTo(t.y,t.x)};p.exports=S}),79432:((p,S,t)=>{var d=t(2141),c=function(h,r){return r===void 0&&(r=new d),r.setTo(-h.x,-h.y)};p.exports=c}),2141:((p,S,t)=>{var d=t(83419),c=t(23777),h=new d({initialize:function(n,e){n===void 0&&(n=0),e===void 0&&(e=n),this.type=c.POINT,this.x=n,this.y=e},setTo:function(r,n){return r===void 0&&(r=0),n===void 0&&(n=r),this.x=r,this.y=n,this}});p.exports=h}),72930:((p,S,t)=>{var d=t(2141),c=t(44405),h=function(r,n,e){e===void 0&&(e=new d);var s=r.x*n.x+r.y*n.y,o=s/c(n);return o!==0&&(e.x=o*n.x,e.y=o*n.y),e};p.exports=h}),62880:((p,S,t)=>{var d=t(2141),c=function(h,r,n){n===void 0&&(n=new d);var e=h.x*r.x+h.y*r.y;return e!==0&&(n.x=e*r.x,n.y=e*r.y),n};p.exports=c}),15093:((p,S,t)=>{var d=t(28793),c=function(h,r){if(h.x!==0||h.y!==0){var n=d(h);h.x/=n,h.y/=n}return h.x*=r,h.y*=r,h};p.exports=c}),43711:((p,S,t)=>{var d=t(2141);d.Ceil=t(96550),d.Clone=t(99706),d.CopyFrom=t(68010),d.Equals=t(27814),d.Floor=t(73565),d.GetCentroid=t(87555),d.GetMagnitude=t(28793),d.GetMagnitudeSq=t(44405),d.GetRectangleFromPoints=t(20873),d.Interpolate=t(26152),d.Invert=t(55767),d.Negative=t(79432),d.Project=t(72930),d.ProjectUnit=t(62880),d.SetMagnitude=t(15093),p.exports=d}),12306:((p,S,t)=>{var d=t(25717),c=function(h){return new d(h.points)};p.exports=c}),63814:(p=>{var S=function(t,d,c){for(var h=!1,r=-1,n=t.points.length-1;++r<t.points.length;n=r){var e=t.points[r].x,s=t.points[r].y,o=t.points[n].x,i=t.points[n].y;(s<=c&&c<i||i<=c&&c<s)&&d<(o-e)*(c-s)/(i-s)+e&&(h=!h)}return h};p.exports=S}),99338:((p,S,t)=>{var d=t(63814),c=function(h,r){return d(h,r.x,r.y)};p.exports=c}),94811:(p=>{function S(D,B,L){L=L||2;var G=B&&B.length,O=G?B[0]*L:D.length,X=t(D,0,O,L,!0),z=[];if(!X||X.next===X.prev)return z;var V,Y,W,H,K,b,J;if(G&&(X=s(D,B,X,L)),D.length>80*L){V=W=D[0],Y=H=D[1];for(var $=L;$<O;$+=L)K=D[$],b=D[$+1],K<V&&(V=K),b<Y&&(Y=b),K>W&&(W=K),b>H&&(H=b);J=Math.max(W-V,H-Y),J=J!==0?32767/J:0}return c(X,z,L,V,Y,J,0),z}function t(D,B,L,G,O){var X,z;if(O===N(D,B,L,G)>0)for(X=B;X<L;X+=G)z=w(X,D[X],D[X+1],z);else for(X=L-G;X>=B;X-=G)z=w(X,D[X],D[X+1],z);return z&&T(z,z.next)&&(I(z),z=z.next),z}function d(D,B){if(!D)return D;B||(B=D);var L=D,G;do if(G=!1,!L.steiner&&(T(L,L.next)||y(L.prev,L,L.next)===0)){if(I(L),L=B=L.prev,L===L.next)break;G=!0}else L=L.next;while(G||L!==B);return B}function c(D,B,L,G,O,X,z){if(D){!z&&X&&f(D,G,O,X);for(var V=D,Y,W;D.prev!==D.next;){if(Y=D.prev,W=D.next,X?r(D,G,O,X):h(D)){B.push(Y.i/L|0),B.push(D.i/L|0),B.push(W.i/L|0),I(D),D=W.next,V=W.next;continue}if(D=W,D===V){z?z===1?(D=n(d(D),B,L),c(D,B,L,G,O,X,2)):z===2&&e(D,B,L,G,O,X):c(d(D),B,L,G,O,X,1);break}}}}function h(D){var B=D.prev,L=D,G=D.next;if(y(B,L,G)>=0)return!1;for(var O=B.x,X=L.x,z=G.x,V=B.y,Y=L.y,W=G.y,H=O<X?O<z?O:z:X<z?X:z,K=V<Y?V<W?V:W:Y<W?Y:W,b=O>X?O>z?O:z:X>z?X:z,J=V>Y?V>W?V:W:Y>W?Y:W,$=G.next;$!==B;){if($.x>=H&&$.x<=b&&$.y>=K&&$.y<=J&&x(O,V,X,Y,z,W,$.x,$.y)&&y($.prev,$,$.next)>=0)return!1;$=$.next}return!0}function r(D,B,L,G){var O=D.prev,X=D,z=D.next;if(y(O,X,z)>=0)return!1;for(var V=O.x,Y=X.x,W=z.x,H=O.y,K=X.y,b=z.y,J=V<Y?V<W?V:W:Y<W?Y:W,$=H<K?H<b?H:b:K<b?K:b,Z=V>Y?V>W?V:W:Y>W?Y:W,q=H>K?H>b?H:b:K>b?K:b,_=v(J,$,B,L,G),tt=v(Z,q,B,L,G),Q=D.prevZ,j=D.nextZ;Q&&Q.z>=_&&j&&j.z<=tt;){if(Q.x>=J&&Q.x<=Z&&Q.y>=$&&Q.y<=q&&Q!==O&&Q!==z&&x(V,H,Y,K,W,b,Q.x,Q.y)&&y(Q.prev,Q,Q.next)>=0||(Q=Q.prevZ,j.x>=J&&j.x<=Z&&j.y>=$&&j.y<=q&&j!==O&&j!==z&&x(V,H,Y,K,W,b,j.x,j.y)&&y(j.prev,j,j.next)>=0))return!1;j=j.nextZ}for(;Q&&Q.z>=_;){if(Q.x>=J&&Q.x<=Z&&Q.y>=$&&Q.y<=q&&Q!==O&&Q!==z&&x(V,H,Y,K,W,b,Q.x,Q.y)&&y(Q.prev,Q,Q.next)>=0)return!1;Q=Q.prevZ}for(;j&&j.z<=tt;){if(j.x>=J&&j.x<=Z&&j.y>=$&&j.y<=q&&j!==O&&j!==z&&x(V,H,Y,K,W,b,j.x,j.y)&&y(j.prev,j,j.next)>=0)return!1;j=j.nextZ}return!0}function n(D,B,L){var G=D;do{var O=G.prev,X=G.next.next;!T(O,X)&&C(O,G,G.next,X)&&A(O,X)&&A(X,O)&&(B.push(O.i/L|0),B.push(G.i/L|0),B.push(X.i/L|0),I(G),I(G.next),G=D=X),G=G.next}while(G!==D);return d(G)}function e(D,B,L,G,O,X){var z=D;do{for(var V=z.next.next;V!==z.prev;){if(z.i!==V.i&&g(z,V)){var Y=F(z,V);z=d(z,z.next),Y=d(Y,Y.next),c(z,B,L,G,O,X,0),c(Y,B,L,G,O,X,0);return}V=V.next}z=z.next}while(z!==D)}function s(D,B,L,G){var O=[],X,z,V,Y,W;for(X=0,z=B.length;X<z;X++)V=B[X]*G,Y=X<z-1?B[X+1]*G:D.length,W=t(D,V,Y,G,!1),W===W.next&&(W.steiner=!0),O.push(m(W));for(O.sort(o),X=0;X<O.length;X++)L=i(O[X],L);return L}function o(D,B){return D.x-B.x}function i(D,B){var L=a(D,B);if(!L)return B;var G=F(L,D);return d(G,G.next),d(L,L.next)}function a(D,B){var L=B,G=D.x,O=D.y,X=-1/0,z;do{if(O<=L.y&&O>=L.next.y&&L.next.y!==L.y){var V=L.x+(O-L.y)*(L.next.x-L.x)/(L.next.y-L.y);if(V<=G&&V>X&&(X=V,z=L.x<L.next.x?L:L.next,V===G))return z}L=L.next}while(L!==B);if(!z)return null;var Y=z,W=z.x,H=z.y,K=1/0,b;L=z;do G>=L.x&&L.x>=W&&G!==L.x&&x(O<H?G:X,O,W,H,O<H?X:G,O,L.x,L.y)&&(b=Math.abs(O-L.y)/(G-L.x),A(L,D)&&(b<K||b===K&&(L.x>z.x||L.x===z.x&&l(z,L)))&&(z=L,K=b)),L=L.next;while(L!==Y);return z}function l(D,B){return y(D.prev,D,B.prev)<0&&y(B.next,D,D.next)<0}function f(D,B,L,G){var O=D;do O.z===0&&(O.z=v(O.x,O.y,B,L,G)),O.prevZ=O.prev,O.nextZ=O.next,O=O.next;while(O!==D);O.prevZ.nextZ=null,O.prevZ=null,u(O)}function u(D){var B,L,G,O,X,z,V,Y,W=1;do{for(L=D,D=null,X=null,z=0;L;){for(z++,G=L,V=0,B=0;B<W&&(V++,G=G.nextZ,!!G);B++);for(Y=W;V>0||Y>0&&G;)V!==0&&(Y===0||!G||L.z<=G.z)?(O=L,L=L.nextZ,V--):(O=G,G=G.nextZ,Y--),X?X.nextZ=O:D=O,O.prevZ=X,X=O;L=G}X.nextZ=null,W*=2}while(z>1);return D}function v(D,B,L,G,O){return D=(D-L)*O|0,B=(B-G)*O|0,D=(D|D<<8)&16711935,D=(D|D<<4)&252645135,D=(D|D<<2)&858993459,D=(D|D<<1)&1431655765,B=(B|B<<8)&16711935,B=(B|B<<4)&252645135,B=(B|B<<2)&858993459,B=(B|B<<1)&1431655765,D|B<<1}function m(D){var B=D,L=D;do(B.x<L.x||B.x===L.x&&B.y<L.y)&&(L=B),B=B.next;while(B!==D);return L}function x(D,B,L,G,O,X,z,V){return(O-z)*(B-V)>=(D-z)*(X-V)&&(D-z)*(G-V)>=(L-z)*(B-V)&&(L-z)*(X-V)>=(O-z)*(G-V)}function g(D,B){return D.next.i!==B.i&&D.prev.i!==B.i&&!P(D,B)&&(A(D,B)&&A(B,D)&&R(D,B)&&(y(D.prev,D,B.prev)||y(D,B.prev,B))||T(D,B)&&y(D.prev,D,D.next)>0&&y(B.prev,B,B.next)>0)}function y(D,B,L){return(B.y-D.y)*(L.x-B.x)-(B.x-D.x)*(L.y-B.y)}function T(D,B){return D.x===B.x&&D.y===B.y}function C(D,B,L,G){var O=M(y(D,B,L)),X=M(y(D,B,G)),z=M(y(L,G,D)),V=M(y(L,G,B));return!!(O!==X&&z!==V||O===0&&E(D,L,B)||X===0&&E(D,G,B)||z===0&&E(L,D,G)||V===0&&E(L,B,G))}function E(D,B,L){return B.x<=Math.max(D.x,L.x)&&B.x>=Math.min(D.x,L.x)&&B.y<=Math.max(D.y,L.y)&&B.y>=Math.min(D.y,L.y)}function M(D){return D>0?1:D<0?-1:0}function P(D,B){var L=D;do{if(L.i!==D.i&&L.next.i!==D.i&&L.i!==B.i&&L.next.i!==B.i&&C(L,L.next,D,B))return!0;L=L.next}while(L!==D);return!1}function A(D,B){return y(D.prev,D,D.next)<0?y(D,B,D.next)>=0&&y(D,D.prev,B)>=0:y(D,B,D.prev)<0||y(D,D.next,B)<0}function R(D,B){var L=D,G=!1,O=(D.x+B.x)/2,X=(D.y+B.y)/2;do L.y>X!=L.next.y>X&&L.next.y!==L.y&&O<(L.next.x-L.x)*(X-L.y)/(L.next.y-L.y)+L.x&&(G=!G),L=L.next;while(L!==D);return G}function F(D,B){var L=new U(D.i,D.x,D.y),G=new U(B.i,B.x,B.y),O=D.next,X=B.prev;return D.next=B,B.prev=D,L.next=O,O.prev=L,G.next=L,L.prev=G,X.next=G,G.prev=X,G}function w(D,B,L,G){var O=new U(D,B,L);return G?(O.next=G.next,O.prev=G,G.next.prev=O,G.next=O):(O.prev=O,O.next=O),O}function I(D){D.next.prev=D.prev,D.prev.next=D.next,D.prevZ&&(D.prevZ.nextZ=D.nextZ),D.nextZ&&(D.nextZ.prevZ=D.prevZ)}function U(D,B,L){this.i=D,this.x=B,this.y=L,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}S.deviation=function(D,B,L,G){var O=B&&B.length,X=O?B[0]*L:D.length,z=Math.abs(N(D,0,X,L));if(O)for(var V=0,Y=B.length;V<Y;V++){var W=B[V]*L,H=V<Y-1?B[V+1]*L:D.length;z-=Math.abs(N(D,W,H,L))}var K=0;for(V=0;V<G.length;V+=3){var b=G[V]*L,J=G[V+1]*L,$=G[V+2]*L;K+=Math.abs((D[b]-D[$])*(D[J+1]-D[b+1])-(D[b]-D[J])*(D[$+1]-D[b+1]))}return z===0&&K===0?0:Math.abs((K-z)/z)};function N(D,B,L,G){for(var O=0,X=B,z=L-G;X<L;X+=G)O+=(D[z]-D[X])*(D[X+1]+D[z+1]),z=X;return O}S.flatten=function(D){for(var B=D[0][0].length,L={vertices:[],holes:[],dimensions:B},G=0,O=0;O<D.length;O++){for(var X=0;X<D[O].length;X++)for(var z=0;z<B;z++)L.vertices.push(D[O][X][z]);O>0&&(G+=D[O-1].length,L.holes.push(G))}return L},p.exports=S}),13829:((p,S,t)=>{var d=t(87841),c=function(h,r){r===void 0&&(r=new d);for(var n=1/0,e=1/0,s=-n,o=-e,i,a=0;a<h.points.length;a++)i=h.points[a],n=Math.min(n,i.x),e=Math.min(e,i.y),s=Math.max(s,i.x),o=Math.max(o,i.y);return r.x=n,r.y=e,r.width=s-n,r.height=o-e,r};p.exports=c}),26173:(p=>{var S=function(t,d){d===void 0&&(d=[]);for(var c=0;c<t.points.length;c++)d.push(t.points[c].x),d.push(t.points[c].y);return d};p.exports=S}),9564:((p,S,t)=>{var d=t(35001),c=t(23031),h=t(30052),r=function(n,e,s,o){o===void 0&&(o=[]);var i=n.points,a=h(n);!e&&s>0&&(e=a/s);for(var l=0;l<e;l++)for(var f=a*(l/e),u=0,v=0;v<i.length;v++){var m=i[v],x=i[(v+1)%i.length],g=new c(m.x,m.y,x.x,x.y),y=d(g);if(f<u||f>u+y){u+=y;continue}var T=g.getPoint((f-u)/y);o.push(T);break}return o};p.exports=r}),30052:((p,S,t)=>{var d=t(35001),c=t(23031),h=function(r){for(var n=r.points,e=0,s=0;s<n.length;s++){var o=n[s],i=n[(s+1)%n.length],a=new c(o.x,o.y,i.x,i.y);e+=d(a)}return e};p.exports=h}),25717:((p,S,t)=>{var d=t(83419),c=t(63814),h=t(9564),r=t(23777),n=new d({initialize:function(s){this.type=r.POLYGON,this.area=0,this.points=[],s&&this.setTo(s)},contains:function(e,s){return c(this,e,s)},setTo:function(e){if(this.area=0,this.points=[],typeof e=="string"&&(e=e.split(" ")),!Array.isArray(e))return this;for(var s,o=0;o<e.length;o++)s={x:0,y:0},typeof e[o]=="number"||typeof e[o]=="string"?(s.x=parseFloat(e[o]),s.y=parseFloat(e[o+1]),o++):Array.isArray(e[o])?(s.x=e[o][0],s.y=e[o][1]):(s.x=e[o].x,s.y=e[o].y),this.points.push(s);return this.calculateArea(),this},calculateArea:function(){if(this.points.length<3)return this.area=0,this.area;for(var e=0,s,o,i=0;i<this.points.length-1;i++)s=this.points[i],o=this.points[i+1],e+=(o.x-s.x)*(s.y+o.y);return s=this.points[0],o=this.points[this.points.length-1],e+=(s.x-o.x)*(o.y+s.y),this.area=-e*.5,this.area},getPoints:function(e,s,o){return h(this,e,s,o)}});p.exports=n}),8133:(p=>{var S=function(t){return t.points.reverse(),t};p.exports=S}),29524:(p=>{function S(n,e){var s=n.x-e.x,o=n.y-e.y;return s*s+o*o}function t(n,e,s){var o=e.x,i=e.y,a=s.x-o,l=s.y-i;if(a!==0||l!==0){var f=((n.x-o)*a+(n.y-i)*l)/(a*a+l*l);f>1?(o=s.x,i=s.y):f>0&&(o+=a*f,i+=l*f)}return a=n.x-o,l=n.y-i,a*a+l*l}function d(n,e){for(var s=n[0],o=[s],i,a=1,l=n.length;a<l;a++)i=n[a],S(i,s)>e&&(o.push(i),s=i);return s!==i&&o.push(i),o}function c(n,e,s,o,i){for(var a=o,l,f=e+1;f<s;f++){var u=t(n[f],n[e],n[s]);u>a&&(l=f,a=u)}a>o&&(l-e>1&&c(n,e,l,o,i),i.push(n[l]),s-l>1&&c(n,l,s,o,i))}function h(n,e){var s=n.length-1,o=[n[0]];return c(n,0,s,e,o),o.push(n[s]),o}var r=function(n,e,s){e===void 0&&(e=1),s===void 0&&(s=!1);var o=n.points;if(o.length>2){var i=e*e;s||(o=d(o,i)),n.setTo(h(o,i))}return n};p.exports=r}),5469:(p=>{var S=function(d,c){return d[0]=c[0],d[1]=c[1],d},t=function(d){var c,h=[],r=d.points;for(c=0;c<r.length;c++)h.push([r[c].x,r[c].y]);var n=[];for(h.length>0&&n.push(S([0,0],h[0])),c=0;c<h.length-1;c++){var e=h[c],s=h[c+1],o=e[0],i=e[1],a=s[0],l=s[1];n.push([.85*o+.15*a,.85*i+.15*l]),n.push([.15*o+.85*a,.15*i+.85*l])}return h.length>1&&n.push(S([0,0],h[h.length-1])),d.setTo(n)};p.exports=t}),24709:(p=>{var S=function(t,d,c){for(var h=t.points,r=0;r<h.length;r++)h[r].x+=d,h[r].y+=c;return t};p.exports=S}),58423:((p,S,t)=>{var d=t(25717);d.Clone=t(12306),d.Contains=t(63814),d.ContainsPoint=t(99338),d.Earcut=t(94811),d.GetAABB=t(13829),d.GetNumberArray=t(26173),d.GetPoints=t(9564),d.Perimeter=t(30052),d.Reverse=t(8133),d.Simplify=t(29524),d.Smooth=t(5469),d.Translate=t(24709),p.exports=d}),62224:(p=>{var S=function(t){return t.width*t.height};p.exports=S}),98615:(p=>{var S=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t};p.exports=S}),31688:(p=>{var S=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t.width=Math.ceil(t.width),t.height=Math.ceil(t.height),t};p.exports=S}),67502:(p=>{var S=function(t,d,c){return t.x=d-t.width/2,t.y=c-t.height/2,t};p.exports=S}),65085:((p,S,t)=>{var d=t(87841),c=function(h){return new d(h.x,h.y,h.width,h.height)};p.exports=c}),37303:(p=>{var S=function(t,d,c){return t.width<=0||t.height<=0?!1:t.x<=d&&t.x+t.width>=d&&t.y<=c&&t.y+t.height>=c};p.exports=S}),96553:((p,S,t)=>{var d=t(37303),c=function(h,r){return d(h,r.x,r.y)};p.exports=c}),70273:(p=>{var S=function(t,d){return d.width*d.height>t.width*t.height?!1:d.x>t.x&&d.x<t.right&&d.right>t.x&&d.right<t.right&&d.y>t.y&&d.y<t.bottom&&d.bottom>t.y&&d.bottom<t.bottom};p.exports=S}),43459:(p=>{var S=function(t,d){return d.setTo(t.x,t.y,t.width,t.height)};p.exports=S}),77493:(p=>{var S=function(t,d){return d===void 0&&(d=[]),d.push({x:t.x,y:t.y}),d.push({x:t.right,y:t.y}),d.push({x:t.right,y:t.bottom}),d.push({x:t.x,y:t.bottom}),d};p.exports=S}),9219:(p=>{var S=function(t,d){return t.x===d.x&&t.y===d.y&&t.width===d.width&&t.height===d.height};p.exports=S}),53751:((p,S,t)=>{var d=t(8249),c=function(h,r){var n=d(h);return n<d(r)?h.setSize(r.height*n,r.height):h.setSize(r.width,r.width/n),h.setPosition(r.centerX-h.width/2,r.centerY-h.height/2)};p.exports=c}),16088:((p,S,t)=>{var d=t(8249),c=function(h,r){var n=d(h);return n>d(r)?h.setSize(r.height*n,r.height):h.setSize(r.width,r.width/n),h.setPosition(r.centerX-h.width/2,r.centerY-h.height/2)};p.exports=c}),80774:(p=>{var S=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t};p.exports=S}),83859:(p=>{var S=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t};p.exports=S}),19217:((p,S,t)=>{var d=t(87841),c=t(36383),h=function(r,n){if(n===void 0&&(n=new d),r.length===0)return n;for(var e=Number.MAX_VALUE,s=Number.MAX_VALUE,o=c.MIN_SAFE_INTEGER,i=c.MIN_SAFE_INTEGER,a,l,f,u=0;u<r.length;u++)a=r[u],Array.isArray(a)?(l=a[0],f=a[1]):(l=a.x,f=a.y),e=Math.min(e,l),s=Math.min(s,f),o=Math.max(o,l),i=Math.max(i,f);return n.x=e,n.y=s,n.width=o-e,n.height=i-s,n};p.exports=h}),9477:((p,S,t)=>{var d=t(87841),c=function(h,r,n,e,s){return s===void 0&&(s=new d),s.setTo(Math.min(h,n),Math.min(r,e),Math.abs(h-n),Math.abs(r-e))};p.exports=c}),8249:(p=>{var S=function(t){return t.height===0?NaN:t.width/t.height};p.exports=S}),27165:((p,S,t)=>{var d=t(2141),c=function(h,r){return r===void 0&&(r=new d),r.x=h.centerX,r.y=h.centerY,r};p.exports=c}),20812:((p,S,t)=>{var d=t(13019),c=t(2141),h=function(r,n,e){if(e===void 0&&(e=new c),n<=0||n>=1)return e.x=r.x,e.y=r.y,e;var s=d(r)*n;return n>.5?(s-=r.width+r.height,s<=r.width?(e.x=r.right-s,e.y=r.bottom):(e.x=r.x,e.y=r.bottom-(s-r.width))):s<=r.width?(e.x=r.x+s,e.y=r.y):(e.x=r.right,e.y=r.y+(s-r.width)),e};p.exports=h}),34819:((p,S,t)=>{var d=t(20812),c=t(13019),h=function(r,n,e,s){s===void 0&&(s=[]),!n&&e>0&&(n=c(r)/e);for(var o=0;o<n;o++){var i=o/n;s.push(d(r,i))}return s};p.exports=h}),51313:((p,S,t)=>{var d=t(2141),c=function(h,r){return r===void 0&&(r=new d),r.x=h.width,r.y=h.height,r};p.exports=c}),86091:((p,S,t)=>{var d=t(67502),c=function(h,r,n){var e=h.centerX,s=h.centerY;return h.setSize(h.width+r*2,h.height+n*2),d(h,e,s)};p.exports=c}),53951:((p,S,t)=>{var d=t(87841),c=t(59996),h=function(r,n,e){return e===void 0&&(e=new d),c(r,n)?(e.x=Math.max(r.x,n.x),e.y=Math.max(r.y,n.y),e.width=Math.min(r.right,n.right)-e.x,e.height=Math.min(r.bottom,n.bottom)-e.y):e.setEmpty(),e};p.exports=h}),14649:((p,S,t)=>{var d=t(13019),c=t(2141),h=function(r,n,e,s){if(s===void 0&&(s=[]),!n&&!e)return s;n?e=Math.round(d(r)/n):n=d(r)/e;for(var o=r.x,i=r.y,a=0,l=0;l<e;l++)switch(s.push(new c(o,i)),a){case 0:o+=n,o>=r.right&&(a=1,i+=o-r.right,o=r.right);break;case 1:i+=n,i>=r.bottom&&(a=2,o-=i-r.bottom,i=r.bottom);break;case 2:o-=n,o<=r.left&&(a=3,i-=r.left-o,o=r.left);break;case 3:i-=n,i<=r.top&&(a=0,i=r.top);break}return s};p.exports=h}),33595:(p=>{var S=function(t,d){for(var c=t.x,h=t.right,r=t.y,n=t.bottom,e=0;e<d.length;e++)c=Math.min(c,d[e].x),h=Math.max(h,d[e].x),r=Math.min(r,d[e].y),n=Math.max(n,d[e].y);return t.x=c,t.y=r,t.width=h-c,t.height=n-r,t};p.exports=S}),20074:(p=>{var S=function(t,d){var c=Math.min(t.x,d.x),h=Math.max(t.right,d.right);t.x=c,t.width=h-c;var r=Math.min(t.y,d.y),n=Math.max(t.bottom,d.bottom);return t.y=r,t.height=n-r,t};p.exports=S}),92171:(p=>{var S=function(t,d,c){var h=Math.min(t.x,d),r=Math.max(t.right,d);t.x=h,t.width=r-h;var n=Math.min(t.y,c),e=Math.max(t.bottom,c);return t.y=n,t.height=e-n,t};p.exports=S}),42981:(p=>{var S=function(t,d,c){return t.x+=d,t.y+=c,t};p.exports=S}),46907:(p=>{var S=function(t,d){return t.x+=d.x,t.y+=d.y,t};p.exports=S}),60170:(p=>{var S=function(t,d){return t.x<d.right&&t.right>d.x&&t.y<d.bottom&&t.bottom>d.y};p.exports=S}),13019:(p=>{var S=function(t){return 2*(t.width+t.height)};p.exports=S}),85133:((p,S,t)=>{var d=t(2141),c=t(39506),h=function(r,n,e){e===void 0&&(e=new d),n=c(n);var s=Math.sin(n),o=Math.cos(n),i=o>0?r.width/2:r.width/-2,a=s>0?r.height/2:r.height/-2;return Math.abs(i*s)<Math.abs(a*o)?a=i*s/o:i=a*o/s,e.x=i+r.centerX,e.y=a+r.centerY,e};p.exports=h}),26597:((p,S,t)=>{var d=t(2141),c=function(h,r){return r===void 0&&(r=new d),r.x=h.x+Math.random()*h.width,r.y=h.y+Math.random()*h.height,r};p.exports=c}),86470:((p,S,t)=>{var d=t(30976),c=t(70273),h=t(2141),r=function(n,e,s){if(s===void 0&&(s=new h),c(n,e))switch(d(0,3)){case 0:s.x=n.x+Math.random()*(e.right-n.x),s.y=n.y+Math.random()*(e.top-n.y);break;case 1:s.x=e.x+Math.random()*(n.right-e.x),s.y=e.bottom+Math.random()*(n.bottom-e.bottom);break;case 2:s.x=n.x+Math.random()*(e.x-n.x),s.y=e.y+Math.random()*(n.bottom-e.y);break;case 3:s.x=e.right+Math.random()*(n.right-e.right),s.y=n.y+Math.random()*(e.bottom-n.y);break}return s};p.exports=r}),87841:((p,S,t)=>{var d=t(83419),c=t(37303),h=t(20812),r=t(34819),n=t(23777),e=t(23031),s=t(26597),o=new d({initialize:function(a,l,f,u){a===void 0&&(a=0),l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=0),this.type=n.RECTANGLE,this.x=a,this.y=l,this.width=f,this.height=u},contains:function(i,a){return c(this,i,a)},getPoint:function(i,a){return h(this,i,a)},getPoints:function(i,a,l){return r(this,i,a,l)},getRandomPoint:function(i){return s(this,i)},setTo:function(i,a,l,f){return this.x=i,this.y=a,this.width=l,this.height=f,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(i,a){return a===void 0&&(a=i),this.x=i,this.y=a,this},setSize:function(i,a){return a===void 0&&(a=i),this.width=i,this.height=a,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(i){return i===void 0&&(i=new e),i.setTo(this.x,this.y,this.right,this.y),i},getLineB:function(i){return i===void 0&&(i=new e),i.setTo(this.right,this.y,this.right,this.bottom),i},getLineC:function(i){return i===void 0&&(i=new e),i.setTo(this.right,this.bottom,this.x,this.bottom),i},getLineD:function(i){return i===void 0&&(i=new e),i.setTo(this.x,this.bottom,this.x,this.y),i},left:{get:function(){return this.x},set:function(i){i>=this.right?this.width=0:this.width=this.right-i,this.x=i}},right:{get:function(){return this.x+this.width},set:function(i){i<=this.x?this.width=0:this.width=i-this.x}},top:{get:function(){return this.y},set:function(i){i>=this.bottom?this.height=0:this.height=this.bottom-i,this.y=i}},bottom:{get:function(){return this.y+this.height},set:function(i){i<=this.y?this.height=0:this.height=i-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(i){this.x=i-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(i){this.y=i-this.height/2}}});p.exports=o}),94845:(p=>{var S=function(t,d){return t.width===d.width&&t.height===d.height};p.exports=S}),31730:(p=>{var S=function(t,d,c){return c===void 0&&(c=d),t.width*=d,t.height*=c,t};p.exports=S}),36899:((p,S,t)=>{var d=t(87841),c=function(h,r,n){n===void 0&&(n=new d);var e=Math.min(h.x,r.x),s=Math.min(h.y,r.y),o=Math.max(h.right,r.right)-e,i=Math.max(h.bottom,r.bottom)-s;return n.setTo(e,s,o,i)};p.exports=c}),93232:((p,S,t)=>{var d=t(87841);d.Area=t(62224),d.Ceil=t(98615),d.CeilAll=t(31688),d.CenterOn=t(67502),d.Clone=t(65085),d.Contains=t(37303),d.ContainsPoint=t(96553),d.ContainsRect=t(70273),d.CopyFrom=t(43459),d.Decompose=t(77493),d.Equals=t(9219),d.FitInside=t(53751),d.FitOutside=t(16088),d.Floor=t(80774),d.FloorAll=t(83859),d.FromPoints=t(19217),d.FromXY=t(9477),d.GetAspectRatio=t(8249),d.GetCenter=t(27165),d.GetPoint=t(20812),d.GetPoints=t(34819),d.GetSize=t(51313),d.Inflate=t(86091),d.Intersection=t(53951),d.MarchingAnts=t(14649),d.MergePoints=t(33595),d.MergeRect=t(20074),d.MergeXY=t(92171),d.Offset=t(42981),d.OffsetPoint=t(46907),d.Overlaps=t(60170),d.Perimeter=t(13019),d.PerimeterPoint=t(85133),d.Random=t(26597),d.RandomOutside=t(86470),d.SameDimensions=t(94845),d.Scale=t(31730),d.Union=t(36899),p.exports=d}),41658:(p=>{var S=function(t){var d=t.x1,c=t.y1,h=t.x2,r=t.y2,n=t.x3,e=t.y3;return Math.abs(((n-d)*(r-c)-(h-d)*(e-c))/2)};p.exports=S}),39208:((p,S,t)=>{var d=t(16483),c=function(h,r,n){var e=n*(Math.sqrt(3)/2),s=h,o=r,i=h+n/2,a=r+e,l=h-n/2,f=r+e;return new d(s,o,i,a,l,f)};p.exports=c}),39545:((p,S,t)=>{var d=t(94811),c=t(16483),h=function(r,n,e,s,o){n===void 0&&(n=null),e===void 0&&(e=1),s===void 0&&(s=1),o===void 0&&(o=[]);for(var i=d(r,n),a,l,f,u,v,m,x,g,y,T=0;T<i.length;T+=3)a=i[T],l=i[T+1],f=i[T+2],u=r[a*2]*e,v=r[a*2+1]*s,m=r[l*2]*e,x=r[l*2+1]*s,g=r[f*2]*e,y=r[f*2+1]*s,o.push(new c(u,v,m,x,g,y));return o};p.exports=h}),90301:((p,S,t)=>{var d=t(16483),c=function(h,r,n,e){e===void 0&&(e=n);var s=h,o=r,i=h,a=r-e,l=h+n,f=r;return new d(s,o,i,a,l,f)};p.exports=c}),23707:((p,S,t)=>{var d=t(97523),c=t(13584),h=function(r,n,e,s){s===void 0&&(s=d);var o=s(r),i=n-o.x,a=e-o.y;return c(r,i,a)};p.exports=h}),97523:((p,S,t)=>{var d=t(2141),c=function(h,r){return r===void 0&&(r=new d),r.x=(h.x1+h.x2+h.x3)/3,r.y=(h.y1+h.y2+h.y3)/3,r};p.exports=c}),24951:((p,S,t)=>{var d=t(26099);function c(r,n,e,s){return r*s-n*e}var h=function(r,n){n===void 0&&(n=new d);var e=r.x3,s=r.y3,o=r.x1-e,i=r.y1-s,a=r.x2-e,l=r.y2-s,f=2*c(o,i,a,l),u=c(i,o*o+i*i,l,a*a+l*l),v=c(o,o*o+i*i,a,a*a+l*l);return n.x=e-u/f,n.y=s+v/f,n};p.exports=h}),85614:((p,S,t)=>{var d=t(96503),c=function(h,r){r===void 0&&(r=new d);var n=h.x1,e=h.y1,s=h.x2,o=h.y2,i=h.x3,a=h.y3,l=s-n,f=o-e,u=i-n,v=a-e,m=l*(n+s)+f*(e+o),x=u*(n+i)+v*(e+a),g=2*(l*(a-o)-f*(i-s)),y,T;if(Math.abs(g)<1e-6){var C=Math.min(n,s,i),E=Math.min(e,o,a);y=(Math.max(n,s,i)-C)*.5,T=(Math.max(e,o,a)-E)*.5,r.x=C+y,r.y=E+T,r.radius=Math.sqrt(y*y+T*T)}else r.x=(v*m-f*x)/g,r.y=(l*x-u*m)/g,y=r.x-n,T=r.y-e,r.radius=Math.sqrt(y*y+T*T);return r};p.exports=c}),74422:((p,S,t)=>{var d=t(16483),c=function(h){return new d(h.x1,h.y1,h.x2,h.y2,h.x3,h.y3)};p.exports=c}),10690:(p=>{var S=function(t,d,c){var h=t.x3-t.x1,r=t.y3-t.y1,n=t.x2-t.x1,e=t.y2-t.y1,s=d-t.x1,o=c-t.y1,i=h*h+r*r,a=h*n+r*e,l=h*s+r*o,f=n*n+e*e,u=n*s+e*o,v=i*f-a*a,m=v===0?0:1/v,x=(f*l-a*u)*m,g=(i*u-a*l)*m;return x>=0&&g>=0&&x+g<1};p.exports=S}),48653:(p=>{var S=function(t,d,c,h){c===void 0&&(c=!1),h===void 0&&(h=[]);for(var r=t.x3-t.x1,n=t.y3-t.y1,e=t.x2-t.x1,s=t.y2-t.y1,o=r*r+n*n,i=r*e+n*s,a=e*e+s*s,l=o*a-i*i,f=l===0?0:1/l,u,v,m,x,g,y,T=t.x1,C=t.y1,E=0;E<d.length&&(m=d[E].x-T,x=d[E].y-C,g=r*m+n*x,y=e*m+s*x,u=(a*g-i*y)*f,v=(o*y-i*g)*f,!(u>=0&&v>=0&&u+v<1&&(h.push({x:d[E].x,y:d[E].y}),c)));E++);return h};p.exports=S}),96006:((p,S,t)=>{var d=t(10690),c=function(h,r){return d(h,r.x,r.y)};p.exports=c}),71326:(p=>{var S=function(t,d){return d.setTo(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)};p.exports=S}),71694:(p=>{var S=function(t,d){return d===void 0&&(d=[]),d.push({x:t.x1,y:t.y1}),d.push({x:t.x2,y:t.y2}),d.push({x:t.x3,y:t.y3}),d};p.exports=S}),33522:(p=>{var S=function(t,d){return t.x1===d.x1&&t.y1===d.y1&&t.x2===d.x2&&t.y2===d.y2&&t.x3===d.x3&&t.y3===d.y3};p.exports=S}),20437:((p,S,t)=>{var d=t(2141),c=t(35001),h=function(r,n,e){e===void 0&&(e=new d);var s=r.getLineA(),o=r.getLineB(),i=r.getLineC();if(n<=0||n>=1)return e.x=s.x1,e.y=s.y1,e;var a=c(s),l=c(o),f=c(i),u=a+l+f,v=u*n,m=0;return v<a?(m=v/a,e.x=s.x1+(s.x2-s.x1)*m,e.y=s.y1+(s.y2-s.y1)*m):v>a+l?(v-=a+l,m=v/f,e.x=i.x1+(i.x2-i.x1)*m,e.y=i.y1+(i.y2-i.y1)*m):(v-=a,m=v/l,e.x=o.x1+(o.x2-o.x1)*m,e.y=o.y1+(o.y2-o.y1)*m),e};p.exports=h}),80672:((p,S,t)=>{var d=t(35001),c=t(2141),h=function(r,n,e,s){s===void 0&&(s=[]);var o=r.getLineA(),i=r.getLineB(),a=r.getLineC(),l=d(o),f=d(i),u=d(a),v=l+f+u;!n&&e>0&&(n=v/e);for(var m=0;m<n;m++){var x=v*(m/n),g=0,y=new c;x<l?(g=x/l,y.x=o.x1+(o.x2-o.x1)*g,y.y=o.y1+(o.y2-o.y1)*g):x>l+f?(x-=l+f,g=x/u,y.x=a.x1+(a.x2-a.x1)*g,y.y=a.y1+(a.y2-a.y1)*g):(x-=l,g=x/f,y.x=i.x1+(i.x2-i.x1)*g,y.y=i.y1+(i.y2-i.y1)*g),s.push(y)}return s};p.exports=h}),39757:((p,S,t)=>{var d=t(2141);function c(r,n,e,s){var o=r-e,i=n-s,a=o*o+i*i;return Math.sqrt(a)}var h=function(r,n){n===void 0&&(n=new d);var e=r.x1,s=r.y1,o=r.x2,i=r.y2,a=r.x3,l=r.y3,f=c(a,l,o,i),u=c(e,s,a,l),v=c(o,i,e,s),m=f+u+v;return n.x=(e*f+o*u+a*v)/m,n.y=(s*f+i*u+l*v)/m,n};p.exports=h}),13584:(p=>{var S=function(t,d,c){return t.x1+=d,t.y1+=c,t.x2+=d,t.y2+=c,t.x3+=d,t.y3+=c,t};p.exports=S}),1376:((p,S,t)=>{var d=t(35001),c=function(h){var r=h.getLineA(),n=h.getLineB(),e=h.getLineC();return d(r)+d(n)+d(e)};p.exports=c}),90260:((p,S,t)=>{var d=t(2141),c=function(h,r){r===void 0&&(r=new d);var n=h.x2-h.x1,e=h.y2-h.y1,s=h.x3-h.x1,o=h.y3-h.y1,i=Math.random(),a=Math.random();return i+a>=1&&(i=1-i,a=1-a),r.x=h.x1+(n*i+s*a),r.y=h.y1+(e*i+o*a),r};p.exports=c}),52172:((p,S,t)=>{var d=t(99614),c=t(39757),h=function(r,n){var e=c(r);return d(r,e.x,e.y,n)};p.exports=h}),49907:((p,S,t)=>{var d=t(99614),c=function(h,r,n){return d(h,r.x,r.y,n)};p.exports=c}),99614:(p=>{var S=function(t,d,c,h){var r=Math.cos(h),n=Math.sin(h),e=t.x1-d,s=t.y1-c;return t.x1=e*r-s*n+d,t.y1=e*n+s*r+c,e=t.x2-d,s=t.y2-c,t.x2=e*r-s*n+d,t.y2=e*n+s*r+c,e=t.x3-d,s=t.y3-c,t.x3=e*r-s*n+d,t.y3=e*n+s*r+c,t};p.exports=S}),16483:((p,S,t)=>{var d=t(83419),c=t(10690),h=t(20437),r=t(80672),n=t(23777),e=t(23031),s=t(90260),o=new d({initialize:function(a,l,f,u,v,m){a===void 0&&(a=0),l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=0),v===void 0&&(v=0),m===void 0&&(m=0),this.type=n.TRIANGLE,this.x1=a,this.y1=l,this.x2=f,this.y2=u,this.x3=v,this.y3=m},contains:function(i,a){return c(this,i,a)},getPoint:function(i,a){return h(this,i,a)},getPoints:function(i,a,l){return r(this,i,a,l)},getRandomPoint:function(i){return s(this,i)},setTo:function(i,a,l,f,u,v){return i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=0),v===void 0&&(v=0),this.x1=i,this.y1=a,this.x2=l,this.y2=f,this.x3=u,this.y3=v,this},getLineA:function(i){return i===void 0&&(i=new e),i.setTo(this.x1,this.y1,this.x2,this.y2),i},getLineB:function(i){return i===void 0&&(i=new e),i.setTo(this.x2,this.y2,this.x3,this.y3),i},getLineC:function(i){return i===void 0&&(i=new e),i.setTo(this.x3,this.y3,this.x1,this.y1),i},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(i){var a=0;this.x1<=this.x2&&this.x1<=this.x3?a=this.x1-i:this.x2<=this.x1&&this.x2<=this.x3?a=this.x2-i:a=this.x3-i,this.x1-=a,this.x2-=a,this.x3-=a}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(i){var a=0;this.x1>=this.x2&&this.x1>=this.x3?a=this.x1-i:this.x2>=this.x1&&this.x2>=this.x3?a=this.x2-i:a=this.x3-i,this.x1-=a,this.x2-=a,this.x3-=a}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(i){var a=0;this.y1<=this.y2&&this.y1<=this.y3?a=this.y1-i:this.y2<=this.y1&&this.y2<=this.y3?a=this.y2-i:a=this.y3-i,this.y1-=a,this.y2-=a,this.y3-=a}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(i){var a=0;this.y1>=this.y2&&this.y1>=this.y3?a=this.y1-i:this.y2>=this.y1&&this.y2>=this.y3?a=this.y2-i:a=this.y3-i,this.y1-=a,this.y2-=a,this.y3-=a}}});p.exports=o}),84435:((p,S,t)=>{var d=t(16483);d.Area=t(41658),d.BuildEquilateral=t(39208),d.BuildFromPolygon=t(39545),d.BuildRight=t(90301),d.CenterOn=t(23707),d.Centroid=t(97523),d.CircumCenter=t(24951),d.CircumCircle=t(85614),d.Clone=t(74422),d.Contains=t(10690),d.ContainsArray=t(48653),d.ContainsPoint=t(96006),d.CopyFrom=t(71326),d.Decompose=t(71694),d.Equals=t(33522),d.GetPoint=t(20437),d.GetPoints=t(80672),d.InCenter=t(39757),d.Perimeter=t(1376),d.Offset=t(13584),d.Random=t(90260),d.Rotate=t(52172),d.RotateAroundPoint=t(49907),d.RotateAroundXY=t(99614),p.exports=d}),74457:(p=>{var S=function(t,d,c){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:d,hitAreaCallback:c,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragStartCamera:null,dragX:0,dragY:0}};p.exports=S}),84409:(p=>{var S=function(t,d){return function(c,h,r,n){var e=t.getPixelAlpha(h,r,n.texture.key,n.frame.name);return e&&e>=d}};p.exports=S}),7003:((p,S,t)=>{var d=t(83419),c=t(93301),h=t(50792),r=t(8214),n=t(8443),e=t(78970),s=t(85098),o=t(42515),i=t(36210),a=t(61340),l=t(85955),f=new d({initialize:function(v,m){this.game=v,this.scaleManager,this.canvas,this.config=m,this.enabled=!0,this.events=new h,this.isOver=!0,this.defaultCursor="",this.keyboard=m.inputKeyboard?new e(this):null,this.mouse=m.inputMouse?new s(this):null,this.touch=m.inputTouch?new i(this):null,this.pointers=[],this.pointersTotal=m.inputActivePointers;for(var x=0;x<=this.pointersTotal;x++){var g=new o(this,x);g.smoothFactor=m.inputSmoothFactor,this.pointers.push(g)}this.mousePointer=m.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.globalTopOnly=!0,this.time=0,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new a,this._tempMatrix2=new a,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],v.events.once(n.BOOT,this.boot,this)},boot:function(){var u=this.game,v=u.events;this.canvas=u.canvas,this.scaleManager=u.scale,this.events.emit(r.MANAGER_BOOT),v.on(n.PRE_RENDER,this.preRender,this),v.once(n.DESTROY,this.destroy,this)},setCanvasOver:function(u){this.isOver=!0,this.events.emit(r.GAME_OVER,u)},setCanvasOut:function(u){this.isOver=!1,this.events.emit(r.GAME_OUT,u)},preRender:function(){var u=this.game.loop.now,v=this.game.loop.delta,m=this.game.scene.getScenes(!0,!0);this.time=u,this.events.emit(r.MANAGER_UPDATE);for(var x=0;x<m.length;x++){var g=m[x];if(g.sys.input&&g.sys.input.updatePoll(u,v)&&this.globalTopOnly)return}},setDefaultCursor:function(u){this.defaultCursor=u,this.canvas.style.cursor!==u&&(this.canvas.style.cursor=u)},setCursor:function(u){u.cursor&&(this.canvas.style.cursor=u.cursor)},resetCursor:function(u,v){(v||u&&u.cursor)&&this.canvas&&(this.canvas.style.cursor=this.defaultCursor)},addPointer:function(u){u===void 0&&(u=1);var v=[];this.pointersTotal+u>10&&(u=10-this.pointersTotal);for(var m=0;m<u;m++){var x=this.pointers.length,g=new o(this,x);g.smoothFactor=this.config.inputSmoothFactor,this.pointers.push(g),this.pointersTotal++,v.push(g)}return v},updateInputPlugins:function(u,v){var m=this.game.scene.getScenes(!1,!0);this._tempSkip=!1;for(var x=0;x<m.length;x++){var g=m[x];if(g.sys.input){var y=g.sys.input.update(u,v);if(y&&this.globalTopOnly||this._tempSkip)return}}},onTouchStart:function(u){for(var v=this.pointers,m=[],x=0;x<u.changedTouches.length;x++)for(var g=u.changedTouches[x],y=1;y<v.length;y++){var T=v[y];if(!T.active){T.touchstart(g,u),this.activePointer=T,m.push(T);break}}this.updateInputPlugins(c.TOUCH_START,m)},onTouchMove:function(u){for(var v=this.pointers,m=[],x=0;x<u.changedTouches.length;x++)for(var g=u.changedTouches[x],y=1;y<v.length;y++){var T=v[y];if(T.active&&T.identifier===g.identifier){var C=document.elementFromPoint(g.clientX,g.clientY),E=C===this.canvas;!this.isOver&&E?this.setCanvasOver(u):this.isOver&&!E&&this.setCanvasOut(u),this.isOver&&(T.touchmove(g,u),this.activePointer=T,m.push(T));break}}this.updateInputPlugins(c.TOUCH_MOVE,m)},onTouchEnd:function(u){for(var v=this.pointers,m=[],x=0;x<u.changedTouches.length;x++)for(var g=u.changedTouches[x],y=1;y<v.length;y++){var T=v[y];if(T.active&&T.identifier===g.identifier){T.touchend(g,u),m.push(T);break}}this.updateInputPlugins(c.TOUCH_END,m)},onTouchCancel:function(u){for(var v=this.pointers,m=[],x=0;x<u.changedTouches.length;x++)for(var g=u.changedTouches[x],y=1;y<v.length;y++){var T=v[y];if(T.active&&T.identifier===g.identifier){T.touchcancel(g,u),m.push(T);break}}this.updateInputPlugins(c.TOUCH_CANCEL,m)},onMouseDown:function(u){var v=this.mousePointer;v.down(u),v.updateMotion(),this.activePointer=v,this.updateInputPlugins(c.MOUSE_DOWN,this.mousePointerContainer)},onMouseMove:function(u){var v=this.mousePointer;v.move(u),v.updateMotion(),this.activePointer=v,this.updateInputPlugins(c.MOUSE_MOVE,this.mousePointerContainer)},onMouseUp:function(u){var v=this.mousePointer;v.up(u),v.updateMotion(),this.activePointer=v,this.updateInputPlugins(c.MOUSE_UP,this.mousePointerContainer)},onMouseWheel:function(u){var v=this.mousePointer;v.wheel(u),this.activePointer=v,this.updateInputPlugins(c.MOUSE_WHEEL,this.mousePointerContainer)},onPointerLockChange:function(u){var v=this.mouse.locked;this.mousePointer.locked=v,this.events.emit(r.POINTERLOCK_CHANGE,u,v)},inputCandidate:function(u,v){var m=u.input;if(!m||!m.enabled||!u.willRender(v))return!1;var x=!0,g=u.parentContainer;if(g)do{if(!g.willRender(v)){x=!1;break}g=g.parentContainer}while(g);return x},hitTest:function(u,v,m,x){x===void 0&&(x=this._tempHitTest);var g=this._tempPoint,y=m.scrollX,T=m.scrollY;x.length=0;var C=u.x,E=u.y;m.getWorldPoint(C,E,g),u.worldX=g.x,u.worldY=g.y;for(var M={x:0,y:0},P=this._tempMatrix,A=this._tempMatrix2,R=0;R<v.length;R++){var F=v[R];if(this.inputCandidate(F,m)){var w=g.x+y*F.scrollFactorX-y,I=g.y+T*F.scrollFactorY-T;F.parentContainer?(F.getWorldTransformMatrix(P,A),P.applyInverse(w,I,M)):l(w,I,F.x,F.y,F.rotation,F.scaleX,F.scaleY,M),this.pointWithinHitArea(F,M.x,M.y)&&x.push(F)}}return x},pointWithinHitArea:function(u,v,m){v+=u.displayOriginX,m+=u.displayOriginY;var x=u.input;return x&&x.hitAreaCallback(x.hitArea,v,m,u)?(x.localX=v,x.localY=m,!0):!1},pointWithinInteractiveObject:function(u,v,m){return u.hitArea?(v+=u.gameObject.displayOriginX,m+=u.gameObject.displayOriginY,u.localX=v,u.localY=m,u.hitAreaCallback(u.hitArea,v,m,u)):!1},transformPointer:function(u,v,m,x){var g=u.position,y=u.prevPosition;y.x=g.x,y.y=g.y;var T=this.scaleManager.transformX(v),C=this.scaleManager.transformY(m),E=u.smoothFactor;!x||E===0?(g.x=T,g.y=C):(g.x=T*E+y.x*(1-E),g.y=C*E+y.y*(1-E))},destroy:function(){this.events.removeAllListeners(),this.game.events.off(n.PRE_RENDER),this.keyboard&&this.keyboard.destroy(),this.mouse&&this.mouse.destroy(),this.touch&&this.touch.destroy();for(var u=0;u<this.pointers.length;u++)this.pointers[u].destroy();this.pointers=[],this._tempHitTest=[],this._tempMatrix.destroy(),this.canvas=null,this.game=null}});p.exports=f}),48205:((p,S,t)=>{var d=t(96503),c=t(87902),h=t(83419),r=t(93301),n=t(74457),e=t(84409),s=t(20339),o=t(8497),i=t(81154),a=t(8214),l=t(50792),f=t(95540),u=t(23777),v=t(89639),m=t(41212),x=t(37277),g=t(87841),y=t(37303),T=t(44594),C=t(16483),E=t(10690),M=new h({Extends:l,initialize:function(A){l.call(this),this.scene=A,this.systems=A.sys,this.settings=A.sys.settings,this.manager=A.sys.game.input,this.pluginEvents=new l,this.enabled=!0,this.displayList,this.cameras,v.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0;var R={cancelled:!1};this._eventContainer={stopPropagation:function(){R.cancelled=!0}},this._eventData=R,this.dragDistanceThreshold=0,this.dragTimeThreshold=0,this._temp=[],this._tempZones=[],this._list=[],this._pendingInsertion=[],this._pendingRemoval=[],this._draggable=[],this._drag={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._dragState=[],this._over={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._validTypes=["onDown","onUp","onOver","onOut","onMove","onDragStart","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDrop"],this._updatedThisFrame=!1,A.sys.events.once(T.BOOT,this.boot,this),A.sys.events.on(T.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(T.DESTROY,this.destroy,this),this.pluginEvents.emit(a.BOOT)},start:function(){var P=this.systems.events;P.on(T.TRANSITION_START,this.transitionIn,this),P.on(T.TRANSITION_OUT,this.transitionOut,this),P.on(T.TRANSITION_COMPLETE,this.transitionComplete,this),P.on(T.PRE_UPDATE,this.preUpdate,this),P.once(T.SHUTDOWN,this.shutdown,this),this.manager.events.on(a.GAME_OUT,this.onGameOut,this),this.manager.events.on(a.GAME_OVER,this.onGameOver,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(a.START)},onGameOver:function(P){this.isActive()&&this.emit(a.GAME_OVER,P.timeStamp,P)},onGameOut:function(P){this.isActive()&&this.emit(a.GAME_OUT,P.timeStamp,P)},preUpdate:function(){this.pluginEvents.emit(a.PRE_UPDATE);var P=this._pendingRemoval,A=this._pendingInsertion,R=P.length,F=A.length;if(!(R===0&&F===0)){for(var w=this._list,I=0;I<R;I++){var U=P[I],N=w.indexOf(U);N>-1&&(w.splice(N,1),this.clear(U,!0))}this._pendingRemoval.length=0,this._list=w.concat(A.splice(0))}},isActive:function(){return this.manager&&this.manager.enabled&&this.enabled&&this.scene.sys.canInput()},setCursor:function(P){this.manager&&this.manager.setCursor(P)},resetCursor:function(){this.manager&&this.manager.resetCursor(null,!0)},updatePoll:function(P,A){if(!this.isActive())return!1;if(this.pluginEvents.emit(a.UPDATE,P,A),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var R,F=this.manager,w=F.pointers;for(R=0;R<w.length;R++)w[R].updateMotion();if(this._list.length===0)return!1;var I=this.pollRate;if(I===-1)return!1;if(I>0)if(this._pollTimer-=A,this._pollTimer<0)this._pollTimer=this.pollRate;else return!1;var U=!1;for(R=0;R<w.length;R++){var N=0,D=w[R];this._tempZones=[],this._temp=this.hitTestPointer(D),this.sortGameObjects(this._temp,D),this.sortDropZones(this._tempZones),this.topOnly&&(this._temp.length&&this._temp.splice(1),this._tempZones.length&&this._tempZones.splice(1)),N+=this.processOverOutEvents(D),this.getDragState(D)===2&&this.processDragThresholdEvent(D,P),N>0&&(U=!0)}return U},update:function(P,A){if(!this.isActive())return!1;for(var R=!1,F=0;F<A.length;F++){var w=0,I=A[F];switch(this._tempZones=[],this._temp=this.hitTestPointer(I),this.sortGameObjects(this._temp,I),this.sortDropZones(this._tempZones),this.topOnly&&(this._temp.length&&this._temp.splice(1),this._tempZones.length&&this._tempZones.splice(1)),P){case r.MOUSE_DOWN:w+=this.processDragDownEvent(I),w+=this.processDownEvents(I),w+=this.processOverOutEvents(I);break;case r.MOUSE_UP:w+=this.processDragUpEvent(I),w+=this.processUpEvents(I),w+=this.processOverOutEvents(I);break;case r.TOUCH_START:w+=this.processDragDownEvent(I),w+=this.processDownEvents(I),w+=this.processOverEvents(I);break;case r.TOUCH_END:case r.TOUCH_CANCEL:w+=this.processDragUpEvent(I),w+=this.processUpEvents(I),w+=this.processOutEvents(I);break;case r.MOUSE_MOVE:case r.TOUCH_MOVE:w+=this.processDragMoveEvent(I),w+=this.processMoveEvents(I),w+=this.processOverOutEvents(I);break;case r.MOUSE_WHEEL:w+=this.processWheelEvent(I);break}w>0&&(R=!0)}return this._updatedThisFrame=!0,R},clear:function(P,A){A===void 0&&(A=!1),this.disable(P);var R=P.input;R&&(this.removeDebug(P),this.manager.resetCursor(R),R.gameObject=void 0,R.target=void 0,R.hitArea=void 0,R.hitAreaCallback=void 0,R.callbackContext=void 0,P.input=null),A||this.queueForRemoval(P);var F=this._draggable.indexOf(P);return F>-1&&this._draggable.splice(F,1),P},disable:function(P,A){A===void 0&&(A=!1);var R=P.input;R&&(R.enabled=!1,R.dragState=0);for(var F=this._drag,w=this._over,I=this.manager,U=0,N;U<I.pointers.length;U++)N=F[U].indexOf(P),N>-1&&F[U].splice(N,1),N=w[U].indexOf(P),N>-1&&w[U].splice(N,1);return A&&this.resetCursor(),this},enable:function(P,A,R,F){return F===void 0&&(F=!1),P.input?P.input.enabled=!0:this.setHitArea(P,A,R),P.input&&F&&!P.input.dropZone&&(P.input.dropZone=F),this},hitTestPointer:function(P){for(var A=this.cameras.getCamerasBelowPointer(P),R=0;R<A.length;R++){for(var F=A[R],w=this.manager.hitTest(P,this._list,F),I=0;I<w.length;I++){var U=w[I];U.input.dropZone&&this._tempZones.push(U)}if(w.length>0)return P.camera=F,w}return P.camera=A[0],[]},processDownEvents:function(P){var A=0,R=this._temp,F=this._eventData,w=this._eventContainer;F.cancelled=!1;for(var I=0;I<R.length;I++){var U=R[I];if(!(!U.input||!U.input.enabled)&&(A++,U.emit(a.GAMEOBJECT_POINTER_DOWN,P,U.input.localX,U.input.localY,w),F.cancelled||!this.isActive()||U.input&&U.input.enabled&&(this.emit(a.GAMEOBJECT_DOWN,P,U,w),F.cancelled||!this.isActive())))break}return!F.cancelled&&this.isActive()&&(P.downElement===this.manager.game.canvas?this.emit(a.POINTER_DOWN,P,R):this.emit(a.POINTER_DOWN_OUTSIDE,P)),A},getDragState:function(P){return this._dragState[P.id]},setDragState:function(P,A){this._dragState[P.id]=A},processDragThresholdEvent:function(P,A){var R=!1,F=this.dragTimeThreshold,w=this.dragDistanceThreshold;if((w>0&&s(P.x,P.y,P.downX,P.downY)>=w||F>0&&A>=P.downTime+F)&&(R=!0),R)return this.setDragState(P,3),this.processDragStartList(P)},processDragStartList:function(P){if(this.getDragState(P)!==3)return 0;var A=this._drag[P.id];A.length>1&&(A=A.slice(0));for(var R=0;R<A.length;R++){var F=A[R],w=F.input;w.dragState=2,w.dragStartX=F.x,w.dragStartY=F.y,w.dragStartXGlobal=P.worldX,w.dragStartYGlobal=P.worldY,w.dragStartCamera=P.camera,w.dragX=w.dragStartXGlobal-w.dragStartX,w.dragY=w.dragStartYGlobal-w.dragStartY,F.emit(a.GAMEOBJECT_DRAG_START,P,w.dragX,w.dragY),this.emit(a.DRAG_START,P,F)}return this.setDragState(P,4),A.length},processDragDownEvent:function(P){var A=this._temp;if(this._draggable.length===0||A.length===0||!P.primaryDown||this.getDragState(P)!==0)return 0;this.setDragState(P,1);for(var R=[],F=0;F<A.length;F++){var w=A[F];w.input.draggable&&w.input.dragState===0&&R.push(w)}return R.length===0?(this.setDragState(P,0),0):(R.length>1&&(this.sortGameObjects(R,P),this.topOnly&&R.splice(1)),this._drag[P.id]=R,this.dragDistanceThreshold===0&&this.dragTimeThreshold===0?(this.setDragState(P,3),this.processDragStartList(P)):(this.setDragState(P,2),0))},processDragMoveEvent:function(P){if(this.getDragState(P)===2&&this.processDragThresholdEvent(P,this.manager.game.loop.now),this.getDragState(P)!==4)return 0;var A=this._tempZones,R=this._drag[P.id];R.length>1&&(R=R.slice(0));for(var F=0;F<R.length;F++){var w=R[F],I=w.input,U=I.target;if(U){var N=A.indexOf(U);N===0?(w.emit(a.GAMEOBJECT_DRAG_OVER,P,U),this.emit(a.DRAG_OVER,P,w,U)):N>0?(w.emit(a.GAMEOBJECT_DRAG_LEAVE,P,U),this.emit(a.DRAG_LEAVE,P,w,U),I.target=A[0],U=I.target,w.emit(a.GAMEOBJECT_DRAG_ENTER,P,U),this.emit(a.DRAG_ENTER,P,w,U)):(w.emit(a.GAMEOBJECT_DRAG_LEAVE,P,U),this.emit(a.DRAG_LEAVE,P,w,U),A[0]?(I.target=A[0],U=I.target,w.emit(a.GAMEOBJECT_DRAG_ENTER,P,U),this.emit(a.DRAG_ENTER,P,w,U)):I.target=null)}else!U&&A[0]&&(I.target=A[0],U=I.target,w.emit(a.GAMEOBJECT_DRAG_ENTER,P,U),this.emit(a.DRAG_ENTER,P,w,U));var D,B,L=P.positionToCamera(I.dragStartCamera);if(!w.parentContainer)D=L.x-I.dragX,B=L.y-I.dragY;else{var G=L.x-I.dragStartXGlobal,O=L.y-I.dragStartYGlobal,X=w.getParentRotation(),z=G*Math.cos(X)+O*Math.sin(X),V=O*Math.cos(X)-G*Math.sin(X);z*=1/w.parentContainer.scaleX,V*=1/w.parentContainer.scaleY,D=z+I.dragStartX,B=V+I.dragStartY}w.emit(a.GAMEOBJECT_DRAG,P,D,B),this.emit(a.DRAG,P,w,D,B)}return R.length},processDragUpEvent:function(P){var A=this._drag[P.id];A.length>1&&(A=A.slice(0));for(var R=0;R<A.length;R++){var F=A[R],w=F.input;if(w&&w.dragState===2){w.dragState=0,w.dragX=w.localX-F.displayOriginX,w.dragY=w.localY-F.displayOriginY,w.dragStartCamera=null;var I=!1,U=w.target;U&&(F.emit(a.GAMEOBJECT_DROP,P,U),this.emit(a.DROP,P,F,U),w.target=null,I=!0),F.input&&F.input.enabled&&(F.emit(a.GAMEOBJECT_DRAG_END,P,w.dragX,w.dragY,I),this.emit(a.DRAG_END,P,F,I))}}return this.setDragState(P,0),A.splice(0),0},processMoveEvents:function(P){var A=0,R=this._temp,F=this._eventData,w=this._eventContainer;F.cancelled=!1;for(var I=0;I<R.length;I++){var U=R[I];if(!(!U.input||!U.input.enabled)&&(A++,U.emit(a.GAMEOBJECT_POINTER_MOVE,P,U.input.localX,U.input.localY,w),F.cancelled||!this.isActive()||U.input&&U.input.enabled&&(this.emit(a.GAMEOBJECT_MOVE,P,U,w),F.cancelled||!this.isActive()||this.topOnly)))break}return!F.cancelled&&this.isActive()&&this.emit(a.POINTER_MOVE,P,R),A},processWheelEvent:function(P){var A=0,R=this._temp,F=this._eventData,w=this._eventContainer;F.cancelled=!1;for(var I=P.deltaX,U=P.deltaY,N=P.deltaZ,D=0;D<R.length;D++){var B=R[D];if(!(!B.input||!B.input.enabled)&&(A++,B.emit(a.GAMEOBJECT_POINTER_WHEEL,P,I,U,N,w),F.cancelled||!this.isActive()||B.input&&B.input.enabled&&(this.emit(a.GAMEOBJECT_WHEEL,P,B,I,U,N,w),F.cancelled||!this.isActive())))break}return!F.cancelled&&this.isActive()&&this.emit(a.POINTER_WHEEL,P,R,I,U,N),A},processOverEvents:function(P){var A=this._temp,R=0,F=A.length,w=[];if(F>0){var I=this.manager,U=this._eventData,N=this._eventContainer;U.cancelled=!1;for(var D=0;D<F;D++){var B=A[D];if(!(!B.input||!B.input.enabled)&&(w.push(B),I.setCursor(B.input),B.emit(a.GAMEOBJECT_POINTER_OVER,P,B.input.localX,B.input.localY,N),R++,U.cancelled||!this.isActive()||B.input&&B.input.enabled&&(this.emit(a.GAMEOBJECT_OVER,P,B,N),U.cancelled||!this.isActive())))break}!U.cancelled&&this.isActive()&&this.emit(a.POINTER_OVER,P,w)}return this._over[P.id]=w,R},processOutEvents:function(P){var A=this._over[P.id],R=0,F=A.length;if(F>0){var w=this.manager,I=this._eventData,U=this._eventContainer;I.cancelled=!1,this.sortGameObjects(A,P);for(var N=0;N<F;N++){var D=A[N];if(D=A[N],!(!D.input||!D.input.enabled)&&(w.resetCursor(D.input),D.emit(a.GAMEOBJECT_POINTER_OUT,P,U),R++,I.cancelled||!this.isActive()||D.input&&D.input.enabled&&(this.emit(a.GAMEOBJECT_OUT,P,D,U),I.cancelled||!this.isActive())))break}!I.cancelled&&this.isActive()&&this.emit(a.POINTER_OUT,P,A),this._over[P.id]=[]}return R},processOverOutEvents:function(P){var A=this._temp,R,F,w=[],I=[],U=[],N=this._over[P.id],D=this._drag[P.id],B=this.manager;for(R=0;R<N.length;R++)F=N[R],A.indexOf(F)===-1&&D.indexOf(F)===-1?w.push(F):U.push(F);for(R=0;R<A.length;R++)F=A[R],N.indexOf(F)===-1&&I.push(F);var L=w.length,G=0,O=this._eventData,X=this._eventContainer;if(O.cancelled=!1,L>0){for(this.sortGameObjects(w,P),R=0;R<L&&(F=w[R],!(!(!F.input||!F.input.enabled)&&(B.resetCursor(F.input),F.emit(a.GAMEOBJECT_POINTER_OUT,P,X),G++,O.cancelled||!this.isActive()||F.input&&F.input.enabled&&(this.emit(a.GAMEOBJECT_OUT,P,F,X),O.cancelled||!this.isActive()))));R++);(!O.cancelled||this.isActive())&&this.emit(a.POINTER_OUT,P,w)}if(L=I.length,O.cancelled=!1,L>0){for(this.sortGameObjects(I,P),R=0;R<L&&(F=I[R],!(!(!F.input||!F.input.enabled)&&(B.setCursor(F.input),F.emit(a.GAMEOBJECT_POINTER_OVER,P,F.input.localX,F.input.localY,X),G++,O.cancelled||!this.isActive()||F.input&&F.input.enabled&&(this.emit(a.GAMEOBJECT_OVER,P,F,X),O.cancelled||!this.isActive()))));R++);!O.cancelled&&this.isActive()&&this.emit(a.POINTER_OVER,P,I)}return N=U.concat(I),this._over[P.id]=this.sortGameObjects(N,P),G},processUpEvents:function(P){var A=this._temp,R=this._eventData,F=this._eventContainer;R.cancelled=!1;for(var w=0;w<A.length;w++){var I=A[w];if(!(!I.input||!I.input.enabled)&&(I.emit(a.GAMEOBJECT_POINTER_UP,P,I.input.localX,I.input.localY,F),R.cancelled||!this.isActive()||I.input&&I.input.enabled&&(this.emit(a.GAMEOBJECT_UP,P,I,F),R.cancelled||!this.isActive())))break}return!R.cancelled&&this.isActive()&&(P.upElement===this.manager.game.canvas?this.emit(a.POINTER_UP,P,A):this.emit(a.POINTER_UP_OUTSIDE,P)),A.length},forceDownState:function(P,A){this.forceState(P,A,a.GAMEOBJECT_POINTER_DOWN,a.GAMEOBJECT_DOWN,!1)},forceUpState:function(P,A){this.forceState(P,A,a.GAMEOBJECT_POINTER_UP,a.GAMEOBJECT_UP,!1)},forceOverState:function(P,A){this.forceState(P,A,a.GAMEOBJECT_POINTER_OVER,a.GAMEOBJECT_OVER,!0)},forceOutState:function(P,A){this.forceState(P,A,a.GAMEOBJECT_POINTER_OUT,a.GAMEOBJECT_OUT,!1)},forceState:function(P,A,R,F,w){var I=this._eventData,U=this._eventContainer;I.cancelled=!1,A.input&&A.input.enabled&&(A.emit(R,P,A.input.localX,A.input.localY,U),w&&this.setCursor(A.input),!I.cancelled&&this.isActive()&&A.input&&A.input.enabled&&this.emit(F,P,A,U))},queueForInsertion:function(P){return this._pendingInsertion.indexOf(P)===-1&&this._list.indexOf(P)===-1&&this._pendingInsertion.push(P),this},queueForRemoval:function(P){return this._pendingRemoval.push(P),this},setDraggable:function(P,A){A===void 0&&(A=!0),Array.isArray(P)||(P=[P]);for(var R=0;R<P.length;R++){var F=P[R];F.input.draggable=A;var w=this._draggable.indexOf(F);A&&w===-1?this._draggable.push(F):!A&&w>-1&&this._draggable.splice(w,1)}return this},makePixelPerfect:function(P){P===void 0&&(P=1);var A=this.systems.textures;return e(A,P)},setHitArea:function(P,A,R){if(A===void 0)return this.setHitAreaFromTexture(P);Array.isArray(P)||(P=[P]);var F=!1,w=!1,I=!1,U=!1,N=!1,D=!0;if(m(A)&&Object.keys(A).length){var B=A,L=P.some(function(V){return V.hasOwnProperty("faces")});if(!L){A=f(B,"hitArea",null),R=f(B,"hitAreaCallback",null),N=f(B,"pixelPerfect",!1);var G=f(B,"alphaTolerance",1);N&&(A={},R=this.makePixelPerfect(G))}F=f(B,"draggable",!1),w=f(B,"dropZone",!1),I=f(B,"cursor",!1),U=f(B,"useHandCursor",!1),(!A||!R)&&(this.setHitAreaFromTexture(P),D=!1)}else typeof A=="function"&&!R&&(R=A,A={});for(var O=0;O<P.length;O++){var X=P[O];if(N&&X.type==="Container"){console.warn("Cannot pixelPerfect test a Container. Use a custom callback.");continue}var z=X.input?X.input:n(X,A,R);z.customHitArea=D,z.dropZone=w,z.cursor=U?"pointer":I,X.input=z,F&&this.setDraggable(X),this.queueForInsertion(X)}return this},setHitAreaCircle:function(P,A,R,F,w){w===void 0&&(w=c);var I=new d(A,R,F);return this.setHitArea(P,I,w)},setHitAreaEllipse:function(P,A,R,F,w,I){I===void 0&&(I=i);var U=new o(A,R,F,w);return this.setHitArea(P,U,I)},setHitAreaFromTexture:function(P,A){A===void 0&&(A=y),Array.isArray(P)||(P=[P]);for(var R=0;R<P.length;R++){var F=P[R],w=F.frame,I=0,U=0;if(F.width?(I=F.width,U=F.height):w&&(I=w.realWidth,U=w.realHeight),F.type==="Container"&&(I===0||U===0)){console.warn("Container.setInteractive must specify a Shape or call setSize() first");continue}I!==0&&U!==0&&(F.input=n(F,new g(0,0,I,U),A),this.queueForInsertion(F))}return this},setHitAreaRectangle:function(P,A,R,F,w,I){I===void 0&&(I=y);var U=new g(A,R,F,w);return this.setHitArea(P,U,I)},setHitAreaTriangle:function(P,A,R,F,w,I,U,N){N===void 0&&(N=E);var D=new C(A,R,F,w,I,U);return this.setHitArea(P,D,N)},enableDebug:function(P,A){A===void 0&&(A=65280);var R=P.input;if(!R||!R.hitArea)return this;var F=R.hitArea,w=F.type,I=R.hitAreaDebug,U=this.systems.add,N=this.systems.updateList;I&&(N.remove(I),I.destroy(),I=null);var D=0,B=0;switch(w){case u.CIRCLE:I=U.arc(0,0,F.radius),D=F.x-F.radius,B=F.y-F.radius;break;case u.ELLIPSE:I=U.ellipse(0,0,F.width,F.height),D=F.x-F.width/2,B=F.y-F.height/2;break;case u.LINE:I=U.line(0,0,F.x1,F.y1,F.x2,F.y2);break;case u.POLYGON:I=U.polygon(0,0,F.points);break;case u.RECTANGLE:I=U.rectangle(0,0,F.width,F.height),D=F.x,B=F.y;break;case u.TRIANGLE:I=U.triangle(0,0,F.x1,F.y1,F.x2,F.y2,F.x3,F.y3);break}return I&&(I.isFilled=!1,I.strokeColor=A,I.preUpdate=function(){I.setVisible(P.visible),I.setStrokeStyle(1/P.scale,I.strokeColor),I.setDisplayOrigin(P.displayOriginX,P.displayOriginY);var L=P.x,G=P.y,O=P.rotation,X=P.scaleX,z=P.scaleY;if(P.parentContainer){var V=P.getWorldTransformMatrix();L=V.tx,G=V.ty,O=V.rotation,X=V.scaleX,z=V.scaleY}I.setRotation(O),I.setScale(X,z),I.setPosition(L+D*X,G+B*z),I.setScrollFactor(P.scrollFactorX,P.scrollFactorY),I.setDepth(P.depth)},N.add(I),R.hitAreaDebug=I),this},removeDebug:function(P){var A=P.input;if(A&&A.hitAreaDebug){var R=A.hitAreaDebug;R.destroy(),A.hitAreaDebug=null}return this},setPollAlways:function(){return this.setPollRate(0)},setPollOnMove:function(){return this.setPollRate(-1)},setPollRate:function(P){return this.pollRate=P,this._pollTimer=0,this},setGlobalTopOnly:function(P){return this.manager.globalTopOnly=P,this},setTopOnly:function(P){return this.topOnly=P,this},sortGameObjects:function(P,A){if(P.length<2||!A.camera)return P;var R=A.camera.renderList;return P.sort(function(F,w){var I=Math.max(R.indexOf(F),0),U=Math.max(R.indexOf(w),0);return U-I})},sortDropZones:function(P){return P.length<2?P:(this.scene.sys.depthSort(),P.sort(this.sortDropZoneHandler.bind(this)))},sortDropZoneHandler:function(P,A){if(!P.parentContainer&&!A.parentContainer)return this.displayList.getIndex(A)-this.displayList.getIndex(P);if(P.parentContainer===A.parentContainer)return A.parentContainer.getIndex(A)-P.parentContainer.getIndex(P);if(P.parentContainer===A)return-1;if(A.parentContainer===P)return 1;for(var R=P.getIndexList(),F=A.getIndexList(),w=Math.min(R.length,F.length),I=0;I<w;I++){var U=R[I],N=F[I];if(U!==N)return N-U}return F.length-R.length},stopPropagation:function(){return this.manager._tempSkip=!0,this},addPointer:function(P){return this.manager.addPointer(P)},setDefaultCursor:function(P){return this.manager.setDefaultCursor(P),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(a.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 P=0;P<10;P++)this._drag[P]=[],this._over[P]=[];this.removeAllListeners();var A=this.manager;A.canvas.style.cursor=A.defaultCursor;var R=this.systems.events;R.off(T.TRANSITION_START,this.transitionIn,this),R.off(T.TRANSITION_OUT,this.transitionOut,this),R.off(T.TRANSITION_COMPLETE,this.transitionComplete,this),R.off(T.PRE_UPDATE,this.preUpdate,this),A.events.off(a.GAME_OUT,this.onGameOut,this),A.events.off(a.GAME_OVER,this.onGameOver,this),R.off(T.SHUTDOWN,this.shutdown,this)},resetPointers:function(){for(var P=this.manager.pointers,A=0;A<P.length;A++)P[A].reset()},destroy:function(){this.shutdown(),this.pluginEvents.emit(a.DESTROY),this.pluginEvents.removeAllListeners(),this.scene.sys.events.off(T.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]}}});x.register("InputPlugin",M,"input"),p.exports=M}),89639:((p,S,t)=>{var d=t(35154),c={},h={};h.register=function(r,n,e,s,o){c[r]={plugin:n,mapping:e,settingsKey:s,configKey:o}},h.getPlugin=function(r){return c[r]},h.install=function(r){var n=r.scene.sys,e=n.settings.input,s=n.game.config;for(var o in c){var i=c[o].plugin,a=c[o].mapping,l=c[o].settingsKey,f=c[o].configKey;d(e,l,s[f])&&(r[a]=new i(r))}},h.remove=function(r){c.hasOwnProperty(r)&&delete c[r]},p.exports=h}),42515:((p,S,t)=>{var d=t(31040),c=t(83419),h=t(20339),r=t(43855),n=t(47235),e=t(26099),s=t(25892),o=new c({initialize:function(a,l){this.manager=a,this.id=l,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new e,this.prevPosition=new e,this.midPoint=new e(-1,-1),this.velocity=new e,this.angle=0,this.distance=0,this.smoothFactor=0,this.motionFactor=.2,this.worldX=0,this.worldY=0,this.moveTime=0,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.isDown=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.active=l===0,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(i){var a=i.getWorldPoint(this.x,this.y);return this.worldX=a.x,this.worldY=a.y,this},positionToCamera:function(i,a){return i.getWorldPoint(this.x,this.y,a)},updateMotion:function(){var i=this.position.x,a=this.position.y,l=this.midPoint.x,f=this.midPoint.y;if(!(i===l&&a===f)){var u=n(this.motionFactor,l,i),v=n(this.motionFactor,f,a);r(u,i,.1)&&(u=i),r(v,a,.1)&&(v=a),this.midPoint.set(u,v);var m=i-u,x=a-v;this.velocity.set(m,x),this.angle=d(u,v,i,a),this.distance=Math.sqrt(m*m+x*x)}},up:function(i){"buttons"in i&&(this.buttons=i.buttons),this.event=i,this.button=i.button,this.upElement=i.target,this.manager.transformPointer(this,i.pageX,i.pageY,!1),i.button===0&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y),this.buttons===0&&(this.isDown=!1,this.upTime=i.timeStamp,this.wasTouch=!1)},down:function(i){"buttons"in i&&(this.buttons=i.buttons),this.event=i,this.button=i.button,this.downElement=i.target,this.manager.transformPointer(this,i.pageX,i.pageY,!1),i.button===0&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y),s.macOS&&i.ctrlKey&&(this.buttons=2,this.primaryDown=!1),this.isDown||(this.isDown=!0,this.downTime=i.timeStamp),this.wasTouch=!1},move:function(i){"buttons"in i&&(this.buttons=i.buttons),this.event=i,this.manager.transformPointer(this,i.pageX,i.pageY,!0),this.locked&&(this.movementX=i.movementX||i.mozMovementX||i.webkitMovementX||0,this.movementY=i.movementY||i.mozMovementY||i.webkitMovementY||0),this.moveTime=i.timeStamp,this.wasTouch=!1},wheel:function(i){"buttons"in i&&(this.buttons=i.buttons),this.event=i,this.manager.transformPointer(this,i.pageX,i.pageY,!1),this.deltaX=i.deltaX,this.deltaY=i.deltaY,this.deltaZ=i.deltaZ,this.wasTouch=!1},touchstart:function(i,a){i.pointerId&&(this.pointerId=i.pointerId),this.identifier=i.identifier,this.target=i.target,this.active=!0,this.buttons=1,this.event=a,this.downElement=i.target,this.manager.transformPointer(this,i.pageX,i.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=a.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(i,a){this.event=a,this.manager.transformPointer(this,i.pageX,i.pageY,!0),this.moveTime=a.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(i,a){this.buttons=0,this.event=a,this.upElement=i.target,this.manager.transformPointer(this,i.pageX,i.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=a.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(i,a){this.buttons=0,this.event=a,this.upElement=i.target,this.manager.transformPointer(this,i.pageX,i.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=a.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return this.buttons===0},leftButtonDown:function(){return!!(this.buttons&1)},rightButtonDown:function(){return!!(this.buttons&2)},middleButtonDown:function(){return!!(this.buttons&4)},backButtonDown:function(){return!!(this.buttons&8)},forwardButtonDown:function(){return!!(this.buttons&16)},leftButtonReleased:function(){return this.buttons===0?this.button===0&&!this.isDown:this.button===0},rightButtonReleased:function(){return this.buttons===0?this.button===2&&!this.isDown:this.button===2},middleButtonReleased:function(){return this.buttons===0?this.button===1&&!this.isDown:this.button===1},backButtonReleased:function(){return this.buttons===0?this.button===3&&!this.isDown:this.button===3},forwardButtonReleased:function(){return this.buttons===0?this.button===4&&!this.isDown:this.button===4},getDistance:function(){return this.isDown?h(this.downX,this.downY,this.x,this.y):h(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?d(this.downX,this.downY,this.x,this.y):d(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(i,a){i===void 0&&(i=10),a===void 0&&(a=[]);for(var l=this.prevPosition.x,f=this.prevPosition.y,u=this.position.x,v=this.position.y,m=0;m<i;m++){var x=1/i*m;a[m]={x:n(x,l,u),y:n(x,f,v)}}return a},reset:function(){this.event=null,this.downElement=null,this.upElement=null,this.button=0,this.buttons=0,this.position.set(0,0),this.prevPosition.set(0,0),this.midPoint.set(-1,-1),this.velocity.set(0,0),this.angle=0,this.distance=0,this.worldX=0,this.worldY=0,this.downX=0,this.downY=0,this.upX=0,this.upY=0,this.moveTime=0,this.upTime=0,this.downTime=0,this.primaryDown=!1,this.isDown=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.deltaX=0,this.deltaY=0,this.deltaZ=0,this.active=this.id===0},destroy:function(){this.camera=null,this.manager=null,this.position=null},x:{get:function(){return this.position.x},set:function(i){this.position.x=i}},y:{get:function(){return this.position.y},set:function(i){this.position.y=i}},time:{get:function(){return this.event?this.event.timeStamp:0}}});p.exports=o}),93301:(p=>{var S={MOUSE_DOWN:0,MOUSE_MOVE:1,MOUSE_UP:2,TOUCH_START:3,TOUCH_MOVE:4,TOUCH_END:5,POINTER_LOCK_CHANGE:6,TOUCH_CANCEL:7,MOUSE_WHEEL:8};p.exports=S}),7179:(p=>{p.exports="boot"}),85375:(p=>{p.exports="destroy"}),39843:(p=>{p.exports="dragend"}),23388:(p=>{p.exports="dragenter"}),16133:(p=>{p.exports="drag"}),27829:(p=>{p.exports="dragleave"}),53904:(p=>{p.exports="dragover"}),56058:(p=>{p.exports="dragstart"}),2642:(p=>{p.exports="drop"}),88171:(p=>{p.exports="gameobjectdown"}),36147:(p=>{p.exports="dragend"}),71692:(p=>{p.exports="dragenter"}),96149:(p=>{p.exports="drag"}),81285:(p=>{p.exports="dragleave"}),74048:(p=>{p.exports="dragover"}),21322:(p=>{p.exports="dragstart"}),49378:(p=>{p.exports="drop"}),86754:(p=>{p.exports="gameobjectmove"}),86433:(p=>{p.exports="gameobjectout"}),60709:(p=>{p.exports="gameobjectover"}),24081:(p=>{p.exports="pointerdown"}),11172:(p=>{p.exports="pointermove"}),18907:(p=>{p.exports="pointerout"}),95579:(p=>{p.exports="pointerover"}),35368:(p=>{p.exports="pointerup"}),26972:(p=>{p.exports="wheel"}),47078:(p=>{p.exports="gameobjectup"}),73802:(p=>{p.exports="gameobjectwheel"}),56718:(p=>{p.exports="gameout"}),25936:(p=>{p.exports="gameover"}),27503:(p=>{p.exports="boot"}),50852:(p=>{p.exports="process"}),96438:(p=>{p.exports="update"}),59152:(p=>{p.exports="pointerlockchange"}),47777:(p=>{p.exports="pointerdown"}),27957:(p=>{p.exports="pointerdownoutside"}),19444:(p=>{p.exports="pointermove"}),54251:(p=>{p.exports="pointerout"}),18667:(p=>{p.exports="pointerover"}),27192:(p=>{p.exports="pointerup"}),24652:(p=>{p.exports="pointerupoutside"}),45132:(p=>{p.exports="wheel"}),44512:(p=>{p.exports="preupdate"}),15757:(p=>{p.exports="shutdown"}),41637:(p=>{p.exports="start"}),93802:(p=>{p.exports="update"}),8214:((p,S,t)=>{p.exports={BOOT:t(7179),DESTROY:t(85375),DRAG_END:t(39843),DRAG_ENTER:t(23388),DRAG:t(16133),DRAG_LEAVE:t(27829),DRAG_OVER:t(53904),DRAG_START:t(56058),DROP:t(2642),GAME_OUT:t(56718),GAME_OVER:t(25936),GAMEOBJECT_DOWN:t(88171),GAMEOBJECT_DRAG_END:t(36147),GAMEOBJECT_DRAG_ENTER:t(71692),GAMEOBJECT_DRAG:t(96149),GAMEOBJECT_DRAG_LEAVE:t(81285),GAMEOBJECT_DRAG_OVER:t(74048),GAMEOBJECT_DRAG_START:t(21322),GAMEOBJECT_DROP:t(49378),GAMEOBJECT_MOVE:t(86754),GAMEOBJECT_OUT:t(86433),GAMEOBJECT_OVER:t(60709),GAMEOBJECT_POINTER_DOWN:t(24081),GAMEOBJECT_POINTER_MOVE:t(11172),GAMEOBJECT_POINTER_OUT:t(18907),GAMEOBJECT_POINTER_OVER:t(95579),GAMEOBJECT_POINTER_UP:t(35368),GAMEOBJECT_POINTER_WHEEL:t(26972),GAMEOBJECT_UP:t(47078),GAMEOBJECT_WHEEL:t(73802),MANAGER_BOOT:t(27503),MANAGER_PROCESS:t(50852),MANAGER_UPDATE:t(96438),POINTER_DOWN:t(47777),POINTER_DOWN_OUTSIDE:t(27957),POINTER_MOVE:t(19444),POINTER_OUT:t(54251),POINTER_OVER:t(18667),POINTER_UP:t(27192),POINTER_UP_OUTSIDE:t(24652),POINTER_WHEEL:t(45132),POINTERLOCK_CHANGE:t(59152),PRE_UPDATE:t(44512),SHUTDOWN:t(15757),START:t(41637),UPDATE:t(93802)}}),97421:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r,n){this.pad=r,this.events=r.events,this.index=n,this.value=0,this.threshold=.1},update:function(h){this.value=h},getValue:function(){return Math.abs(this.value)<this.threshold?0:this.value},destroy:function(){this.pad=null,this.events=null}});p.exports=c}),28884:((p,S,t)=>{var d=t(83419),c=t(92734),h=new d({initialize:function(n,e){this.pad=n,this.events=n.manager,this.index=e,this.value=0,this.threshold=1,this.pressed=!1},update:function(r){this.value=r;var n=this.pad,e=this.index;r>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(c.BUTTON_DOWN,n,this,r),this.pad.emit(c.GAMEPAD_BUTTON_DOWN,e,r,this)):this.pressed&&(this.pressed=!1,this.events.emit(c.BUTTON_UP,n,this,r),this.pad.emit(c.GAMEPAD_BUTTON_UP,e,r,this))},destroy:function(){this.pad=null,this.events=null}});p.exports=h}),99125:((p,S,t)=>{var d=t(97421),c=t(28884),h=t(83419),r=t(50792),n=t(26099),e=new h({Extends:r,initialize:function(o,i){r.call(this),this.manager=o,this.pad=i,this.id=i.id,this.index=i.index;for(var a=[],l=0;l<i.buttons.length;l++)a.push(new c(this,l));this.buttons=a;var f=[];for(l=0;l<i.axes.length;l++)f.push(new d(this,l));this.axes=f,this.vibration=i.vibrationActuator;var u={value:0,pressed:!1};this._LCLeft=a[14]?a[14]:u,this._LCRight=a[15]?a[15]:u,this._LCTop=a[12]?a[12]:u,this._LCBottom=a[13]?a[13]:u,this._RCLeft=a[2]?a[2]:u,this._RCRight=a[1]?a[1]:u,this._RCTop=a[3]?a[3]:u,this._RCBottom=a[0]?a[0]:u,this._FBLeftTop=a[4]?a[4]:u,this._FBLeftBottom=a[6]?a[6]:u,this._FBRightTop=a[5]?a[5]:u,this._FBRightBottom=a[7]?a[7]:u;var v={value:0};this._HAxisLeft=f[0]?f[0]:v,this._VAxisLeft=f[1]?f[1]:v,this._HAxisRight=f[2]?f[2]:v,this._VAxisRight=f[3]?f[3]:v,this.leftStick=new n,this.rightStick=new n,this._created=performance.now()},getAxisTotal:function(){return this.axes.length},getAxisValue:function(s){return this.axes[s].getValue()},setAxisThreshold:function(s){for(var o=0;o<this.axes.length;o++)this.axes[o].threshold=s},getButtonTotal:function(){return this.buttons.length},getButtonValue:function(s){return this.buttons[s].value},isButtonDown:function(s){return this.buttons[s].pressed},update:function(s){if(!(s.timestamp<this._created)){var o,i=this.buttons,a=s.buttons,l=i.length;for(o=0;o<l;o++)i[o].update(a[o].value);var f=this.axes,u=s.axes;for(l=f.length,o=0;o<l;o++)f[o].update(u[o]);l>=2&&(this.leftStick.set(f[0].getValue(),f[1].getValue()),l>=4&&this.rightStick.set(f[2].getValue(),f[3].getValue()))}},destroy:function(){this.removeAllListeners(),this.manager=null,this.pad=null;var s;for(s=0;s<this.buttons.length;s++)this.buttons[s].destroy();for(s=0;s<this.axes.length;s++)this.axes[s].destroy();this.buttons=[],this.axes=[]},connected:{get:function(){return this.pad.connected}},timestamp:{get:function(){return this.pad.timestamp}},left:{get:function(){return this._LCLeft.pressed}},right:{get:function(){return this._LCRight.pressed}},up:{get:function(){return this._LCTop.pressed}},down:{get:function(){return this._LCBottom.pressed}},A:{get:function(){return this._RCBottom.pressed}},Y:{get:function(){return this._RCTop.pressed}},X:{get:function(){return this._RCLeft.pressed}},B:{get:function(){return this._RCRight.pressed}},L1:{get:function(){return this._FBLeftTop.value}},L2:{get:function(){return this._FBLeftBottom.value}},R1:{get:function(){return this._FBRightTop.value}},R2:{get:function(){return this._FBRightBottom.value}}});p.exports=e}),56654:((p,S,t)=>{var d=t(83419),c=t(50792),h=t(92734),r=t(99125),n=t(35154),e=t(89639),s=t(8214),o=new d({Extends:c,initialize:function(a){c.call(this),this.scene=a.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=a,this.enabled=!0,this.target,this.gamepads=[],this.queue=[],this.onGamepadHandler,this._pad1,this._pad2,this._pad3,this._pad4,a.pluginEvents.once(s.BOOT,this.boot,this),a.pluginEvents.on(s.START,this.start,this)},boot:function(){var i=this.scene.sys.game,a=this.settings.input,l=i.config;this.enabled=n(a,"gamepad",l.inputGamepad)&&i.device.input.gamepads,this.target=n(a,"gamepad.target",l.inputGamepadEventTarget),this.sceneInputPlugin.pluginEvents.once(s.DESTROY,this.destroy,this)},start:function(){this.enabled&&(this.startListeners(),this.refreshPads()),this.sceneInputPlugin.pluginEvents.once(s.SHUTDOWN,this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var i=this,a=this.target,l=function(f){f.defaultPrevented||!i.isActive()||(i.refreshPads(),i.queue.push(f))};this.onGamepadHandler=l,a.addEventListener("gamepadconnected",l,!1),a.addEventListener("gamepaddisconnected",l,!1),this.sceneInputPlugin.pluginEvents.on(s.UPDATE,this.update,this)},stopListeners:function(){this.target.removeEventListener("gamepadconnected",this.onGamepadHandler),this.target.removeEventListener("gamepaddisconnected",this.onGamepadHandler),this.sceneInputPlugin.pluginEvents.off(s.UPDATE,this.update);for(var i=0;i<this.gamepads.length;i++)this.gamepads[i].removeAllListeners()},disconnectAll:function(){for(var i=0;i<this.gamepads.length;i++)this.gamepads[i].pad.connected=!1},refreshPads:function(){var i=navigator.getGamepads();if(!i)this.disconnectAll();else for(var a=this.gamepads,l=0;l<i.length;l++){var f=i[l];if(f){var u=f.id,v=f.index,m=a[v];if(m)m.id!==u?(m.destroy(),a[v]=new r(this,f)):m.update(f);else{var x=new r(this,f);a[v]=x,this._pad1?this._pad2?this._pad3?this._pad4||(this._pad4=x):this._pad3=x:this._pad2=x:this._pad1=x}}}},getAll:function(){for(var i=[],a=this.gamepads,l=0;l<a.length;l++)a[l]&&i.push(a[l]);return i},getPad:function(i){for(var a=this.gamepads,l=0;l<a.length;l++)if(a[l]&&a[l].index===i)return a[l]},update:function(){if(this.enabled){this.refreshPads();var i=this.queue.length;if(i!==0)for(var a=this.queue.splice(0,i),l=0;l<i;l++){var f=a[l],u=this.getPad(f.gamepad.index);f.type==="gamepadconnected"?this.emit(h.CONNECTED,u,f):f.type==="gamepaddisconnected"&&this.emit(h.DISCONNECTED,u,f)}}},shutdown:function(){this.stopListeners(),this.removeAllListeners()},destroy:function(){this.shutdown();for(var i=0;i<this.gamepads.length;i++)this.gamepads[i]&&this.gamepads[i].destroy();this.gamepads=[],this.scene=null,this.settings=null,this.sceneInputPlugin=null,this.target=null},total:{get:function(){return this.gamepads.length}},pad1:{get:function(){return this._pad1}},pad2:{get:function(){return this._pad2}},pad3:{get:function(){return this._pad3}},pad4:{get:function(){return this._pad4}}});e.register("GamepadPlugin",o,"gamepad","gamepad","inputGamepad"),p.exports=o}),89651:(p=>{p.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SELECT:8,START:9,B:0,A:1,Y:2,X:3,LEFT_SHOULDER:4,RIGHT_SHOULDER:5}}),65294:(p=>{p.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SHARE:8,OPTIONS:9,PS:16,TOUCHBAR:17,X:0,CIRCLE:1,SQUARE:2,TRIANGLE:3,L1:4,R1:5,L2:6,R2:7,L3:10,R3:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}}),90089:(p=>{p.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,MENU:16,A:0,B:1,X:2,Y:3,LB:4,RB:5,LT:6,RT:7,BACK:8,START:9,LS:10,RS:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}}),64894:((p,S,t)=>{p.exports={DUALSHOCK_4:t(65294),SNES_USB:t(89651),XBOX_360:t(90089)}}),46008:(p=>{p.exports="down"}),7629:(p=>{p.exports="up"}),42206:(p=>{p.exports="connected"}),86544:(p=>{p.exports="disconnected"}),94784:(p=>{p.exports="down"}),14325:(p=>{p.exports="up"}),92734:((p,S,t)=>{p.exports={BUTTON_DOWN:t(46008),BUTTON_UP:t(7629),CONNECTED:t(42206),DISCONNECTED:t(86544),GAMEPAD_BUTTON_DOWN:t(94784),GAMEPAD_BUTTON_UP:t(14325)}}),48646:((p,S,t)=>{p.exports={Axis:t(97421),Button:t(28884),Events:t(92734),Gamepad:t(99125),GamepadPlugin:t(56654),Configs:t(64894)}}),14350:((p,S,t)=>{var d=t(93301),c=t(79291),h={CreatePixelPerfectHandler:t(84409),CreateInteractiveObject:t(74457),Events:t(8214),Gamepad:t(48646),InputManager:t(7003),InputPlugin:t(48205),InputPluginCache:t(89639),Keyboard:t(51442),Mouse:t(87078),Pointer:t(42515),Touch:t(95618)};h=c(!1,h,d),p.exports=h}),78970:((p,S,t)=>{var d=t(72905),c=t(83419),h=t(8443),r=t(8214),n=t(46032),e=t(29747),s=new c({initialize:function(i){this.manager=i,this.queue=[],this.preventDefault=!0,this.captures=[],this.enabled=!1,this.target,this.onKeyDown=e,this.onKeyUp=e,i.events.once(r.MANAGER_BOOT,this.boot,this)},boot:function(){var o=this.manager.config;this.enabled=o.inputKeyboard,this.target=o.inputKeyboardEventTarget,this.addCapture(o.inputKeyboardCapture),!this.target&&window&&(this.target=window),this.enabled&&this.target&&this.startListeners(),this.manager.game.events.on(h.POST_STEP,this.postUpdate,this)},startListeners:function(){var o=this;this.onKeyDown=function(a){if(!(a.defaultPrevented||!o.enabled||!o.manager)){o.queue.push(a),o.manager.events.emit(r.MANAGER_PROCESS);var l=a.altKey||a.ctrlKey||a.shiftKey||a.metaKey;o.preventDefault&&!l&&o.captures.indexOf(a.keyCode)>-1&&a.preventDefault()}},this.onKeyUp=function(a){if(!(a.defaultPrevented||!o.enabled||!o.manager)){o.queue.push(a),o.manager.events.emit(r.MANAGER_PROCESS);var l=a.altKey||a.ctrlKey||a.shiftKey||a.metaKey;o.preventDefault&&!l&&o.captures.indexOf(a.keyCode)>-1&&a.preventDefault()}};var i=this.target;i&&(i.addEventListener("keydown",this.onKeyDown,!1),i.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var o=this.target;o.removeEventListener("keydown",this.onKeyDown,!1),o.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(o){typeof o=="string"&&(o=o.split(",")),Array.isArray(o)||(o=[o]);for(var i=this.captures,a=0;a<o.length;a++){var l=o[a];typeof l=="string"&&(l=n[l.trim().toUpperCase()]),i.indexOf(l)===-1&&i.push(l)}this.preventDefault=i.length>0},removeCapture:function(o){typeof o=="string"&&(o=o.split(",")),Array.isArray(o)||(o=[o]);for(var i=this.captures,a=0;a<o.length;a++){var l=o[a];typeof l=="string"&&(l=n[l.toUpperCase()]),d(i,l)}this.preventDefault=i.length>0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(h.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});p.exports=s}),28846:((p,S,t)=>{var d=t(83419),c=t(50792),h=t(95922),r=t(8443),n=t(35154),e=t(8214),s=t(89639),o=t(30472),i=t(46032),a=t(87960),l=t(74600),f=t(44594),u=t(56583),v=new d({Extends:c,initialize:function(x){c.call(this),this.game=x.systems.game,this.scene=x.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=x,this.manager=x.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],this.prevCode=null,this.prevTime=0,this.prevType=null,x.pluginEvents.once(e.BOOT,this.boot,this),x.pluginEvents.on(e.START,this.start,this)},boot:function(){var m=this.settings.input;this.enabled=n(m,"keyboard",!0);var x=n(m,"keyboard.capture",null);x&&this.addCaptures(x),this.sceneInputPlugin.pluginEvents.once(e.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.events.on(e.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(e.SHUTDOWN,this.shutdown,this),this.game.events.on(r.BLUR,this.resetKeys,this),this.scene.sys.events.on(f.PAUSE,this.resetKeys,this),this.scene.sys.events.on(f.SLEEP,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.canInput()},addCapture:function(m){return this.manager.addCapture(m),this},removeCapture:function(m){return this.manager.removeCapture(m),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:i.UP,down:i.DOWN,left:i.LEFT,right:i.RIGHT,space:i.SPACE,shift:i.SHIFT})},addKeys:function(m,x,g){x===void 0&&(x=!0),g===void 0&&(g=!1);var y={};if(typeof m=="string"){m=m.split(",");for(var T=0;T<m.length;T++){var C=m[T].trim();C&&(y[C]=this.addKey(C,x,g))}}else for(var E in m)y[E]=this.addKey(m[E],x,g);return y},addKey:function(m,x,g){x===void 0&&(x=!0),g===void 0&&(g=!1);var y=this.keys;if(m instanceof o){var T=y.indexOf(m);return T>-1?y[T]=m:y[m.keyCode]=m,x&&this.addCapture(m.keyCode),m.setEmitOnRepeat(g),m}return typeof m=="string"&&(m=i[m.toUpperCase()]),y[m]||(y[m]=new o(this,m),x&&this.addCapture(m),y[m].setEmitOnRepeat(g)),y[m]},removeKey:function(m,x,g){x===void 0&&(x=!1),g===void 0&&(g=!1);var y=this.keys,T;if(m instanceof o){var C=y.indexOf(m);C>-1&&(T=this.keys[C],this.keys[C]=void 0)}else typeof m=="string"&&(m=i[m.toUpperCase()]);return y[m]&&(T=y[m],y[m]=void 0),T&&(T.plugin=null,g&&this.removeCapture(T.keyCode),x&&T.destroy()),this},removeAllKeys:function(m,x){m===void 0&&(m=!1),x===void 0&&(x=!1);for(var g=this.keys,y=0;y<g.length;y++){var T=g[y];T&&(g[y]=void 0,x&&this.removeCapture(T.keyCode),m&&T.destroy())}return this},createCombo:function(m,x){return new a(this,m,x)},checkDown:function(m,x){if(x===void 0&&(x=0),this.enabled&&m.isDown){var g=u(this.time-m.timeDown,x);if(g>m._tick)return m._tick=g,!0}return!1},update:function(){var m=this.manager.queue,x=m.length;if(!(!this.isActive()||x===0))for(var g=this.keys,y=0;y<x;y++){var T=m[y],C=T.keyCode,E=g[C],M=!1;T.cancelled===void 0&&(T.cancelled=0,T.stopImmediatePropagation=function(){T.cancelled=1},T.stopPropagation=function(){T.cancelled=-1}),T.cancelled!==-1&&(C===this.prevCode&&T.timeStamp===this.prevTime&&T.type===this.prevType||(this.prevCode=C,this.prevTime=T.timeStamp,this.prevType=T.type,T.type==="keydown"?(E&&(M=E.isDown,E.onDown(T)),!T.cancelled&&(!E||!M)&&(l[C]&&this.emit(h.KEY_DOWN+l[C],T),T.cancelled||this.emit(h.ANY_KEY_DOWN,T))):(E&&E.onUp(T),T.cancelled||(l[C]&&this.emit(h.KEY_UP+l[C],T),T.cancelled||this.emit(h.ANY_KEY_UP,T))),T.cancelled===1&&(T.cancelled=0)))}},resetKeys:function(){for(var m=this.keys,x=0;x<m.length;x++)m[x]&&m[x].reset();return this},shutdown:function(){this.removeAllKeys(!0),this.removeAllListeners(),this.sceneInputPlugin.manager.events.off(e.MANAGER_PROCESS,this.update,this),this.game.events.off(r.BLUR,this.resetKeys),this.scene.sys.events.off(f.PAUSE,this.resetKeys,this),this.scene.sys.events.off(f.SLEEP,this.resetKeys,this),this.queue=[]},destroy:function(){this.shutdown();for(var m=this.keys,x=0;x<m.length;x++)m[x]&&m[x].destroy();this.keys=[],this.combos=[],this.queue=[],this.scene=null,this.settings=null,this.sceneInputPlugin=null,this.manager=null},time:{get:function(){return this.sceneInputPlugin.manager.time}}});s.register("KeyboardPlugin",v,"keyboard","keyboard","inputKeyboard"),p.exports=v}),66970:(p=>{var S=function(t,d){return d.timeLastMatched=t.timeStamp,d.index++,d.index===d.size?!0:(d.current=d.keyCodes[d.index],!1)};p.exports=S}),87960:((p,S,t)=>{var d=t(83419),c=t(95922),h=t(95540),r=t(68769),n=t(92803),e=new d({initialize:function(o,i,a){if(a===void 0&&(a={}),i.length<2)return!1;this.manager=o,this.enabled=!0,this.keyCodes=[];for(var l=0;l<i.length;l++){var f=i[l];typeof f=="string"?this.keyCodes.push(f.toUpperCase().charCodeAt(0)):typeof f=="number"?this.keyCodes.push(f):f.hasOwnProperty("keyCode")&&this.keyCodes.push(f.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=h(a,"resetOnWrongKey",!0),this.maxKeyDelay=h(a,"maxKeyDelay",0),this.resetOnMatch=h(a,"resetOnMatch",!1),this.deleteOnMatch=h(a,"deleteOnMatch",!1);var u=this,v=function(m){if(!(u.matched||!u.enabled)){var x=r(m,u);x&&(u.manager.emit(c.COMBO_MATCH,u,m),u.resetOnMatch?n(u):u.deleteOnMatch&&u.destroy())}};this.onKeyDown=v,this.manager.on(c.ANY_KEY_DOWN,this.onKeyDown)},progress:{get:function(){return this.index/this.size}},destroy:function(){this.enabled=!1,this.keyCodes=[],this.manager.off(c.ANY_KEY_DOWN,this.onKeyDown),this.manager=null}});p.exports=e}),68769:((p,S,t)=>{var d=t(66970),c=function(h,r){if(r.matched)return!0;var n=!1,e=!1;if(h.keyCode===r.current)if(r.index>0&&r.maxKeyDelay>0){var s=r.timeLastMatched+r.maxKeyDelay;h.timeStamp<=s&&(e=!0,n=d(h,r))}else e=!0,n=d(h,r);return!e&&r.resetOnWrongKey&&(r.index=0,r.current=r.keyCodes[0]),n&&(r.timeLastMatched=h.timeStamp,r.matched=!0,r.timeMatched=h.timeStamp),n};p.exports=c}),92803:(p=>{var S=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t};p.exports=S}),92612:(p=>{p.exports="keydown"}),23345:(p=>{p.exports="keyup"}),21957:(p=>{p.exports="keycombomatch"}),44743:(p=>{p.exports="down"}),3771:(p=>{p.exports="keydown-"}),46358:(p=>{p.exports="keyup-"}),75674:(p=>{p.exports="up"}),95922:((p,S,t)=>{p.exports={ANY_KEY_DOWN:t(92612),ANY_KEY_UP:t(23345),COMBO_MATCH:t(21957),DOWN:t(44743),KEY_DOWN:t(3771),KEY_UP:t(46358),UP:t(75674)}}),51442:((p,S,t)=>{p.exports={Events:t(95922),KeyboardManager:t(78970),KeyboardPlugin:t(28846),Key:t(30472),KeyCodes:t(46032),KeyCombo:t(87960),AdvanceKeyCombo:t(66970),ProcessKeyCombo:t(68769),ResetKeyCombo:t(92803),JustDown:t(90229),JustUp:t(38796),DownDuration:t(37015),UpDuration:t(41170)}}),37015:(p=>{var S=function(t,d){d===void 0&&(d=50);var c=t.plugin.game.loop.time-t.timeDown;return t.isDown&&c<d};p.exports=S}),90229:(p=>{var S=function(t){return t._justDown?(t._justDown=!1,!0):!1};p.exports=S}),38796:(p=>{var S=function(t){return t._justUp?(t._justUp=!1,!0):!1};p.exports=S}),30472:((p,S,t)=>{var d=t(83419),c=t(50792),h=t(95922),r=new d({Extends:c,initialize:function(e,s){c.call(this),this.plugin=e,this.keyCode=s,this.originalEvent=void 0,this.enabled=!0,this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.location=0,this.timeDown=0,this.duration=0,this.timeUp=0,this.emitOnRepeat=!1,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1},setEmitOnRepeat:function(n){return this.emitOnRepeat=n,this},onDown:function(n){this.originalEvent=n,this.enabled&&(this.altKey=n.altKey,this.ctrlKey=n.ctrlKey,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.location=n.location,this.repeats++,this.isDown?this.emitOnRepeat&&this.emit(h.DOWN,this,n):(this.isDown=!0,this.isUp=!1,this.timeDown=n.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(h.DOWN,this,n)))},onUp:function(n){this.originalEvent=n,this.enabled&&(this.isDown=!1,this.isUp=!0,this.timeUp=n.timeStamp,this.duration=this.timeUp-this.timeDown,this.repeats=0,this._justDown=!1,this._justUp=!0,this._tick=-1,this.emit(h.UP,this,n))},reset:function(){return this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.timeDown=0,this.duration=0,this.timeUp=0,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1,this},getDuration:function(){return this.isDown?this.plugin.game.loop.time-this.timeDown:0},destroy:function(){this.removeAllListeners(),this.originalEvent=null,this.plugin=null}});p.exports=r}),46032:(p=>{var S={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,NUMPAD_ADD:107,NUMPAD_SUBTRACT:109,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221,SEMICOLON_FIREFOX:59,COLON:58,COMMA_FIREFOX_WINDOWS:60,COMMA_FIREFOX:62,BRACKET_RIGHT_FIREFOX:174,BRACKET_LEFT_FIREFOX:175};p.exports=S}),74600:((p,S,t)=>{var d=t(46032),c={};for(var h in d)c[d[h]]=h;p.exports=c}),41170:(p=>{var S=function(t,d){d===void 0&&(d=50);var c=t.plugin.game.loop.time-t.timeUp;return t.isUp&&c<d};p.exports=S}),85098:((p,S,t)=>{var d=t(83419),c=t(89357),h=t(8214),r=t(29747),n=new d({initialize:function(s){this.manager=s,this.preventDefaultDown=!0,this.preventDefaultUp=!0,this.preventDefaultMove=!0,this.preventDefaultWheel=!1,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=r,this.onMouseDown=r,this.onMouseUp=r,this.onMouseDownWindow=r,this.onMouseUpWindow=r,this.onMouseOver=r,this.onMouseOut=r,this.onMouseWheel=r,this.pointerLockChange=r,this.isTop=!0,s.events.once(h.MANAGER_BOOT,this.boot,this)},boot:function(){var e=this.manager.config;this.enabled=e.inputMouse,this.target=e.inputMouseEventTarget,this.passive=e.inputMousePassive,this.preventDefaultDown=e.inputMousePreventDefaultDown,this.preventDefaultUp=e.inputMousePreventDefaultUp,this.preventDefaultMove=e.inputMousePreventDefaultMove,this.preventDefaultWheel=e.inputMousePreventDefaultWheel,this.target?typeof this.target=="string"&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,e.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",function(e){return e.preventDefault(),!1}),this},requestPointerLock:function(){if(c.pointerLock){var e=this.target;e.requestPointerLock=e.requestPointerLock||e.mozRequestPointerLock||e.webkitRequestPointerLock,e.requestPointerLock()}},releasePointerLock:function(){c.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var e=this.target;if(e){var s=this,o=this.manager,i=o.canvas,a=window&&window.focus&&o.game.config.autoFocus;this.onMouseMove=function(f){!f.defaultPrevented&&s.enabled&&o&&o.enabled&&(o.onMouseMove(f),s.preventDefaultMove&&f.preventDefault())},this.onMouseDown=function(f){a&&window.focus(),!f.defaultPrevented&&s.enabled&&o&&o.enabled&&(o.onMouseDown(f),s.preventDefaultDown&&f.target===i&&f.preventDefault())},this.onMouseDownWindow=function(f){f.sourceCapabilities&&f.sourceCapabilities.firesTouchEvents||!f.defaultPrevented&&s.enabled&&o&&o.enabled&&f.target!==i&&o.onMouseDown(f)},this.onMouseUp=function(f){!f.defaultPrevented&&s.enabled&&o&&o.enabled&&(o.onMouseUp(f),s.preventDefaultUp&&f.target===i&&f.preventDefault())},this.onMouseUpWindow=function(f){f.sourceCapabilities&&f.sourceCapabilities.firesTouchEvents||!f.defaultPrevented&&s.enabled&&o&&o.enabled&&f.target!==i&&o.onMouseUp(f)},this.onMouseOver=function(f){!f.defaultPrevented&&s.enabled&&o&&o.enabled&&o.setCanvasOver(f)},this.onMouseOut=function(f){!f.defaultPrevented&&s.enabled&&o&&o.enabled&&o.setCanvasOut(f)},this.onMouseWheel=function(f){!f.defaultPrevented&&s.enabled&&o&&o.enabled&&o.onMouseWheel(f),s.preventDefaultWheel&&f.target===i&&f.preventDefault()};var l={passive:!0};if(e.addEventListener("mousemove",this.onMouseMove),e.addEventListener("mousedown",this.onMouseDown),e.addEventListener("mouseup",this.onMouseUp),e.addEventListener("mouseover",this.onMouseOver,l),e.addEventListener("mouseout",this.onMouseOut,l),this.preventDefaultWheel?e.addEventListener("wheel",this.onMouseWheel,{passive:!1}):e.addEventListener("wheel",this.onMouseWheel,l),window&&o.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,l),window.top.addEventListener("mouseup",this.onMouseUpWindow,l)}catch{window.addEventListener("mousedown",this.onMouseDownWindow,l),window.addEventListener("mouseup",this.onMouseUpWindow,l),this.isTop=!1}c.pointerLock&&(this.pointerLockChange=function(f){var u=s.target;s.locked=document.pointerLockElement===u||document.mozPointerLockElement===u||document.webkitPointerLockElement===u,o.onPointerLockChange(f)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var e=this.target;e.removeEventListener("mousemove",this.onMouseMove),e.removeEventListener("mousedown",this.onMouseDown),e.removeEventListener("mouseup",this.onMouseUp),e.removeEventListener("mouseover",this.onMouseOver),e.removeEventListener("mouseout",this.onMouseOut),window&&(e=this.isTop?window.top:window,e.removeEventListener("mousedown",this.onMouseDownWindow),e.removeEventListener("mouseup",this.onMouseUpWindow)),c.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});p.exports=n}),87078:((p,S,t)=>{p.exports={MouseManager:t(85098)}}),36210:((p,S,t)=>{var d=t(83419),c=t(8214),h=t(29747),r=new d({initialize:function(e){this.manager=e,this.capture=!0,this.enabled=!1,this.target,this.onTouchStart=h,this.onTouchStartWindow=h,this.onTouchMove=h,this.onTouchEnd=h,this.onTouchEndWindow=h,this.onTouchCancel=h,this.onTouchCancelWindow=h,this.isTop=!0,e.events.once(c.MANAGER_BOOT,this.boot,this)},boot:function(){var n=this.manager.config;this.enabled=n.inputTouch,this.target=n.inputTouchEventTarget,this.capture=n.inputTouchCapture,this.target?typeof this.target=="string"&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,n.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",function(n){return n.preventDefault(),!1}),this},startListeners:function(){var n=this.target;if(n){var e=this,s=this.manager,o=s.canvas,i=window&&window.focus&&s.game.config.autoFocus;this.onTouchMove=function(u){!u.defaultPrevented&&e.enabled&&s&&s.enabled&&(s.onTouchMove(u),e.capture&&u.cancelable&&u.preventDefault())},this.onTouchStart=function(u){i&&window.focus(),!u.defaultPrevented&&e.enabled&&s&&s.enabled&&(s.onTouchStart(u),e.capture&&u.cancelable&&u.target===o&&u.preventDefault())},this.onTouchStartWindow=function(u){!u.defaultPrevented&&e.enabled&&s&&s.enabled&&u.target!==o&&s.onTouchStart(u)},this.onTouchEnd=function(u){!u.defaultPrevented&&e.enabled&&s&&s.enabled&&(s.onTouchEnd(u),e.capture&&u.cancelable&&u.target===o&&u.preventDefault())},this.onTouchEndWindow=function(u){!u.defaultPrevented&&e.enabled&&s&&s.enabled&&u.target!==o&&s.onTouchEnd(u)},this.onTouchCancel=function(u){!u.defaultPrevented&&e.enabled&&s&&s.enabled&&(s.onTouchCancel(u),e.capture&&u.preventDefault())},this.onTouchCancelWindow=function(u){!u.defaultPrevented&&e.enabled&&s&&s.enabled&&s.onTouchCancel(u)};var a=this.capture,l={passive:!0},f={passive:!1};if(n.addEventListener("touchstart",this.onTouchStart,a?f:l),n.addEventListener("touchmove",this.onTouchMove,a?f:l),n.addEventListener("touchend",this.onTouchEnd,a?f:l),n.addEventListener("touchcancel",this.onTouchCancel,a?f:l),window&&s.game.config.inputWindowEvents)try{window.top.addEventListener("touchstart",this.onTouchStartWindow,f),window.top.addEventListener("touchend",this.onTouchEndWindow,f),window.top.addEventListener("touchcancel",this.onTouchCancelWindow,f)}catch{window.addEventListener("touchstart",this.onTouchStartWindow,f),window.addEventListener("touchend",this.onTouchEndWindow,f),window.addEventListener("touchcancel",this.onTouchCancelWindow,f),this.isTop=!1}this.enabled=!0}},stopListeners:function(){var n=this.target;n.removeEventListener("touchstart",this.onTouchStart),n.removeEventListener("touchmove",this.onTouchMove),n.removeEventListener("touchend",this.onTouchEnd),n.removeEventListener("touchcancel",this.onTouchCancel),window&&(n=this.isTop?window.top:window,n.removeEventListener("touchstart",this.onTouchStartWindow),n.removeEventListener("touchend",this.onTouchEndWindow),n.removeEventListener("touchcancel",this.onTouchCancelWindow))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});p.exports=r}),95618:((p,S,t)=>{p.exports={TouchManager:t(36210)}}),41299:((p,S,t)=>{var d=t(83419),c=t(23906),h=t(54899),r=t(95540),n=t(98356),e=t(3374),s=t(84376),o=t(92638),i=new d({initialize:function(l,f){if(this.loader=l,this.cache=r(f,"cache",!1),this.type=r(f,"type",!1),!this.type)throw new Error("Invalid File type: "+this.type);this.key=r(f,"key",!1);var u=this.key;if(l.prefix&&l.prefix!==""&&(this.key=l.prefix+u),!this.key)throw new Error("Invalid File key: "+this.key);var v=r(f,"url");v===void 0?v=l.path+u+"."+r(f,"extension",""):typeof v=="string"&&!v.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)&&(v=l.path+v),this.url=v,this.src="",this.xhrSettings=o(r(f,"responseType",void 0)),r(f,"xhrSettings",!1)&&(this.xhrSettings=e(this.xhrSettings,r(f,"xhrSettings",{}))),this.xhrLoader=null,this.state=typeof this.url=="function"?c.FILE_POPULATED:c.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=r(f,"config",{}),this.multiFile,this.linkFile,this.base64=typeof v=="string"&&v.indexOf("data:")===0,this.retryAttempts=r(f,"maxRetries",l.maxRetries)},setLink:function(a){this.linkFile=a,a.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){if(this.state===c.FILE_POPULATED)this.loader.nextFile(this,!0);else{if(this.state=c.FILE_LOADING,this.src=n(this,this.loader.baseURL),!this.src)throw new Error("URL Error in File: "+this.key+" from: "+this.url);this.src.indexOf("data:")===0&&(this.base64=!0),this.xhrLoader=s(this,this.loader.xhr)}},onLoad:function(a,l){var f=a.responseURL&&this.loader.localSchemes.some(function(m){return a.responseURL.indexOf(m)===0}),u=f&&l.target.status===0,v=!(l.target&&l.target.status!==200)||u;a.readyState===4&&a.status>=400&&a.status<=599&&(v=!1),this.state=c.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,v)},onBase64Load:function(a){this.xhrLoader=a,this.state=c.FILE_LOADED,this.percentComplete=1,this.loader.emit(h.FILE_PROGRESS,this,this.percentComplete),this.loader.nextFile(this,!0)},onError:function(){this.resetXHR(),this.retryAttempts>0?(this.retryAttempts--,this.load()):this.loader.nextFile(this,!1)},onProgress:function(a){a.lengthComputable&&(this.bytesLoaded=a.loaded,this.bytesTotal=a.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(h.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=c.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=c.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){console.error('Failed to process file: %s "%s"',this.type,this.key),this.state=c.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.data&&this.cache.add(this.key,this.data)},pendingDestroy:function(a){if(this.state!==c.FILE_PENDING_DESTROY){a===void 0&&(a=this.data);var l=this.key,f=this.type;this.loader.emit(h.FILE_COMPLETE,l,f,a),this.loader.emit(h.FILE_KEY_COMPLETE+f+"-"+l,l,f,a),this.loader.flagForRemoval(this),this.state=c.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});i.createObjectURL=function(a,l,f){if(typeof URL=="function")a.src=URL.createObjectURL(l);else{var u=new FileReader;u.onload=function(){a.removeAttribute("crossOrigin"),a.src="data:"+(l.type||f)+";base64,"+u.result.split(",")[1]},u.onerror=a.onerror,u.readAsDataURL(l)}},i.revokeObjectURL=function(a){typeof URL=="function"&&URL.revokeObjectURL(a.src)},p.exports=i}),74099:(p=>{var S={},t={install:function(d){for(var c in S)d[c]=S[c]},register:function(d,c){S[d]=c},destroy:function(){S={}}};p.exports=t}),98356:(p=>{var S=function(t,d){return t.url?t.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:d+t.url:!1};p.exports=S}),74261:((p,S,t)=>{var d=t(83419),c=t(23906),h=t(35072),r=t(50792),n=t(54899),e=t(74099),s=t(95540),o=t(35154),i=t(41212),a=t(37277),l=t(44594),f=t(92638),u=new d({Extends:r,initialize:function(m){r.call(this);var x=m.sys.game.config,g=m.sys.settings.loader;this.scene=m,this.systems=m.sys,this.cacheManager=m.sys.cache,this.textureManager=m.sys.textures,this.sceneManager=m.sys.game.scene,e.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(s(g,"baseURL",x.loaderBaseURL)),this.setPath(s(g,"path",x.loaderPath)),this.setPrefix(s(g,"prefix",x.loaderPrefix)),this.maxParallelDownloads=s(g,"maxParallelDownloads",x.loaderMaxParallelDownloads),this.xhr=f(s(g,"responseType",x.loaderResponseType),s(g,"async",x.loaderAsync),s(g,"user",x.loaderUser),s(g,"password",x.loaderPassword),s(g,"timeout",x.loaderTimeout),s(g,"withCredentials",x.loaderWithCredentials)),this.crossOrigin=s(g,"crossOrigin",x.loaderCrossOrigin),this.imageLoadType=s(g,"imageLoadType",x.loaderImageLoadType),this.localSchemes=s(g,"localScheme",x.loaderLocalScheme),this.totalToLoad=0,this.progress=0,this.list=new h,this.inflight=new h,this.queue=new h,this._deleteQueue=new h,this.totalFailed=0,this.totalComplete=0,this.state=c.LOADER_IDLE,this.multiKeyIndex=0,this.maxRetries=s(g,"maxRetries",x.loaderMaxRetries),m.sys.events.once(l.BOOT,this.boot,this),m.sys.events.on(l.START,this.pluginStart,this)},boot:function(){this.systems.events.once(l.DESTROY,this.destroy,this)},pluginStart:function(){this.systems.events.once(l.SHUTDOWN,this.shutdown,this)},setBaseURL:function(v){return v===void 0&&(v=""),v!==""&&v.substr(-1)!=="/"&&(v=v.concat("/")),this.baseURL=v,this},setPath:function(v){return v===void 0&&(v=""),v!==""&&v.substr(-1)!=="/"&&(v=v.concat("/")),this.path=v,this},setPrefix:function(v){return v===void 0&&(v=""),this.prefix=v,this},setCORS:function(v){return this.crossOrigin=v,this},addFile:function(v){Array.isArray(v)||(v=[v]);for(var m=0;m<v.length;m++){var x=v[m];this.keyExists(x)||(this.list.set(x),this.emit(n.ADD,x.key,x.type,this,x),this.isLoading()&&(this.totalToLoad++,this.updateProgress()))}},keyExists:function(v){var m=v.hasCacheConflict();return m||this.list.iterate(function(x){if(x.type===v.type&&x.key===v.key)return m=!0,!1}),!m&&this.isLoading()&&(this.inflight.iterate(function(x){if(x.type===v.type&&x.key===v.key)return m=!0,!1}),this.queue.iterate(function(x){if(x.type===v.type&&x.key===v.key)return m=!0,!1})),m},addPack:function(v,m){if(typeof m=="string"){var x=o(v,m);x&&(v={packKey:x})}var g=0,y=this.baseURL,T=this.path,C=this.prefix;for(var E in v)if(Object.prototype.hasOwnProperty.call(v,E)){var M=v[E],P=s(M,"baseURL",y),A=s(M,"path",T),R=s(M,"prefix",C),F=s(M,"files",null),w=s(M,"defaultType","void");if(Array.isArray(F)){this.setBaseURL(P),this.setPath(A),this.setPrefix(R);for(var I=0;I<F.length;I++){var U=F[I],N=U.hasOwnProperty("type")?U.type:w;this[N]&&(this[N](U),g++)}}}return this.setBaseURL(y),this.setPath(T),this.setPrefix(C),g>0},removePack:function(v,m){var x=this.systems.anims,g=this.cacheManager,y=this.textureManager,T={animation:"json",aseprite:"json",audio:"audio",audioSprite:"audio",binary:"binary",bitmapFont:"bitmapFont",css:null,glsl:"shader",html:"html",json:"json",obj:"obj",plugin:null,scenePlugin:null,script:null,spine:"json",text:"text",tilemapCSV:"tilemap",tilemapImpact:"tilemap",tilemapTiledJSON:"tilemap",video:"video",xml:"xml"},C;if(i(v))C=v;else if(C=g.json.get(v),!C){console.warn("Asset Pack not found in JSON cache:",v);return}m&&(C={_:C[m]});for(var E in C){var M=C[E],P=s(M,"prefix",""),A=s(M,"files"),R=s(M,"defaultType");if(Array.isArray(A))for(var F=0;F<A.length;F++){var w=A[F],I=w.hasOwnProperty("type")?w.type:R;if(!I){console.warn("No type:",w);continue}var U=P+w.key;if(I==="animation"&&x.remove(U),!((I==="aseprite"||I==="atlas"||I==="atlasXML"||I==="htmlTexture"||I==="image"||I==="multiatlas"||I==="spritesheet"||I==="svg"||I==="texture"||I==="unityAtlas")&&(y.remove(U),!T[I]))){if(I==="pack"){this.removePack(U,w.dataKey);continue}if(I==="spine"){var N=g.custom.spine.get(U);if(!N)continue;var D=N.prefix===void 0?"":N.prefix;g.custom.spine.remove(U);var B=g.custom.spineTextures.get(U);if(!B)continue;g.custom.spineTextures.remove(U);for(var L=0;L<B.pages.length;L++){var G=B.pages[L],O=D+G.name,X=U+":"+O;y.exists(X)?y.remove(X):y.remove(O)}}var z=T[I];if(z!==null){if(!z){console.warn("Unknown type:",I);continue}var V=g[z];V.remove(U)}}}}},isLoading:function(){return this.state===c.LOADER_LOADING||this.state===c.LOADER_PROCESSING},isReady:function(){return this.state===c.LOADER_IDLE||this.state===c.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(n.START,this),this.list.size===0?this.loadComplete():(this.state=c.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on(l.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(n.PROGRESS,this.progress)},update:function(){this.state===c.LOADER_LOADING&&this.list.size>0&&this.inflight.size<this.maxParallelDownloads&&this.checkLoadQueue()},checkLoadQueue:function(){this.list.each(function(v){if((v.state===c.FILE_POPULATED||v.state===c.FILE_PENDING&&this.inflight.size<this.maxParallelDownloads)&&(this.inflight.set(v),this.list.delete(v),v.crossOrigin||(v.crossOrigin=this.crossOrigin),v.load()),this.inflight.size===this.maxParallelDownloads)return!1},this)},nextFile:function(v,m){this.inflight&&(this.inflight.delete(v),this.updateProgress(),m?(this.totalComplete++,this.queue.set(v),this.emit(n.FILE_LOAD,v),v.onProcess()):(this.totalFailed++,this._deleteQueue.set(v),this.emit(n.FILE_LOAD_ERROR,v),this.fileProcessComplete(v)))},fileProcessComplete:function(v){!this.scene||!this.systems||!this.systems.game||this.systems.game.pendingDestroy||(v.state===c.FILE_ERRORED?v.multiFile&&v.multiFile.onFileFailed(v):v.state===c.FILE_COMPLETE&&(v.multiFile?v.multiFile.isReadyToProcess()&&(v.multiFile.addToCache(),v.multiFile.pendingDestroy()):(v.addToCache(),v.pendingDestroy())),this.queue.delete(v),this.list.size===0&&this.inflight.size===0&&this.queue.size===0&&this.loadComplete())},loadComplete:function(){this.emit(n.POST_PROCESS,this),this.list.clear(),this.inflight.clear(),this.queue.clear(),this.progress=1,this.state=c.LOADER_COMPLETE,this.systems.events.off(l.UPDATE,this.update,this),this._deleteQueue.iterateLocal("destroy"),this._deleteQueue.clear(),this.emit(n.COMPLETE,this,this.totalComplete,this.totalFailed)},flagForRemoval:function(v){this._deleteQueue.set(v)},saveJSON:function(v,m){return this.save(JSON.stringify(v),m)},save:function(v,m,x){m===void 0&&(m="file.json"),x===void 0&&(x="application/json");var g=new Blob([v],{type:x}),y=URL.createObjectURL(g),T=document.createElement("a");return T.download=m,T.textContent="Download "+m,T.href=y,T.click(),this},reset:function(){this.list.clear(),this.inflight.clear(),this.queue.clear();var v=this.systems.game.config,m=this.systems.settings.loader;this.setBaseURL(s(m,"baseURL",v.loaderBaseURL)),this.setPath(s(m,"path",v.loaderPath)),this.setPrefix(s(m,"prefix",v.loaderPrefix)),this.state=c.LOADER_IDLE},shutdown:function(){this.reset(),this.state=c.LOADER_SHUTDOWN,this.removeAllListeners(),this.systems.events.off(l.UPDATE,this.update,this),this.systems.events.off(l.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.state=c.LOADER_DESTROYED,this.systems.events.off(l.UPDATE,this.update,this),this.systems.events.off(l.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}});a.register("Loader",u,"load"),p.exports=u}),3374:((p,S,t)=>{var d=t(79291),c=t(92638),h=function(r,n){var e=r===void 0?c():d({},r);if(n)for(var s in n)n[s]!==void 0&&(e[s]=n[s]);return e};p.exports=h}),26430:((p,S,t)=>{var d=t(83419),c=t(23906),h=t(54899),r=new d({initialize:function(e,s,o,i){var a=[];i.forEach(function(u){u&&a.push(u)}),this.loader=e,this.type=s,this.key=o;var l=this.key;e.prefix&&e.prefix!==""&&(this.key=e.prefix+l),this.multiKeyIndex=e.multiKeyIndex++,this.files=a,this.state=c.FILE_PENDING,this.complete=!1,this.pending=a.length,this.failed=0,this.config={},this.baseURL=e.baseURL,this.path=e.path,this.prefix=e.prefix;for(var f=0;f<a.length;f++)a[f].multiFile=this},isReadyToProcess:function(){return this.pending===0&&this.failed===0&&!this.complete},addToMultiFile:function(n){return this.files.push(n),n.multiFile=this,this.pending++,this.complete=!1,this},onFileComplete:function(n){var e=this.files.indexOf(n);e!==-1&&this.pending--},onFileFailed:function(n){var e=this.files.indexOf(n);e!==-1&&(this.failed++,console.error('File failed: %s "%s" (via %s "%s")',this.type,this.key,n.type,n.key))},pendingDestroy:function(){if(this.state!==c.FILE_PENDING_DESTROY){var n=this.key,e=this.type;this.loader.emit(h.FILE_COMPLETE,n,e),this.loader.emit(h.FILE_KEY_COMPLETE+e+"-"+n,n,e),this.loader.flagForRemoval(this);for(var s=0;s<this.files.length;s++)this.files[s].pendingDestroy();this.state=c.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.files=null,this.config=null}});p.exports=r}),84376:((p,S,t)=>{var d=t(3374),c=function(h,r){var n=d(r,h.xhrSettings);if(h.base64){var e=h.url.split(";base64,").pop()||h.url.split(",").pop(),s;h.xhrSettings.responseType==="arraybuffer"?s={response:Uint8Array.from(atob(e),function(a){return a.charCodeAt(0)}).buffer}:s={responseText:atob(e)},h.onBase64Load(s);return}var o=new XMLHttpRequest;if(o.open("GET",h.src,n.async,n.user,n.password),o.responseType=h.xhrSettings.responseType,o.timeout=n.timeout,n.headers)for(var i in n.headers)o.setRequestHeader(i,n.headers[i]);return n.header&&n.headerValue&&o.setRequestHeader(n.header,n.headerValue),n.requestedWith&&o.setRequestHeader("X-Requested-With",n.requestedWith),n.overrideMimeType&&o.overrideMimeType(n.overrideMimeType),n.withCredentials&&(o.withCredentials=!0),o.onload=h.onLoad.bind(h,o),o.onerror=h.onError.bind(h,o),o.onprogress=h.onProgress.bind(h),o.ontimeout=h.onError.bind(h,o),o.send(),o};p.exports=c}),92638:(p=>{var S=function(t,d,c,h,r,n){return t===void 0&&(t=""),d===void 0&&(d=!0),c===void 0&&(c=""),h===void 0&&(h=""),r===void 0&&(r=0),n===void 0&&(n=!1),{responseType:t,async:d,user:c,password:h,timeout:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:n}};p.exports=S}),23906:(p=>{var S={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19,FILE_PENDING_DESTROY:20};p.exports=S}),42155:(p=>{p.exports="addfile"}),38991:(p=>{p.exports="complete"}),27540:(p=>{p.exports="filecomplete"}),87464:(p=>{p.exports="filecomplete-"}),94486:(p=>{p.exports="loaderror"}),13035:(p=>{p.exports="load"}),38144:(p=>{p.exports="fileprogress"}),97520:(p=>{p.exports="postprocess"}),85595:(p=>{p.exports="progress"}),55680:(p=>{p.exports="start"}),54899:((p,S,t)=>{p.exports={ADD:t(42155),COMPLETE:t(38991),FILE_COMPLETE:t(27540),FILE_KEY_COMPLETE:t(87464),FILE_LOAD_ERROR:t(94486),FILE_LOAD:t(13035),FILE_PROGRESS:t(38144),POST_PROCESS:t(97520),PROGRESS:t(85595),START:t(55680)}}),14135:((p,S,t)=>{var d=t(83419),c=t(74099),h=t(518),r=t(54899),n=new d({Extends:h,initialize:function(s,o,i,a,l){h.call(this,s,o,i,a,l),this.type="animationJSON"},onProcess:function(){this.loader.once(r.POST_PROCESS,this.onLoadComplete,this),h.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});c.register("animation",function(e,s,o,i){if(Array.isArray(e))for(var a=0;a<e.length;a++)this.addFile(new n(this,e[a]));else this.addFile(new n(this,e,s,i,o));return this}),p.exports=n}),76272:((p,S,t)=>{var d=t(83419),c=t(74099),h=t(95540),r=t(19550),n=t(41212),e=t(518),s=t(26430),o=new d({Extends:s,initialize:function(a,l,f,u,v,m){var x,g;if(n(l)){var y=l;l=h(y,"key"),x=new r(a,{key:l,url:h(y,"textureURL"),extension:h(y,"textureExtension","png"),normalMap:h(y,"normalMap"),xhrSettings:h(y,"textureXhrSettings")}),g=new e(a,{key:l,url:h(y,"atlasURL"),extension:h(y,"atlasExtension","json"),xhrSettings:h(y,"atlasXhrSettings")})}else x=new r(a,l,f,v),g=new e(a,l,u,m);x.linkFile?s.call(this,a,"atlasjson",l,[x,g,x.linkFile]):s.call(this,a,"atlasjson",l,[x,g])},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],a=this.files[1],l=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(i.key,i.data,a.data,l),a.addToCache(),this.complete=!0}}});c.register("aseprite",function(i,a,l,f,u){var v;if(Array.isArray(i))for(var m=0;m<i.length;m++)v=new o(this,i[m]),this.addFile(v.files);else v=new o(this,i,a,l,f,u),this.addFile(v.files);return this}),p.exports=o}),38734:((p,S,t)=>{var d=t(83419),c=t(74099),h=t(95540),r=t(19550),n=t(41212),e=t(518),s=t(26430),o=new d({Extends:s,initialize:function(a,l,f,u,v,m){var x,g;if(n(l)){var y=l;l=h(y,"key"),x=new r(a,{key:l,url:h(y,"textureURL"),extension:h(y,"textureExtension","png"),normalMap:h(y,"normalMap"),xhrSettings:h(y,"textureXhrSettings")}),g=new e(a,{key:l,url:h(y,"atlasURL"),extension:h(y,"atlasExtension","json"),xhrSettings:h(y,"atlasXhrSettings")})}else x=new r(a,l,f,v),g=new e(a,l,u,m);x.linkFile?s.call(this,a,"atlasjson",l,[x,g,x.linkFile]):s.call(this,a,"atlasjson",l,[x,g])},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],a=this.files[1],l=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(i.key,i.data,a.data,l),this.complete=!0}}});c.register("atlas",function(i,a,l,f,u){var v;if(Array.isArray(i))for(var m=0;m<i.length;m++)v=new o(this,i[m]),this.addFile(v.files);else v=new o(this,i,a,l,f,u),this.addFile(v.files);return this}),p.exports=o}),74599:((p,S,t)=>{var d=t(83419),c=t(74099),h=t(95540),r=t(19550),n=t(41212),e=t(26430),s=t(57318),o=new d({Extends:e,initialize:function(a,l,f,u,v,m){var x,g;if(n(l)){var y=l;l=h(y,"key"),x=new r(a,{key:l,url:h(y,"textureURL"),extension:h(y,"textureExtension","png"),normalMap:h(y,"normalMap"),xhrSettings:h(y,"textureXhrSettings")}),g=new s(a,{key:l,url:h(y,"atlasURL"),extension:h(y,"atlasExtension","xml"),xhrSettings:h(y,"atlasXhrSettings")})}else x=new r(a,l,f,v),g=new s(a,l,u,m);x.linkFile?e.call(this,a,"atlasxml",l,[x,g,x.linkFile]):e.call(this,a,"atlasxml",l,[x,g])},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],a=this.files[1],l=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlasXML(i.key,i.data,a.data,l),this.complete=!0}}});c.register("atlasXML",function(i,a,l,f,u){var v;if(Array.isArray(i))for(var m=0;m<i.length;m++)v=new o(this,i[m]),this.addFile(v.files);else v=new o(this,i,a,l,f,u),this.addFile(v.files);return this}),p.exports=o}),21097:((p,S,t)=>{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(89749),s=t(41212),o=new d({Extends:h,initialize:function(a,l,f,u,v){if(s(l)){var m=l;l=n(m,"key"),u=n(m,"xhrSettings"),v=n(m,"context",v)}var x={type:"audio",cache:a.cacheManager.audio,extension:f.type,responseType:"arraybuffer",key:l,url:f.url,xhrSettings:u,config:{context:v}};h.call(this,a,x)},onProcess:function(){this.state=c.FILE_PROCESSING;var i=this;this.config.context.decodeAudioData(this.xhrLoader.response,function(a){i.data=a,i.onProcessComplete()},function(a){console.error("Error decoding audio: "+i.key+" - ",a?a.message:null),i.onProcessError()}),this.config.context=null}});o.create=function(i,a,l,f,u){var v=i.systems.game,m=v.config.audio,x=v.device.audio;s(a)&&(l=n(a,"url",[]),f=n(a,"config",{}));var g=o.getAudioURL(v,l);return g?x.webAudio&&!m.disableWebAudio?new o(i,a,g,u,v.sound.context):new e(i,a,g,f):(console.warn('No audio URLs for "%s" can play on this device',a),null)},o.getAudioURL=function(i,a){Array.isArray(a)||(a=[a]);for(var l=0;l<a.length;l++){var f=n(a[l],"url",a[l]);if(f.indexOf("blob:")===0||f.indexOf("data:")===0)return{url:f,type:""};var u=f.match(/\.([a-zA-Z0-9]+)($|\?)/);if(u=n(a[l],"type",u?u[1]:"").toLowerCase(),i.device.audio[u])return{url:f,type:u}}return null},r.register("audio",function(i,a,l,f){var u=this.systems.game,v=u.config.audio,m=u.device.audio;if(v.noAudio||!m.webAudio&&!m.audioData)return this;var x;if(Array.isArray(i))for(var g=0;g<i.length;g++)x=o.create(this,i[g]),x&&this.addFile(x);else x=o.create(this,i,a,l,f),x&&this.addFile(x);return this}),p.exports=o}),89524:((p,S,t)=>{var d=t(21097),c=t(83419),h=t(74099),r=t(95540),n=t(41212),e=t(518),s=t(26430),o=new c({Extends:s,initialize:function(a,l,f,u,v,m,x){if(n(l)){var g=l;l=r(g,"key"),f=r(g,"jsonURL"),u=r(g,"audioURL"),v=r(g,"audioConfig"),m=r(g,"audioXhrSettings"),x=r(g,"jsonXhrSettings")}var y;if(!u)y=new e(a,l,f,x),s.call(this,a,"audiosprite",l,[y]),this.config.resourceLoad=!0,this.config.audioConfig=v,this.config.audioXhrSettings=m;else{var T=d.create(a,l,u,v,m);T&&(y=new e(a,l,f,x),s.call(this,a,"audiosprite",l,[T,y]),this.config.resourceLoad=!1)}},onFileComplete:function(i){var a=this.files.indexOf(i);if(a!==-1&&(this.pending--,this.config.resourceLoad&&i.type==="json"&&i.data.hasOwnProperty("resources"))){var l=i.data.resources,f=r(this.config,"audioConfig"),u=r(this.config,"audioXhrSettings"),v=d.create(this.loader,i.key,l,f,u);v&&(this.addToMultiFile(v),this.loader.addFile(v))}},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],a=this.files[1];i.addToCache(),a.addToCache(),this.complete=!0}}});h.register("audioSprite",function(i,a,l,f,u,v){var m=this.systems.game,x=m.config.audio,g=m.device.audio;if(x&&x.noAudio||!g.webAudio&&!g.audioData)return this;var y;if(Array.isArray(i))for(var T=0;T<i.length;T++)y=new o(this,i[T]),y.files&&this.addFile(y.files);else y=new o(this,i,a,l,f,u,v),y.files&&this.addFile(y.files);return this})}),85722:((p,S,t)=>{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,f,u){var v="bin";if(e(a)){var m=a;a=n(m,"key"),l=n(m,"url"),f=n(m,"xhrSettings"),v=n(m,"extension",v),u=n(m,"dataType",u)}var x={type:"binary",cache:i.cacheManager.binary,extension:v,responseType:"arraybuffer",key:a,url:l,xhrSettings:f,config:{dataType:u}};h.call(this,i,x)},onProcess:function(){this.state=c.FILE_PROCESSING;var o=this.config.dataType;this.data=o?new o(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});r.register("binary",function(o,i,a,l){if(Array.isArray(o))for(var f=0;f<o.length;f++)this.addFile(new s(this,o[f]));else this.addFile(new s(this,o,i,l,a));return this}),p.exports=s}),97025:((p,S,t)=>{var d=t(83419),c=t(74099),h=t(95540),r=t(19550),n=t(41212),e=t(26430),s=t(21859),o=t(57318),i=new d({Extends:e,initialize:function(l,f,u,v,m,x){var g,y;if(n(f)){var T=f;f=h(T,"key"),g=new r(l,{key:f,url:h(T,"textureURL"),extension:h(T,"textureExtension","png"),normalMap:h(T,"normalMap"),xhrSettings:h(T,"textureXhrSettings")}),y=new o(l,{key:f,url:h(T,"fontDataURL"),extension:h(T,"fontDataExtension","xml"),xhrSettings:h(T,"fontDataXhrSettings")})}else g=new r(l,f,u,m),y=new o(l,f,v,x);g.linkFile?e.call(this,l,"bitmapfont",f,[g,y,g.linkFile]):e.call(this,l,"bitmapfont",f,[g,y])},addToCache:function(){if(this.isReadyToProcess()){var a=this.files[0],l=this.files[1];a.addToCache();var f=a.cache.get(a.key),u=s(l.data,a.cache.getFrame(a.key),0,0,f);this.loader.cacheManager.bitmapFont.add(a.key,{data:u,texture:a.key,frame:null}),this.complete=!0}}});c.register("bitmapFont",function(a,l,f,u,v){var m;if(Array.isArray(a))for(var x=0;x<a.length;x++)m=new i(this,a[x]),this.addFile(m.files);else m=new i(this,a,l,f,u,v),this.addFile(m.files);return this}),p.exports=i}),16024:((p,S,t)=>{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,f){var u="css";if(e(a)){var v=a;a=n(v,"key"),l=n(v,"url"),f=n(v,"xhrSettings"),u=n(v,"extension",u)}var m={type:"script",cache:!1,extension:u,responseType:"text",key:a,url:l,xhrSettings:f};h.call(this,i,m)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=document.createElement("style"),this.data.defer=!1,this.data.innerHTML=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});r.register("css",function(o,i,a){if(Array.isArray(o))for(var l=0;l<o.length;l++)this.addFile(new s(this,o[l]));else this.addFile(new s(this,o,i,a));return this}),p.exports=s}),69559:((p,S,t)=>{var d=t(38734),c=t(85722),h=t(83419),r=t(74099),n=t(95540),e=t(19550),s=t(41212),o=t(518),i=t(31403),a=t(46975),l=t(59327),f=t(26430),u=t(82038),v=t(55222),m=new h({Extends:f,initialize:function(g,y,T,C){if(T.multiAtlasURL){var E=new o(g,{key:y,url:T.multiAtlasURL,xhrSettings:C,config:T});f.call(this,g,"texture",y,[E])}else{var M=T.textureURL.substr(T.textureURL.length-3);T.type||(T.type=M.toLowerCase()==="ktx"?"KTX":"PVR");var P=new c(g,{key:y,url:T.textureURL,extension:M,xhrSettings:C,config:T});if(T.atlasURL){var A=new o(g,{key:y,url:T.atlasURL,xhrSettings:C,config:T});f.call(this,g,"texture",y,[P,A])}else f.call(this,g,"texture",y,[P])}this.config=T},onFileComplete:function(x){var g=this.files.indexOf(x);if(g!==-1){if(this.pending--,!this.config.multiAtlasURL)return;if(x.type==="json"&&x.data.hasOwnProperty("textures")){var y=x.data.textures,T=this.config,C=this.loader,E=C.baseURL,M=C.path,P=C.prefix,A=n(T,"multiBaseURL",this.baseURL),R=n(T,"multiPath",this.path),F=n(T,"prefix",this.prefix),w=n(T,"textureXhrSettings");A&&C.setBaseURL(A),R&&C.setPath(R),F&&C.setPrefix(F);for(var I=0;I<y.length;I++){var U=y[I].image,N="CMA"+this.multiKeyIndex+"_"+U,D=new c(C,N,U,w);if(this.addToMultiFile(D),C.addFile(D),y[I].normalMap){var B=new c(C,N,y[I].normalMap,w);B.type="normalMap",D.setLink(B),this.addToMultiFile(B),C.addFile(B)}}C.setBaseURL(E),C.setPath(M),C.setPrefix(P)}}},addToCache:function(){function x(A){console.warn('Compressed Texture Invalid: "'+E.key+'". '+A)}if(this.isReadyToProcess()){var g=this.config;if(g.multiAtlasURL)this.addMultiToCache();else{var y=this.loader.systems.renderer,T=this.loader.textureManager,C,E=this.files[0],M=this.files[1];if(g.type==="PVR"?C=u(E.data):g.type==="KTX"&&(C=i(E.data),C||x("KTX file contains unsupported format.")),C&&!v(C)&&(x("Texture dimensions failed verification. Check the texture format specifications for "+g.format+" 0x"+C.internalFormat.toString(16)+"."),C=null),C&&!y.supportsCompressedTexture(g.format,C.internalFormat)&&(x("Texture format "+g.format+" with internal format "+C.internalFormat+" not supported by the GPU. Texture invalid. This is often due to the texture using sRGB instead of linear RGB."),C=null),C){C.format=y.getCompressedTextureName(g.format,C.internalFormat);var P=M&&M.data?M.data:null;T.addCompressedTexture(E.key,C,P)}}this.complete=!0}},addMultiToCache:function(){for(var x=this.config,g=this.files[0],y=[],T=[],C=[],E=this.loader.systems.renderer,M=this.loader.textureManager,P,A=1;A<this.files.length;A++){var R=this.files[A];if(R.type!=="normalMap")for(var F=R.key.indexOf("_"),w=R.key.substr(F+1),I=R.data,U=0;U<g.data.textures.length;U++){var N=g.data.textures[U];if(N.image===w){x.type==="PVR"?P=u(I):x.type==="KTX"&&(P=i(I)),P&&E.supportsCompressedTexture(x.format,P.internalFormat)&&(P.format=E.getCompressedTextureName(x.format,P.internalFormat),T.push(P),y.push(N),R.linkFile&&C.push(R.linkFile.data));break}}}C.length===0&&(C=void 0),M.addAtlasJSONArray(this.key,T,y,C),this.complete=!0}});r.register("texture",function(x,g,y){var T=this.systems.renderer,C=function(M,P,A,R){var F={format:null,type:null,textureURL:void 0,atlasURL:void 0,multiAtlasURL:void 0,multiPath:void 0,multiBaseURL:void 0};if(s(P)){var w=P;P=n(w,"key"),A=n(w,"url"),R=n(w,"xhrSettings")}var I=!1;for(var U in A)if(T.supportsCompressedTexture(U)){var N=A[U];typeof N=="string"?F.textureURL=N:F=a(N,F),F.format=U.toUpperCase(),I=!0;break}if(!I)console.warn("No supported compressed texture format or IMG fallback",P);else if(F.format==="IMG"){var D,B;F.multiAtlasURL?(B=new l(M,P,F.multiAtlasURL,F.multiPath,F.multiBaseURL,R),D=B.files):F.atlasURL?(B=new d(M,P,F.textureURL,F.atlasURL,R),D=B.files):D=new e(M,P,F.textureURL,R),M.addFile(D)}else{var L=new m(M,P,F,R);M.addFile(L.files)}};if(Array.isArray(x))for(var E=0;E<x.length;E++)C(this,x[E]);else C(this,x,g,y);return this}),p.exports=m}),87674:((p,S,t)=>{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(98356),s=t(41212),o=new d({Extends:h,initialize:function(a,l,f,u,v,m){var x="ttf";if(s(l)){var g=l;l=n(g,"key"),f=n(g,"url"),u=n(g,"format","truetype"),v=n(g,"descriptors",null),m=n(g,"xhrSettings"),x=n(g,"extension",x)}else u===void 0&&(u="truetype");var y={type:"font",cache:!1,extension:x,responseType:"text",key:l,url:f,xhrSettings:m};h.call(this,a,y),this.data={format:u,descriptors:v},this.state=c.FILE_POPULATED},onProcess:function(){this.state=c.FILE_PROCESSING,this.src=e(this,this.loader.baseURL);var i,a=this.key,l="url("+this.src+') format("'+this.data.format+'")';this.data.descriptors?i=new FontFace(a,l,this.data.descriptors):i=new FontFace(a,l);var f=this;i.load().then(function(){document.fonts.add(i),document.body.classList.add("fonts-loaded"),f.onProcessComplete()}).catch(function(){console.warn("Font failed to load",l),f.onProcessComplete()})}});r.register("font",function(i,a,l,f,u){if(Array.isArray(i))for(var v=0;v<i.length;v++)this.addFile(new o(this,i[v]));else this.addFile(new o(this,i,a,l,f,u));return this}),p.exports=o}),47931:((p,S,t)=>{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=t(73894),o=new d({Extends:h,initialize:function(a,l,f,u,v){var m="glsl";if(e(l)){var x=l;l=n(x,"key"),f=n(x,"url"),u=n(x,"shaderType","fragment"),v=n(x,"xhrSettings"),m=n(x,"extension",m)}else u===void 0&&(u="fragment");var g={type:"glsl",cache:a.cacheManager.shader,extension:m,responseType:"text",key:l,url:f,config:{shaderType:u},xhrSettings:v};h.call(this,a,g)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var i=this.data.split(`
|
|
`),a=this.extractBlock(i,0);if(a)for(;a;){var l=this.getShaderName(a.header),f=this.getShaderType(a.header),u=this.getShaderUniforms(a.header),v=a.shader;if(this.cache.has(l)){var m=this.cache.get(l);f==="fragment"?m.fragmentSrc=v:m.vertexSrc=v,m.uniforms||(m.uniforms=u)}else f==="fragment"?this.cache.add(l,new s(l,v,"",u)):this.cache.add(l,new s(l,"",v,u));a=this.extractBlock(i,a.offset)}else this.config.shaderType==="fragment"?this.cache.add(this.key,new s(this.key,this.data)):this.cache.add(this.key,new s(this.key,"",this.data))},getShaderName:function(i){for(var a=0;a<i.length;a++){var l=i[a].trim();if(l.substring(0,5)==="name:")return l.substring(5).trim()}return this.key},getShaderType:function(i){for(var a=0;a<i.length;a++){var l=i[a].trim();if(l.substring(0,5)==="type:")return l.substring(5).trim()}return this.config.shaderType},getShaderUniforms:function(i){for(var a={},l=0;l<i.length;l++){var f=i[l].trim();if(f.substring(0,8)==="uniform."){var u=f.indexOf(":");if(u){var v=f.substring(8,u);try{a[v]=JSON.parse(f.substring(u+1))}catch{console.warn("Invalid uniform JSON: "+v)}}}}return a},extractBlock:function(i,a){for(var l=-1,f=-1,u=-1,v=!1,m=!1,x=[],g=[],y=a;y<i.length;y++){var T=i[y].trim();if(T==="---")if(l===-1)l=y,v=!0;else if(v)f=y,v=!1,m=!0;else{m=!1;break}else v?x.push(T):m&&(g.push(T),u=y)}return!v&&f!==-1?{header:x,shader:g.join(`
|
|
`),offset:u}:null}});r.register("glsl",function(i,a,l,f){if(Array.isArray(i))for(var u=0;u<i.length;u++)this.addFile(new o(this,i[u]));else this.addFile(new o(this,i,a,l,f));return this}),p.exports=o}),89749:((p,S,t)=>{var d=t(83419),c=t(54899),h=t(41299),r=t(95540),n=t(98356),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,f){if(e(a)){var u=a;a=r(u,"key"),f=r(u,"config",f)}var v={type:"audio",cache:i.cacheManager.audio,extension:l.type,key:a,url:l.url,config:f};h.call(this,i,v),this.locked="ontouchstart"in window,this.loaded=!1,this.filesLoaded=0,this.filesTotal=0},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var o=0;o<this.data.length;o++){var i=this.data[o];i.oncanplaythrough=null,i.onerror=null}this.loader.nextFile(this,!1)},onProgress:function(o){var i=o.target;i.oncanplaythrough=null,i.onerror=null,this.filesLoaded++,this.percentComplete=Math.min(this.filesLoaded/this.filesTotal,1),this.loader.emit(c.FILE_PROGRESS,this,this.percentComplete),this.filesLoaded===this.filesTotal&&this.onLoad()},load:function(){this.data=[];var o=this.config&&this.config.instances||1;this.filesTotal=o,this.filesLoaded=0,this.percentComplete=0;for(var i=0;i<o;i++){var a=new Audio;a.dataset||(a.dataset={}),a.dataset.name=this.key+("0"+i).slice(-2),a.dataset.used="false",this.locked?a.dataset.locked="true":(a.dataset.locked="false",a.preload="auto",a.oncanplaythrough=this.onProgress.bind(this),a.onerror=this.onError.bind(this)),this.data.push(a)}for(i=0;i<this.data.length;i++)a=this.data[i],a.src=n(this,this.loader.baseURL),this.locked||a.load();this.locked&&setTimeout(this.onLoad.bind(this))}});p.exports=s}),88470:((p,S,t)=>{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,f){var u="html";if(e(a)){var v=a;a=n(v,"key"),l=n(v,"url"),f=n(v,"xhrSettings"),u=n(v,"extension",u)}var m={type:"text",cache:i.cacheManager.html,extension:u,responseType:"text",key:a,url:l,xhrSettings:f};h.call(this,i,m)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});r.register("html",function(o,i,a){if(Array.isArray(o))for(var l=0;l<o.length;l++)this.addFile(new s(this,o[l]));else this.addFile(new s(this,o,i,a));return this}),p.exports=s}),14643:((p,S,t)=>{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,f,u,v){f===void 0&&(f=512),u===void 0&&(u=512);var m="html";if(e(a)){var x=a;a=n(x,"key"),l=n(x,"url"),v=n(x,"xhrSettings"),m=n(x,"extension",m),f=n(x,"width",f),u=n(x,"height",u)}var g={type:"html",cache:i.textureManager,extension:m,responseType:"text",key:a,url:l,xhrSettings:v,config:{width:f,height:u}};h.call(this,i,g)},onProcess:function(){this.state=c.FILE_PROCESSING;var o=this.config.width,i=this.config.height,a=[];a.push('<svg width="'+o+'px" height="'+i+'px" viewBox="0 0 '+o+" "+i+'" xmlns="http://www.w3.org/2000/svg">'),a.push('<foreignObject width="100%" height="100%">'),a.push('<body xmlns="http://www.w3.org/1999/xhtml">'),a.push(this.xhrLoader.responseText),a.push("</body>"),a.push("</foreignObject>"),a.push("</svg>");var l=[a.join(`
|
|
`)],f=this;try{var u=new window.Blob(l,{type:"image/svg+xml;charset=utf-8"})}catch{f.state=c.FILE_ERRORED,f.onProcessComplete();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){h.revokeObjectURL(f.data),f.onProcessComplete()},this.data.onerror=function(){h.revokeObjectURL(f.data),f.onProcessError()},h.createObjectURL(this.data,u,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});r.register("htmlTexture",function(o,i,a,l,f){if(Array.isArray(o))for(var u=0;u<o.length;u++)this.addFile(new s(this,o[u]));else this.addFile(new s(this,o,i,a,l,f));return this}),p.exports=s}),19550:((p,S,t)=>{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=t(98356),o=new d({Extends:h,initialize:function i(a,l,f,u,v){var m="png",x;if(e(l)){var g=l;l=n(g,"key"),f=n(g,"url"),x=n(g,"normalMap"),u=n(g,"xhrSettings"),m=n(g,"extension",m),v=n(g,"frameConfig")}Array.isArray(f)&&(x=f[1],f=f[0]);var y={type:"image",cache:a.textureManager,extension:m,responseType:"blob",key:l,url:f,xhrSettings:u,config:v};if(h.call(this,a,y),x){var T=new i(a,this.key,x,u,v);T.type="normalMap",this.setLink(T),a.addFile(T)}this.useImageElementLoad=a.imageLoadType==="HTMLImageElement"||this.base64,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var i=this;this.data.onload=function(){h.revokeObjectURL(i.data),i.onProcessComplete()},this.data.onerror=function(){h.revokeObjectURL(i.data),i.onProcessError()},h.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var i=this.state;this.state=c.FILE_PROCESSING,i===c.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){this.state=c.FILE_LOADING,this.src=s(this,this.loader.baseURL),this.data=new Image,this.data.crossOrigin=this.crossOrigin;var i=this;this.data.onload=function(){i.state=c.FILE_LOADED,i.loader.nextFile(i,!0)},this.data.onerror=function(){i.loader.nextFile(i,!1)},this.data.src=this.src},addToCache:function(){var i=this.linkFile;i?i.state>=c.FILE_COMPLETE&&(i.type==="spritesheet"?i.addToCache():this.type==="normalMap"?this.cache.addImage(this.key,i.data,this.data):this.cache.addImage(this.key,this.data,i.data)):this.cache.addImage(this.key,this.data)}});r.register("image",function(i,a,l){if(Array.isArray(i))for(var f=0;f<i.length;f++)this.addFile(new o(this,i[f]));else this.addFile(new o(this,i,a,l));return this}),p.exports=o}),518:((p,S,t)=>{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(35154),s=t(41212),o=new d({Extends:h,initialize:function(a,l,f,u,v){var m="json";if(s(l)){var x=l;l=n(x,"key"),f=n(x,"url"),u=n(x,"xhrSettings"),m=n(x,"extension",m),v=n(x,"dataKey",v)}var g={type:"json",cache:a.cacheManager.json,extension:m,responseType:"text",key:l,url:f,xhrSettings:u,config:v};h.call(this,a,g),s(f)&&(v?this.data=e(f,v):this.data=f,this.state=c.FILE_POPULATED)},onProcess:function(){if(this.state!==c.FILE_POPULATED){this.state=c.FILE_PROCESSING;try{var i=JSON.parse(this.xhrLoader.responseText)}catch(l){throw this.onProcessError(),l}var a=this.config;typeof a=="string"?this.data=e(i,a,i):this.data=i}this.onProcessComplete()}});r.register("json",function(i,a,l,f){if(Array.isArray(i))for(var u=0;u<i.length;u++)this.addFile(new o(this,i[u]));else this.addFile(new o(this,i,a,f,l));return this}),p.exports=o}),59327:((p,S,t)=>{var d=t(83419),c=t(74099),h=t(95540),r=t(19550),n=t(41212),e=t(518),s=t(26430),o=new d({Extends:s,initialize:function(a,l,f,u,v,m,x){if(n(l)){var g=l;l=h(g,"key"),h(g,"url",!1)?f=h(g,"url"):f=h(g,"atlasURL"),m=h(g,"xhrSettings"),u=h(g,"path"),v=h(g,"baseURL"),x=h(g,"textureXhrSettings")}var y=new e(a,l,f,m);s.call(this,a,"multiatlas",l,[y]),this.config.path=u,this.config.baseURL=v,this.config.textureXhrSettings=x},onFileComplete:function(i){var a=this.files.indexOf(i);if(a!==-1&&(this.pending--,i.type==="json"&&i.data.hasOwnProperty("textures"))){var l=i.data.textures,f=this.config,u=this.loader,v=u.baseURL,m=u.path,x=u.prefix,g=h(f,"baseURL",this.baseURL),y=h(f,"path",this.path),T=h(f,"prefix",this.prefix),C=h(f,"textureXhrSettings");u.setBaseURL(g),u.setPath(y),u.setPrefix(T);for(var E=0;E<l.length;E++){var M=l[E].image,P="MA"+this.multiKeyIndex+"_"+M,A=new r(u,P,M,C);if(this.addToMultiFile(A),u.addFile(A),l[E].normalMap){var R=new r(u,P,l[E].normalMap,C);R.type="normalMap",A.setLink(R),this.addToMultiFile(R),u.addFile(R)}}u.setBaseURL(v),u.setPath(m),u.setPrefix(x)}},addToCache:function(){if(this.isReadyToProcess()){for(var i=this.files[0],a=[],l=[],f=[],u=1;u<this.files.length;u++){var v=this.files[u];if(v.type!=="normalMap")for(var m=v.key.indexOf("_"),x=v.key.substr(m+1),g=v.data,y=0;y<i.data.textures.length;y++){var T=i.data.textures[y];if(T.image===x){l.push(g),a.push(T),v.linkFile&&f.push(v.linkFile.data);break}}}f.length===0&&(f=void 0),this.loader.textureManager.addAtlasJSONArray(this.key,l,a,f),this.complete=!0}}});c.register("multiatlas",function(i,a,l,f,u){var v;if(Array.isArray(i))for(var m=0;m<i.length;m++)v=new o(this,i[m]),this.addFile(v.files);else v=new o(this,i,a,l,f,u),this.addFile(v.files);return this}),p.exports=o}),99297:((p,S,t)=>{var d=t(83419),c=t(74099),h=t(95540),r=t(41212),n=t(26430),e=t(34328),s=new d({Extends:n,initialize:function(i,a,l,f){var u="js",v=[];if(r(a)){var m=a;a=h(m,"key"),l=h(m,"url"),f=h(m,"xhrSettings"),u=h(m,"extension",u)}Array.isArray(l)||(l=[l]);for(var x=0;x<l.length;x++){var g=new e(i,{key:a+"_"+x.toString(),url:l[x],extension:u,xhrSettings:f});g.onProcess=function(){this.onProcessComplete()},v.push(g)}n.call(this,i,"scripts",a,v)},addToCache:function(){if(this.isReadyToProcess()){for(var o=0;o<this.files.length;o++){var i=this.files[o];i.data=document.createElement("script"),i.data.language="javascript",i.data.type="text/javascript",i.data.defer=!1,i.data.text=i.xhrLoader.responseText,document.head.appendChild(i.data)}this.complete=!0}}});c.register("scripts",function(o,i,a){var l;if(Array.isArray(o))for(var f=0;f<o.length;f++)l=new s(this,o[f]),this.addFile(l.files);else l=new s(this,o,i,a),this.addFile(l.files);return this}),p.exports=s}),41846:((p,S,t)=>{var d=t(83419),c=t(74099),h=t(95540),r=t(41212),n=t(26430),e=t(85048),s=t(61485),o=t(78776),i=new d({Extends:n,initialize:function(l,f,u,v,m,x){var g,y,T=l.cacheManager.obj;if(r(f)){var C=f;f=h(C,"key"),g=new o(l,{key:f,type:"obj",cache:T,url:h(C,"url"),extension:h(C,"extension","obj"),xhrSettings:h(C,"xhrSettings"),config:{flipUV:h(C,"flipUV",m)}}),v=h(C,"matURL"),v&&(y=new o(l,{key:f,type:"mat",cache:T,url:v,extension:h(C,"matExtension","mat"),xhrSettings:h(C,"xhrSettings")}))}else g=new o(l,{key:f,url:u,type:"obj",cache:T,extension:"obj",xhrSettings:x,config:{flipUV:m}}),v&&(y=new o(l,{key:f,url:v,type:"mat",cache:T,extension:"mat",xhrSettings:x}));n.call(this,l,"obj",f,[g,y])},addToCache:function(){if(this.isReadyToProcess()){var a=this.files[0],l=this.files[1],f=e(a.data,a.config.flipUV);l&&(f.materials=s(l.data)),a.cache.add(a.key,f),this.complete=!0}}});c.register("obj",function(a,l,f,u,v){var m;if(Array.isArray(a))for(var x=0;x<a.length;x++)m=new i(this,a[x]),this.addFile(m.files);else m=new i(this,a,l,f,u,v),this.addFile(m.files);return this}),p.exports=i}),58610:((p,S,t)=>{var d=t(83419),c=t(23906),h=t(74099),r=t(518),n=new d({Extends:r,initialize:function(s,o,i,a,l){r.call(this,s,o,i,a,l),this.type="packfile"},onProcess:function(){if(this.state!==c.FILE_POPULATED&&(this.state=c.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText)),this.data.hasOwnProperty("files")&&this.config){var e={};e[this.config]=this.data,this.data=e}this.loader.addPack(this.data,this.config),this.onProcessComplete()}});h.register("pack",function(e,s,o,i){if(Array.isArray(e))for(var a=0;a<e.length;a++)this.addFile(new n(this,e[a]));else this.addFile(new n(this,e,s,i,o));return this}),p.exports=n}),48988:((p,S,t)=>{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,f,u,v){var m="js";if(e(a)){var x=a;a=n(x,"key"),l=n(x,"url"),v=n(x,"xhrSettings"),m=n(x,"extension",m),f=n(x,"start"),u=n(x,"mapping")}var g={type:"plugin",cache:!1,extension:m,responseType:"text",key:a,url:l,xhrSettings:v,config:{start:f,mapping:u}};h.call(this,i,g),typeof l=="function"&&(this.data=l,this.state=c.FILE_POPULATED)},onProcess:function(){var o=this.loader.systems.plugins,i=this.config,a=n(i,"start",!1),l=n(i,"mapping",null);if(this.state===c.FILE_POPULATED)o.install(this.key,this.data,a,l);else{this.state=c.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data);var f=o.install(this.key,window[this.key],a,l);(a||l)&&(this.loader.systems[l]=f,this.loader.scene[l]=f)}this.onProcessComplete()}});r.register("plugin",function(o,i,a,l,f){if(Array.isArray(o))for(var u=0;u<o.length;u++)this.addFile(new s(this,o[u]));else this.addFile(new s(this,o,i,a,l,f));return this}),p.exports=s}),67397:((p,S,t)=>{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,f,u){var v="svg";if(e(a)){var m=a;a=n(m,"key"),l=n(m,"url"),f=n(m,"svgConfig",{}),u=n(m,"xhrSettings"),v=n(m,"extension",v)}var x={type:"svg",cache:i.textureManager,extension:v,responseType:"text",key:a,url:l,xhrSettings:u,config:{width:n(f,"width"),height:n(f,"height"),scale:n(f,"scale")}};h.call(this,i,x)},onProcess:function(){this.state=c.FILE_PROCESSING;var o=this.xhrLoader.responseText,i=[o],a=this.config.width,l=this.config.height,f=this.config.scale;t:if(a&&l||f){var u=null,v=new DOMParser;u=v.parseFromString(o,"text/xml");var m=u.getElementsByTagName("svg")[0],x=m.hasAttribute("viewBox"),g=parseFloat(m.getAttribute("width")),y=parseFloat(m.getAttribute("height"));if(!x&&g&&y)m.setAttribute("viewBox","0 0 "+g+" "+y);else if(x&&!g&&!y){var T=m.getAttribute("viewBox").split(/\s+|,/);g=T[2],y=T[3]}if(f)if(g&&y)a=g*f,l=y*f;else break t;m.setAttribute("width",a.toString()+"px"),m.setAttribute("height",l.toString()+"px"),i=[new XMLSerializer().serializeToString(m)]}try{var C=new window.Blob(i,{type:"image/svg+xml;charset=utf-8"})}catch{this.onProcessError();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var E=this,M=!1;this.data.onload=function(){M||h.revokeObjectURL(E.data),E.onProcessComplete()},this.data.onerror=function(){M?E.onProcessError():(M=!0,h.revokeObjectURL(E.data),E.data.src="data:image/svg+xml,"+encodeURIComponent(i.join("")))},h.createObjectURL(this.data,C,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});r.register("svg",function(o,i,a,l){if(Array.isArray(o))for(var f=0;f<o.length;f++)this.addFile(new s(this,o[f]));else this.addFile(new s(this,o,i,a,l));return this}),p.exports=s}),88423:((p,S,t)=>{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,f){var u="js";if(e(a)){var v=a;a=n(v,"key"),l=n(v,"url"),f=n(v,"xhrSettings"),u=n(v,"extension",u)}var m={type:"text",extension:u,responseType:"text",key:a,url:l,xhrSettings:f};h.call(this,i,m)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var o=this.data.concat(`(function(){
|
|
return new `+this.key+`();
|
|
}).call(this);`),i=eval;this.loader.sceneManager.add(this.key,i(o)),this.complete=!0}});r.register("sceneFile",function(o,i,a){if(Array.isArray(o))for(var l=0;l<o.length;l++)this.addFile(new s(this,o[l]));else this.addFile(new s(this,o,i,a));return this}),p.exports=s}),56812:((p,S,t)=>{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,f,u,v){var m="js";if(e(a)){var x=a;a=n(x,"key"),l=n(x,"url"),v=n(x,"xhrSettings"),m=n(x,"extension",m),f=n(x,"systemKey"),u=n(x,"sceneKey")}var g={type:"scenePlugin",cache:!1,extension:m,responseType:"text",key:a,url:l,xhrSettings:v,config:{systemKey:f,sceneKey:u}};h.call(this,i,g),typeof l=="function"&&(this.data=l,this.state=c.FILE_POPULATED)},onProcess:function(){var o=this.loader.systems.plugins,i=this.config,a=this.key,l=n(i,"systemKey",a),f=n(i,"sceneKey",a);this.state===c.FILE_POPULATED?o.installScenePlugin(l,this.data,f,this.loader.scene,!0):(this.state=c.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),o.installScenePlugin(l,window[this.key],f,this.loader.scene,!0)),this.onProcessComplete()}});r.register("scenePlugin",function(o,i,a,l,f){if(Array.isArray(o))for(var u=0;u<o.length;u++)this.addFile(new s(this,o[u]));else this.addFile(new s(this,o,i,a,l,f));return this}),p.exports=s}),34328:((p,S,t)=>{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,f,u){var v="js";if(e(a)){var m=a;a=n(m,"key"),l=n(m,"url"),f=n(m,"type","script"),u=n(m,"xhrSettings"),v=n(m,"extension",v)}else f===void 0&&(f="script");var x={type:f,cache:!1,extension:v,responseType:"text",key:a,url:l,xhrSettings:u};h.call(this,i,x)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});r.register("script",function(o,i,a,l){if(Array.isArray(o))for(var f=0;f<o.length;f++)this.addFile(new s(this,o[f]));else this.addFile(new s(this,o,i,a,l));return this}),p.exports=s}),85035:((p,S,t)=>{var d=t(83419),c=t(23906),h=t(74099),r=t(19550),n=new d({Extends:r,initialize:function(s,o,i,a,l){r.call(this,s,o,i,l,a),this.type="spritesheet"},addToCache:function(){var e=this.linkFile;e?e.state>=c.FILE_COMPLETE&&(this.type==="normalMap"?this.cache.addSpriteSheet(this.key,e.data,this.config,this.data):this.cache.addSpriteSheet(this.key,this.data,this.config,e.data)):this.cache.addSpriteSheet(this.key,this.data,this.config)}});h.register("spritesheet",function(e,s,o,i){if(Array.isArray(e))for(var a=0;a<e.length;a++)this.addFile(new n(this,e[a]));else this.addFile(new n(this,e,s,o,i));return this}),p.exports=n}),78776:((p,S,t)=>{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,f){var u="text",v="txt",m=i.cacheManager.text;if(e(a)){var x=a;a=n(x,"key"),l=n(x,"url"),f=n(x,"xhrSettings"),v=n(x,"extension",v),u=n(x,"type",u),m=n(x,"cache",m)}var g={type:u,cache:m,extension:v,responseType:"text",key:a,url:l,xhrSettings:f};h.call(this,i,g)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});r.register("text",function(o,i,a){if(Array.isArray(o))for(var l=0;l<o.length;l++)this.addFile(new s(this,o[l]));else this.addFile(new s(this,o,i,a));return this}),p.exports=s}),49477:((p,S,t)=>{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=t(80341),o=new d({Extends:h,initialize:function(a,l,f,u){var v="csv";if(e(l)){var m=l;l=n(m,"key"),f=n(m,"url"),u=n(m,"xhrSettings"),v=n(m,"extension",v)}var x={type:"tilemapCSV",cache:a.cacheManager.tilemap,extension:v,responseType:"text",key:l,url:f,xhrSettings:u};h.call(this,a,x),this.tilemapFormat=s.CSV},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var i={format:this.tilemapFormat,data:this.data};this.cache.add(this.key,i)}});r.register("tilemapCSV",function(i,a,l){if(Array.isArray(i))for(var f=0;f<i.length;f++)this.addFile(new o(this,i[f]));else this.addFile(new o(this,i,a,l));return this}),p.exports=o}),40807:((p,S,t)=>{var d=t(83419),c=t(74099),h=t(518),r=t(80341),n=new d({Extends:h,initialize:function(s,o,i,a){h.call(this,s,o,i,a),this.type="tilemapJSON",this.cache=s.cacheManager.tilemap},addToCache:function(){var e={format:r.WELTMEISTER,data:this.data};this.cache.add(this.key,e)}});c.register("tilemapImpact",function(e,s,o){if(Array.isArray(e))for(var i=0;i<e.length;i++)this.addFile(new n(this,e[i]));else this.addFile(new n(this,e,s,o));return this}),p.exports=n}),56775:((p,S,t)=>{var d=t(83419),c=t(74099),h=t(518),r=t(80341),n=new d({Extends:h,initialize:function(s,o,i,a){h.call(this,s,o,i,a),this.type="tilemapJSON",this.cache=s.cacheManager.tilemap},addToCache:function(){var e={format:r.TILED_JSON,data:this.data};this.cache.add(this.key,e)}});c.register("tilemapTiledJSON",function(e,s,o){if(Array.isArray(e))for(var i=0;i<e.length;i++)this.addFile(new n(this,e[i]));else this.addFile(new n(this,e,s,o));return this}),p.exports=n}),25771:((p,S,t)=>{var d=t(83419),c=t(74099),h=t(95540),r=t(19550),n=t(41212),e=t(26430),s=t(78776),o=new d({Extends:e,initialize:function(a,l,f,u,v,m){var x,g;if(n(l)){var y=l;l=h(y,"key"),x=new r(a,{key:l,url:h(y,"textureURL"),extension:h(y,"textureExtension","png"),normalMap:h(y,"normalMap"),xhrSettings:h(y,"textureXhrSettings")}),g=new s(a,{key:l,url:h(y,"atlasURL"),extension:h(y,"atlasExtension","txt"),xhrSettings:h(y,"atlasXhrSettings")})}else x=new r(a,l,f,v),g=new s(a,l,u,m);x.linkFile?e.call(this,a,"unityatlas",l,[x,g,x.linkFile]):e.call(this,a,"unityatlas",l,[x,g])},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],a=this.files[1],l=this.files[2]?this.files[2].data:null;this.loader.textureManager.addUnityAtlas(i.key,i.data,a.data,l),this.complete=!0}}});c.register("unityAtlas",function(i,a,l,f,u){var v;if(Array.isArray(i))for(var m=0;m<i.length;m++)v=new o(this,i[m]),this.addFile(v.files);else v=new o(this,i,a,l,f,u),this.addFile(v.files);return this}),p.exports=o}),33720:((p,S,t)=>{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(98356),e=t(95540),s=t(41212),o=new d({Extends:h,initialize:function(a,l,f,u){if(u===void 0&&(u=!1),s(l)){var v=l;l=e(v,"key"),f=e(v,"url",[]),u=e(v,"noAudio",!1)}var m=a.systems.game.device.video.getVideoURL(f);m||console.warn("VideoFile: No supported format for "+l);var x={type:"video",cache:a.cacheManager.video,extension:m.type,key:l,url:m.url,config:{noAudio:u}};h.call(this,a,x)},onProcess:function(){this.data={url:this.src,noAudio:this.config.noAudio,crossOrigin:this.crossOrigin},this.onProcessComplete()},load:function(){this.src=n(this,this.loader.baseURL),this.state=c.FILE_LOADED,this.loader.nextFile(this,!0)}});r.register("video",function(i,a,l){if(Array.isArray(i))for(var f=0;f<i.length;f++)this.addFile(new o(this,i[f]));else this.addFile(new o(this,i,a,l));return this}),p.exports=o}),57318:((p,S,t)=>{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=t(56836),o=new d({Extends:h,initialize:function(a,l,f,u){var v="xml";if(e(l)){var m=l;l=n(m,"key"),f=n(m,"url"),u=n(m,"xhrSettings"),v=n(m,"extension",v)}var x={type:"xml",cache:a.cacheManager.xml,extension:v,responseType:"text",key:l,url:f,xhrSettings:u};h.call(this,a,x)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=s(this.xhrLoader.responseText),this.data?this.onProcessComplete():this.onProcessError()}});r.register("xml",function(i,a,l){if(Array.isArray(i))for(var f=0;f<i.length;f++)this.addFile(new o(this,i[f]));else this.addFile(new o(this,i,a,l));return this}),p.exports=o}),64589:((p,S,t)=>{p.exports={AnimationJSONFile:t(14135),AsepriteFile:t(76272),AtlasJSONFile:t(38734),AtlasXMLFile:t(74599),AudioFile:t(21097),AudioSpriteFile:t(89524),BinaryFile:t(85722),BitmapFontFile:t(97025),CompressedTextureFile:t(69559),CSSFile:t(16024),FontFile:t(87674),GLSLFile:t(47931),HTML5AudioFile:t(89749),HTMLFile:t(88470),HTMLTextureFile:t(14643),ImageFile:t(19550),JSONFile:t(518),MultiAtlasFile:t(59327),MultiScriptFile:t(99297),OBJFile:t(41846),PackFile:t(58610),PluginFile:t(48988),SceneFile:t(88423),ScenePluginFile:t(56812),ScriptFile:t(34328),SpriteSheetFile:t(85035),SVGFile:t(67397),TextFile:t(78776),TilemapCSVFile:t(49477),TilemapImpactFile:t(40807),TilemapJSONFile:t(56775),UnityAtlasFile:t(25771),VideoFile:t(33720),XMLFile:t(57318)}}),57777:((p,S,t)=>{var d=t(23906),c=t(79291),h={Events:t(54899),FileTypes:t(64589),File:t(41299),FileTypesManager:t(74099),GetURL:t(98356),LoaderPlugin:t(74261),MergeXHRSettings:t(3374),MultiFile:t(26430),XHRLoader:t(84376),XHRSettings:t(92638)};h=c(!1,h,d),p.exports=h}),53307:(p=>{var S=function(t){for(var d=0,c=0;c<t.length;c++)d+=+t[c];return d/t.length};p.exports=S}),85710:((p,S,t)=>{var d=t(6411),c=function(h,r){return d(h)/d(r)/d(h-r)};p.exports=c}),30976:(p=>{var S=function(t,d){return Math.floor(Math.random()*(d-t+1)+t)};p.exports=S}),87842:(p=>{var S=function(t,d,c,h,r){var n=(h-d)*.5,e=(r-c)*.5,s=t*t,o=t*s;return(2*c-2*h+n+e)*o+(-3*c+3*h-2*n-e)*s+n*t+c};p.exports=S}),26302:(p=>{var S=function(t,d,c){d===void 0&&(d=0),c===void 0&&(c=10);var h=Math.pow(c,-d);return Math.ceil(t*h)/h};p.exports=S}),45319:(p=>{var S=function(t,d,c){return Math.max(d,Math.min(c,t))};p.exports=S}),39506:((p,S,t)=>{var d=t(36383),c=function(h){return h*d.DEG_TO_RAD};p.exports=c}),61241:(p=>{var S=function(t,d){return Math.abs(t-d)};p.exports=S}),38857:((p,S,t)=>{var d=t(45319),c=t(83419),h=t(37867),r=t(29747),n=new h,e=new c({initialize:function s(o,i,a,l){o===void 0&&(o=0),i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=s.DefaultOrder),this._x=o,this._y=i,this._z=a,this._order=l,this.onChangeCallback=r},x:{get:function(){return this._x},set:function(s){this._x=s,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(s){this._y=s,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(s){this._z=s,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(s){this._order=s,this.onChangeCallback(this)}},set:function(s,o,i,a){return a===void 0&&(a=this._order),this._x=s,this._y=o,this._z=i,this._order=a,this.onChangeCallback(this),this},copy:function(s){return this.set(s.x,s.y,s.z,s.order)},setFromQuaternion:function(s,o,i){return o===void 0&&(o=this._order),i===void 0&&(i=!1),n.fromQuat(s),this.setFromRotationMatrix(n,o,i)},setFromRotationMatrix:function(s,o,i){o===void 0&&(o=this._order),i===void 0&&(i=!1);var a=s.val,l=a[0],f=a[4],u=a[8],v=a[1],m=a[5],x=a[9],g=a[2],y=a[6],T=a[10],C=0,E=0,M=0,P=.99999;switch(o){case"XYZ":{E=Math.asin(d(u,-1,1)),Math.abs(u)<P?(C=Math.atan2(-x,T),M=Math.atan2(-f,l)):C=Math.atan2(y,m);break}case"YXZ":{C=Math.asin(-d(x,-1,1)),Math.abs(x)<P?(E=Math.atan2(u,T),M=Math.atan2(v,m)):E=Math.atan2(-g,l);break}case"ZXY":{C=Math.asin(d(y,-1,1)),Math.abs(y)<P?(E=Math.atan2(-g,T),M=Math.atan2(-f,m)):M=Math.atan2(v,l);break}case"ZYX":{E=Math.asin(-d(g,-1,1)),Math.abs(g)<P?(C=Math.atan2(y,T),M=Math.atan2(v,l)):M=Math.atan2(-f,m);break}case"YZX":{M=Math.asin(d(v,-1,1)),Math.abs(v)<P?(C=Math.atan2(-x,m),E=Math.atan2(-g,l)):E=Math.atan2(u,T);break}case"XZY":{M=Math.asin(-d(f,-1,1)),Math.abs(f)<P?(C=Math.atan2(y,m),E=Math.atan2(u,l)):C=Math.atan2(-x,T);break}}return this._x=C,this._y=E,this._z=M,this._order=o,i&&this.onChangeCallback(this),this}});e.RotationOrders=["XYZ","YXZ","ZXY","ZYX","YZX","XZY"],e.DefaultOrder="XYZ",p.exports=e}),6411:(p=>{var S=function(t){if(t===0)return 1;for(var d=t;--t;)d*=t;return d};p.exports=S}),99472:(p=>{var S=function(t,d){return Math.random()*(d-t)+t};p.exports=S}),77623:(p=>{var S=function(t,d,c){d===void 0&&(d=0),c===void 0&&(c=10);var h=Math.pow(c,-d);return Math.floor(t*h)/h};p.exports=S}),62945:((p,S,t)=>{var d=t(45319),c=function(h,r,n){return h=d(h,0,1),(n-r)*h+r};p.exports=c}),38265:(p=>{var S=function(t,d){return t/d/1e3};p.exports=S}),78702:(p=>{var S=function(t){return t==parseFloat(t)?!(t%2):void 0};p.exports=S}),94883:(p=>{var S=function(t){return t===parseFloat(t)?!(t%2):void 0};p.exports=S}),28915:(p=>{var S=function(t,d,c){return(d-t)*c+t};p.exports=S}),94908:(p=>{var S=function(t,d,c){return c===void 0&&(c=0),t.clone().lerp(d,c)};p.exports=S}),94434:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r){this.val=new Float32Array(9),r?this.copy(r):this.identity()},clone:function(){return new c(this)},set:function(h){return this.copy(h)},copy:function(h){var r=this.val,n=h.val;return r[0]=n[0],r[1]=n[1],r[2]=n[2],r[3]=n[3],r[4]=n[4],r[5]=n[5],r[6]=n[6],r[7]=n[7],r[8]=n[8],this},fromMat4:function(h){var r=h.val,n=this.val;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[4],n[4]=r[5],n[5]=r[6],n[6]=r[8],n[7]=r[9],n[8]=r[10],this},fromArray:function(h){var r=this.val;return r[0]=h[0],r[1]=h[1],r[2]=h[2],r[3]=h[3],r[4]=h[4],r[5]=h[5],r[6]=h[6],r[7]=h[7],r[8]=h[8],this},identity:function(){var h=this.val;return h[0]=1,h[1]=0,h[2]=0,h[3]=0,h[4]=1,h[5]=0,h[6]=0,h[7]=0,h[8]=1,this},transpose:function(){var h=this.val,r=h[1],n=h[2],e=h[5];return h[1]=h[3],h[2]=h[6],h[3]=r,h[5]=h[7],h[6]=n,h[7]=e,this},invert:function(){var h=this.val,r=h[0],n=h[1],e=h[2],s=h[3],o=h[4],i=h[5],a=h[6],l=h[7],f=h[8],u=f*o-i*l,v=-f*s+i*a,m=l*s-o*a,x=r*u+n*v+e*m;return x?(x=1/x,h[0]=u*x,h[1]=(-f*n+e*l)*x,h[2]=(i*n-e*o)*x,h[3]=v*x,h[4]=(f*r-e*a)*x,h[5]=(-i*r+e*s)*x,h[6]=m*x,h[7]=(-l*r+n*a)*x,h[8]=(o*r-n*s)*x,this):null},adjoint:function(){var h=this.val,r=h[0],n=h[1],e=h[2],s=h[3],o=h[4],i=h[5],a=h[6],l=h[7],f=h[8];return h[0]=o*f-i*l,h[1]=e*l-n*f,h[2]=n*i-e*o,h[3]=i*a-s*f,h[4]=r*f-e*a,h[5]=e*s-r*i,h[6]=s*l-o*a,h[7]=n*a-r*l,h[8]=r*o-n*s,this},determinant:function(){var h=this.val,r=h[0],n=h[1],e=h[2],s=h[3],o=h[4],i=h[5],a=h[6],l=h[7],f=h[8];return r*(f*o-i*l)+n*(-f*s+i*a)+e*(l*s-o*a)},multiply:function(h){var r=this.val,n=r[0],e=r[1],s=r[2],o=r[3],i=r[4],a=r[5],l=r[6],f=r[7],u=r[8],v=h.val,m=v[0],x=v[1],g=v[2],y=v[3],T=v[4],C=v[5],E=v[6],M=v[7],P=v[8];return r[0]=m*n+x*o+g*l,r[1]=m*e+x*i+g*f,r[2]=m*s+x*a+g*u,r[3]=y*n+T*o+C*l,r[4]=y*e+T*i+C*f,r[5]=y*s+T*a+C*u,r[6]=E*n+M*o+P*l,r[7]=E*e+M*i+P*f,r[8]=E*s+M*a+P*u,this},translate:function(h){var r=this.val,n=h.x,e=h.y;return r[6]=n*r[0]+e*r[3]+r[6],r[7]=n*r[1]+e*r[4]+r[7],r[8]=n*r[2]+e*r[5]+r[8],this},rotate:function(h){var r=this.val,n=r[0],e=r[1],s=r[2],o=r[3],i=r[4],a=r[5],l=Math.sin(h),f=Math.cos(h);return r[0]=f*n+l*o,r[1]=f*e+l*i,r[2]=f*s+l*a,r[3]=f*o-l*n,r[4]=f*i-l*e,r[5]=f*a-l*s,this},scale:function(h){var r=this.val,n=h.x,e=h.y;return r[0]=n*r[0],r[1]=n*r[1],r[2]=n*r[2],r[3]=e*r[3],r[4]=e*r[4],r[5]=e*r[5],this},fromQuat:function(h){var r=h.x,n=h.y,e=h.z,s=h.w,o=r+r,i=n+n,a=e+e,l=r*o,f=r*i,u=r*a,v=n*i,m=n*a,x=e*a,g=s*o,y=s*i,T=s*a,C=this.val;return C[0]=1-(v+x),C[3]=f+T,C[6]=u-y,C[1]=f-T,C[4]=1-(l+x),C[7]=m+g,C[2]=u+y,C[5]=m-g,C[8]=1-(l+v),this},normalFromMat4:function(h){var r=h.val,n=this.val,e=r[0],s=r[1],o=r[2],i=r[3],a=r[4],l=r[5],f=r[6],u=r[7],v=r[8],m=r[9],x=r[10],g=r[11],y=r[12],T=r[13],C=r[14],E=r[15],M=e*l-s*a,P=e*f-o*a,A=e*u-i*a,R=s*f-o*l,F=s*u-i*l,w=o*u-i*f,I=v*T-m*y,U=v*C-x*y,N=v*E-g*y,D=m*C-x*T,B=m*E-g*T,L=x*E-g*C,G=M*L-P*B+A*D+R*N-F*U+w*I;return G?(G=1/G,n[0]=(l*L-f*B+u*D)*G,n[1]=(f*N-a*L-u*U)*G,n[2]=(a*B-l*N+u*I)*G,n[3]=(o*B-s*L-i*D)*G,n[4]=(e*L-o*N+i*U)*G,n[5]=(s*N-e*B-i*I)*G,n[6]=(T*w-C*F+E*R)*G,n[7]=(C*A-y*w-E*P)*G,n[8]=(y*F-T*A+E*M)*G,this):null}});p.exports=c}),37867:((p,S,t)=>{var d=t(83419),c=t(25836),h=1e-6,r=new d({initialize:function(l){this.val=new Float32Array(16),l?this.copy(l):this.identity()},clone:function(){return new r(this)},set:function(a){return this.copy(a)},setValues:function(a,l,f,u,v,m,x,g,y,T,C,E,M,P,A,R){var F=this.val;return F[0]=a,F[1]=l,F[2]=f,F[3]=u,F[4]=v,F[5]=m,F[6]=x,F[7]=g,F[8]=y,F[9]=T,F[10]=C,F[11]=E,F[12]=M,F[13]=P,F[14]=A,F[15]=R,this},copy:function(a){var l=a.val;return this.setValues(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],l[8],l[9],l[10],l[11],l[12],l[13],l[14],l[15])},fromArray:function(a){return this.setValues(a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(a,l,f){var u=n.fromQuat(f),v=u.val,m=l.x,x=l.y,g=l.z;return this.setValues(v[0]*m,v[1]*m,v[2]*m,0,v[4]*x,v[5]*x,v[6]*x,0,v[8]*g,v[9]*g,v[10]*g,0,a.x,a.y,a.z,1)},xyz:function(a,l,f){this.identity();var u=this.val;return u[12]=a,u[13]=l,u[14]=f,this},scaling:function(a,l,f){this.zero();var u=this.val;return u[0]=a,u[5]=l,u[10]=f,u[15]=1,this},identity:function(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var a=this.val,l=a[1],f=a[2],u=a[3],v=a[6],m=a[7],x=a[11];return a[1]=a[4],a[2]=a[8],a[3]=a[12],a[4]=l,a[6]=a[9],a[7]=a[13],a[8]=f,a[9]=v,a[11]=a[14],a[12]=u,a[13]=m,a[14]=x,this},getInverse:function(a){return this.copy(a),this.invert()},invert:function(){var a=this.val,l=a[0],f=a[1],u=a[2],v=a[3],m=a[4],x=a[5],g=a[6],y=a[7],T=a[8],C=a[9],E=a[10],M=a[11],P=a[12],A=a[13],R=a[14],F=a[15],w=l*x-f*m,I=l*g-u*m,U=l*y-v*m,N=f*g-u*x,D=f*y-v*x,B=u*y-v*g,L=T*A-C*P,G=T*R-E*P,O=T*F-M*P,X=C*R-E*A,z=C*F-M*A,V=E*F-M*R,Y=w*V-I*z+U*X+N*O-D*G+B*L;return Y?(Y=1/Y,this.setValues((x*V-g*z+y*X)*Y,(u*z-f*V-v*X)*Y,(A*B-R*D+F*N)*Y,(E*D-C*B-M*N)*Y,(g*O-m*V-y*G)*Y,(l*V-u*O+v*G)*Y,(R*U-P*B-F*I)*Y,(T*B-E*U+M*I)*Y,(m*z-x*O+y*L)*Y,(f*O-l*z-v*L)*Y,(P*D-A*U+F*w)*Y,(C*U-T*D-M*w)*Y,(x*G-m*X-g*L)*Y,(l*X-f*G+u*L)*Y,(A*I-P*N-R*w)*Y,(T*N-C*I+E*w)*Y)):this},adjoint:function(){var a=this.val,l=a[0],f=a[1],u=a[2],v=a[3],m=a[4],x=a[5],g=a[6],y=a[7],T=a[8],C=a[9],E=a[10],M=a[11],P=a[12],A=a[13],R=a[14],F=a[15];return this.setValues(x*(E*F-M*R)-C*(g*F-y*R)+A*(g*M-y*E),-(f*(E*F-M*R)-C*(u*F-v*R)+A*(u*M-v*E)),f*(g*F-y*R)-x*(u*F-v*R)+A*(u*y-v*g),-(f*(g*M-y*E)-x*(u*M-v*E)+C*(u*y-v*g)),-(m*(E*F-M*R)-T*(g*F-y*R)+P*(g*M-y*E)),l*(E*F-M*R)-T*(u*F-v*R)+P*(u*M-v*E),-(l*(g*F-y*R)-m*(u*F-v*R)+P*(u*y-v*g)),l*(g*M-y*E)-m*(u*M-v*E)+T*(u*y-v*g),m*(C*F-M*A)-T*(x*F-y*A)+P*(x*M-y*C),-(l*(C*F-M*A)-T*(f*F-v*A)+P*(f*M-v*C)),l*(x*F-y*A)-m*(f*F-v*A)+P*(f*y-v*x),-(l*(x*M-y*C)-m*(f*M-v*C)+T*(f*y-v*x)),-(m*(C*R-E*A)-T*(x*R-g*A)+P*(x*E-g*C)),l*(C*R-E*A)-T*(f*R-u*A)+P*(f*E-u*C),-(l*(x*R-g*A)-m*(f*R-u*A)+P*(f*g-u*x)),l*(x*E-g*C)-m*(f*E-u*C)+T*(f*g-u*x))},determinant:function(){var a=this.val,l=a[0],f=a[1],u=a[2],v=a[3],m=a[4],x=a[5],g=a[6],y=a[7],T=a[8],C=a[9],E=a[10],M=a[11],P=a[12],A=a[13],R=a[14],F=a[15],w=l*x-f*m,I=l*g-u*m,U=l*y-v*m,N=f*g-u*x,D=f*y-v*x,B=u*y-v*g,L=T*A-C*P,G=T*R-E*P,O=T*F-M*P,X=C*R-E*A,z=C*F-M*A,V=E*F-M*R;return w*V-I*z+U*X+N*O-D*G+B*L},multiply:function(a){var l=this.val,f=l[0],u=l[1],v=l[2],m=l[3],x=l[4],g=l[5],y=l[6],T=l[7],C=l[8],E=l[9],M=l[10],P=l[11],A=l[12],R=l[13],F=l[14],w=l[15],I=a.val,U=I[0],N=I[1],D=I[2],B=I[3];return l[0]=U*f+N*x+D*C+B*A,l[1]=U*u+N*g+D*E+B*R,l[2]=U*v+N*y+D*M+B*F,l[3]=U*m+N*T+D*P+B*w,U=I[4],N=I[5],D=I[6],B=I[7],l[4]=U*f+N*x+D*C+B*A,l[5]=U*u+N*g+D*E+B*R,l[6]=U*v+N*y+D*M+B*F,l[7]=U*m+N*T+D*P+B*w,U=I[8],N=I[9],D=I[10],B=I[11],l[8]=U*f+N*x+D*C+B*A,l[9]=U*u+N*g+D*E+B*R,l[10]=U*v+N*y+D*M+B*F,l[11]=U*m+N*T+D*P+B*w,U=I[12],N=I[13],D=I[14],B=I[15],l[12]=U*f+N*x+D*C+B*A,l[13]=U*u+N*g+D*E+B*R,l[14]=U*v+N*y+D*M+B*F,l[15]=U*m+N*T+D*P+B*w,this},multiplyLocal:function(a){var l=this.val,f=a.val;return this.setValues(l[0]*f[0]+l[1]*f[4]+l[2]*f[8]+l[3]*f[12],l[0]*f[1]+l[1]*f[5]+l[2]*f[9]+l[3]*f[13],l[0]*f[2]+l[1]*f[6]+l[2]*f[10]+l[3]*f[14],l[0]*f[3]+l[1]*f[7]+l[2]*f[11]+l[3]*f[15],l[4]*f[0]+l[5]*f[4]+l[6]*f[8]+l[7]*f[12],l[4]*f[1]+l[5]*f[5]+l[6]*f[9]+l[7]*f[13],l[4]*f[2]+l[5]*f[6]+l[6]*f[10]+l[7]*f[14],l[4]*f[3]+l[5]*f[7]+l[6]*f[11]+l[7]*f[15],l[8]*f[0]+l[9]*f[4]+l[10]*f[8]+l[11]*f[12],l[8]*f[1]+l[9]*f[5]+l[10]*f[9]+l[11]*f[13],l[8]*f[2]+l[9]*f[6]+l[10]*f[10]+l[11]*f[14],l[8]*f[3]+l[9]*f[7]+l[10]*f[11]+l[11]*f[15],l[12]*f[0]+l[13]*f[4]+l[14]*f[8]+l[15]*f[12],l[12]*f[1]+l[13]*f[5]+l[14]*f[9]+l[15]*f[13],l[12]*f[2]+l[13]*f[6]+l[14]*f[10]+l[15]*f[14],l[12]*f[3]+l[13]*f[7]+l[14]*f[11]+l[15]*f[15])},premultiply:function(a){return this.multiplyMatrices(a,this)},multiplyMatrices:function(a,l){var f=a.val,u=l.val,v=f[0],m=f[4],x=f[8],g=f[12],y=f[1],T=f[5],C=f[9],E=f[13],M=f[2],P=f[6],A=f[10],R=f[14],F=f[3],w=f[7],I=f[11],U=f[15],N=u[0],D=u[4],B=u[8],L=u[12],G=u[1],O=u[5],X=u[9],z=u[13],V=u[2],Y=u[6],W=u[10],H=u[14],K=u[3],b=u[7],J=u[11],$=u[15];return this.setValues(v*N+m*G+x*V+g*K,y*N+T*G+C*V+E*K,M*N+P*G+A*V+R*K,F*N+w*G+I*V+U*K,v*D+m*O+x*Y+g*b,y*D+T*O+C*Y+E*b,M*D+P*O+A*Y+R*b,F*D+w*O+I*Y+U*b,v*B+m*X+x*W+g*J,y*B+T*X+C*W+E*J,M*B+P*X+A*W+R*J,F*B+w*X+I*W+U*J,v*L+m*z+x*H+g*$,y*L+T*z+C*H+E*$,M*L+P*z+A*H+R*$,F*L+w*z+I*H+U*$)},translate:function(a){return this.translateXYZ(a.x,a.y,a.z)},translateXYZ:function(a,l,f){var u=this.val;return u[12]=u[0]*a+u[4]*l+u[8]*f+u[12],u[13]=u[1]*a+u[5]*l+u[9]*f+u[13],u[14]=u[2]*a+u[6]*l+u[10]*f+u[14],u[15]=u[3]*a+u[7]*l+u[11]*f+u[15],this},scale:function(a){return this.scaleXYZ(a.x,a.y,a.z)},scaleXYZ:function(a,l,f){var u=this.val;return u[0]=u[0]*a,u[1]=u[1]*a,u[2]=u[2]*a,u[3]=u[3]*a,u[4]=u[4]*l,u[5]=u[5]*l,u[6]=u[6]*l,u[7]=u[7]*l,u[8]=u[8]*f,u[9]=u[9]*f,u[10]=u[10]*f,u[11]=u[11]*f,this},makeRotationAxis:function(a,l){var f=Math.cos(l),u=Math.sin(l),v=1-f,m=a.x,x=a.y,g=a.z,y=v*m,T=v*x;return this.setValues(y*m+f,y*x-u*g,y*g+u*x,0,y*x+u*g,T*x+f,T*g-u*m,0,y*g-u*x,T*g+u*m,v*g*g+f,0,0,0,0,1)},rotate:function(a,l){var f=this.val,u=l.x,v=l.y,m=l.z,x=Math.sqrt(u*u+v*v+m*m);if(Math.abs(x)<h)return this;x=1/x,u*=x,v*=x,m*=x;var g=Math.sin(a),y=Math.cos(a),T=1-y,C=f[0],E=f[1],M=f[2],P=f[3],A=f[4],R=f[5],F=f[6],w=f[7],I=f[8],U=f[9],N=f[10],D=f[11],B=f[12],L=f[13],G=f[14],O=f[15],X=u*u*T+y,z=v*u*T+m*g,V=m*u*T-v*g,Y=u*v*T-m*g,W=v*v*T+y,H=m*v*T+u*g,K=u*m*T+v*g,b=v*m*T-u*g,J=m*m*T+y;return this.setValues(C*X+A*z+I*V,E*X+R*z+U*V,M*X+F*z+N*V,P*X+w*z+D*V,C*Y+A*W+I*H,E*Y+R*W+U*H,M*Y+F*W+N*H,P*Y+w*W+D*H,C*K+A*b+I*J,E*K+R*b+U*J,M*K+F*b+N*J,P*K+w*b+D*J,B,L,G,O)},rotateX:function(a){var l=this.val,f=Math.sin(a),u=Math.cos(a),v=l[4],m=l[5],x=l[6],g=l[7],y=l[8],T=l[9],C=l[10],E=l[11];return l[4]=v*u+y*f,l[5]=m*u+T*f,l[6]=x*u+C*f,l[7]=g*u+E*f,l[8]=y*u-v*f,l[9]=T*u-m*f,l[10]=C*u-x*f,l[11]=E*u-g*f,this},rotateY:function(a){var l=this.val,f=Math.sin(a),u=Math.cos(a),v=l[0],m=l[1],x=l[2],g=l[3],y=l[8],T=l[9],C=l[10],E=l[11];return l[0]=v*u-y*f,l[1]=m*u-T*f,l[2]=x*u-C*f,l[3]=g*u-E*f,l[8]=v*f+y*u,l[9]=m*f+T*u,l[10]=x*f+C*u,l[11]=g*f+E*u,this},rotateZ:function(a){var l=this.val,f=Math.sin(a),u=Math.cos(a),v=l[0],m=l[1],x=l[2],g=l[3],y=l[4],T=l[5],C=l[6],E=l[7];return l[0]=v*u+y*f,l[1]=m*u+T*f,l[2]=x*u+C*f,l[3]=g*u+E*f,l[4]=y*u-v*f,l[5]=T*u-m*f,l[6]=C*u-x*f,l[7]=E*u-g*f,this},fromRotationTranslation:function(a,l){var f=a.x,u=a.y,v=a.z,m=a.w,x=f+f,g=u+u,y=v+v,T=f*x,C=f*g,E=f*y,M=u*g,P=u*y,A=v*y,R=m*x,F=m*g,w=m*y;return this.setValues(1-(M+A),C+w,E-F,0,C-w,1-(T+A),P+R,0,E+F,P-R,1-(T+M),0,l.x,l.y,l.z,1)},fromQuat:function(a){var l=a.x,f=a.y,u=a.z,v=a.w,m=l+l,x=f+f,g=u+u,y=l*m,T=l*x,C=l*g,E=f*x,M=f*g,P=u*g,A=v*m,R=v*x,F=v*g;return this.setValues(1-(E+P),T+F,C-R,0,T-F,1-(y+P),M+A,0,C+R,M-A,1-(y+E),0,0,0,0,1)},frustum:function(a,l,f,u,v,m){var x=1/(l-a),g=1/(u-f),y=1/(v-m);return this.setValues(v*2*x,0,0,0,0,v*2*g,0,0,(l+a)*x,(u+f)*g,(m+v)*y,-1,0,0,m*v*2*y,0)},perspective:function(a,l,f,u){var v=1/Math.tan(a/2),m=1/(f-u);return this.setValues(v/l,0,0,0,0,v,0,0,0,0,(u+f)*m,-1,0,0,2*u*f*m,0)},perspectiveLH:function(a,l,f,u){return this.setValues(2*f/a,0,0,0,0,2*f/l,0,0,0,0,-u/(f-u),1,0,0,f*u/(f-u),0)},ortho:function(a,l,f,u,v,m){var x=a-l,g=f-u,y=v-m;return x=x===0?x:1/x,g=g===0?g:1/g,y=y===0?y:1/y,this.setValues(-2*x,0,0,0,0,-2*g,0,0,0,0,2*y,0,(a+l)*x,(u+f)*g,(m+v)*y,1)},lookAtRH:function(a,l,f){var u=this.val;return i.subVectors(a,l),i.lengthSq()===0&&(i.z=1),i.normalize(),s.crossVectors(f,i),s.lengthSq()===0&&(Math.abs(f.z)===1?i.x+=1e-4:i.z+=1e-4,i.normalize(),s.crossVectors(f,i)),s.normalize(),o.crossVectors(i,s),u[0]=s.x,u[1]=s.y,u[2]=s.z,u[4]=o.x,u[5]=o.y,u[6]=o.z,u[8]=i.x,u[9]=i.y,u[10]=i.z,this},lookAt:function(a,l,f){var u=a.x,v=a.y,m=a.z,x=f.x,g=f.y,y=f.z,T=l.x,C=l.y,E=l.z;if(Math.abs(u-T)<h&&Math.abs(v-C)<h&&Math.abs(m-E)<h)return this.identity();var M=u-T,P=v-C,A=m-E,R=1/Math.sqrt(M*M+P*P+A*A);M*=R,P*=R,A*=R;var F=g*A-y*P,w=y*M-x*A,I=x*P-g*M;R=Math.sqrt(F*F+w*w+I*I),R?(R=1/R,F*=R,w*=R,I*=R):(F=0,w=0,I=0);var U=P*I-A*w,N=A*F-M*I,D=M*w-P*F;return R=Math.sqrt(U*U+N*N+D*D),R?(R=1/R,U*=R,N*=R,D*=R):(U=0,N=0,D=0),this.setValues(F,U,M,0,w,N,P,0,I,D,A,0,-(F*u+w*v+I*m),-(U*u+N*v+D*m),-(M*u+P*v+A*m),1)},yawPitchRoll:function(a,l,f){this.zero(),n.zero(),e.zero();var u=this.val,v=n.val,m=e.val,x=Math.sin(f),g=Math.cos(f);return u[10]=1,u[15]=1,u[0]=g,u[1]=x,u[4]=-x,u[5]=g,x=Math.sin(l),g=Math.cos(l),v[0]=1,v[15]=1,v[5]=g,v[10]=g,v[9]=-x,v[6]=x,x=Math.sin(a),g=Math.cos(a),m[5]=1,m[15]=1,m[0]=g,m[2]=-x,m[8]=x,m[10]=g,this.multiplyLocal(n),this.multiplyLocal(e),this},setWorldMatrix:function(a,l,f,u,v){return this.yawPitchRoll(a.y,a.x,a.z),n.scaling(f.x,f.y,f.z),e.xyz(l.x,l.y,l.z),this.multiplyLocal(n),this.multiplyLocal(e),u&&this.multiplyLocal(u),v&&this.multiplyLocal(v),this},multiplyToMat4:function(a,l){var f=this.val,u=a.val,v=f[0],m=f[1],x=f[2],g=f[3],y=f[4],T=f[5],C=f[6],E=f[7],M=f[8],P=f[9],A=f[10],R=f[11],F=f[12],w=f[13],I=f[14],U=f[15],N=u[0],D=u[1],B=u[2],L=u[3],G=u[4],O=u[5],X=u[6],z=u[7],V=u[8],Y=u[9],W=u[10],H=u[11],K=u[12],b=u[13],J=u[14],$=u[15];return l.setValues(N*v+D*y+B*M+L*F,D*m+D*T+B*P+L*w,B*x+D*C+B*A+L*I,L*g+D*E+B*R+L*U,G*v+O*y+X*M+z*F,G*m+O*T+X*P+z*w,G*x+O*C+X*A+z*I,G*g+O*E+X*R+z*U,V*v+Y*y+W*M+H*F,V*m+Y*T+W*P+H*w,V*x+Y*C+W*A+H*I,V*g+Y*E+W*R+H*U,K*v+b*y+J*M+$*F,K*m+b*T+J*P+$*w,K*x+b*C+J*A+$*I,K*g+b*E+J*R+$*U)},fromRotationXYTranslation:function(a,l,f){var u=l.x,v=l.y,m=l.z,x=Math.sin(a.x),g=Math.cos(a.x),y=Math.sin(a.y),T=Math.cos(a.y),C=u,E=v,M=m,P=-x,A=0-P*y,R=0-g*y,F=P*T,w=g*T;return f||(C=T*u+y*m,E=A*u+g*v+F*m,M=R*u+x*v+w*m),this.setValues(T,A,R,0,0,g,x,0,y,F,w,0,C,E,M,1)},getMaxScaleOnAxis:function(){var a=this.val,l=a[0]*a[0]+a[1]*a[1]+a[2]*a[2],f=a[4]*a[4]+a[5]*a[5]+a[6]*a[6],u=a[8]*a[8]+a[9]*a[9]+a[10]*a[10];return Math.sqrt(Math.max(l,f,u))}}),n=new r,e=new r,s=new c,o=new c,i=new c;p.exports=r}),86883:(p=>{var S=function(t,d,c){return Math.min(t+d,c)};p.exports=S}),50040:(p=>{var S=function(t){var d=t.length;if(d===0)return 0;t.sort(function(h,r){return h-r});var c=Math.floor(d/2);return d%2===0?(t[c]+t[c-1])/2:t[c]};p.exports=S}),37204:(p=>{var S=function(t,d,c){return Math.max(t-d,c)};p.exports=S}),65201:(p=>{var S=function(t,d,c,h){c===void 0&&(c=d+1);var r=(t-d)/(c-d);return r>1?h!==void 0?(r=(h-t)/(h-c),r<0&&(r=0)):r=1:r<0&&(r=0),r};p.exports=S}),15746:((p,S,t)=>{var d=t(83419),c=t(94434),h=t(29747),r=t(25836),n=1e-6,e=new Int8Array([1,2,0]),s=new Float32Array([0,0,0]),o=new r(1,0,0),i=new r(0,1,0),a=new r,l=new c,f=new d({initialize:function(v,m,x,g){this.onChangeCallback=h,this.set(v,m,x,g)},x:{get:function(){return this._x},set:function(u){this._x=u,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(u){this._y=u,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(u){this._z=u,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(u){this._w=u,this.onChangeCallback(this)}},copy:function(u){return this.set(u)},set:function(u,v,m,x,g){return g===void 0&&(g=!0),typeof u=="object"?(this._x=u.x||0,this._y=u.y||0,this._z=u.z||0,this._w=u.w||0):(this._x=u||0,this._y=v||0,this._z=m||0,this._w=x||0),g&&this.onChangeCallback(this),this},add:function(u){return this._x+=u.x,this._y+=u.y,this._z+=u.z,this._w+=u.w,this.onChangeCallback(this),this},subtract:function(u){return this._x-=u.x,this._y-=u.y,this._z-=u.z,this._w-=u.w,this.onChangeCallback(this),this},scale:function(u){return this._x*=u,this._y*=u,this._z*=u,this._w*=u,this.onChangeCallback(this),this},length:function(){var u=this.x,v=this.y,m=this.z,x=this.w;return Math.sqrt(u*u+v*v+m*m+x*x)},lengthSq:function(){var u=this.x,v=this.y,m=this.z,x=this.w;return u*u+v*v+m*m+x*x},normalize:function(){var u=this.x,v=this.y,m=this.z,x=this.w,g=u*u+v*v+m*m+x*x;return g>0&&(g=1/Math.sqrt(g),this._x=u*g,this._y=v*g,this._z=m*g,this._w=x*g),this.onChangeCallback(this),this},dot:function(u){return this.x*u.x+this.y*u.y+this.z*u.z+this.w*u.w},lerp:function(u,v){v===void 0&&(v=0);var m=this.x,x=this.y,g=this.z,y=this.w;return this.set(m+v*(u.x-m),x+v*(u.y-x),g+v*(u.z-g),y+v*(u.w-y))},rotationTo:function(u,v){var m=u.x*v.x+u.y*v.y+u.z*v.z;return m<-.999999?(a.copy(o).cross(u).length()<n&&a.copy(i).cross(u),a.normalize(),this.setAxisAngle(a,Math.PI)):m>.999999?this.set(0,0,0,1):(a.copy(u).cross(v),this._x=a.x,this._y=a.y,this._z=a.z,this._w=1+m,this.normalize())},setAxes:function(u,v,m){var x=l.val;return x[0]=v.x,x[3]=v.y,x[6]=v.z,x[1]=m.x,x[4]=m.y,x[7]=m.z,x[2]=-u.x,x[5]=-u.y,x[8]=-u.z,this.fromMat3(l).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(u,v){v=v*.5;var m=Math.sin(v);return this.set(m*u.x,m*u.y,m*u.z,Math.cos(v))},multiply:function(u){var v=this.x,m=this.y,x=this.z,g=this.w,y=u.x,T=u.y,C=u.z,E=u.w;return this.set(v*E+g*y+m*C-x*T,m*E+g*T+x*y-v*C,x*E+g*C+v*T-m*y,g*E-v*y-m*T-x*C)},slerp:function(u,v){var m=this.x,x=this.y,g=this.z,y=this.w,T=u.x,C=u.y,E=u.z,M=u.w,P=m*T+x*C+g*E+y*M;P<0&&(P=-P,T=-T,C=-C,E=-E,M=-M);var A=1-v,R=v;if(1-P>n){var F=Math.acos(P),w=Math.sin(F);A=Math.sin((1-v)*F)/w,R=Math.sin(v*F)/w}return this.set(A*m+R*T,A*x+R*C,A*g+R*E,A*y+R*M)},invert:function(){var u=this.x,v=this.y,m=this.z,x=this.w,g=u*u+v*v+m*m+x*x,y=g?1/g:0;return this.set(-u*y,-v*y,-m*y,x*y)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(u){u*=.5;var v=this.x,m=this.y,x=this.z,g=this.w,y=Math.sin(u),T=Math.cos(u);return this.set(v*T+g*y,m*T+x*y,x*T-m*y,g*T-v*y)},rotateY:function(u){u*=.5;var v=this.x,m=this.y,x=this.z,g=this.w,y=Math.sin(u),T=Math.cos(u);return this.set(v*T-x*y,m*T+g*y,x*T+v*y,g*T-m*y)},rotateZ:function(u){u*=.5;var v=this.x,m=this.y,x=this.z,g=this.w,y=Math.sin(u),T=Math.cos(u);return this.set(v*T+m*y,m*T-v*y,x*T+g*y,g*T-x*y)},calculateW:function(){var u=this.x,v=this.y,m=this.z;return this.w=-Math.sqrt(1-u*u-v*v-m*m),this},setFromEuler:function(u,v){var m=u.x/2,x=u.y/2,g=u.z/2,y=Math.cos(m),T=Math.cos(x),C=Math.cos(g),E=Math.sin(m),M=Math.sin(x),P=Math.sin(g);switch(u.order){case"XYZ":{this.set(E*T*C+y*M*P,y*M*C-E*T*P,y*T*P+E*M*C,y*T*C-E*M*P,v);break}case"YXZ":{this.set(E*T*C+y*M*P,y*M*C-E*T*P,y*T*P-E*M*C,y*T*C+E*M*P,v);break}case"ZXY":{this.set(E*T*C-y*M*P,y*M*C+E*T*P,y*T*P+E*M*C,y*T*C-E*M*P,v);break}case"ZYX":{this.set(E*T*C-y*M*P,y*M*C+E*T*P,y*T*P-E*M*C,y*T*C+E*M*P,v);break}case"YZX":{this.set(E*T*C+y*M*P,y*M*C+E*T*P,y*T*P-E*M*C,y*T*C-E*M*P,v);break}case"XZY":{this.set(E*T*C-y*M*P,y*M*C-E*T*P,y*T*P+E*M*C,y*T*C+E*M*P,v);break}}return this},setFromRotationMatrix:function(u){var v=u.val,m=v[0],x=v[4],g=v[8],y=v[1],T=v[5],C=v[9],E=v[2],M=v[6],P=v[10],A=m+T+P,R;return A>0?(R=.5/Math.sqrt(A+1),this.set((M-C)*R,(g-E)*R,(y-x)*R,.25/R)):m>T&&m>P?(R=2*Math.sqrt(1+m-T-P),this.set(.25*R,(x+y)/R,(g+E)/R,(M-C)/R)):T>P?(R=2*Math.sqrt(1+T-m-P),this.set((x+y)/R,.25*R,(C+M)/R,(g-E)/R)):(R=2*Math.sqrt(1+P-m-T),this.set((g+E)/R,(C+M)/R,.25*R,(y-x)/R)),this},fromMat3:function(u){var v=u.val,m=v[0]+v[4]+v[8],x;if(m>0)x=Math.sqrt(m+1),this.w=.5*x,x=.5/x,this._x=(v[7]-v[5])*x,this._y=(v[2]-v[6])*x,this._z=(v[3]-v[1])*x;else{var g=0;v[4]>v[0]&&(g=1),v[8]>v[g*3+g]&&(g=2);var y=e[g],T=e[y];x=Math.sqrt(v[g*3+g]-v[y*3+y]-v[T*3+T]+1),s[g]=.5*x,x=.5/x,s[y]=(v[y*3+g]+v[g*3+y])*x,s[T]=(v[T*3+g]+v[g*3+T])*x,this._x=s[0],this._y=s[1],this._z=s[2],this._w=(v[T*3+y]-v[y*3+T])*x}return this.onChangeCallback(this),this}});p.exports=f}),43396:((p,S,t)=>{var d=t(36383),c=function(h){return h*d.RAD_TO_DEG};p.exports=c}),74362:(p=>{var S=function(t,d){d===void 0&&(d=1);var c=Math.random()*2*Math.PI;return t.x=Math.cos(c)*d,t.y=Math.sin(c)*d,t};p.exports=S}),60706:(p=>{var S=function(t,d){d===void 0&&(d=1);var c=Math.random()*2*Math.PI,h=Math.random()*2-1,r=Math.sqrt(1-h*h)*d;return t.x=Math.cos(c)*r,t.y=Math.sin(c)*r,t.z=h*d,t};p.exports=S}),67421:(p=>{var S=function(t,d){return d===void 0&&(d=1),t.x=(Math.random()*2-1)*d,t.y=(Math.random()*2-1)*d,t.z=(Math.random()*2-1)*d,t.w=(Math.random()*2-1)*d,t};p.exports=S}),36305:(p=>{var S=function(t,d){var c=t.x,h=t.y;return t.x=c*Math.cos(d)-h*Math.sin(d),t.y=c*Math.sin(d)+h*Math.cos(d),t};p.exports=S}),11520:(p=>{var S=function(t,d,c,h){var r=Math.cos(h),n=Math.sin(h),e=t.x-d,s=t.y-c;return t.x=e*r-s*n+d,t.y=e*n+s*r+c,t};p.exports=S}),1163:(p=>{var S=function(t,d,c,h,r){var n=h+Math.atan2(t.y-c,t.x-d);return t.x=d+r*Math.cos(n),t.y=c+r*Math.sin(n),t};p.exports=S}),70336:(p=>{var S=function(t,d,c,h,r){return t.x=d+r*Math.cos(h),t.y=c+r*Math.sin(h),t};p.exports=S}),72678:((p,S,t)=>{var d=t(25836),c=t(37867),h=t(15746),r=new c,n=new h,e=new d,s=function(o,i,a){return n.setAxisAngle(i,a),r.fromRotationTranslation(n,e.set(0,0,0)),o.transformMat4(r)};p.exports=s}),2284:(p=>{var S=function(t){return t>0?Math.ceil(t):Math.floor(t)};p.exports=S}),41013:(p=>{var S=function(t,d,c){d===void 0&&(d=0),c===void 0&&(c=10);var h=Math.pow(c,-d);return Math.round(t*h)/h};p.exports=S}),16922:(p=>{var S=function(t,d,c,h){d===void 0&&(d=1),c===void 0&&(c=1),h===void 0&&(h=1),h*=Math.PI/t;for(var r=[],n=[],e=0;e<t;e++)c-=d*h,d+=c*h,r[e]=c,n[e]=d;return{sin:n,cos:r,length:t}};p.exports=S}),7602:(p=>{var S=function(t,d,c){return t<=d?0:t>=c?1:(t=(t-d)/(c-d),t*t*(3-2*t))};p.exports=S}),54261:(p=>{var S=function(t,d,c){return t=Math.max(0,Math.min(1,(t-d)/(c-d))),t*t*t*(t*(t*6-15)+10)};p.exports=S}),44408:((p,S,t)=>{var d=t(26099),c=function(h,r,n,e){e===void 0&&(e=new d);var s=0,o=0,i=r*n;return h>0&&h<=i&&(h>r-1?(o=Math.floor(h/r),s=h-o*r):s=h),e.set(s,o)};p.exports=c}),85955:((p,S,t)=>{var d=t(26099),c=function(h,r,n,e,s,o,i,a){a===void 0&&(a=new d);var l=Math.sin(s),f=Math.cos(s),u=f*o,v=l*o,m=-l*i,x=f*i,g=1/(u*x+m*-v);return a.x=x*g*h+-m*g*r+(e*m-n*x)*g,a.y=u*g*r+-v*g*h+(-e*u+n*v)*g,a};p.exports=c}),26099:((p,S,t)=>{var d=t(83419),c=t(43855),h=new d({initialize:function(n,e){this.x=0,this.y=0,typeof n=="object"?(this.x=n.x||0,this.y=n.y||0):(e===void 0&&(e=n),this.x=n||0,this.y=e||0)},clone:function(){return new h(this.x,this.y)},copy:function(r){return this.x=r.x||0,this.y=r.y||0,this},setFromObject:function(r){return this.x=r.x||0,this.y=r.y||0,this},set:function(r,n){return n===void 0&&(n=r),this.x=r,this.y=n,this},setTo:function(r,n){return this.set(r,n)},setToPolar:function(r,n){return n==null&&(n=1),this.x=Math.cos(r)*n,this.y=Math.sin(r)*n,this},equals:function(r){return this.x===r.x&&this.y===r.y},fuzzyEquals:function(r,n){return c(this.x,r.x,n)&&c(this.y,r.y,n)},angle:function(){var r=Math.atan2(this.y,this.x);return r<0&&(r+=2*Math.PI),r},setAngle:function(r){return this.setToPolar(r,this.length())},add:function(r){return this.x+=r.x,this.y+=r.y,this},subtract:function(r){return this.x-=r.x,this.y-=r.y,this},multiply:function(r){return this.x*=r.x,this.y*=r.y,this},scale:function(r){return isFinite(r)?(this.x*=r,this.y*=r):(this.x=0,this.y=0),this},divide:function(r){return this.x/=r.x,this.y/=r.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(r){var n=r.x-this.x,e=r.y-this.y;return Math.sqrt(n*n+e*e)},distanceSq:function(r){var n=r.x-this.x,e=r.y-this.y;return n*n+e*e},length:function(){var r=this.x,n=this.y;return Math.sqrt(r*r+n*n)},setLength:function(r){return this.normalize().scale(r)},lengthSq:function(){var r=this.x,n=this.y;return r*r+n*n},normalize:function(){var r=this.x,n=this.y,e=r*r+n*n;return e>0&&(e=1/Math.sqrt(e),this.x=r*e,this.y=n*e),this},normalizeRightHand:function(){var r=this.x;return this.x=this.y*-1,this.y=r,this},normalizeLeftHand:function(){var r=this.x;return this.x=this.y,this.y=r*-1,this},dot:function(r){return this.x*r.x+this.y*r.y},cross:function(r){return this.x*r.y-this.y*r.x},lerp:function(r,n){n===void 0&&(n=0);var e=this.x,s=this.y;return this.x=e+n*(r.x-e),this.y=s+n*(r.y-s),this},transformMat3:function(r){var n=this.x,e=this.y,s=r.val;return this.x=s[0]*n+s[3]*e+s[6],this.y=s[1]*n+s[4]*e+s[7],this},transformMat4:function(r){var n=this.x,e=this.y,s=r.val;return this.x=s[0]*n+s[4]*e+s[12],this.y=s[1]*n+s[5]*e+s[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(r){var n=this.length();return n&&n>r&&this.scale(r/n),this},reflect:function(r){return r=r.clone().normalize(),this.subtract(r.scale(2*this.dot(r)))},mirror:function(r){return this.reflect(r).negate()},rotate:function(r){var n=Math.cos(r),e=Math.sin(r);return this.set(n*this.x-e*this.y,e*this.x+n*this.y)},project:function(r){var n=this.dot(r)/r.dot(r);return this.copy(r).scale(n)}});h.ZERO=new h,h.RIGHT=new h(1,0),h.LEFT=new h(-1,0),h.UP=new h(0,-1),h.DOWN=new h(0,1),h.ONE=new h(1,1),p.exports=h}),25836:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r,n,e){this.x=0,this.y=0,this.z=0,typeof r=="object"?(this.x=r.x||0,this.y=r.y||0,this.z=r.z||0):(this.x=r||0,this.y=n||0,this.z=e||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(h){return this.x=Math.min(this.x,h.x),this.y=Math.min(this.y,h.y),this.z=Math.min(this.z,h.z),this},max:function(h){return this.x=Math.max(this.x,h.x),this.y=Math.max(this.y,h.y),this.z=Math.max(this.z,h.z),this},clone:function(){return new c(this.x,this.y,this.z)},addVectors:function(h,r){return this.x=h.x+r.x,this.y=h.y+r.y,this.z=h.z+r.z,this},subVectors:function(h,r){return this.x=h.x-r.x,this.y=h.y-r.y,this.z=h.z-r.z,this},crossVectors:function(h,r){var n=h.x,e=h.y,s=h.z,o=r.x,i=r.y,a=r.z;return this.x=e*a-s*i,this.y=s*o-n*a,this.z=n*i-e*o,this},equals:function(h){return this.x===h.x&&this.y===h.y&&this.z===h.z},copy:function(h){return this.x=h.x,this.y=h.y,this.z=h.z||0,this},set:function(h,r,n){return typeof h=="object"?(this.x=h.x||0,this.y=h.y||0,this.z=h.z||0):(this.x=h||0,this.y=r||0,this.z=n||0),this},setFromMatrixPosition:function(h){return this.fromArray(h.val,12)},setFromMatrixColumn:function(h,r){return this.fromArray(h.val,r*4)},fromArray:function(h,r){return r===void 0&&(r=0),this.x=h[r],this.y=h[r+1],this.z=h[r+2],this},add:function(h){return this.x+=h.x,this.y+=h.y,this.z+=h.z||0,this},addScalar:function(h){return this.x+=h,this.y+=h,this.z+=h,this},addScale:function(h,r){return this.x+=h.x*r,this.y+=h.y*r,this.z+=h.z*r||0,this},subtract:function(h){return this.x-=h.x,this.y-=h.y,this.z-=h.z||0,this},multiply:function(h){return this.x*=h.x,this.y*=h.y,this.z*=h.z||1,this},scale:function(h){return isFinite(h)?(this.x*=h,this.y*=h,this.z*=h):(this.x=0,this.y=0,this.z=0),this},divide:function(h){return this.x/=h.x,this.y/=h.y,this.z/=h.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(h){var r=h.x-this.x,n=h.y-this.y,e=h.z-this.z||0;return Math.sqrt(r*r+n*n+e*e)},distanceSq:function(h){var r=h.x-this.x,n=h.y-this.y,e=h.z-this.z||0;return r*r+n*n+e*e},length:function(){var h=this.x,r=this.y,n=this.z;return Math.sqrt(h*h+r*r+n*n)},lengthSq:function(){var h=this.x,r=this.y,n=this.z;return h*h+r*r+n*n},normalize:function(){var h=this.x,r=this.y,n=this.z,e=h*h+r*r+n*n;return e>0&&(e=1/Math.sqrt(e),this.x=h*e,this.y=r*e,this.z=n*e),this},dot:function(h){return this.x*h.x+this.y*h.y+this.z*h.z},cross:function(h){var r=this.x,n=this.y,e=this.z,s=h.x,o=h.y,i=h.z;return this.x=n*i-e*o,this.y=e*s-r*i,this.z=r*o-n*s,this},lerp:function(h,r){r===void 0&&(r=0);var n=this.x,e=this.y,s=this.z;return this.x=n+r*(h.x-n),this.y=e+r*(h.y-e),this.z=s+r*(h.z-s),this},applyMatrix3:function(h){var r=this.x,n=this.y,e=this.z,s=h.val;return this.x=s[0]*r+s[3]*n+s[6]*e,this.y=s[1]*r+s[4]*n+s[7]*e,this.z=s[2]*r+s[5]*n+s[8]*e,this},applyMatrix4:function(h){var r=this.x,n=this.y,e=this.z,s=h.val,o=1/(s[3]*r+s[7]*n+s[11]*e+s[15]);return this.x=(s[0]*r+s[4]*n+s[8]*e+s[12])*o,this.y=(s[1]*r+s[5]*n+s[9]*e+s[13])*o,this.z=(s[2]*r+s[6]*n+s[10]*e+s[14])*o,this},transformMat3:function(h){var r=this.x,n=this.y,e=this.z,s=h.val;return this.x=r*s[0]+n*s[3]+e*s[6],this.y=r*s[1]+n*s[4]+e*s[7],this.z=r*s[2]+n*s[5]+e*s[8],this},transformMat4:function(h){var r=this.x,n=this.y,e=this.z,s=h.val;return this.x=s[0]*r+s[4]*n+s[8]*e+s[12],this.y=s[1]*r+s[5]*n+s[9]*e+s[13],this.z=s[2]*r+s[6]*n+s[10]*e+s[14],this},transformCoordinates:function(h){var r=this.x,n=this.y,e=this.z,s=h.val,o=r*s[0]+n*s[4]+e*s[8]+s[12],i=r*s[1]+n*s[5]+e*s[9]+s[13],a=r*s[2]+n*s[6]+e*s[10]+s[14],l=r*s[3]+n*s[7]+e*s[11]+s[15];return this.x=o/l,this.y=i/l,this.z=a/l,this},transformQuat:function(h){var r=this.x,n=this.y,e=this.z,s=h.x,o=h.y,i=h.z,a=h.w,l=a*r+o*e-i*n,f=a*n+i*r-s*e,u=a*e+s*n-o*r,v=-s*r-o*n-i*e;return this.x=l*a+v*-s+f*-i-u*-o,this.y=f*a+v*-o+u*-s-l*-i,this.z=u*a+v*-i+l*-o-f*-s,this},project:function(h){var r=this.x,n=this.y,e=this.z,s=h.val,o=s[0],i=s[1],a=s[2],l=s[3],f=s[4],u=s[5],v=s[6],m=s[7],x=s[8],g=s[9],y=s[10],T=s[11],C=s[12],E=s[13],M=s[14],P=s[15],A=1/(r*l+n*m+e*T+P);return this.x=(r*o+n*f+e*x+C)*A,this.y=(r*i+n*u+e*g+E)*A,this.z=(r*a+n*v+e*y+M)*A,this},projectViewMatrix:function(h,r){return this.applyMatrix4(h).applyMatrix4(r)},unprojectViewMatrix:function(h,r){return this.applyMatrix4(h).applyMatrix4(r)},unproject:function(h,r){var n=h.x,e=h.y,s=h.z,o=h.w,i=this.x-n,a=o-this.y-1-e,l=this.z;return this.x=2*i/s-1,this.y=2*a/o-1,this.z=2*l-1,this.project(r)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});c.ZERO=new c,c.RIGHT=new c(1,0,0),c.LEFT=new c(-1,0,0),c.UP=new c(0,-1,0),c.DOWN=new c(0,1,0),c.FORWARD=new c(0,0,1),c.BACK=new c(0,0,-1),c.ONE=new c(1,1,1),p.exports=c}),61369:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r,n,e,s){this.x=0,this.y=0,this.z=0,this.w=0,typeof r=="object"?(this.x=r.x||0,this.y=r.y||0,this.z=r.z||0,this.w=r.w||0):(this.x=r||0,this.y=n||0,this.z=e||0,this.w=s||0)},clone:function(){return new c(this.x,this.y,this.z,this.w)},copy:function(h){return this.x=h.x,this.y=h.y,this.z=h.z||0,this.w=h.w||0,this},equals:function(h){return this.x===h.x&&this.y===h.y&&this.z===h.z&&this.w===h.w},set:function(h,r,n,e){return typeof h=="object"?(this.x=h.x||0,this.y=h.y||0,this.z=h.z||0,this.w=h.w||0):(this.x=h||0,this.y=r||0,this.z=n||0,this.w=e||0),this},add:function(h){return this.x+=h.x,this.y+=h.y,this.z+=h.z||0,this.w+=h.w||0,this},subtract:function(h){return this.x-=h.x,this.y-=h.y,this.z-=h.z||0,this.w-=h.w||0,this},scale:function(h){return this.x*=h,this.y*=h,this.z*=h,this.w*=h,this},length:function(){var h=this.x,r=this.y,n=this.z,e=this.w;return Math.sqrt(h*h+r*r+n*n+e*e)},lengthSq:function(){var h=this.x,r=this.y,n=this.z,e=this.w;return h*h+r*r+n*n+e*e},normalize:function(){var h=this.x,r=this.y,n=this.z,e=this.w,s=h*h+r*r+n*n+e*e;return s>0&&(s=1/Math.sqrt(s),this.x=h*s,this.y=r*s,this.z=n*s,this.w=e*s),this},dot:function(h){return this.x*h.x+this.y*h.y+this.z*h.z+this.w*h.w},lerp:function(h,r){r===void 0&&(r=0);var n=this.x,e=this.y,s=this.z,o=this.w;return this.x=n+r*(h.x-n),this.y=e+r*(h.y-e),this.z=s+r*(h.z-s),this.w=o+r*(h.w-o),this},multiply:function(h){return this.x*=h.x,this.y*=h.y,this.z*=h.z||1,this.w*=h.w||1,this},divide:function(h){return this.x/=h.x,this.y/=h.y,this.z/=h.z||1,this.w/=h.w||1,this},distance:function(h){var r=h.x-this.x,n=h.y-this.y,e=h.z-this.z||0,s=h.w-this.w||0;return Math.sqrt(r*r+n*n+e*e+s*s)},distanceSq:function(h){var r=h.x-this.x,n=h.y-this.y,e=h.z-this.z||0,s=h.w-this.w||0;return r*r+n*n+e*e+s*s},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(h){var r=this.x,n=this.y,e=this.z,s=this.w,o=h.val;return this.x=o[0]*r+o[4]*n+o[8]*e+o[12]*s,this.y=o[1]*r+o[5]*n+o[9]*e+o[13]*s,this.z=o[2]*r+o[6]*n+o[10]*e+o[14]*s,this.w=o[3]*r+o[7]*n+o[11]*e+o[15]*s,this},transformQuat:function(h){var r=this.x,n=this.y,e=this.z,s=h.x,o=h.y,i=h.z,a=h.w,l=a*r+o*e-i*n,f=a*n+i*r-s*e,u=a*e+s*n-o*r,v=-s*r-o*n-i*e;return this.x=l*a+v*-s+f*-i-u*-o,this.y=f*a+v*-o+u*-s-l*-i,this.z=u*a+v*-i+l*-o-f*-s,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});c.prototype.sub=c.prototype.subtract,c.prototype.mul=c.prototype.multiply,c.prototype.div=c.prototype.divide,c.prototype.dist=c.prototype.distance,c.prototype.distSq=c.prototype.distanceSq,c.prototype.len=c.prototype.length,c.prototype.lenSq=c.prototype.lengthSq,p.exports=c}),60417:(p=>{var S=function(t,d,c){return Math.abs(t-d)<=c};p.exports=S}),15994:(p=>{var S=function(t,d,c){var h=c-d;return d+((t-d)%h+h)%h};p.exports=S}),31040:(p=>{var S=function(t,d,c,h){return Math.atan2(h-d,c-t)};p.exports=S}),55495:(p=>{var S=function(t,d){return Math.atan2(d.y-t.y,d.x-t.x)};p.exports=S}),128:(p=>{var S=function(t,d){return Math.atan2(d.x-t.x,d.y-t.y)};p.exports=S}),41273:(p=>{var S=function(t,d,c,h){return Math.atan2(c-t,h-d)};p.exports=S}),1432:((p,S,t)=>{var d=t(36383),c=function(h){return h>Math.PI&&(h-=d.PI2),Math.abs(((h+d.TAU)%d.PI2-d.PI2)%d.PI2)};p.exports=c}),49127:((p,S,t)=>{var d=t(12407),c=function(h,r){return d(r-h)};p.exports=c}),52285:((p,S,t)=>{var d=t(12407),c=2*Math.PI,h=function(r,n){var e=d(n-r);return e>0&&(e-=c),e};p.exports=h}),67317:((p,S,t)=>{var d=t(86554),c=function(h,r){return d(r-h)};p.exports=c}),12407:(p=>{var S=function(t){return t=t%(2*Math.PI),t>=0?t:t+2*Math.PI};p.exports=S}),53993:((p,S,t)=>{var d=t(99472),c=function(){return d(-Math.PI,Math.PI)};p.exports=c}),86564:((p,S,t)=>{var d=t(99472),c=function(){return d(-180,180)};p.exports=c}),90154:((p,S,t)=>{var d=t(12407),c=function(h){return d(h+Math.PI)};p.exports=c}),48736:((p,S,t)=>{var d=t(36383),c=function(h,r,n){return n===void 0&&(n=.05),h===r||(Math.abs(r-h)<=n||Math.abs(r-h)>=d.PI2-n?h=r:(Math.abs(r-h)>Math.PI&&(r<h?r+=d.PI2:r-=d.PI2),r>h?h+=n:r<h&&(h-=n))),h};p.exports=c}),61430:(p=>{var S=function(t,d){var c=d-t;if(c===0)return 0;var h=Math.floor((c- -180)/360);return c-h*360};p.exports=S}),86554:((p,S,t)=>{var d=t(15994),c=function(h){return d(h,-Math.PI,Math.PI)};p.exports=c}),30954:((p,S,t)=>{var d=t(15994),c=function(h){return d(h,-180,180)};p.exports=c}),25588:((p,S,t)=>{p.exports={Between:t(31040),BetweenPoints:t(55495),BetweenPointsY:t(128),BetweenY:t(41273),CounterClockwise:t(1432),GetClockwiseDistance:t(49127),GetCounterClockwiseDistance:t(52285),GetShortestDistance:t(67317),Normalize:t(12407),Random:t(53993),RandomDegrees:t(86564),Reverse:t(90154),RotateTo:t(48736),ShortestBetween:t(61430),Wrap:t(86554),WrapDegrees:t(30954)}}),36383:(p=>{var S={PI2:Math.PI*2,TAU:Math.PI*.5,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};p.exports=S}),20339:(p=>{var S=function(t,d,c,h){var r=t-c,n=d-h;return Math.sqrt(r*r+n*n)};p.exports=S}),52816:(p=>{var S=function(t,d){var c=t.x-d.x,h=t.y-d.y;return Math.sqrt(c*c+h*h)};p.exports=S}),64559:(p=>{var S=function(t,d){var c=t.x-d.x,h=t.y-d.y;return c*c+h*h};p.exports=S}),82340:(p=>{var S=function(t,d,c,h){return Math.max(Math.abs(t-c),Math.abs(d-h))};p.exports=S}),14390:(p=>{var S=function(t,d,c,h,r){return r===void 0&&(r=2),Math.sqrt(Math.pow(c-t,r)+Math.pow(h-d,r))};p.exports=S}),2243:(p=>{var S=function(t,d,c,h){return Math.abs(t-c)+Math.abs(d-h)};p.exports=S}),89774:(p=>{var S=function(t,d,c,h){var r=t-c,n=d-h;return r*r+n*n};p.exports=S}),50994:((p,S,t)=>{p.exports={Between:t(20339),BetweenPoints:t(52816),BetweenPointsSquared:t(64559),Chebyshev:t(82340),Power:t(14390),Snake:t(2243),Squared:t(89774)}}),62640:((p,S,t)=>{var d=t(54178),c=t(41521),h=t(79980),r=t(85433),n=t(99140),e=t(48857),s=t(81596),o=t(59133),i=t(98516),a=t(35248),l=t(82500),f=t(49752);p.exports={Power0:s,Power1:o.Out,Power2:r.Out,Power3:i.Out,Power4:a.Out,Linear:s,Quad:o.Out,Cubic:r.Out,Quart:i.Out,Quint:a.Out,Sine:l.Out,Expo:e.Out,Circ:h.Out,Elastic:n.Out,Back:d.Out,Bounce:c.Out,Stepped:f,"Quad.easeIn":o.In,"Cubic.easeIn":r.In,"Quart.easeIn":i.In,"Quint.easeIn":a.In,"Sine.easeIn":l.In,"Expo.easeIn":e.In,"Circ.easeIn":h.In,"Elastic.easeIn":n.In,"Back.easeIn":d.In,"Bounce.easeIn":c.In,"Quad.easeOut":o.Out,"Cubic.easeOut":r.Out,"Quart.easeOut":i.Out,"Quint.easeOut":a.Out,"Sine.easeOut":l.Out,"Expo.easeOut":e.Out,"Circ.easeOut":h.Out,"Elastic.easeOut":n.Out,"Back.easeOut":d.Out,"Bounce.easeOut":c.Out,"Quad.easeInOut":o.InOut,"Cubic.easeInOut":r.InOut,"Quart.easeInOut":i.InOut,"Quint.easeInOut":a.InOut,"Sine.easeInOut":l.InOut,"Expo.easeInOut":e.InOut,"Circ.easeInOut":h.InOut,"Elastic.easeInOut":n.InOut,"Back.easeInOut":d.InOut,"Bounce.easeInOut":c.InOut}}),1639:(p=>{var S=function(t,d){return d===void 0&&(d=1.70158),t*t*((d+1)*t-d)};p.exports=S}),50099:(p=>{var S=function(t,d){d===void 0&&(d=1.70158);var c=d*1.525;return(t*=2)<1?.5*(t*t*((c+1)*t-c)):.5*((t-=2)*t*((c+1)*t+c)+2)};p.exports=S}),41286:(p=>{var S=function(t,d){return d===void 0&&(d=1.70158),--t*t*((d+1)*t+d)+1};p.exports=S}),54178:((p,S,t)=>{p.exports={In:t(1639),Out:t(41286),InOut:t(50099)}}),59590:(p=>{var S=function(t){return t=1-t,t<.36363636363636365?1-7.5625*t*t:t<.7272727272727273?1-(7.5625*(t-=.5454545454545454)*t+.75):t<.9090909090909091?1-(7.5625*(t-=.8181818181818182)*t+.9375):1-(7.5625*(t-=.9545454545454546)*t+.984375)};p.exports=S}),41788:(p=>{var S=function(t){var d=!1;return t<.5?(t=1-t*2,d=!0):t=t*2-1,t<.36363636363636365?t=7.5625*t*t:t<.7272727272727273?t=7.5625*(t-=.5454545454545454)*t+.75:t<.9090909090909091?t=7.5625*(t-=.8181818181818182)*t+.9375:t=7.5625*(t-=.9545454545454546)*t+.984375,d?(1-t)*.5:t*.5+.5};p.exports=S}),69905:(p=>{var S=function(t){return t<.36363636363636365?7.5625*t*t:t<.7272727272727273?7.5625*(t-=.5454545454545454)*t+.75:t<.9090909090909091?7.5625*(t-=.8181818181818182)*t+.9375:7.5625*(t-=.9545454545454546)*t+.984375};p.exports=S}),41521:((p,S,t)=>{p.exports={In:t(59590),Out:t(69905),InOut:t(41788)}}),91861:(p=>{var S=function(t){return 1-Math.sqrt(1-t*t)};p.exports=S}),4177:(p=>{var S=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)};p.exports=S}),57512:(p=>{var S=function(t){return Math.sqrt(1- --t*t)};p.exports=S}),79980:((p,S,t)=>{p.exports={In:t(91861),Out:t(57512),InOut:t(4177)}}),51150:(p=>{var S=function(t){return t*t*t};p.exports=S}),82820:(p=>{var S=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)};p.exports=S}),35033:(p=>{var S=function(t){return--t*t*t+1};p.exports=S}),85433:((p,S,t)=>{p.exports={In:t(51150),Out:t(35033),InOut:t(82820)}}),69965:(p=>{var S=function(t,d,c){if(d===void 0&&(d=.1),c===void 0&&(c=.1),t===0)return 0;if(t===1)return 1;var h=c/4;return d<1?d=1:h=c*Math.asin(1/d)/(2*Math.PI),-(d*Math.pow(2,10*(t-=1))*Math.sin((t-h)*(2*Math.PI)/c))};p.exports=S}),50665:(p=>{var S=function(t,d,c){if(d===void 0&&(d=.1),c===void 0&&(c=.1),t===0)return 0;if(t===1)return 1;var h=c/4;return d<1?d=1:h=c*Math.asin(1/d)/(2*Math.PI),(t*=2)<1?-.5*(d*Math.pow(2,10*(t-=1))*Math.sin((t-h)*(2*Math.PI)/c)):d*Math.pow(2,-10*(t-=1))*Math.sin((t-h)*(2*Math.PI)/c)*.5+1};p.exports=S}),7744:(p=>{var S=function(t,d,c){if(d===void 0&&(d=.1),c===void 0&&(c=.1),t===0)return 0;if(t===1)return 1;var h=c/4;return d<1?d=1:h=c*Math.asin(1/d)/(2*Math.PI),d*Math.pow(2,-10*t)*Math.sin((t-h)*(2*Math.PI)/c)+1};p.exports=S}),99140:((p,S,t)=>{p.exports={In:t(69965),Out:t(7744),InOut:t(50665)}}),24590:(p=>{var S=function(t){return Math.pow(2,10*(t-1))-.001};p.exports=S}),87844:(p=>{var S=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))};p.exports=S}),89433:(p=>{var S=function(t){return 1-Math.pow(2,-10*t)};p.exports=S}),48857:((p,S,t)=>{p.exports={In:t(24590),Out:t(89433),InOut:t(87844)}}),48820:((p,S,t)=>{p.exports={Back:t(54178),Bounce:t(41521),Circular:t(79980),Cubic:t(85433),Elastic:t(99140),Expo:t(48857),Linear:t(81596),Quadratic:t(59133),Quartic:t(98516),Quintic:t(35248),Sine:t(82500),Stepped:t(49752)}}),7147:(p=>{var S=function(t){return t};p.exports=S}),81596:((p,S,t)=>{p.exports=t(7147)}),34826:(p=>{var S=function(t){return t*t};p.exports=S}),20544:(p=>{var S=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)};p.exports=S}),92029:(p=>{var S=function(t){return t*(2-t)};p.exports=S}),59133:((p,S,t)=>{p.exports={In:t(34826),Out:t(92029),InOut:t(20544)}}),64413:(p=>{var S=function(t){return t*t*t*t};p.exports=S}),78137:(p=>{var S=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)};p.exports=S}),45840:(p=>{var S=function(t){return 1- --t*t*t*t};p.exports=S}),98516:((p,S,t)=>{p.exports={In:t(64413),Out:t(45840),InOut:t(78137)}}),87745:(p=>{var S=function(t){return t*t*t*t*t};p.exports=S}),16509:(p=>{var S=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)};p.exports=S}),17868:(p=>{var S=function(t){return--t*t*t*t*t+1};p.exports=S}),35248:((p,S,t)=>{p.exports={In:t(87745),Out:t(17868),InOut:t(16509)}}),80461:(p=>{var S=function(t){return t===0?0:t===1?1:1-Math.cos(t*Math.PI/2)};p.exports=S}),34025:(p=>{var S=function(t){return t===0?0:t===1?1:.5*(1-Math.cos(Math.PI*t))};p.exports=S}),52768:(p=>{var S=function(t){return t===0?0:t===1?1:Math.sin(t*Math.PI/2)};p.exports=S}),82500:((p,S,t)=>{p.exports={In:t(80461),Out:t(52768),InOut:t(34025)}}),72251:(p=>{var S=function(t,d){return d===void 0&&(d=1),t<=0?0:t>=1?1:((d*t|0)+1)*(1/d)};p.exports=S}),49752:((p,S,t)=>{p.exports=t(72251)}),75698:(p=>{var S=function(t,d){return d===void 0&&(d=1e-4),Math.ceil(t-d)};p.exports=S}),43855:(p=>{var S=function(t,d,c){return c===void 0&&(c=1e-4),Math.abs(t-d)<c};p.exports=S}),25777:(p=>{var S=function(t,d){return d===void 0&&(d=1e-4),Math.floor(t+d)};p.exports=S}),5470:(p=>{var S=function(t,d,c){return c===void 0&&(c=1e-4),t>d-c};p.exports=S}),94977:(p=>{var S=function(t,d,c){return c===void 0&&(c=1e-4),t<d+c};p.exports=S}),48379:((p,S,t)=>{p.exports={Ceil:t(75698),Equal:t(43855),Floor:t(25777),GreaterThan:t(5470),LessThan:t(94977)}}),75508:((p,S,t)=>{var d=t(36383),c=t(79291),h={Angle:t(25588),Distance:t(50994),Easing:t(48820),Fuzzy:t(48379),Interpolation:t(38289),Pow2:t(49001),Snap:t(73697),RandomDataGenerator:t(28453),Average:t(53307),Bernstein:t(85710),Between:t(30976),CatmullRom:t(87842),CeilTo:t(26302),Clamp:t(45319),DegToRad:t(39506),Difference:t(61241),Euler:t(38857),Factorial:t(6411),FloatBetween:t(99472),FloorTo:t(77623),FromPercent:t(62945),GetSpeed:t(38265),IsEven:t(78702),IsEvenStrict:t(94883),Linear:t(28915),LinearXY:t(94908),MaxAdd:t(86883),Median:t(50040),MinSub:t(37204),Percent:t(65201),RadToDeg:t(43396),RandomXY:t(74362),RandomXYZ:t(60706),RandomXYZW:t(67421),Rotate:t(36305),RotateAround:t(11520),RotateAroundDistance:t(1163),RotateTo:t(70336),RoundAwayFromZero:t(2284),RoundTo:t(41013),SinCosTableGenerator:t(16922),SmootherStep:t(54261),SmoothStep:t(7602),ToXY:t(44408),TransformXY:t(85955),Within:t(60417),Wrap:t(15994),Vector2:t(26099),Vector3:t(25836),Vector4:t(61369),Matrix3:t(94434),Matrix4:t(37867),Quaternion:t(15746),RotateVec3:t(72678)};h=c(!1,h,d),p.exports=h}),89318:((p,S,t)=>{var d=t(85710),c=function(h,r){for(var n=0,e=h.length-1,s=0;s<=e;s++)n+=Math.pow(1-r,e-s)*Math.pow(r,s)*h[s]*d(e,s);return n};p.exports=c}),77259:((p,S,t)=>{var d=t(87842),c=function(h,r){var n=h.length-1,e=n*r,s=Math.floor(e);return h[0]===h[n]?(r<0&&(s=Math.floor(e=n*(1+r))),d(e-s,h[(s-1+n)%n],h[s],h[(s+1)%n],h[(s+2)%n])):r<0?h[0]-(d(-e,h[0],h[0],h[1],h[1])-h[0]):r>1?h[n]-(d(e-n,h[n],h[n],h[n-1],h[n-1])-h[n]):d(e-s,h[s?s-1:0],h[s],h[n<s+1?n:s+1],h[n<s+2?n:s+2])};p.exports=c}),36316:(p=>{function S(r,n){var e=1-r;return e*e*e*n}function t(r,n){var e=1-r;return 3*e*e*r*n}function d(r,n){return 3*(1-r)*r*r*n}function c(r,n){return r*r*r*n}var h=function(r,n,e,s,o){return S(r,n)+t(r,e)+d(r,s)+c(r,o)};p.exports=h}),28392:((p,S,t)=>{var d=t(28915),c=function(h,r){var n=h.length-1,e=n*r,s=Math.floor(e);return r<0?d(h[0],h[1],e):r>1?d(h[n],h[n-1],n-e):d(h[s],h[s+1>n?n:s+1],e-s)};p.exports=c}),32112:(p=>{function S(h,r){var n=1-h;return n*n*r}function t(h,r){return 2*(1-h)*h*r}function d(h,r){return h*h*r}var c=function(h,r,n,e){return S(h,r)+t(h,n)+d(h,e)};p.exports=c}),47235:((p,S,t)=>{var d=t(7602),c=function(h,r,n){return r+(n-r)*d(h,0,1)};p.exports=c}),50178:((p,S,t)=>{var d=t(54261),c=function(h,r,n){return r+(n-r)*d(h,0,1)};p.exports=c}),38289:((p,S,t)=>{p.exports={Bezier:t(89318),CatmullRom:t(77259),CubicBezier:t(36316),Linear:t(28392),QuadraticBezier:t(32112),SmoothStep:t(47235),SmootherStep:t(50178)}}),98439:(p=>{var S=function(t){var d=Math.log(t)/.6931471805599453;return 1<<Math.ceil(d)};p.exports=S}),50030:(p=>{var S=function(t,d){return t>0&&(t&t-1)===0&&d>0&&(d&d-1)===0};p.exports=S}),81230:(p=>{var S=function(t){return t>0&&(t&t-1)===0};p.exports=S}),49001:((p,S,t)=>{p.exports={GetNext:t(98439),IsSize:t(50030),IsValue:t(81230)}}),28453:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r){r===void 0&&(r=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],r&&this.init(r)},rnd:function(){var h=2091639*this.s0+this.c*23283064365386963e-26;return this.c=h|0,this.s0=this.s1,this.s1=this.s2,this.s2=h-this.c,this.s2},hash:function(h){var r,n=this.n;h=h.toString();for(var e=0;e<h.length;e++)n+=h.charCodeAt(e),r=.02519603282416938*n,n=r>>>0,r-=n,r*=n,n=r>>>0,r-=n,n+=r*4294967296;return this.n=n,(n>>>0)*23283064365386963e-26},init:function(h){typeof h=="string"?this.state(h):this.sow(h)},sow:function(h){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,!!h)for(var r=0;r<h.length&&h[r]!=null;r++){var n=h[r];this.s0-=this.hash(n),this.s0+=~~(this.s0<0),this.s1-=this.hash(n),this.s1+=~~(this.s1<0),this.s2-=this.hash(n),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(h,r){return Math.floor(this.realInRange(0,r-h+1)+h)},between:function(h,r){return Math.floor(this.realInRange(0,r-h+1)+h)},realInRange:function(h,r){return this.frac()*(r-h)+h},normal:function(){return 1-2*this.frac()},uuid:function(){var h="",r="";for(r=h="";h++<36;r+=~h%5|h*3&4?(h^15?8^this.frac()*(h^20?16:4):4).toString(16):"-");return r},pick:function(h){return h[this.integerInRange(0,h.length-1)]},sign:function(){return this.pick(this.signs)},weightedPick:function(h){return h[~~(Math.pow(this.frac(),2)*(h.length-.5)+.5)]},timestamp:function(h,r){return this.realInRange(h||9466848e5,r||1577862e6)},angle:function(){return this.integerInRange(-180,180)},rotation:function(){return this.realInRange(-3.1415926,3.1415926)},state:function(h){return typeof h=="string"&&h.match(/^!rnd/)&&(h=h.split(","),this.c=parseFloat(h[1]),this.s0=parseFloat(h[2]),this.s1=parseFloat(h[3]),this.s2=parseFloat(h[4])),["!rnd",this.c,this.s0,this.s1,this.s2].join(",")},shuffle:function(h){for(var r=h.length-1,n=r;n>0;n--){var e=Math.floor(this.frac()*(n+1)),s=h[e];h[e]=h[n],h[n]=s}return h}});p.exports=c}),63448:(p=>{var S=function(t,d,c,h){return c===void 0&&(c=0),d===0?t:(t-=c,t=d*Math.ceil(t/d),h?(c+t)/d:c+t)};p.exports=S}),56583:(p=>{var S=function(t,d,c,h){return c===void 0&&(c=0),d===0?t:(t-=c,t=d*Math.floor(t/d),h?(c+t)/d:c+t)};p.exports=S}),77720:(p=>{var S=function(t,d,c,h){return c===void 0&&(c=0),d===0?t:(t-=c,t=d*Math.round(t/d),h?(c+t)/d:c+t)};p.exports=S}),73697:((p,S,t)=>{p.exports={Ceil:t(63448),Floor:t(56583),To:t(77720)}}),85454:((p,S,t)=>{t(63595);var d=t(8054),c=t(79291),h={Actions:t(61061),Animations:t(60421),BlendModes:t(10312),Cache:t(83388),Cameras:t(26638),Core:t(42857),Class:t(83419),Create:t(15822),Curves:t(25410),Data:t(44965),Display:t(27460),DOM:t(84902),Events:t(93055),FX:t(66064),Game:t(50127),GameObjects:t(77856),Geom:t(55738),Input:t(14350),Loader:t(57777),Math:t(75508),Physics:t(44563),Plugins:t(18922),Renderer:t(36909),Scale:t(93364),ScaleModes:t(29795),Scene:t(97482),Scenes:t(62194),Structs:t(41392),Textures:t(27458),Tilemaps:t(62501),Time:t(90291),Tweens:t(43066),Utils:t(91799)};h.Sound=t(23717),h=c(!1,h,d),p.exports=h,t.g.Phaser=h}),71289:((p,S,t)=>{var d=t(83419),c=t(92209),h=t(88571),r=new d({Extends:h,Mixins:[c.Acceleration,c.Angular,c.Bounce,c.Collision,c.Debug,c.Drag,c.Enable,c.Friction,c.Gravity,c.Immovable,c.Mass,c.Pushable,c.Size,c.Velocity],initialize:function(e,s,o,i,a){h.call(this,e,s,o,i,a),this.body=null}});p.exports=r}),86689:((p,S,t)=>{var d=t(83419),c=t(39506),h=t(20339),r=t(89774),n=t(66022),e=t(95540),s=t(46975),o=t(72441),i=t(47956),a=t(37277),l=t(44594),f=t(26099),u=t(82248),v=new d({initialize:function(x){this.scene=x,this.systems=x.sys,this.config=this.getConfig(),this.world,this.add,this._category=1,x.sys.events.once(l.BOOT,this.boot,this),x.sys.events.on(l.START,this.start,this)},boot:function(){this.world=new u(this.scene,this.config),this.add=new n(this.world),this.systems.events.once(l.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new u(this.scene,this.config),this.add=new n(this.world));var m=this.systems.events;e(this.config,"customUpdate",!1)||m.on(l.UPDATE,this.world.update,this.world),m.on(l.POST_UPDATE,this.world.postUpdate,this.world),m.once(l.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(l.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(l.UPDATE,this.world.update,this.world)},getConfig:function(){var m=this.systems.game.config.physics,x=this.systems.settings.physics,g=s(e(x,"arcade",{}),e(m,"arcade",{}));return g},nextCategory:function(){return this._category=this._category<<1,this._category},overlap:function(m,x,g,y,T){return g===void 0&&(g=null),y===void 0&&(y=null),T===void 0&&(T=g),this.world.collideObjects(m,x,g,y,T,!0)},collide:function(m,x,g,y,T){return g===void 0&&(g=null),y===void 0&&(y=null),T===void 0&&(T=g),this.world.collideObjects(m,x,g,y,T,!1)},collideTiles:function(m,x,g,y,T){return this.world.collideTiles(m,x,g,y,T)},overlapTiles:function(m,x,g,y,T){return this.world.overlapTiles(m,x,g,y,T)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(m,x,g,y,T,C){y===void 0&&(y=60);var E=Math.atan2(g-m.y,x-m.x);return m.body.acceleration.setToPolar(E,y),T!==void 0&&C!==void 0&&m.body.maxVelocity.set(T,C),E},accelerateToObject:function(m,x,g,y,T){return this.accelerateTo(m,x.x,x.y,g,y,T)},closest:function(m,x){x||(x=this.world.bodies.entries);for(var g=Number.MAX_VALUE,y=null,T=m.x,C=m.y,E=x.length,M=0;M<E;M++){var P=x[M],A=P.body||P;if(!(m===P||m===A||m===A.gameObject||m===A.center)){var R=r(T,C,A.center.x,A.center.y);R<g&&(y=P,g=R)}}return y},furthest:function(m,x){x||(x=this.world.bodies.entries);for(var g=-1,y=null,T=m.x,C=m.y,E=x.length,M=0;M<E;M++){var P=x[M],A=P.body||P;if(!(m===P||m===A||m===A.gameObject||m===A.center)){var R=r(T,C,A.center.x,A.center.y);R>g&&(y=P,g=R)}}return y},moveTo:function(m,x,g,y,T){y===void 0&&(y=60),T===void 0&&(T=0);var C=Math.atan2(g-m.y,x-m.x);return T>0&&(y=h(m.x,m.y,x,g)/(T/1e3)),m.body.velocity.setToPolar(C,y),C},moveToObject:function(m,x,g,y){return this.moveTo(m,x.x,x.y,g,y)},velocityFromAngle:function(m,x,g){return x===void 0&&(x=60),g===void 0&&(g=new f),g.setToPolar(c(m),x)},velocityFromRotation:function(m,x,g){return x===void 0&&(x=60),g===void 0&&(g=new f),g.setToPolar(m,x)},overlapRect:function(m,x,g,y,T,C){return i(this.world,m,x,g,y,T,C)},overlapCirc:function(m,x,g,y,T){return o(this.world,m,x,g,y,T)},shutdown:function(){if(this.world){var m=this.systems.events;m.off(l.UPDATE,this.world.update,this.world),m.off(l.POST_UPDATE,this.world.postUpdate,this.world),m.off(l.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null,this._category=1}},destroy:function(){this.shutdown(),this.scene.sys.events.off(l.START,this.start,this),this.scene=null,this.systems=null}});a.register("ArcadePhysics",v,"arcadePhysics"),p.exports=v}),13759:((p,S,t)=>{var d=t(83419),c=t(92209),h=t(68287),r=new d({Extends:h,Mixins:[c.Acceleration,c.Angular,c.Bounce,c.Collision,c.Debug,c.Drag,c.Enable,c.Friction,c.Gravity,c.Immovable,c.Mass,c.Pushable,c.Size,c.Velocity],initialize:function(e,s,o,i,a){h.call(this,e,s,o,i,a),this.body=null}});p.exports=r}),37742:((p,S,t)=>{var d=t(83419),c=t(78389),h=t(37747),r=t(63012),n=t(43396),e=t(87841),s=t(37303),o=t(95829),i=t(26099),a=new d({Mixins:[c],initialize:function(f,u){var v=64,m=64,x={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},g=u!==void 0;g&&u.displayWidth&&(v=u.displayWidth,m=u.displayHeight),g||(u=x),this.world=f,this.gameObject=g?u:void 0,this.isBody=!0,this.transform={x:u.x,y:u.y,rotation:u.angle,scaleX:u.scaleX,scaleY:u.scaleY,displayOriginX:u.displayOriginX,displayOriginY:u.displayOriginY},this.debugShowBody=f.defaults.debugShowBody,this.debugShowVelocity=f.defaults.debugShowVelocity,this.debugBodyColor=f.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new i,this.position=new i(u.x-u.scaleX*u.displayOriginX,u.y-u.scaleY*u.displayOriginY),this.prev=this.position.clone(),this.prevFrame=this.position.clone(),this.allowRotation=!0,this.rotation=u.angle,this.preRotation=u.angle,this.width=v,this.height=m,this.sourceWidth=v,this.sourceHeight=m,u.frame&&(this.sourceWidth=u.frame.realWidth,this.sourceHeight=u.frame.realHeight),this.halfWidth=Math.abs(v/2),this.halfHeight=Math.abs(m/2),this.center=new i(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new i,this.newVelocity=new i,this.deltaMax=new i,this.acceleration=new i,this.allowDrag=!0,this.drag=new i,this.allowGravity=!0,this.gravity=new i,this.bounce=new i,this.worldBounce=null,this.customBoundsRectangle=f.bounds,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new i(1e4,1e4),this.maxSpeed=-1,this.friction=new i(1,0),this.useDamping=!1,this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.angle=0,this.speed=0,this.facing=h.FACING_NONE,this.immovable=!1,this.pushable=!0,this.slideFactor=new i(1,1),this.moves=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision=o(!1),this.touching=o(!0),this.wasTouching=o(!0),this.blocked=o(!0),this.syncBounds=!1,this.physicsType=h.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._sx=u.scaleX,this._sy=u.scaleY,this._dx=0,this._dy=0,this._tx=0,this._ty=0,this._bounds=new e,this.directControl=!1,this.autoFrame=this.position.clone()},updateBounds:function(){var l=this.gameObject,f=this.transform;if(l.parentContainer){var u=l.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2);f.x=u.tx,f.y=u.ty,f.rotation=n(u.rotation),f.scaleX=u.scaleX,f.scaleY=u.scaleY,f.displayOriginX=l.displayOriginX,f.displayOriginY=l.displayOriginY}else f.x=l.x,f.y=l.y,f.rotation=l.angle,f.scaleX=l.scaleX,f.scaleY=l.scaleY,f.displayOriginX=l.displayOriginX,f.displayOriginY=l.displayOriginY;var v=!1;if(this.syncBounds){var m=l.getBounds(this._bounds);this.width=m.width,this.height=m.height,v=!0}else{var x=Math.abs(f.scaleX),g=Math.abs(f.scaleY);(this._sx!==x||this._sy!==g)&&(this.width=this.sourceWidth*x,this.height=this.sourceHeight*g,this._sx=x,this._sy=g,v=!0)}v&&(this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter())},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},updateFromGameObject:function(){this.updateBounds();var l=this.transform;this.position.x=l.x+l.scaleX*(this.offset.x-l.displayOriginX),this.position.y=l.y+l.scaleY*(this.offset.y-l.displayOriginY),this.updateCenter()},resetFlags:function(l){l===void 0&&(l=!1);var f=this.wasTouching,u=this.touching,v=this.blocked;l?o(!0,f):(f.none=u.none,f.up=u.up,f.down=u.down,f.left=u.left,f.right=u.right),o(!0,u),o(!0,v),this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(l,f){if(l&&this.resetFlags(),this.gameObject&&this.updateFromGameObject(),this.rotation=this.transform.rotation,this.preRotation=this.rotation,this.moves){var u=this.position;this.prev.x=u.x,this.prev.y=u.y,this.prevFrame.x=u.x,this.prevFrame.y=u.y}l&&this.update(f)},update:function(l){var f=this.prev,u=this.position,v=this.velocity;if(f.set(u.x,u.y),!this.moves){this._dx=u.x-f.x,this._dy=u.y-f.y;return}if(this.directControl){var m=this.autoFrame;v.set((u.x-m.x)/l,(u.y-m.y)/l),this.world.updateMotion(this,l),this._dx=u.x-m.x,this._dy=u.y-m.y}else this.world.updateMotion(this,l),this.newVelocity.set(v.x*l,v.y*l),u.add(this.newVelocity),this._dx=u.x-f.x,this._dy=u.y-f.y;var x=v.x,g=v.y;if(this.updateCenter(),this.angle=Math.atan2(g,x),this.speed=Math.sqrt(x*x+g*g),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds){var y=this.blocked;this.world.emit(r.WORLD_BOUNDS,this,y.up,y.down,y.left,y.right)}},postUpdate:function(){var l=this.position,f=l.x-this.prevFrame.x,u=l.y-this.prevFrame.y,v=this.gameObject;if(this.moves){var m=this.deltaMax.x,x=this.deltaMax.y;m!==0&&f!==0&&(f<0&&f<-m?f=-m:f>0&&f>m&&(f=m)),x!==0&&u!==0&&(u<0&&u<-x?u=-x:u>0&&u>x&&(u=x)),v&&(v.x+=f,v.y+=u)}f<0?this.facing=h.FACING_LEFT:f>0&&(this.facing=h.FACING_RIGHT),u<0?this.facing=h.FACING_UP:u>0&&(this.facing=h.FACING_DOWN),this.allowRotation&&v&&(v.angle+=this.deltaZ()),this._tx=f,this._ty=u,this.autoFrame.set(l.x,l.y)},setBoundsRectangle:function(l){return this.customBoundsRectangle=l||this.world.bounds,this},checkWorldBounds:function(){var l=this.position,f=this.velocity,u=this.blocked,v=this.customBoundsRectangle,m=this.world.checkCollision,x=this.worldBounce?-this.worldBounce.x:-this.bounce.x,g=this.worldBounce?-this.worldBounce.y:-this.bounce.y,y=!1;return l.x<v.x&&m.left?(l.x=v.x,f.x*=x,u.left=!0,y=!0):this.right>v.right&&m.right&&(l.x=v.right-this.width,f.x*=x,u.right=!0,y=!0),l.y<v.y&&m.up?(l.y=v.y,f.y*=g,u.up=!0,y=!0):this.bottom>v.bottom&&m.down&&(l.y=v.bottom-this.height,f.y*=g,u.down=!0,y=!0),y&&(this.blocked.none=!1,this.updateCenter()),y},setOffset:function(l,f){return f===void 0&&(f=l),this.offset.set(l,f),this},setGameObject:function(l,f){if(f===void 0&&(f=!0),!l||!l.hasTransformComponent)return this;var u=this.world;return this.gameObject&&this.gameObject.body&&(u.disable(this.gameObject),this.gameObject.body=null),l.body&&u.disable(l),this.gameObject=l,l.body=this,this.setSize(),this.enable=f,this},setSize:function(l,f,u){u===void 0&&(u=!0);var v=this.gameObject;if(v&&(!l&&v.frame&&(l=v.frame.realWidth),!f&&v.frame&&(f=v.frame.realHeight)),this.sourceWidth=l,this.sourceHeight=f,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),u&&v&&v.getCenter){var m=(v.width-l)/2,x=(v.height-f)/2;this.offset.set(m,x)}return this.isCircle=!1,this.radius=0,this},setCircle:function(l,f,u){return f===void 0&&(f=this.offset.x),u===void 0&&(u=this.offset.y),l>0?(this.isCircle=!0,this.radius=l,this.sourceWidth=l*2,this.sourceHeight=l*2,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(f,u),this.updateCenter()):this.isCircle=!1,this},reset:function(l,f){this.stop();var u=this.gameObject;u&&(u.setPosition(l,f),this.rotation=u.angle,this.preRotation=u.angle);var v=this.position;u&&u.getTopLeft?u.getTopLeft(v):v.set(l,f),this.prev.copy(v),this.prevFrame.copy(v),this.autoFrame.copy(v),u&&this.updateBounds(),this.updateCenter(),this.collideWorldBounds&&this.checkWorldBounds(),this.resetFlags(!0)},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(l){return l.x=this.x,l.y=this.y,l.right=this.right,l.bottom=this.bottom,l},hitTest:function(l,f){if(!this.isCircle)return s(this,l,f);if(this.radius>0&&l>=this.left&&l<=this.right&&f>=this.top&&f<=this.bottom){var u=(this.center.x-l)*(this.center.x-l),v=(this.center.y-f)*(this.center.y-f);return u+v<=this.radius*this.radius}return!1},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaXFinal:function(){return this._tx},deltaYFinal:function(){return this._ty},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(l){var f=this.position,u=f.x+this.halfWidth,v=f.y+this.halfHeight;this.debugShowBody&&(l.lineStyle(l.defaultStrokeWidth,this.debugBodyColor),this.isCircle?l.strokeCircle(u,v,this.width/2):(this.checkCollision.up&&l.lineBetween(f.x,f.y,f.x+this.width,f.y),this.checkCollision.right&&l.lineBetween(f.x+this.width,f.y,f.x+this.width,f.y+this.height),this.checkCollision.down&&l.lineBetween(f.x,f.y+this.height,f.x+this.width,f.y+this.height),this.checkCollision.left&&l.lineBetween(f.x,f.y,f.x,f.y+this.height))),this.debugShowVelocity&&(l.lineStyle(l.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),l.lineBetween(u,v,u+this.velocity.x/2,v+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setDirectControl:function(l){return l===void 0&&(l=!0),this.directControl=l,this},setCollideWorldBounds:function(l,f,u,v){l===void 0&&(l=!0),this.collideWorldBounds=l;var m=f!==void 0,x=u!==void 0;return(m||x)&&(this.worldBounce||(this.worldBounce=new i),m&&(this.worldBounce.x=f),x&&(this.worldBounce.y=u)),v!==void 0&&(this.onWorldBounds=v),this},setVelocity:function(l,f){return this.velocity.set(l,f),l=this.velocity.x,f=this.velocity.y,this.speed=Math.sqrt(l*l+f*f),this},setVelocityX:function(l){return this.setVelocity(l,this.velocity.y)},setVelocityY:function(l){return this.setVelocity(this.velocity.x,l)},setMaxVelocity:function(l,f){return this.maxVelocity.set(l,f),this},setMaxVelocityX:function(l){return this.maxVelocity.x=l,this},setMaxVelocityY:function(l){return this.maxVelocity.y=l,this},setMaxSpeed:function(l){return this.maxSpeed=l,this},setSlideFactor:function(l,f){return this.slideFactor.set(l,f),this},setBounce:function(l,f){return this.bounce.set(l,f),this},setBounceX:function(l){return this.bounce.x=l,this},setBounceY:function(l){return this.bounce.y=l,this},setAcceleration:function(l,f){return this.acceleration.set(l,f),this},setAccelerationX:function(l){return this.acceleration.x=l,this},setAccelerationY:function(l){return this.acceleration.y=l,this},setAllowDrag:function(l){return l===void 0&&(l=!0),this.allowDrag=l,this},setAllowGravity:function(l){return l===void 0&&(l=!0),this.allowGravity=l,this},setAllowRotation:function(l){return l===void 0&&(l=!0),this.allowRotation=l,this},setDrag:function(l,f){return this.drag.set(l,f),this},setDamping:function(l){return this.useDamping=l,this},setDragX:function(l){return this.drag.x=l,this},setDragY:function(l){return this.drag.y=l,this},setGravity:function(l,f){return this.gravity.set(l,f),this},setGravityX:function(l){return this.gravity.x=l,this},setGravityY:function(l){return this.gravity.y=l,this},setFriction:function(l,f){return this.friction.set(l,f),this},setFrictionX:function(l){return this.friction.x=l,this},setFrictionY:function(l){return this.friction.y=l,this},setAngularVelocity:function(l){return this.angularVelocity=l,this},setAngularAcceleration:function(l){return this.angularAcceleration=l,this},setAngularDrag:function(l){return this.angularDrag=l,this},setMass:function(l){return this.mass=l,this},setImmovable:function(l){return l===void 0&&(l=!0),this.immovable=l,this},setEnable:function(l){return l===void 0&&(l=!0),this.enable=l,this},processX:function(l,f,u,v){this.x+=l,this.updateCenter(),f!==null&&(this.velocity.x=f*this.slideFactor.x);var m=this.blocked;u&&(m.left=!0,m.none=!1),v&&(m.right=!0,m.none=!1)},processY:function(l,f,u,v){this.y+=l,this.updateCenter(),f!==null&&(this.velocity.y=f*this.slideFactor.y);var m=this.blocked;u&&(m.up=!0,m.none=!1),v&&(m.down=!0,m.none=!1)},x:{get:function(){return this.position.x},set:function(l){this.position.x=l}},y:{get:function(){return this.position.y},set:function(l){this.position.y=l}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});p.exports=a}),79342:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r,n,e,s,o,i,a){this.world=r,this.name="",this.active=!0,this.overlapOnly=n,this.object1=e,this.object2=s,this.collideCallback=o,this.processCallback=i,this.callbackContext=a},setName:function(h){return this.name=h,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});p.exports=c}),66022:((p,S,t)=>{var d=t(71289),c=t(13759),h=t(37742),r=t(83419),n=t(37747),e=t(60758),s=t(72624),o=t(71464),i=new r({initialize:function(l){this.world=l,this.scene=l.scene,this.sys=l.scene.sys},collider:function(a,l,f,u,v){return this.world.addCollider(a,l,f,u,v)},overlap:function(a,l,f,u,v){return this.world.addOverlap(a,l,f,u,v)},existing:function(a,l){var f=l?n.STATIC_BODY:n.DYNAMIC_BODY;return this.world.enableBody(a,f),a},staticImage:function(a,l,f,u){var v=new d(this.scene,a,l,f,u);return this.sys.displayList.add(v),this.world.enableBody(v,n.STATIC_BODY),v},image:function(a,l,f,u){var v=new d(this.scene,a,l,f,u);return this.sys.displayList.add(v),this.world.enableBody(v,n.DYNAMIC_BODY),v},staticSprite:function(a,l,f,u){var v=new c(this.scene,a,l,f,u);return this.sys.displayList.add(v),this.sys.updateList.add(v),this.world.enableBody(v,n.STATIC_BODY),v},sprite:function(a,l,f,u){var v=new c(this.scene,a,l,f,u);return this.sys.displayList.add(v),this.sys.updateList.add(v),this.world.enableBody(v,n.DYNAMIC_BODY),v},staticGroup:function(a,l){return this.sys.updateList.add(new o(this.world,this.world.scene,a,l))},group:function(a,l){return this.sys.updateList.add(new e(this.world,this.world.scene,a,l))},body:function(a,l,f,u){var v=new h(this.world);return v.position.set(a,l),f&&u&&v.setSize(f,u),this.world.add(v,n.DYNAMIC_BODY),v},staticBody:function(a,l,f,u){var v=new s(this.world);return v.position.set(a,l),f&&u&&v.setSize(f,u),this.world.add(v,n.STATIC_BODY),v},destroy:function(){this.world=null,this.scene=null,this.sys=null}});p.exports=i}),79599:(p=>{var S=function(t){var d=0;if(!Array.isArray(t))d=t;else for(var c=0;c<t.length;c++)d|=t[c];return d};p.exports=S}),64897:((p,S,t)=>{var d=t(37747),c=function(h,r,n,e){var s=0,o=h.deltaAbsX()+r.deltaAbsX()+e;return h._dx===0&&r._dx===0?(h.embedded=!0,r.embedded=!0):h._dx>r._dx?(s=h.right-r.x,s>o&&!n||h.checkCollision.right===!1||r.checkCollision.left===!1?s=0:(h.touching.none=!1,h.touching.right=!0,r.touching.none=!1,r.touching.left=!0,r.physicsType===d.STATIC_BODY&&!n&&(h.blocked.none=!1,h.blocked.right=!0),h.physicsType===d.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.left=!0))):h._dx<r._dx&&(s=h.x-r.width-r.x,-s>o&&!n||h.checkCollision.left===!1||r.checkCollision.right===!1?s=0:(h.touching.none=!1,h.touching.left=!0,r.touching.none=!1,r.touching.right=!0,r.physicsType===d.STATIC_BODY&&!n&&(h.blocked.none=!1,h.blocked.left=!0),h.physicsType===d.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.right=!0))),h.overlapX=s,r.overlapX=s,s};p.exports=c}),45170:((p,S,t)=>{var d=t(37747),c=function(h,r,n,e){var s=0,o=h.deltaAbsY()+r.deltaAbsY()+e;return h._dy===0&&r._dy===0?(h.embedded=!0,r.embedded=!0):h._dy>r._dy?(s=h.bottom-r.y,s>o&&!n||h.checkCollision.down===!1||r.checkCollision.up===!1?s=0:(h.touching.none=!1,h.touching.down=!0,r.touching.none=!1,r.touching.up=!0,r.physicsType===d.STATIC_BODY&&!n&&(h.blocked.none=!1,h.blocked.down=!0),h.physicsType===d.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.up=!0))):h._dy<r._dy&&(s=h.y-r.bottom,-s>o&&!n||h.checkCollision.up===!1||r.checkCollision.down===!1?s=0:(h.touching.none=!1,h.touching.up=!0,r.touching.none=!1,r.touching.down=!0,r.physicsType===d.STATIC_BODY&&!n&&(h.blocked.none=!1,h.blocked.up=!0),h.physicsType===d.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.down=!0))),h.overlapY=s,r.overlapY=s,s};p.exports=c}),60758:((p,S,t)=>{var d=t(13759),c=t(83419),h=t(78389),r=t(37747),n=t(95540),e=t(26479),s=t(41212),o=new c({Extends:e,Mixins:[h],initialize:function(a,l,f,u){if(!f&&!u)u={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};else if(s(f))u=f,f=null,u.internalCreateCallback=this.createCallbackHandler,u.internalRemoveCallback=this.removeCallbackHandler;else if(Array.isArray(f)&&s(f[0])){var v=this;f.forEach(function(m){m.internalCreateCallback=v.createCallbackHandler,m.internalRemoveCallback=v.removeCallbackHandler,m.classType=n(m,"classType",d)}),u=null}else u={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};this.world=a,u&&(u.classType=n(u,"classType",d)),this.physicsType=r.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=2147483647,this.defaults={setCollideWorldBounds:n(u,"collideWorldBounds",!1),setBoundsRectangle:n(u,"customBoundsRectangle",null),setAccelerationX:n(u,"accelerationX",0),setAccelerationY:n(u,"accelerationY",0),setAllowDrag:n(u,"allowDrag",!0),setAllowGravity:n(u,"allowGravity",!0),setAllowRotation:n(u,"allowRotation",!0),setDamping:n(u,"useDamping",!1),setBounceX:n(u,"bounceX",0),setBounceY:n(u,"bounceY",0),setDragX:n(u,"dragX",0),setDragY:n(u,"dragY",0),setEnable:n(u,"enable",!0),setGravityX:n(u,"gravityX",0),setGravityY:n(u,"gravityY",0),setFrictionX:n(u,"frictionX",0),setFrictionY:n(u,"frictionY",0),setMaxSpeed:n(u,"maxSpeed",-1),setMaxVelocityX:n(u,"maxVelocityX",1e4),setMaxVelocityY:n(u,"maxVelocityY",1e4),setVelocityX:n(u,"velocityX",0),setVelocityY:n(u,"velocityY",0),setAngularVelocity:n(u,"angularVelocity",0),setAngularAcceleration:n(u,"angularAcceleration",0),setAngularDrag:n(u,"angularDrag",0),setMass:n(u,"mass",1),setImmovable:n(u,"immovable",!1)},e.call(this,l,f,u),this.type="PhysicsGroup"},createCallbackHandler:function(i){i.body||this.world.enableBody(i,r.DYNAMIC_BODY);var a=i.body;for(var l in this.defaults)a[l](this.defaults[l])},removeCallbackHandler:function(i){i.body&&this.world.disableBody(i)},setVelocity:function(i,a,l){l===void 0&&(l=0);for(var f=this.getChildren(),u=0;u<f.length;u++)f[u].body.velocity.set(i+u*l,a+u*l);return this},setVelocityX:function(i,a){a===void 0&&(a=0);for(var l=this.getChildren(),f=0;f<l.length;f++)l[f].body.velocity.x=i+f*a;return this},setVelocityY:function(i,a){a===void 0&&(a=0);for(var l=this.getChildren(),f=0;f<l.length;f++)l[f].body.velocity.y=i+f*a;return this}});p.exports=o}),3017:(p=>{var S,t,d,c,h,r,n,e,s,o,i,a,l,f,u,v,m,x=function(M,P,A){S=M,t=P;var R=S.velocity.x,F=t.velocity.x;return d=S.pushable,s=S._dx<0,o=S._dx>0,i=S._dx===0,u=Math.abs(S.right-t.x)<=Math.abs(t.right-S.x),n=F-R*S.bounce.x,c=t.pushable,a=t._dx<0,l=t._dx>0,f=t._dx===0,v=!u,e=R-F*t.bounce.x,m=Math.abs(A),g()},g=function(){return o&&u&&t.blocked.right?(S.processX(-m,n,!1,!0),1):s&&v&&t.blocked.left?(S.processX(m,n,!0),1):l&&v&&S.blocked.right?(t.processX(-m,e,!1,!0),2):a&&u&&S.blocked.left?(t.processX(m,e,!0),2):0},y=function(){var M=S.velocity.x,P=t.velocity.x,A=Math.sqrt(P*P*t.mass/S.mass)*(P>0?1:-1),R=Math.sqrt(M*M*S.mass/t.mass)*(M>0?1:-1),F=(A+R)*.5;return A-=F,R-=F,h=F+A*S.bounce.x,r=F+R*t.bounce.x,s&&v?T(0):a&&u?T(1):o&&u?T(2):l&&v?T(3):!1},T=function(M){if(d&&c)m*=.5,M===0||M===3?(S.processX(m,h),t.processX(-m,r)):(S.processX(-m,h),t.processX(m,r));else if(d&&!c)M===0||M===3?S.processX(m,n,!0):S.processX(-m,n,!1,!0);else if(!d&&c)M===0||M===3?t.processX(-m,e,!1,!0):t.processX(m,e,!0);else{var P=m*.5;M===0?f?(S.processX(m,0,!0),t.processX(0,null,!1,!0)):l?(S.processX(P,0,!0),t.processX(-P,0,!1,!0)):(S.processX(P,t.velocity.x,!0),t.processX(-P,null,!1,!0)):M===1?i?(S.processX(0,null,!1,!0),t.processX(m,0,!0)):o?(S.processX(-P,0,!1,!0),t.processX(P,0,!0)):(S.processX(-P,null,!1,!0),t.processX(P,S.velocity.x,!0)):M===2?f?(S.processX(-m,0,!1,!0),t.processX(0,null,!0)):a?(S.processX(-P,0,!1,!0),t.processX(P,0,!0)):(S.processX(-P,t.velocity.x,!1,!0),t.processX(P,null,!0)):M===3&&(i?(S.processX(0,null,!0),t.processX(-m,0,!1,!0)):s?(S.processX(P,0,!0),t.processX(-P,0,!1,!0)):(S.processX(P,t.velocity.y,!0),t.processX(-P,null,!1,!0)))}return!0},C=function(M){if(M===1?t.velocity.x=0:u?t.processX(m,e,!0):t.processX(-m,e,!1,!0),S.moves){var P=S.directControl?S.y-S.autoFrame.y:S.y-S.prev.y;t.y+=P*S.friction.y,t._dy=t.y-t.prev.y}},E=function(M){if(M===2?S.velocity.x=0:v?S.processX(m,n,!0):S.processX(-m,n,!1,!0),t.moves){var P=t.directControl?t.y-t.autoFrame.y:t.y-t.prev.y;S.y+=P*t.friction.y,S._dy=S.y-S.prev.y}};p.exports={BlockCheck:g,Check:y,Set:x,Run:T,RunImmovableBody1:C,RunImmovableBody2:E}}),47962:(p=>{var S,t,d,c,h,r,n,e,s,o,i,a,l,f,u,v,m,x=function(M,P,A){S=M,t=P;var R=S.velocity.y,F=t.velocity.y;return d=S.pushable,s=S._dy<0,o=S._dy>0,i=S._dy===0,u=Math.abs(S.bottom-t.y)<=Math.abs(t.bottom-S.y),n=F-R*S.bounce.y,c=t.pushable,a=t._dy<0,l=t._dy>0,f=t._dy===0,v=!u,e=R-F*t.bounce.y,m=Math.abs(A),g()},g=function(){return o&&u&&t.blocked.down?(S.processY(-m,n,!1,!0),1):s&&v&&t.blocked.up?(S.processY(m,n,!0),1):l&&v&&S.blocked.down?(t.processY(-m,e,!1,!0),2):a&&u&&S.blocked.up?(t.processY(m,e,!0),2):0},y=function(){var M=S.velocity.y,P=t.velocity.y,A=Math.sqrt(P*P*t.mass/S.mass)*(P>0?1:-1),R=Math.sqrt(M*M*S.mass/t.mass)*(M>0?1:-1),F=(A+R)*.5;return A-=F,R-=F,h=F+A*S.bounce.y,r=F+R*t.bounce.y,s&&v?T(0):a&&u?T(1):o&&u?T(2):l&&v?T(3):!1},T=function(M){if(d&&c)m*=.5,M===0||M===3?(S.processY(m,h),t.processY(-m,r)):(S.processY(-m,h),t.processY(m,r));else if(d&&!c)M===0||M===3?S.processY(m,n,!0):S.processY(-m,n,!1,!0);else if(!d&&c)M===0||M===3?t.processY(-m,e,!1,!0):t.processY(m,e,!0);else{var P=m*.5;M===0?f?(S.processY(m,0,!0),t.processY(0,null,!1,!0)):l?(S.processY(P,0,!0),t.processY(-P,0,!1,!0)):(S.processY(P,t.velocity.y,!0),t.processY(-P,null,!1,!0)):M===1?i?(S.processY(0,null,!1,!0),t.processY(m,0,!0)):o?(S.processY(-P,0,!1,!0),t.processY(P,0,!0)):(S.processY(-P,null,!1,!0),t.processY(P,S.velocity.y,!0)):M===2?f?(S.processY(-m,0,!1,!0),t.processY(0,null,!0)):a?(S.processY(-P,0,!1,!0),t.processY(P,0,!0)):(S.processY(-P,t.velocity.y,!1,!0),t.processY(P,null,!0)):M===3&&(i?(S.processY(0,null,!0),t.processY(-m,0,!1,!0)):s?(S.processY(P,0,!0),t.processY(-P,0,!1,!0)):(S.processY(P,t.velocity.y,!0),t.processY(-P,null,!1,!0)))}return!0},C=function(M){if(M===1?t.velocity.y=0:u?t.processY(m,e,!0):t.processY(-m,e,!1,!0),S.moves){var P=S.directControl?S.x-S.autoFrame.x:S.x-S.prev.x;t.x+=P*S.friction.x,t._dx=t.x-t.prev.x}},E=function(M){if(M===2?S.velocity.y=0:v?S.processY(m,n,!0):S.processY(-m,n,!1,!0),t.moves){var P=t.directControl?t.x-t.autoFrame.x:t.x-t.prev.x;S.x+=P*t.friction.x,S._dx=S.x-S.prev.x}};p.exports={BlockCheck:g,Check:y,Set:x,Run:T,RunImmovableBody1:C,RunImmovableBody2:E}}),14087:((p,S,t)=>{var d=t(64897),c=t(3017),h=function(r,n,e,s,o){o===void 0&&(o=d(r,n,e,s));var i=r.immovable,a=n.immovable;if(e||o===0||i&&a||r.customSeparateX||n.customSeparateX)return o!==0||r.embedded&&n.embedded;var l=c.Set(r,n,o);return!i&&!a?l>0?!0:c.Check():(i?c.RunImmovableBody1(l):a&&c.RunImmovableBody2(l),!0)};p.exports=h}),89936:((p,S,t)=>{var d=t(45170),c=t(47962),h=function(r,n,e,s,o){o===void 0&&(o=d(r,n,e,s));var i=r.immovable,a=n.immovable;if(e||o===0||i&&a||r.customSeparateY||n.customSeparateY)return o!==0||r.embedded&&n.embedded;var l=c.Set(r,n,o);return!i&&!a?l>0?!0:c.Check():(i?c.RunImmovableBody1(l):a&&c.RunImmovableBody2(l),!0)};p.exports=h}),95829:(p=>{var S=function(t,d){return d===void 0&&(d={}),d.none=t,d.up=!1,d.down=!1,d.left=!1,d.right=!1,t||(d.up=!0,d.down=!0,d.left=!0,d.right=!0),d};p.exports=S}),72624:((p,S,t)=>{var d=t(87902),c=t(83419),h=t(78389),r=t(37747),n=t(37303),e=t(95829),s=t(26099),o=new c({Mixins:[h],initialize:function(a,l){var f=64,u=64,v={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},m=l!==void 0;m&&l.displayWidth&&(f=l.displayWidth,u=l.displayHeight),m||(l=v),this.world=a,this.gameObject=m?l:void 0,this.isBody=!0,this.debugShowBody=a.defaults.debugShowStaticBody,this.debugBodyColor=a.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new s,this.position=new s(l.x-f*l.originX,l.y-u*l.originY),this.width=f,this.height=u,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new s(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=s.ZERO,this.allowGravity=!1,this.gravity=s.ZERO,this.bounce=s.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.pushable=!1,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision=e(!1),this.touching=e(!0),this.wasTouching=e(!0),this.blocked=e(!0),this.physicsType=r.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._dx=0,this._dy=0},setGameObject:function(i,a,l){if(a===void 0&&(a=!0),l===void 0&&(l=!0),!i||!i.hasTransformComponent)return this;var f=this.world;return this.gameObject&&this.gameObject.body&&(f.disable(this.gameObject),this.gameObject.body=null),i.body&&f.disable(i),this.gameObject=i,i.body=this,this.setSize(),a&&this.updateFromGameObject(),this.enable=l,this},updateFromGameObject:function(){this.world.staticTree.remove(this);var i=this.gameObject;return i.getTopLeft(this.position),this.width=i.displayWidth,this.height=i.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(i,a){return a===void 0&&(a=i),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(i,a),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(i,a,l){l===void 0&&(l=!0);var f=this.gameObject;if(f&&f.frame&&(i||(i=f.frame.realWidth),a||(a=f.frame.realHeight)),this.world.staticTree.remove(this),this.width=i,this.height=a,this.halfWidth=Math.floor(i/2),this.halfHeight=Math.floor(a/2),l&&f&&f.getCenter){var u=f.displayWidth/2,v=f.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(u-this.halfWidth,v-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(i,a,l){return a===void 0&&(a=this.offset.x),l===void 0&&(l=this.offset.y),i>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=i,this.width=i*2,this.height=i*2,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(a,l),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(i,a){var l=this.gameObject;i===void 0&&(i=l.x),a===void 0&&(a=l.y),this.world.staticTree.remove(this),l.setPosition(i,a),l.getTopLeft(this.position),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(i){return i.x=this.x,i.y=this.y,i.right=this.right,i.bottom=this.bottom,i},hitTest:function(i,a){return this.isCircle?d(this,i,a):n(this,i,a)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(i){var a=this.position,l=a.x+this.halfWidth,f=a.y+this.halfHeight;this.debugShowBody&&(i.lineStyle(i.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?i.strokeCircle(l,f,this.width/2):i.strokeRect(a.x,a.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(i){return i<=0&&(i=.1),this.mass=i,this},x:{get:function(){return this.position.x},set:function(i){this.world.staticTree.remove(this),this.position.x=i,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(i){this.world.staticTree.remove(this),this.position.y=i,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});p.exports=o}),71464:((p,S,t)=>{var d=t(13759),c=t(83419),h=t(78389),r=t(37747),n=t(95540),e=t(26479),s=t(41212),o=new c({Extends:e,Mixins:[h],initialize:function(a,l,f,u){!f&&!u?u={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:d}:s(f)?(u=f,f=null,u.internalCreateCallback=this.createCallbackHandler,u.internalRemoveCallback=this.removeCallbackHandler,u.createMultipleCallback=this.createMultipleCallbackHandler,u.classType=n(u,"classType",d)):Array.isArray(f)&&s(f[0])?(u=f,f=null,u.forEach(function(v){v.internalCreateCallback=this.createCallbackHandler,v.internalRemoveCallback=this.removeCallbackHandler,v.createMultipleCallback=this.createMultipleCallbackHandler,v.classType=n(v,"classType",d)})):u={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler},this.world=a,this.physicsType=r.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,e.call(this,l,f,u),this.type="StaticPhysicsGroup"},createCallbackHandler:function(i){i.body||this.world.enableBody(i,r.STATIC_BODY)},removeCallbackHandler:function(i){i.body&&this.world.disableBody(i)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var i=this.children.entries,a=0;a<i.length;a++)i[a].body.reset();return this}});p.exports=o}),82248:((p,S,t)=>{var d=t(55495),c=t(37742),h=t(45319),r=t(83419),n=t(79342),e=t(37747),s=t(20339),o=t(52816),i=t(50792),a=t(63012),l=t(43855),f=t(5470),u=t(94977),v=t(64897),m=t(45170),x=t(96523),g=t(35154),y=t(36383),T=t(25774),C=t(96602),E=t(87841),M=t(59542),P=t(40012),A=t(14087),R=t(89936),F=t(35072),w=t(72624),I=t(2483),U=t(61340),N=t(26099),D=t(15994),B=new r({Extends:i,initialize:function(G,O){i.call(this),this.scene=G,this.bodies=new F,this.staticBodies=new F,this.pendingDestroy=new F,this.colliders=new T,this.gravity=new N(g(O,"gravity.x",0),g(O,"gravity.y",0)),this.bounds=new E(g(O,"x",0),g(O,"y",0),g(O,"width",G.sys.scale.width),g(O,"height",G.sys.scale.height)),this.checkCollision={up:g(O,"checkCollision.up",!0),down:g(O,"checkCollision.down",!0),left:g(O,"checkCollision.left",!0),right:g(O,"checkCollision.right",!0)},this.fps=g(O,"fps",60),this.fixedStep=g(O,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=g(O,"timeScale",1),this.OVERLAP_BIAS=g(O,"overlapBias",4),this.TILE_BIAS=g(O,"tileBias",16),this.forceX=g(O,"forceX",!1),this.isPaused=g(O,"isPaused",!1),this._total=0,this.drawDebug=g(O,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:g(O,"debugShowBody",!0),debugShowStaticBody:g(O,"debugShowStaticBody",!0),debugShowVelocity:g(O,"debugShowVelocity",!0),bodyDebugColor:g(O,"debugBodyColor",16711935),staticBodyDebugColor:g(O,"debugStaticBodyColor",255),velocityDebugColor:g(O,"debugVelocityColor",65280)},this.maxEntries=g(O,"maxEntries",16),this.useTree=g(O,"useTree",!0),this.tree=new M(this.maxEntries),this.staticTree=new M(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new U,this._tempMatrix2=new U,this.tileFilterOptions={isColliding:!0,isNotEmpty:!0,hasInterestingFace:!0},this.drawDebug&&this.createDebugGraphic()},enable:function(L,G){G===void 0&&(G=e.DYNAMIC_BODY),Array.isArray(L)||(L=[L]);for(var O=0;O<L.length;O++){var X=L[O];if(X.isParent)for(var z=X.getChildren(),V=0;V<z.length;V++){var Y=z[V];Y.isParent?this.enable(Y,G):this.enableBody(Y,G)}else this.enableBody(X,G)}},enableBody:function(L,G){return G===void 0&&(G=e.DYNAMIC_BODY),L.hasTransformComponent&&(L.body||(G===e.DYNAMIC_BODY?L.body=new c(this,L):G===e.STATIC_BODY&&(L.body=new w(this,L))),this.add(L.body)),L},add:function(L){return L.physicsType===e.DYNAMIC_BODY?this.bodies.set(L):L.physicsType===e.STATIC_BODY&&(this.staticBodies.set(L),this.staticTree.insert(L)),L.enable=!0,L},disable:function(L){Array.isArray(L)||(L=[L]);for(var G=0;G<L.length;G++){var O=L[G];if(O.isParent)for(var X=O.getChildren(),z=0;z<X.length;z++){var V=X[z];V.isParent?this.disable(V):this.disableBody(V.body)}else this.disableBody(O.body)}},disableBody:function(L){this.remove(L),L.enable=!1},remove:function(L){L.physicsType===e.DYNAMIC_BODY?(this.tree.remove(L),this.bodies.delete(L)):L.physicsType===e.STATIC_BODY&&(this.staticBodies.delete(L),this.staticTree.remove(L))},createDebugGraphic:function(){var L=this.scene.sys.add.graphics({x:0,y:0});return L.setDepth(Number.MAX_VALUE),this.debugGraphic=L,this.drawDebug=!0,L},setBounds:function(L,G,O,X,z,V,Y,W){return this.bounds.setTo(L,G,O,X),z!==void 0&&this.setBoundsCollision(z,V,Y,W),this},setBoundsCollision:function(L,G,O,X){return L===void 0&&(L=!0),G===void 0&&(G=!0),O===void 0&&(O=!0),X===void 0&&(X=!0),this.checkCollision.left=L,this.checkCollision.right=G,this.checkCollision.up=O,this.checkCollision.down=X,this},pause:function(){return this.isPaused=!0,this.emit(a.PAUSE),this},resume:function(){return this.isPaused=!1,this.emit(a.RESUME),this},addCollider:function(L,G,O,X,z){O===void 0&&(O=null),X===void 0&&(X=null),z===void 0&&(z=O);var V=new n(this,!1,L,G,O,X,z);return this.colliders.add(V),V},addOverlap:function(L,G,O,X,z){O===void 0&&(O=null),X===void 0&&(X=null),z===void 0&&(z=O);var V=new n(this,!0,L,G,O,X,z);return this.colliders.add(V),V},removeCollider:function(L){return this.colliders.remove(L),this},setFPS:function(L){return this.fps=L,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this},update:function(L,G){if(!(this.isPaused||this.bodies.size===0)){var O,X=this._frameTime,z=this._frameTimeMS*this.timeScale;this._elapsed+=G;var V,Y=this.bodies.entries,W=this._elapsed>=z;for(this.fixedStep||(X=G*.001,W=!0,this._elapsed=0),O=0;O<Y.length;O++)V=Y[O],V.enable&&V.preUpdate(W,X);if(W){this._elapsed-=z,this.stepsLastFrame=1,this.useTree&&(this.tree.clear(),this.tree.load(Y));var H=this.colliders.update();for(O=0;O<H.length;O++){var K=H[O];K.active&&K.update()}this.emit(a.WORLD_STEP,X)}for(;this._elapsed>=z;)this._elapsed-=z,this.step(X)}},step:function(L){var G,O,X=this.bodies.entries,z=X.length;for(G=0;G<z;G++)O=X[G],O.enable&&O.update(L);this.useTree&&(this.tree.clear(),this.tree.load(X));var V=this.colliders.update();for(G=0;G<V.length;G++){var Y=V[G];Y.active&&Y.update()}this.emit(a.WORLD_STEP,L),this.stepsLastFrame++},singleStep:function(){this.update(0,this._frameTimeMS),this.postUpdate()},postUpdate:function(){var L,G,O=this.bodies.entries,X=O.length,z=this.bodies,V=this.staticBodies;if(this.stepsLastFrame)for(this.stepsLastFrame=0,L=0;L<X;L++)G=O[L],G.enable&&G.postUpdate();if(this.drawDebug){var Y=this.debugGraphic;for(Y.clear(),L=0;L<X;L++)G=O[L],G.willDrawDebug()&&G.drawDebug(Y);for(O=V.entries,X=O.length,L=0;L<X;L++)G=O[L],G.willDrawDebug()&&G.drawDebug(Y)}var W=this.pendingDestroy;if(W.size>0){var H=this.tree,K=this.staticTree;for(O=W.entries,X=O.length,L=0;L<X;L++)G=O[L],G.physicsType===e.DYNAMIC_BODY?(H.remove(G),z.delete(G)):G.physicsType===e.STATIC_BODY&&(K.remove(G),V.delete(G)),G.world=void 0,G.gameObject=void 0;W.clear()}},updateMotion:function(L,G){L.allowRotation&&this.computeAngularVelocity(L,G),this.computeVelocity(L,G)},computeAngularVelocity:function(L,G){var O=L.angularVelocity,X=L.angularAcceleration,z=L.angularDrag,V=L.maxAngular;X?O+=X*G:L.allowDrag&&z&&(z*=G,f(O-z,0,.1)?O-=z:u(O+z,0,.1)?O+=z:O=0),O=h(O,-V,V);var Y=O-L.angularVelocity;L.angularVelocity+=Y,L.rotation+=L.angularVelocity*G},computeVelocity:function(L,G){var O=L.velocity.x,X=L.acceleration.x,z=L.drag.x,V=L.maxVelocity.x,Y=L.velocity.y,W=L.acceleration.y,H=L.drag.y,K=L.maxVelocity.y,b=L.speed,J=L.maxSpeed,$=L.allowDrag,Z=L.useDamping;L.allowGravity&&(O+=(this.gravity.x+L.gravity.x)*G,Y+=(this.gravity.y+L.gravity.y)*G),X?O+=X*G:$&&z&&(Z?(z=Math.pow(z,G),O*=z,b=Math.sqrt(O*O+Y*Y),l(b,0,.001)&&(O=0)):(z*=G,f(O-z,0,.01)?O-=z:u(O+z,0,.01)?O+=z:O=0)),W?Y+=W*G:$&&H&&(Z?(H=Math.pow(H,G),Y*=H,b=Math.sqrt(O*O+Y*Y),l(b,0,.001)&&(Y=0)):(H*=G,f(Y-H,0,.01)?Y-=H:u(Y+H,0,.01)?Y+=H:Y=0)),O=h(O,-V,V),Y=h(Y,-K,K),L.velocity.set(O,Y),J>-1&&L.velocity.length()>J&&(L.velocity.normalize().scale(J),b=J),L.speed=b},separate:function(L,G,O,X,z){var V,Y,W=!1,H=!0;if(!L.enable||!G.enable||L.checkCollision.none||G.checkCollision.none||!this.intersects(L,G)||(L.collisionMask&G.collisionCategory)===0||(G.collisionMask&L.collisionCategory)===0||O&&O.call(X,L.gameObject||L,G.gameObject||G)===!1)return W;if(L.isCircle||G.isCircle){var K=this.separateCircle(L,G,z);K.result?(W=!0,H=!1):(V=K.x,Y=K.y,H=!0)}if(H){var b=!1,J=!1,$=this.OVERLAP_BIAS;z?(b=A(L,G,z,$,V),J=R(L,G,z,$,Y)):this.forceX||Math.abs(this.gravity.y+L.gravity.y)<Math.abs(this.gravity.x+L.gravity.x)?(b=A(L,G,z,$,V),this.intersects(L,G)&&(J=R(L,G,z,$,Y))):(J=R(L,G,z,$,Y),this.intersects(L,G)&&(b=A(L,G,z,$,V))),W=b||J}return W&&(z?(L.onOverlap||G.onOverlap)&&this.emit(a.OVERLAP,L.gameObject,G.gameObject,L,G):(L.onCollide||G.onCollide)&&this.emit(a.COLLIDE,L.gameObject,G.gameObject,L,G)),W},separateCircle:function(L,G,O){v(L,G,!1,0),m(L,G,!1,0);var X=L.isCircle,z=G.isCircle,V=L.center,Y=G.center,W=L.immovable,H=G.immovable,K=L.velocity,b=G.velocity,J=0,$=!0;if(X!==z){$=!1;var Z=V.x,q=V.y,_=L.halfWidth,tt=G.position.x,Q=G.position.y,j=G.right,k=G.bottom;z&&(Z=Y.x,q=Y.y,_=G.halfWidth,tt=L.position.x,Q=L.position.y,j=L.right,k=L.bottom),q<Q?Z<tt?J=s(Z,q,tt,Q)-_:Z>j&&(J=s(Z,q,j,Q)-_):q>k&&(Z<tt?J=s(Z,q,tt,k)-_:Z>j&&(J=s(Z,q,j,k)-_)),J*=-1}else J=L.halfWidth+G.halfWidth-o(V,Y);L.overlapR=J,G.overlapR=J;var et=d(V,Y),nt=(J+y.EPSILON)*Math.cos(et),lt=(J+y.EPSILON)*Math.sin(et),it={overlap:J,result:!1,x:nt,y:lt};if(O&&(!$||$&&J!==0))return it.result=!0,it;if(!$&&J===0||W&&H||L.customSeparateX||G.customSeparateX)return it.x=void 0,it.y=void 0,it;var st=!L.pushable&&!G.pushable;if($){var ft=V.x-Y.x,ct=V.y-Y.y,rt=Math.sqrt(Math.pow(ft,2)+Math.pow(ct,2)),dt=(Y.x-V.x)/rt||0,vt=(Y.y-V.y)/rt||0,pt=2*(K.x*dt+K.y*vt-b.x*dt-b.y*vt)/(L.mass+G.mass);(W||H||!L.pushable||!G.pushable)&&(pt*=2),!W&&L.pushable&&(K.x=K.x-pt/L.mass*dt,K.y=K.y-pt/L.mass*vt,K.multiply(L.bounce)),!H&&G.pushable&&(b.x=b.x+pt/G.mass*dt,b.y=b.y+pt/G.mass*vt,b.multiply(G.bounce)),!W&&!H&&(nt*=.5,lt*=.5),(!W||L.pushable||st)&&(L.x-=nt,L.y-=lt,L.updateCenter()),(!H||G.pushable||st)&&(G.x+=nt,G.y+=lt,G.updateCenter()),it.result=!0}else!W&&(L.pushable||st)&&(L.x-=nt,L.y-=lt,L.updateCenter()),!H&&(G.pushable||st)&&(G.x+=nt,G.y+=lt,G.updateCenter()),it.x=void 0,it.y=void 0;return it},intersects:function(L,G){return L===G?!1:!L.isCircle&&!G.isCircle?!(L.right<=G.left||L.bottom<=G.top||L.left>=G.right||L.top>=G.bottom):L.isCircle?G.isCircle?o(L.center,G.center)<=L.halfWidth+G.halfWidth:this.circleBodyIntersects(L,G):this.circleBodyIntersects(G,L)},circleBodyIntersects:function(L,G){var O=h(L.center.x,G.left,G.right),X=h(L.center.y,G.top,G.bottom),z=(L.center.x-O)*(L.center.x-O),V=(L.center.y-X)*(L.center.y-X);return z+V<=L.halfWidth*L.halfWidth},overlap:function(L,G,O,X,z){return O===void 0&&(O=null),X===void 0&&(X=null),z===void 0&&(z=O),this.collideObjects(L,G,O,X,z,!0)},collide:function(L,G,O,X,z){return O===void 0&&(O=null),X===void 0&&(X=null),z===void 0&&(z=O),this.collideObjects(L,G,O,X,z,!1)},collideObjects:function(L,G,O,X,z,V){var Y,W;L.isParent&&(L.physicsType===void 0||G===void 0||L===G)&&(L=L.children.entries),G&&G.isParent&&G.physicsType===void 0&&(G=G.children.entries);var H=Array.isArray(L),K=Array.isArray(G);if(this._total=0,!H&&!K)this.collideHandler(L,G,O,X,z,V);else if(!H&&K)for(Y=0;Y<G.length;Y++)this.collideHandler(L,G[Y],O,X,z,V);else if(H&&!K)if(G)for(Y=0;Y<L.length;Y++)this.collideHandler(L[Y],G,O,X,z,V);else for(Y=0;Y<L.length;Y++){var b=L[Y];for(W=Y+1;W<L.length;W++)Y!==W&&this.collideHandler(b,L[W],O,X,z,V)}else for(Y=0;Y<L.length;Y++)for(W=0;W<G.length;W++)this.collideHandler(L[Y],G[W],O,X,z,V);return this._total>0},collideHandler:function(L,G,O,X,z,V){if(G===void 0&&L.isParent)return this.collideGroupVsGroup(L,L,O,X,z,V);if(!L||!G)return!1;if(L.body||L.isBody){if(G.body||G.isBody)return this.collideSpriteVsSprite(L,G,O,X,z,V);if(G.isParent)return this.collideSpriteVsGroup(L,G,O,X,z,V);if(G.isTilemap)return this.collideSpriteVsTilemapLayer(L,G,O,X,z,V)}else if(L.isParent){if(G.body||G.isBody)return this.collideSpriteVsGroup(G,L,O,X,z,V);if(G.isParent)return this.collideGroupVsGroup(L,G,O,X,z,V);if(G.isTilemap)return this.collideGroupVsTilemapLayer(L,G,O,X,z,V)}else if(L.isTilemap){if(G.body||G.isBody)return this.collideSpriteVsTilemapLayer(G,L,O,X,z,V);if(G.isParent)return this.collideGroupVsTilemapLayer(G,L,O,X,z,V)}},canCollide:function(L,G){return L&&G&&(L.collisionMask&G.collisionCategory)!==0&&(G.collisionMask&L.collisionCategory)!==0},collideSpriteVsSprite:function(L,G,O,X,z,V){var Y=L.isBody?L:L.body,W=G.isBody?G:G.body;return this.canCollide(Y,W)?(this.separate(Y,W,X,z,V)&&(O&&O.call(z,L,G),this._total++),!0):!1},collideSpriteVsGroup:function(L,G,O,X,z,V){var Y=L.isBody?L:L.body;if(!(G.getLength()===0||!Y||!Y.enable||Y.checkCollision.none||!this.canCollide(Y,G))){var W,H,K;if(this.useTree||G.physicsType===e.STATIC_BODY){var b=this.treeMinMax;b.minX=Y.left,b.minY=Y.top,b.maxX=Y.right,b.maxY=Y.bottom;var J=G.physicsType===e.DYNAMIC_BODY?this.tree.search(b):this.staticTree.search(b);for(H=J.length,W=0;W<H;W++)K=J[W],!(Y===K||!K.enable||K.checkCollision.none||!G.contains(K.gameObject))&&this.separate(Y,K,X,z,V)&&(O&&O.call(z,Y.gameObject,K.gameObject),this._total++)}else{var $=G.getChildren(),Z=G.children.entries.indexOf(L);for(H=$.length,W=0;W<H;W++)K=$[W].body,!(!K||W===Z||!K.enable)&&this.separate(Y,K,X,z,V)&&(O&&O.call(z,Y.gameObject,K.gameObject),this._total++)}}},collideGroupVsTilemapLayer:function(L,G,O,X,z,V){if(!this.canCollide(L,G))return!1;var Y=L.getChildren();if(Y.length===0)return!1;for(var W=!1,H=0;H<Y.length;H++)(Y[H].body||Y[H].isBody)&&this.collideSpriteVsTilemapLayer(Y[H],G,O,X,z,V)&&(W=!0);return W},collideTiles:function(L,G,O,X,z){return G.length===0||L.body&&!L.body.enable||L.isBody&&!L.enable?!1:this.collideSpriteVsTilesHandler(L,G,O,X,z,!1,!1)},overlapTiles:function(L,G,O,X,z){return G.length===0||L.body&&!L.body.enable||L.isBody&&!L.enable?!1:this.collideSpriteVsTilesHandler(L,G,O,X,z,!0,!1)},collideSpriteVsTilemapLayer:function(L,G,O,X,z,V){var Y=L.isBody?L:L.body;if(!Y.enable||Y.checkCollision.none||!this.canCollide(Y,G))return!1;var W=G.layer,H=Y.x-W.tileWidth*G.scaleX,K=Y.y-W.tileHeight*G.scaleY,b=Y.width+W.tileWidth*G.scaleX,J=Y.height+W.tileHeight*G.scaleY,$=V?null:this.tileFilterOptions,Z=x(H,K,b,J,$,G.scene.cameras.main,G.layer);return Z.length===0?!1:this.collideSpriteVsTilesHandler(L,Z,O,X,z,V,!0)},collideSpriteVsTilesHandler:function(L,G,O,X,z,V,Y){for(var W=L.isBody?L:L.body,H,K={left:0,right:0,top:0,bottom:0},b,J=!1,$=0;$<G.length;$++){H=G[$],b=H.tilemapLayer;var Z=b.tileToWorldXY(H.x,H.y);K.left=Z.x,K.top=Z.y,K.right=K.left+H.width*b.scaleX,K.bottom=K.top+H.height*b.scaleY,I(K,W)&&(!X||X.call(z,L,H))&&C(H,L)&&(V||P($,W,H,K,b,this.TILE_BIAS,Y))&&(this._total++,J=!0,O&&O.call(z,L,H),V&&W.onOverlap?this.emit(a.TILE_OVERLAP,L,H,W):W.onCollide&&this.emit(a.TILE_COLLIDE,L,H,W))}return J},collideGroupVsGroup:function(L,G,O,X,z,V){if(!(L.getLength()===0||G.getLength()===0||!this.canCollide(L,G)))for(var Y=L.getChildren(),W=0;W<Y.length;W++)this.collideSpriteVsGroup(Y[W],G,O,X,z,V)},wrap:function(L,G){L.body?this.wrapObject(L,G):L.getChildren?this.wrapArray(L.getChildren(),G):Array.isArray(L)?this.wrapArray(L,G):this.wrapObject(L,G)},wrapArray:function(L,G){for(var O=0;O<L.length;O++)this.wrapObject(L[O],G)},wrapObject:function(L,G){G===void 0&&(G=0),L.x=D(L.x,this.bounds.left-G,this.bounds.right+G),L.y=D(L.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)}});p.exports=B}),1093:(p=>{var S={setAcceleration:function(t,d){return this.body.acceleration.set(t,d),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}};p.exports=S}),59023:(p=>{var S={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}};p.exports=S}),62069:(p=>{var S={setBounce:function(t,d){return this.body.bounce.set(t,d),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t,d,c,h){return this.body.setCollideWorldBounds(t,d,c,h),this}};p.exports=S}),78389:((p,S,t)=>{var d=t(79599),c={setCollisionCategory:function(h){var r=this.body?this.body:this;return r.collisionCategory=h,this},willCollideWith:function(h){var r=this.body?this.body:this;return(r.collisionMask&h)!==0},addCollidesWith:function(h){var r=this.body?this.body:this;return r.collisionMask=r.collisionMask|h,this},removeCollidesWith:function(h){var r=this.body?this.body:this;return r.collisionMask=r.collisionMask&~h,this},setCollidesWith:function(h){var r=this.body?this.body:this;return r.collisionMask=d(h),this},resetCollisionCategory:function(){var h=this.body?this.body:this;return h.collisionCategory=1,h.collisionMask=2147483647,this}};p.exports=c}),87118:(p=>{var S={setDebug:function(t,d,c){return this.debugShowBody=t,this.debugShowVelocity=d,this.debugBodyColor=c,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}};p.exports=S}),52819:(p=>{var S={setDrag:function(t,d){return this.body.drag.set(t,d),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this},setDamping:function(t){return this.body.useDamping=t,this}};p.exports=S}),4074:(p=>{var S={setDirectControl:function(t){return this.body.setDirectControl(t),this},enableBody:function(t,d,c,h,r){return t&&this.body.reset(d,c),h&&(this.body.gameObject.active=!0),r&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,d){return t===void 0&&(t=!1),d===void 0&&(d=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),d&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};p.exports=S}),40831:(p=>{var S={setFriction:function(t,d){return this.body.friction.set(t,d),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}};p.exports=S}),26775:(p=>{var S={setGravity:function(t,d){return this.body.gravity.set(t,d),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}};p.exports=S}),9437:(p=>{var S={setImmovable:function(t){return t===void 0&&(t=!0),this.body.immovable=t,this}};p.exports=S}),30621:(p=>{var S={setMass:function(t){return this.body.mass=t,this}};p.exports=S}),72441:((p,S,t)=>{var d=t(47956),c=t(96503),h=t(2044),r=t(81491),n=function(e,s,o,i,a,l){var f=d(e,s-i,o-i,2*i,2*i,a,l);if(f.length===0)return f;for(var u=new c(s,o,i),v=new c,m=[],x=0;x<f.length;x++){var g=f[x];g.isCircle?(v.setTo(g.center.x,g.center.y,g.halfWidth),h(u,v)&&m.push(g)):r(u,g)&&m.push(g)}return m};p.exports=n}),47956:(p=>{var S=function(t,d,c,h,r,n,e){n===void 0&&(n=!0),e===void 0&&(e=!1);var s=[],o=[],i=t.treeMinMax;if(i.minX=d,i.minY=c,i.maxX=d+h,i.maxY=c+r,e&&(o=t.staticTree.search(i)),n&&t.useTree)s=t.tree.search(i);else if(n){var a=t.bodies,l={position:{x:d,y:c},left:d,top:c,right:d+h,bottom:c+r,isCircle:!1},f=t.intersects;a.iterate(function(u){f(u,l)&&s.push(u)})}return o.concat(s)};p.exports=S}),62121:(p=>{var S={setPushable:function(t){return t===void 0&&(t=!0),this.body.pushable=t,this}};p.exports=S}),29384:(p=>{var S={setOffset:function(t,d){return this.body.setOffset(t,d),this},setSize:function(t,d,c){return this.body.setSize(t,d,c),this},setBodySize:function(t,d,c){return this.body.setSize(t,d,c),this},setCircle:function(t,d,c){return this.body.setCircle(t,d,c),this}};p.exports=S}),15098:(p=>{var S={setVelocity:function(t,d){return this.body.setVelocity(t,d),this},setVelocityX:function(t){return this.body.setVelocityX(t),this},setVelocityY:function(t){return this.body.setVelocityY(t),this},setMaxVelocity:function(t,d){return this.body.maxVelocity.set(t,d),this}};p.exports=S}),92209:((p,S,t)=>{p.exports={Acceleration:t(1093),Angular:t(59023),Bounce:t(62069),Collision:t(78389),Debug:t(87118),Drag:t(52819),Enable:t(4074),Friction:t(40831),Gravity:t(26775),Immovable:t(9437),Mass:t(30621),OverlapCirc:t(72441),OverlapRect:t(47956),Pushable:t(62121),Size:t(29384),Velocity:t(15098)}}),37747:(p=>{var S={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14};p.exports=S}),20009:(p=>{p.exports="collide"}),36768:(p=>{p.exports="overlap"}),60473:(p=>{p.exports="pause"}),89954:(p=>{p.exports="resume"}),61804:(p=>{p.exports="tilecollide"}),7161:(p=>{p.exports="tileoverlap"}),34689:(p=>{p.exports="worldbounds"}),16006:(p=>{p.exports="worldstep"}),63012:((p,S,t)=>{p.exports={COLLIDE:t(20009),OVERLAP:t(36768),PAUSE:t(60473),RESUME:t(89954),TILE_COLLIDE:t(61804),TILE_OVERLAP:t(7161),WORLD_BOUNDS:t(34689),WORLD_STEP:t(16006)}}),27064:((p,S,t)=>{var d=t(37747),c=t(79291),h={ArcadePhysics:t(86689),Body:t(37742),Collider:t(79342),Components:t(92209),Events:t(63012),Factory:t(66022),GetCollidesWith:t(79599),GetOverlapX:t(64897),GetOverlapY:t(45170),SeparateX:t(14087),SeparateY:t(89936),Group:t(60758),Image:t(71289),Sprite:t(13759),StaticBody:t(72624),StaticGroup:t(71464),Tilemap:t(55173),World:t(82248)};h=c(!1,h,d),p.exports=h}),96602:(p=>{var S=function(t,d){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,d,t):t.layer.callbacks[t.index]?!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,d,t):!0};p.exports=S}),36294:(p=>{var S=function(t,d){d<0?(t.blocked.none=!1,t.blocked.left=!0):d>0&&(t.blocked.none=!1,t.blocked.right=!0),t.position.x-=d,t.updateCenter(),t.bounce.x===0?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x};p.exports=S}),67013:(p=>{var S=function(t,d){d<0?(t.blocked.none=!1,t.blocked.up=!0):d>0&&(t.blocked.none=!1,t.blocked.down=!0),t.position.y-=d,t.updateCenter(),t.bounce.y===0?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y};p.exports=S}),40012:((p,S,t)=>{var d=t(21329),c=t(53442),h=t(2483),r=function(n,e,s,o,i,a,l){var f=o.left,u=o.top,v=o.right,m=o.bottom,x=s.faceLeft||s.faceRight,g=s.faceTop||s.faceBottom;if(l||(x=!0,g=!0),!x&&!g)return!1;var y=0,T=0,C=0,E=1;if(e.deltaAbsX()>e.deltaAbsY()?C=-1:e.deltaAbsX()<e.deltaAbsY()&&(E=-1),e.deltaX()!==0&&e.deltaY()!==0&&x&&g&&(C=Math.min(Math.abs(e.position.x-v),Math.abs(e.right-f)),E=Math.min(Math.abs(e.position.y-m),Math.abs(e.bottom-u))),C<E){if(x&&(y=d(e,s,f,v,a,l),y!==0&&!h(o,e)))return!0;g&&(T=c(e,s,u,m,a,l))}else{if(g&&(T=c(e,s,u,m,a,l),T!==0&&!h(o,e)))return!0;x&&(y=d(e,s,f,v,a,l))}return y!==0||T!==0};p.exports=r}),21329:((p,S,t)=>{var d=t(36294),c=function(h,r,n,e,s,o){var i=0,a=r.faceLeft,l=r.faceRight,f=r.collideLeft,u=r.collideRight;return o||(a=!0,l=!0,f=!0,u=!0),h.deltaX()<0&&u&&h.checkCollision.left?l&&h.x<e&&(i=h.x-e,i<-s&&(i=0)):h.deltaX()>0&&f&&h.checkCollision.right&&a&&h.right>n&&(i=h.right-n,i>s&&(i=0)),i!==0&&(h.customSeparateX?h.overlapX=i:d(h,i)),i};p.exports=c}),53442:((p,S,t)=>{var d=t(67013),c=function(h,r,n,e,s,o){var i=0,a=r.faceTop,l=r.faceBottom,f=r.collideUp,u=r.collideDown;return o||(a=!0,l=!0,f=!0,u=!0),h.deltaY()<0&&u&&h.checkCollision.up?l&&h.y<e&&(i=h.y-e,i<-s&&(i=0)):h.deltaY()>0&&f&&h.checkCollision.down&&a&&h.bottom>n&&(i=h.bottom-n,i>s&&(i=0)),i!==0&&(h.customSeparateY?h.overlapY=i:d(h,i)),i};p.exports=c}),2483:(p=>{var S=function(t,d){return!(d.right<=t.left||d.bottom<=t.top||d.position.x>=t.right||d.position.y>=t.bottom)};p.exports=S}),55173:((p,S,t)=>{var d={ProcessTileCallbacks:t(96602),ProcessTileSeparationX:t(36294),ProcessTileSeparationY:t(67013),SeparateTile:t(40012),TileCheckX:t(21329),TileCheckY:t(53442),TileIntersectsBody:t(2483)};p.exports=d}),44563:((p,S,t)=>{p.exports={Arcade:t(27064),Matter:t(3875)}}),68174:((p,S,t)=>{var d=t(83419),c=t(26099),h=new d({initialize:function(){this.boundsCenter=new c,this.centerDiff=new c},parseBody:function(r){if(r=r.hasOwnProperty("body")?r.body:r,!r.hasOwnProperty("bounds")||!r.hasOwnProperty("centerOfMass"))return!1;var n=this.boundsCenter,e=this.centerDiff,s=r.bounds.max.x-r.bounds.min.x,o=r.bounds.max.y-r.bounds.min.y,i=s*r.centerOfMass.x,a=o*r.centerOfMass.y;return n.set(s/2,o/2),e.set(i-n.x,a-n.y),!0},getTopLeft:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,o=this.centerDiff;return new c(n+s.x+o.x,e+s.y+o.y)}return!1},getTopCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,o=this.centerDiff;return new c(n+o.x,e+s.y+o.y)}return!1},getTopRight:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,o=this.centerDiff;return new c(n-(s.x-o.x),e+s.y+o.y)}return!1},getLeftCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,o=this.centerDiff;return new c(n+s.x+o.x,e+o.y)}return!1},getCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.centerDiff;return new c(n+s.x,e+s.y)}return!1},getRightCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,o=this.centerDiff;return new c(n-(s.x-o.x),e+o.y)}return!1},getBottomLeft:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,o=this.centerDiff;return new c(n+s.x+o.x,e-(s.y-o.y))}return!1},getBottomCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,o=this.centerDiff;return new c(n+o.x,e-(s.y-o.y))}return!1},getBottomRight:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,o=this.centerDiff;return new c(n-(s.x-o.x),e-(s.y-o.y))}return!1}});p.exports=h}),19933:((p,S,t)=>{var d=t(6790);d.Body=t(22562),d.Composite=t(69351),d.World=t(4372),d.Collision=t(52284),d.Detector=t(81388),d.Pairs=t(99561),d.Pair=t(4506),d.Query=t(73296),d.Resolver=t(66272),d.Constraint=t(48140),d.Common=t(53402),d.Engine=t(48413),d.Events=t(35810),d.Sleeping=t(53614),d.Plugin=t(73832),d.Bodies=t(66280),d.Composites=t(74116),d.Axes=t(66615),d.Bounds=t(15647),d.Svg=t(74058),d.Vector=t(31725),d.Vertices=t(41598),d.World.add=d.Composite.add,d.World.remove=d.Composite.remove,d.World.addComposite=d.Composite.addComposite,d.World.addBody=d.Composite.addBody,d.World.addConstraint=d.Composite.addConstraint,d.World.clear=d.Composite.clear,p.exports=d}),28137:((p,S,t)=>{var d=t(66280),c=t(83419),h=t(74116),r=t(48140),n=t(74058),e=t(75803),s=t(23181),o=t(34803),i=t(73834),a=t(19496),l=t(85791),f=t(98713),u=t(41598),v=new c({initialize:function(x){this.world=x,this.scene=x.scene,this.sys=x.scene.sys},rectangle:function(m,x,g,y,T){var C=d.rectangle(m,x,g,y,T);return this.world.add(C),C},trapezoid:function(m,x,g,y,T,C){var E=d.trapezoid(m,x,g,y,T,C);return this.world.add(E),E},circle:function(m,x,g,y,T){var C=d.circle(m,x,g,y,T);return this.world.add(C),C},polygon:function(m,x,g,y,T){var C=d.polygon(m,x,g,y,T);return this.world.add(C),C},fromVertices:function(m,x,g,y,T,C,E){typeof g=="string"&&(g=u.fromPath(g));var M=d.fromVertices(m,x,g,y,T,C,E);return this.world.add(M),M},fromPhysicsEditor:function(m,x,g,y,T){T===void 0&&(T=!0);var C=a.parseBody(m,x,g,y);return T&&!this.world.has(C)&&this.world.add(C),C},fromSVG:function(m,x,g,y,T,C){y===void 0&&(y=1),T===void 0&&(T={}),C===void 0&&(C=!0);for(var E=g.getElementsByTagName("path"),M=[],P=0;P<E.length;P++){var A=n.pathToVertices(E[P],30);y!==1&&u.scale(A,y,y),M.push(A)}var R=d.fromVertices(m,x,M,T);return C&&this.world.add(R),R},fromJSON:function(m,x,g,y,T){y===void 0&&(y={}),T===void 0&&(T=!0);var C=l.parseBody(m,x,g,y);return C&&T&&this.world.add(C),C},imageStack:function(m,x,g,y,T,C,E,M,P){E===void 0&&(E=0),M===void 0&&(M=0),P===void 0&&(P={});var A=this.world,R=this.sys.displayList;P.addToWorld=!1;var F=h.stack(g,y,T,C,E,M,function(w,I){var U=new s(A,w,I,m,x,P);return R.add(U),U.body});return A.add(F),F},stack:function(m,x,g,y,T,C,E){var M=h.stack(m,x,g,y,T,C,E);return this.world.add(M),M},pyramid:function(m,x,g,y,T,C,E){var M=h.pyramid(m,x,g,y,T,C,E);return this.world.add(M),M},chain:function(m,x,g,y,T,C){return h.chain(m,x,g,y,T,C)},mesh:function(m,x,g,y,T){return h.mesh(m,x,g,y,T)},newtonsCradle:function(m,x,g,y,T){var C=h.newtonsCradle(m,x,g,y,T);return this.world.add(C),C},car:function(m,x,g,y,T){var C=h.car(m,x,g,y,T);return this.world.add(C),C},softBody:function(m,x,g,y,T,C,E,M,P,A){var R=h.softBody(m,x,g,y,T,C,E,M,P,A);return this.world.add(R),R},joint:function(m,x,g,y,T){return this.constraint(m,x,g,y,T)},spring:function(m,x,g,y,T){return this.constraint(m,x,g,y,T)},constraint:function(m,x,g,y,T){y===void 0&&(y=1),T===void 0&&(T={}),T.bodyA=m.type==="body"?m:m.body,T.bodyB=x.type==="body"?x:x.body,isNaN(g)||(T.length=g),T.stiffness=y;var C=r.create(T);return this.world.add(C),C},worldConstraint:function(m,x,g,y){g===void 0&&(g=1),y===void 0&&(y={}),y.bodyB=m.type==="body"?m:m.body,isNaN(x)||(y.length=x),y.stiffness=g;var T=r.create(y);return this.world.add(T),T},mouseSpring:function(m){return this.pointerConstraint(m)},pointerConstraint:function(m){m===void 0&&(m={}),m.hasOwnProperty("render")||(m.render={visible:!1});var x=new f(this.scene,this.world,m);return this.world.add(x.constraint),x},image:function(m,x,g,y,T){var C=new s(this.world,m,x,g,y,T);return this.sys.displayList.add(C),C},tileBody:function(m,x){return new i(this.world,m,x)},sprite:function(m,x,g,y,T){var C=new o(this.world,m,x,g,y,T);return this.sys.displayList.add(C),this.sys.updateList.add(C),C},gameObject:function(m,x,g){return e(this.world,m,x,g)},destroy:function(){this.world=null,this.scene=null,this.sys=null}});p.exports=v}),75803:((p,S,t)=>{var d=t(31884),c=t(95540),h=t(26099);function r(e){return!!e.get&&typeof e.get=="function"||!!e.set&&typeof e.set=="function"}var n=function(e,s,o,i){o===void 0&&(o={}),i===void 0&&(i=!0);var a=s.x,l=s.y;s.body={temp:!0,position:{x:a,y:l}};var f=[d.Bounce,d.Collision,d.Force,d.Friction,d.Gravity,d.Mass,d.Sensor,d.SetBody,d.Sleep,d.Static,d.Transform,d.Velocity];if(f.forEach(function(v){for(var m in v)r(v[m])?Object.defineProperty(s,m,{get:v[m].get,set:v[m].set}):Object.defineProperty(s,m,{value:v[m]})}),s.world=e,s._tempVec2=new h(a,l),o.hasOwnProperty("type")&&o.type==="body")s.setExistingBody(o,i);else{var u=c(o,"shape",null);u||(u="rectangle"),o.addToWorld=i,s.setBody(u,o)}return s};p.exports=n}),23181:((p,S,t)=>{var d=t(83419),c=t(31884),h=t(95643),r=t(95540),n=t(88571),e=t(72699),s=t(26099),o=new d({Extends:n,Mixins:[c.Bounce,c.Collision,c.Force,c.Friction,c.Gravity,c.Mass,c.Sensor,c.SetBody,c.Sleep,c.Static,c.Transform,c.Velocity,e],initialize:function(a,l,f,u,v,m){h.call(this,a.scene,"Image"),this._crop=this.resetCropObject(),this.setTexture(u,v),this.setSizeToFrame(),this.setOrigin(),this.world=a,this._tempVec2=new s(l,f);var x=r(m,"shape",null);x?this.setBody(x,m):this.setRectangle(this.width,this.height,m),this.setPosition(l,f),this.initPipeline(),this.initPostPipeline(!0)}});p.exports=o}),42045:((p,S,t)=>{var d=t(60461),c=t(66615),h=t(66280),r=t(22562),n=t(68174),e=t(15647),s=t(83419),o=t(52284),i=t(53402),a=t(69351),l=t(74116),f=t(48140),u=t(81388),v=t(20339),m=t(28137),x=t(95540),g=t(35154),y=t(46975),T=t(4506),C=t(99561),E=t(37277),M=t(73296),P=t(66272),A=t(44594),R=t(74058),F=t(31725),w=t(41598),I=t(68243);i.setDecomp(t(55973));var U=new s({initialize:function(D){this.scene=D,this.systems=D.sys,this.config=this.getConfig(),this.world,this.add,this.bodyBounds,this.body=r,this.composite=a,this.collision=o,this.detector=u,this.pair=T,this.pairs=C,this.query=M,this.resolver=P,this.constraint=f,this.bodies=h,this.composites=l,this.axes=c,this.bounds=e,this.svg=R,this.vector=F,this.vertices=w,this.verts=w,this._tempVec2=F.create(),P._restingThresh=g(this.config,"restingThresh",4),P._restingThreshTangent=g(this.config,"restingThreshTangent",6),P._positionDampen=g(this.config,"positionDampen",.9),P._positionWarming=g(this.config,"positionWarming",.8),P._frictionNormalMultiplier=g(this.config,"frictionNormalMultiplier",5),D.sys.events.once(A.BOOT,this.boot,this),D.sys.events.on(A.START,this.start,this)},boot:function(){this.world=new I(this.scene,this.config),this.add=new m(this.world),this.bodyBounds=new n,this.systems.events.once(A.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new I(this.scene,this.config),this.add=new m(this.world));var N=this.systems.events;N.on(A.UPDATE,this.world.update,this.world),N.on(A.POST_UPDATE,this.world.postUpdate,this.world),N.once(A.SHUTDOWN,this.shutdown,this)},getConfig:function(){var N=this.systems.game.config.physics,D=this.systems.settings.physics,B=y(x(D,"matter",{}),x(N,"matter",{}));return B},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},set60Hz:function(){return this.world.getDelta=this.world.update60Hz,this.world.autoUpdate=!0,this},set30Hz:function(){return this.world.getDelta=this.world.update30Hz,this.world.autoUpdate=!0,this},step:function(N,D){this.world.step(N,D)},containsPoint:function(N,D,B){N=this.getMatterBodies(N);var L=F.create(D,B),G=M.point(N,L);return G.length>0},intersectPoint:function(N,D,B){B=this.getMatterBodies(B);var L=F.create(N,D),G=[],O=M.point(B,L);return O.forEach(function(X){G.indexOf(X)===-1&&G.push(X)}),G},intersectRect:function(N,D,B,L,G,O){G===void 0&&(G=!1),O=this.getMatterBodies(O);var X={min:{x:N,y:D},max:{x:N+B,y:D+L}},z=[],V=M.region(O,X,G);return V.forEach(function(Y){z.indexOf(Y)===-1&&z.push(Y)}),z},intersectRay:function(N,D,B,L,G,O){G===void 0&&(G=1),O=this.getMatterBodies(O);for(var X=[],z=M.ray(O,F.create(N,D),F.create(B,L),G),V=0;V<z.length;V++)X.push(z[V].body);return X},intersectBody:function(N,D){D=this.getMatterBodies(D);for(var B=[],L=M.collides(N,D),G=0;G<L.length;G++){var O=L[G];O.bodyA===N?B.push(O.bodyB):B.push(O.bodyA)}return B},overlap:function(N,D,B,L,G){B===void 0&&(B=null),L===void 0&&(L=null),G===void 0&&(G=B),Array.isArray(N)||(N=[N]),N=this.getMatterBodies(N),D=this.getMatterBodies(D);for(var O=!1,X=0;X<N.length;X++)for(var z=N[X],V=M.collides(z,D),Y=0;Y<V.length;Y++){var W=V[Y],H=W.bodyA.id===z.id?W.bodyB:W.bodyA;if(!L||L.call(G,z,H,W)){if(O=!0,B)B.call(G,z,H,W);else if(!L)return!0}}return O},setCollisionCategory:function(N,D){return N=this.getMatterBodies(N),N.forEach(function(B){B.collisionFilter.category=D}),this},setCollisionGroup:function(N,D){return N=this.getMatterBodies(N),N.forEach(function(B){B.collisionFilter.group=D}),this},setCollidesWith:function(N,D){N=this.getMatterBodies(N);var B=0;if(!Array.isArray(D))B=D;else for(var L=0;L<D.length;L++)B|=D[L];return N.forEach(function(G){G.collisionFilter.mask=B}),this},getMatterBodies:function(N){if(!N)return this.world.getAllBodies();Array.isArray(N)||(N=[N]);for(var D=[],B=0;B<N.length;B++){var L=N[B].hasOwnProperty("body")?N[B].body:N[B];D.push(L)}return D},setVelocity:function(N,D,B){N=this.getMatterBodies(N);var L=this._tempVec2;return L.x=D,L.y=B,N.forEach(function(G){r.setVelocity(G,L)}),this},setVelocityX:function(N,D){N=this.getMatterBodies(N);var B=this._tempVec2;return B.x=D,N.forEach(function(L){B.y=L.velocity.y,r.setVelocity(L,B)}),this},setVelocityY:function(N,D){N=this.getMatterBodies(N);var B=this._tempVec2;return B.y=D,N.forEach(function(L){B.x=L.velocity.x,r.setVelocity(L,B)}),this},setAngularVelocity:function(N,D){return N=this.getMatterBodies(N),N.forEach(function(B){r.setAngularVelocity(B,D)}),this},applyForce:function(N,D){N=this.getMatterBodies(N);var B=this._tempVec2;return N.forEach(function(L){B.x=L.position.x,B.y=L.position.y,r.applyForce(L,B,D)}),this},applyForceFromPosition:function(N,D,B,L){N=this.getMatterBodies(N);var G=this._tempVec2;return N.forEach(function(O){L===void 0&&(L=O.angle),G.x=B*Math.cos(L),G.y=B*Math.sin(L),r.applyForce(O,D,G)}),this},applyForceFromAngle:function(N,D,B){N=this.getMatterBodies(N);var L=this._tempVec2;return N.forEach(function(G){B===void 0&&(B=G.angle),L.x=D*Math.cos(B),L.y=D*Math.sin(B),r.applyForce(G,{x:G.position.x,y:G.position.y},L)}),this},getConstraintLength:function(N){var D=N.pointA.x,B=N.pointA.y,L=N.pointB.x,G=N.pointB.y;return N.bodyA&&(D+=N.bodyA.position.x,B+=N.bodyA.position.y),N.bodyB&&(L+=N.bodyB.position.x,G+=N.bodyB.position.y),v(D,B,L,G)},alignBody:function(N,D,B,L){N=N.hasOwnProperty("body")?N.body:N;var G;switch(L){case d.TOP_LEFT:case d.LEFT_TOP:G=this.bodyBounds.getTopLeft(N,D,B);break;case d.TOP_CENTER:G=this.bodyBounds.getTopCenter(N,D,B);break;case d.TOP_RIGHT:case d.RIGHT_TOP:G=this.bodyBounds.getTopRight(N,D,B);break;case d.LEFT_CENTER:G=this.bodyBounds.getLeftCenter(N,D,B);break;case d.CENTER:G=this.bodyBounds.getCenter(N,D,B);break;case d.RIGHT_CENTER:G=this.bodyBounds.getRightCenter(N,D,B);break;case d.LEFT_BOTTOM:case d.BOTTOM_LEFT:G=this.bodyBounds.getBottomLeft(N,D,B);break;case d.BOTTOM_CENTER:G=this.bodyBounds.getBottomCenter(N,D,B);break;case d.BOTTOM_RIGHT:case d.RIGHT_BOTTOM:G=this.bodyBounds.getBottomRight(N,D,B);break}return G&&r.setPosition(N,G),this},shutdown:function(){var N=this.systems.events;this.world&&(N.off(A.UPDATE,this.world.update,this.world),N.off(A.POST_UPDATE,this.world.postUpdate,this.world)),N.off(A.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(A.START,this.start,this),this.scene=null,this.systems=null}});E.register("MatterPhysics",U,"matterPhysics"),p.exports=U}),34803:((p,S,t)=>{var d=t(9674),c=t(83419),h=t(31884),r=t(95643),n=t(95540),e=t(72699),s=t(68287),o=t(26099),i=new c({Extends:s,Mixins:[h.Bounce,h.Collision,h.Force,h.Friction,h.Gravity,h.Mass,h.Sensor,h.SetBody,h.Sleep,h.Static,h.Transform,h.Velocity,e],initialize:function(l,f,u,v,m,x){r.call(this,l.scene,"Sprite"),this._crop=this.resetCropObject(),this.anims=new d(this),this.setTexture(v,m),this.setSizeToFrame(),this.setOrigin(),this.world=l,this._tempVec2=new o(f,u);var g=n(x,"shape",null);g?this.setBody(g,x):this.setRectangle(this.width,this.height,x),this.setPosition(f,u),this.initPipeline(),this.initPostPipeline(!0)}});p.exports=i}),73834:((p,S,t)=>{var d=t(66280),c=t(22562),h=t(83419),r=t(31884),n=t(62644),e=t(50792),s=t(95540),o=t(97022),i=t(41598),a=new h({Extends:e,Mixins:[r.Bounce,r.Collision,r.Friction,r.Gravity,r.Mass,r.Sensor,r.Sleep,r.Static],initialize:function(f,u,v){e.call(this),this.tile=u,this.world=f,u.physics.matterBody&&u.physics.matterBody.destroy(),u.physics.matterBody=this;var m=s(v,"body",null),x=s(v,"addToWorld",!0);if(m)this.setBody(m,x);else{var g=u.getCollisionGroup(),y=s(g,"objects",[]);y.length>0?this.setFromTileCollision(v):this.setFromTileRectangle(v)}if(u.flipX||u.flipY){var T={x:u.getCenterX(),y:u.getCenterY()},C=u.flipX?-1:1,E=u.flipY?-1:1;c.scale(m,C,E,T)}},setFromTileRectangle:function(l){l===void 0&&(l={}),o(l,"isStatic")||(l.isStatic=!0),o(l,"addToWorld")||(l.addToWorld=!0);var f=this.tile.getBounds(),u=f.x+f.width/2,v=f.y+f.height/2,m=d.rectangle(u,v,f.width,f.height,l);return this.setBody(m,l.addToWorld),this},setFromTileCollision:function(l){l===void 0&&(l={}),o(l,"isStatic")||(l.isStatic=!0),o(l,"addToWorld")||(l.addToWorld=!0);for(var f=this.tile.tilemapLayer.scaleX,u=this.tile.tilemapLayer.scaleY,v=this.tile.getLeft(),m=this.tile.getTop(),x=this.tile.getCollisionGroup(),g=s(x,"objects",[]),y=[],T=0;T<g.length;T++){var C=g[T],E=v+C.x*f,M=m+C.y*u,P=C.width*f,A=C.height*u,R=null;if(C.rectangle)R=d.rectangle(E+P/2,M+A/2,P,A,l);else if(C.ellipse)R=d.circle(E+P/2,M+A/2,P/2,l);else if(C.polygon||C.polyline){var F=C.polygon?C.polygon:C.polyline,w=F.map(function(D){return{x:D.x*f,y:D.y*u}}),I=i.create(w),U=i.centre(I);E+=U.x,M+=U.y,R=d.fromVertices(E,M,I,l)}R&&y.push(R)}if(y.length===1)this.setBody(y[0],l.addToWorld);else if(y.length>1){var N=n(l);N.parts=y,this.setBody(c.create(N),N.addToWorld)}return this},setBody:function(l,f){return f===void 0&&(f=!0),this.body&&this.removeBody(),this.body=l,this.body.gameObject=this,f&&this.world.add(this.body),this},removeBody:function(){return this.body&&(this.world.remove(this.body),this.body.gameObject=void 0,this.body=void 0),this},destroy:function(){this.removeBody(),this.tile.physics.matterBody=void 0,this.removeAllListeners()}});p.exports=a}),19496:((p,S,t)=>{var d=t(66280),c=t(22562),h=t(53402),r=t(95540),n=t(41598),e={parseBody:function(s,o,i,a){a===void 0&&(a={});for(var l=r(i,"fixtures",[]),f=[],u=0;u<l.length;u++)for(var v=this.parseFixture(l[u]),m=0;m<v.length;m++)f.push(v[m]);var x=h.clone(i,!0);h.extend(x,a,!0),delete x.fixtures,delete x.type;var g=c.create(x);return c.setParts(g,f),c.setPosition(g,{x:s,y:o}),g},parseFixture:function(s){var o=h.extend({},!1,s);delete o.circle,delete o.vertices;var i;if(s.circle){var a=r(s.circle,"x"),l=r(s.circle,"y"),f=r(s.circle,"radius");i=[d.circle(a,l,f,o)]}else s.vertices&&(i=this.parseVertices(s.vertices,o));return i},parseVertices:function(s,o){o===void 0&&(o={});for(var i=[],a=0;a<s.length;a++)n.clockwiseSort(s[a]),i.push(c.create(h.extend({position:n.centre(s[a]),vertices:s[a]},o)));return d.flagCoincidentParts(i)}};p.exports=e}),85791:((p,S,t)=>{var d=t(66280),c=t(22562),h={parseBody:function(r,n,e,s){s===void 0&&(s={});var o,i=e.vertices;if(i.length===1)s.vertices=i[0],o=c.create(s),d.flagCoincidentParts(o.parts);else{for(var a=[],l=0;l<i.length;l++){var f=c.create({vertices:i[l]});a.push(f)}d.flagCoincidentParts(a),s.parts=a,o=c.create(s)}return o.label=e.label,c.setPosition(o,{x:r,y:n}),o}};p.exports=h}),98713:((p,S,t)=>{var d=t(15647),c=t(83419),h=t(69351),r=t(48140),n=t(81388),e=t(1121),s=t(8214),o=t(46975),i=t(53614),a=t(26099),l=t(41598),f=new c({initialize:function(v,m,x){x===void 0&&(x={});var g={label:"Pointer Constraint",pointA:{x:0,y:0},pointB:{x:0,y:0},length:.01,stiffness:.1,angularStiffness:1,collisionFilter:{category:1,mask:4294967295,group:0}};this.scene=v,this.world=m,this.camera=null,this.pointer=null,this.active=!0,this.position=new a,this.body=null,this.part=null,this.constraint=r.create(o(x,g)),this.world.on(e.BEFORE_UPDATE,this.update,this),v.sys.input.on(s.POINTER_DOWN,this.onDown,this),v.sys.input.on(s.POINTER_UP,this.onUp,this)},onDown:function(u){this.pointer||(this.pointer=u,this.camera=u.camera)},onUp:function(u){u===this.pointer&&(this.pointer=null)},getBody:function(u){var v=this.position,m=this.constraint;this.camera.getWorldPoint(u.x,u.y,v);for(var x=h.allBodies(this.world.localWorld),g=0;g<x.length;g++){var y=x[g];if(!y.ignorePointer&&d.contains(y.bounds,v)&&n.canCollide(y.collisionFilter,m.collisionFilter)&&this.hitTestBody(y,v))return this.world.emit(e.DRAG_START,y,this.part,this),!0}return!1},hitTestBody:function(u,v){for(var m=this.constraint,x=u.parts.length,g=x>1?1:0,y=g;y<x;y++){var T=u.parts[y];if(l.contains(T.vertices,v))return m.pointA=v,m.pointB={x:v.x-u.position.x,y:v.y-u.position.y},m.bodyB=u,m.angleB=u.angle,i.set(u,!1),this.part=T,this.body=u,!0}return!1},update:function(){var u=this.pointer,v=this.body;if(!this.active||!u){v&&this.stopDrag();return}if(!u.isDown&&v){this.stopDrag();return}else if(u.isDown){if(!this.camera||!v&&!this.getBody(u))return;v=this.body;var m=this.position,x=this.constraint;this.camera.getWorldPoint(u.x,u.y,m),x.pointA.x=m.x,x.pointA.y=m.y,i.set(v,!1),this.world.emit(e.DRAG,v,this)}},stopDrag:function(){var u=this.body,v=this.constraint;v.bodyB=null,v.pointB=null,this.pointer=null,this.body=null,this.part=null,u&&this.world.emit(e.DRAG_END,u,this)},destroy:function(){this.world.removeConstraint(this.constraint),this.pointer=null,this.constraint=null,this.body=null,this.part=null,this.world.off(e.BEFORE_UPDATE,this.update),this.scene.sys.input.off(s.POINTER_DOWN,this.onDown,this),this.scene.sys.input.off(s.POINTER_UP,this.onUp,this)}});p.exports=f}),68243:((p,S,t)=>{var d=t(66280),c=t(22562),h=t(83419),r=t(53402),n=t(69351),e=t(48413),s=t(50792),o=t(1121),i=t(95540),a=t(35154),l=t(22562),f=t(35810),u=t(73834),v=t(4372),m=t(13037),x=t(31725),g=new h({Extends:s,initialize:function(T,C){s.call(this),this.scene=T,this.engine=e.create(C),this.localWorld=this.engine.world;var E=a(C,"gravity",null);E?this.setGravity(E.x,E.y,E.scale):E===!1&&this.setGravity(0,0,0),this.walls={left:null,right:null,top:null,bottom:null},this.enabled=a(C,"enabled",!0),this.getDelta=a(C,"getDelta",this.update60Hz);var M=i(C,"runner",{}),P=i(M,"fps",!1);P&&(M.delta=1e3/i(M,"fps",60)),this.runner=m.create(M),this.autoUpdate=a(C,"autoUpdate",!0);var A=a(C,"debug",!1);if(this.drawDebug=typeof A=="object"?!0:A,this.debugGraphic,this.debugConfig={showAxes:i(A,"showAxes",!1),showAngleIndicator:i(A,"showAngleIndicator",!1),angleColor:i(A,"angleColor",15208787),showBroadphase:i(A,"showBroadphase",!1),broadphaseColor:i(A,"broadphaseColor",16757760),showBounds:i(A,"showBounds",!1),boundsColor:i(A,"boundsColor",16777215),showVelocity:i(A,"showVelocity",!1),velocityColor:i(A,"velocityColor",44783),showCollisions:i(A,"showCollisions",!1),collisionColor:i(A,"collisionColor",16094476),showSeparations:i(A,"showSeparations",!1),separationColor:i(A,"separationColor",16753920),showBody:i(A,"showBody",!0),showStaticBody:i(A,"showStaticBody",!0),showInternalEdges:i(A,"showInternalEdges",!1),renderFill:i(A,"renderFill",!1),renderLine:i(A,"renderLine",!0),fillColor:i(A,"fillColor",1075465),fillOpacity:i(A,"fillOpacity",1),lineColor:i(A,"lineColor",2678297),lineOpacity:i(A,"lineOpacity",1),lineThickness:i(A,"lineThickness",1),staticFillColor:i(A,"staticFillColor",857979),staticLineColor:i(A,"staticLineColor",1255396),showSleeping:i(A,"showSleeping",!1),staticBodySleepOpacity:i(A,"staticBodySleepOpacity",.7),sleepFillColor:i(A,"sleepFillColor",4605510),sleepLineColor:i(A,"sleepLineColor",10066585),showSensors:i(A,"showSensors",!0),sensorFillColor:i(A,"sensorFillColor",857979),sensorLineColor:i(A,"sensorLineColor",1255396),showPositions:i(A,"showPositions",!0),positionSize:i(A,"positionSize",4),positionColor:i(A,"positionColor",14697178),showJoint:i(A,"showJoint",!0),jointColor:i(A,"jointColor",14737474),jointLineOpacity:i(A,"jointLineOpacity",1),jointLineThickness:i(A,"jointLineThickness",2),pinSize:i(A,"pinSize",4),pinColor:i(A,"pinColor",4382944),springColor:i(A,"springColor",14697184),anchorColor:i(A,"anchorColor",15724527),anchorSize:i(A,"anchorSize",4),showConvexHulls:i(A,"showConvexHulls",!1),hullColor:i(A,"hullColor",14091216)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy(),i(C,"setBounds",!1)){var R=C.setBounds;if(typeof R=="boolean")this.setBounds();else{var F=i(R,"x",0),w=i(R,"y",0),I=i(R,"width",T.sys.scale.width),U=i(R,"height",T.sys.scale.height),N=i(R,"thickness",64),D=i(R,"left",!0),B=i(R,"right",!0),L=i(R,"top",!0),G=i(R,"bottom",!0);this.setBounds(F,w,I,U,N,D,B,L,G)}}},setCompositeRenderStyle:function(y){var T=y.bodies,C=y.constraints,E=y.composites,M,P,A;for(M=0;M<T.length;M++)P=T[M],A=P.render,this.setBodyRenderStyle(P,A.lineColor,A.lineOpacity,A.lineThickness,A.fillColor,A.fillOpacity);for(M=0;M<C.length;M++)P=C[M],A=P.render,this.setConstraintRenderStyle(P,A.lineColor,A.lineOpacity,A.lineThickness,A.pinSize,A.anchorColor,A.anchorSize);for(M=0;M<E.length;M++)P=E[M],this.setCompositeRenderStyle(P);return this},setBodyRenderStyle:function(y,T,C,E,M,P){var A=y.render,R=this.debugConfig;return A?(T==null&&(T=y.isStatic?R.staticLineColor:R.lineColor),C==null&&(C=R.lineOpacity),E==null&&(E=R.lineThickness),M==null&&(M=y.isStatic?R.staticFillColor:R.fillColor),P==null&&(P=R.fillOpacity),T!==!1&&(A.lineColor=T),C!==!1&&(A.lineOpacity=C),E!==!1&&(A.lineThickness=E),M!==!1&&(A.fillColor=M),P!==!1&&(A.fillOpacity=P),this):this},setConstraintRenderStyle:function(y,T,C,E,M,P,A){var R=y.render,F=this.debugConfig;if(!R)return this;if(T==null){var w=R.type;w==="line"?T=F.jointColor:w==="pin"?T=F.pinColor:w==="spring"&&(T=F.springColor)}return C==null&&(C=F.jointLineOpacity),E==null&&(E=F.jointLineThickness),M==null&&(M=F.pinSize),P==null&&(P=F.anchorColor),A==null&&(A=F.anchorSize),T!==!1&&(R.lineColor=T),C!==!1&&(R.lineOpacity=C),E!==!1&&(R.lineThickness=E),M!==!1&&(R.pinSize=M),P!==!1&&(R.anchorColor=P),A!==!1&&(R.anchorSize=A),this},setEventsProxy:function(){var y=this,T=this.engine,C=this.localWorld;this.drawDebug&&(f.on(C,"compositeModified",function(E){y.setCompositeRenderStyle(E)}),f.on(C,"beforeAdd",function(E){for(var M=[].concat(E.object),P=0;P<M.length;P++){var A=M[P],R=A.render;A.type==="body"?y.setBodyRenderStyle(A,R.lineColor,R.lineOpacity,R.lineThickness,R.fillColor,R.fillOpacity):A.type==="composite"?y.setCompositeRenderStyle(A):A.type==="constraint"&&y.setConstraintRenderStyle(A,R.lineColor,R.lineOpacity,R.lineThickness,R.pinSize,R.anchorColor,R.anchorSize)}})),f.on(C,"beforeAdd",function(E){y.emit(o.BEFORE_ADD,E)}),f.on(C,"afterAdd",function(E){y.emit(o.AFTER_ADD,E)}),f.on(C,"beforeRemove",function(E){y.emit(o.BEFORE_REMOVE,E)}),f.on(C,"afterRemove",function(E){y.emit(o.AFTER_REMOVE,E)}),f.on(T,"beforeUpdate",function(E){y.emit(o.BEFORE_UPDATE,E)}),f.on(T,"afterUpdate",function(E){y.emit(o.AFTER_UPDATE,E)}),f.on(T,"collisionStart",function(E){var M=E.pairs,P,A;M.length>0&&M.map(function(R){P=R.bodyA,A=R.bodyB,P.gameObject&&P.gameObject.emit("collide",P,A,R),A.gameObject&&A.gameObject.emit("collide",A,P,R),f.trigger(P,"onCollide",{pair:R}),f.trigger(A,"onCollide",{pair:R}),P.onCollideCallback&&P.onCollideCallback(R),A.onCollideCallback&&A.onCollideCallback(R),P.onCollideWith[A.id]&&P.onCollideWith[A.id](A,R),A.onCollideWith[P.id]&&A.onCollideWith[P.id](P,R)}),y.emit(o.COLLISION_START,E,P,A)}),f.on(T,"collisionActive",function(E){var M=E.pairs,P,A;M.length>0&&M.map(function(R){P=R.bodyA,A=R.bodyB,P.gameObject&&P.gameObject.emit("collideActive",P,A,R),A.gameObject&&A.gameObject.emit("collideActive",A,P,R),f.trigger(P,"onCollideActive",{pair:R}),f.trigger(A,"onCollideActive",{pair:R}),P.onCollideActiveCallback&&P.onCollideActiveCallback(R),A.onCollideActiveCallback&&A.onCollideActiveCallback(R)}),y.emit(o.COLLISION_ACTIVE,E,P,A)}),f.on(T,"collisionEnd",function(E){var M=E.pairs,P,A;M.length>0&&M.map(function(R){P=R.bodyA,A=R.bodyB,P.gameObject&&P.gameObject.emit("collideEnd",P,A,R),A.gameObject&&A.gameObject.emit("collideEnd",A,P,R),f.trigger(P,"onCollideEnd",{pair:R}),f.trigger(A,"onCollideEnd",{pair:R}),P.onCollideEndCallback&&P.onCollideEndCallback(R),A.onCollideEndCallback&&A.onCollideEndCallback(R)}),y.emit(o.COLLISION_END,E,P,A)})},setBounds:function(y,T,C,E,M,P,A,R,F){return y===void 0&&(y=0),T===void 0&&(T=0),C===void 0&&(C=this.scene.sys.scale.width),E===void 0&&(E=this.scene.sys.scale.height),M===void 0&&(M=64),P===void 0&&(P=!0),A===void 0&&(A=!0),R===void 0&&(R=!0),F===void 0&&(F=!0),this.updateWall(P,"left",y-M,T-M,M,E+M*2),this.updateWall(A,"right",y+C,T-M,M,E+M*2),this.updateWall(R,"top",y,T-M,C,M),this.updateWall(F,"bottom",y,T+E,C,M),this},updateWall:function(y,T,C,E,M,P){var A=this.walls[T];y?(A&&v.remove(this.localWorld,A),C+=M/2,E+=P/2,this.walls[T]=this.create(C,E,M,P,{isStatic:!0,friction:0,frictionStatic:0})):(A&&v.remove(this.localWorld,A),this.walls[T]=null)},createDebugGraphic:function(){var y=this.scene.sys.add.graphics({x:0,y:0});return y.setDepth(Number.MAX_VALUE),this.debugGraphic=y,this.drawDebug=!0,y},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(y,T,C){return y===void 0&&(y=0),T===void 0&&(T=1),C===void 0&&(C=.001),this.localWorld.gravity.x=y,this.localWorld.gravity.y=T,this.localWorld.gravity.scale=C,this},create:function(y,T,C,E,M){var P=d.rectangle(y,T,C,E,M);return v.add(this.localWorld,P),P},add:function(y){return v.add(this.localWorld,y),this},remove:function(y,T){Array.isArray(y)||(y=[y]);for(var C=0;C<y.length;C++){var E=y[C],M=E.body?E.body:E;n.remove(this.localWorld,M,T)}return this},removeConstraint:function(y,T){return n.remove(this.localWorld,y,T),this},convertTilemapLayer:function(y,T){var C=y.layer,E=y.getTilesWithin(0,0,C.width,C.height,{isColliding:!0});return this.convertTiles(E,T),this},convertTiles:function(y,T){if(y.length===0)return this;for(var C=0;C<y.length;C++)new u(this,y[C],T);return this},nextGroup:function(y){return l.nextGroup(y)},nextCategory:function(){return l.nextCategory()},pause:function(){return this.enabled=!1,this.emit(o.PAUSE),this},resume:function(){return this.enabled=!0,this.runner.timeLastTick=r.now(),this.emit(o.RESUME),this},update:function(y){if(!(!this.enabled||!this.autoUpdate)){var T=this.engine,C=this.runner,E=r.now(),M=C.delta,P=0,A=y-C.timeLastTick;if((!A||!C.timeLastTick||A>Math.max(m._maxFrameDelta,C.maxFrameTime))&&(A=C.frameDelta||m._frameDeltaFallback),C.frameDeltaSmoothing){C.frameDeltaHistory.push(A),C.frameDeltaHistory=C.frameDeltaHistory.slice(-C.frameDeltaHistorySize);var R=C.frameDeltaHistory.slice(0).sort(),F=C.frameDeltaHistory.slice(R.length*m._smoothingLowerBound,R.length*m._smoothingUpperBound),w=m._mean(F);A=w||A}C.frameDeltaSnapping&&(A=1e3/Math.round(1e3/A)),C.frameDelta=A,C.timeLastTick=y,C.timeBuffer+=C.frameDelta,C.timeBuffer=r.clamp(C.timeBuffer,0,C.frameDelta+M*m._timeBufferMargin),C.lastUpdatesDeferred=0;for(var I=C.maxUpdates||Math.ceil(C.maxFrameTime/M),U=r.now();M>0&&C.timeBuffer>=M*m._timeBufferMargin;){e.update(T,M),C.timeBuffer-=M,P+=1;var N=r.now()-E,D=r.now()-U,B=N+m._elapsedNextEstimate*D/P;if(P>=I||B>C.maxFrameTime){C.lastUpdatesDeferred=Math.round(Math.max(0,C.timeBuffer/M-m._timeBufferMargin));break}}}},step:function(y){e.update(this.engine,y)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(y){var T=y.hasOwnProperty("body")?y.body:y;return n.get(this.localWorld,T.id,T.type)!==null},getAllBodies:function(){return n.allBodies(this.localWorld)},getAllConstraints:function(){return n.allConstraints(this.localWorld)},getAllComposites:function(){return n.allComposites(this.localWorld)},postUpdate:function(){if(this.drawDebug){var y=this.debugConfig,T=this.engine,C=this.debugGraphic,E=n.allBodies(this.localWorld);this.debugGraphic.clear(),y.showBroadphase&&T.broadphase.controller&&this.renderGrid(T.broadphase,C,y.broadphaseColor,.5),y.showBounds&&this.renderBodyBounds(E,C,y.boundsColor,.5),(y.showBody||y.showStaticBody)&&this.renderBodies(E),y.showJoint&&this.renderJoints(),(y.showAxes||y.showAngleIndicator)&&this.renderBodyAxes(E,C,y.showAxes,y.angleColor,.5),y.showVelocity&&this.renderBodyVelocity(E,C,y.velocityColor,1,2),y.showSeparations&&this.renderSeparations(T.pairs.list,C,y.separationColor),y.showCollisions&&this.renderCollisions(T.pairs.list,C,y.collisionColor)}},renderGrid:function(y,T,C,E){T.lineStyle(1,C,E);for(var M=r.keys(y.buckets),P=0;P<M.length;P++){var A=M[P];if(!(y.buckets[A].length<2)){var R=A.split(/C|R/);T.strokeRect(parseInt(R[1],10)*y.bucketWidth,parseInt(R[2],10)*y.bucketHeight,y.bucketWidth,y.bucketHeight)}}return this},renderSeparations:function(y,T,C){T.lineStyle(1,C,1);for(var E=0;E<y.length;E++){var M=y[E];if(M.isActive){var P=M.collision,A=P.bodyA,R=P.bodyB,F=A.position,w=R.position,I=P.penetration,U=!A.isStatic&&!R.isStatic?4:1;R.isStatic&&(U=0),T.lineBetween(w.x,w.y,w.x-I.x*U,w.y-I.y*U),U=!A.isStatic&&!R.isStatic?4:1,A.isStatic&&(U=0),T.lineBetween(F.x,F.y,F.x-I.x*U,F.y-I.y*U)}}return this},renderCollisions:function(y,T,C){T.lineStyle(1,C,.5),T.fillStyle(C,1);var E,M;for(E=0;E<y.length;E++)if(M=y[E],!!M.isActive)for(var P=0;P<M.contactCount;P++){var A=M.contacts[P],R=A.vertex;R&&T.fillRect(R.x-2,R.y-2,5,5)}for(E=0;E<y.length;E++)if(M=y[E],!!M.isActive){var F=M.collision,w=M.contacts;if(M.contactCount>0){var I=w[0].vertex.x,U=w[0].vertex.y;M.contactCount===2&&(I=(w[0].vertex.x+w[1].vertex.x)/2,U=(w[0].vertex.y+w[1].vertex.y)/2),F.bodyB===F.supports[0].body||F.bodyA.isStatic?T.lineBetween(I-F.normal.x*8,U-F.normal.y*8,I,U):T.lineBetween(I+F.normal.x*8,U+F.normal.y*8,I,U)}}return this},renderBodyBounds:function(y,T,C,E){T.lineStyle(1,C,E);for(var M=0;M<y.length;M++){var P=y[M];if(P.render.visible){var A=P.bounds;if(A)T.strokeRect(A.min.x,A.min.y,A.max.x-A.min.x,A.max.y-A.min.y);else for(var R=P.parts,F=R.length>1?1:0;F<R.length;F++){var w=R[F];T.strokeRect(w.bounds.min.x,w.bounds.min.y,w.bounds.max.x-w.bounds.min.x,w.bounds.max.y-w.bounds.min.y)}}}return this},renderBodyAxes:function(y,T,C,E,M){T.lineStyle(1,E,M);for(var P=0;P<y.length;P++){var A=y[P],R=A.parts;if(A.render.visible){var F,w,I;if(C)for(w=R.length>1?1:0;w<R.length;w++)for(F=R[w],I=0;I<F.axes.length;I++){var U=F.axes[I];T.lineBetween(F.position.x,F.position.y,F.position.x+U.x*20,F.position.y+U.y*20)}else for(w=R.length>1?1:0;w<R.length;w++)for(F=R[w],I=0;I<F.axes.length;I++)T.lineBetween(F.position.x,F.position.y,(F.vertices[0].x+F.vertices[F.vertices.length-1].x)/2,(F.vertices[0].y+F.vertices[F.vertices.length-1].y)/2)}}return this},renderBodyVelocity:function(y,T,C,E,M){T.lineStyle(M,C,E);for(var P=0;P<y.length;P++){var A=y[P];A.render.visible&&T.lineBetween(A.position.x,A.position.y,A.position.x+(A.position.x-A.positionPrev.x)*2,A.position.y+(A.position.y-A.positionPrev.y)*2)}return this},renderBodies:function(y){for(var T=this.debugGraphic,C=this.debugConfig,E=C.showBody,M=C.showStaticBody,P=C.showSleeping,A=C.showInternalEdges,R=C.showConvexHulls,F=C.renderFill,w=C.renderLine,I=C.staticBodySleepOpacity,U=C.sleepFillColor,N=C.sleepLineColor,D=C.hullColor,B=0;B<y.length;B++){var L=y[B];if(L.render.visible&&!(!M&&L.isStatic||!E&&!L.isStatic)){var G=L.render.lineColor,O=L.render.lineOpacity,X=L.render.lineThickness,z=L.render.fillColor,V=L.render.fillOpacity;P&&L.isSleeping&&(L.isStatic?(O*=I,V*=I):(G=N,z=U)),F||(z=null),w||(G=null),this.renderBody(L,T,A,G,O,X,z,V);var Y=L.parts.length;R&&Y>1&&this.renderConvexHull(L,T,D,X)}}},renderBody:function(y,T,C,E,M,P,A,R){E===void 0&&(E=null),M===void 0&&(M=null),P===void 0&&(P=1),A===void 0&&(A=null),R===void 0&&(R=null);for(var F=this.debugConfig,w=F.sensorFillColor,I=F.sensorLineColor,U=y.parts,N=U.length,D=N>1?1:0;D<N;D++){var B=U[D],L=B.render,G=L.opacity;if(!(!L.visible||G===0||B.isSensor&&!F.showSensors)){var O=B.circleRadius;if(T.beginPath(),B.isSensor?(A!==null&&T.fillStyle(w,R*G),E!==null&&T.lineStyle(P,I,M*G)):(A!==null&&T.fillStyle(A,R*G),E!==null&&T.lineStyle(P,E,M*G)),O)T.arc(B.position.x,B.position.y,O,0,2*Math.PI);else{var X=B.vertices,z=X.length;T.moveTo(X[0].x,X[0].y);for(var V=1;V<z;V++){var Y=X[V];if(!X[V-1].isInternal||C?T.lineTo(Y.x,Y.y):T.moveTo(Y.x,Y.y),V<z&&Y.isInternal&&!C){var W=(V+1)%z;T.moveTo(X[W].x,X[W].y)}}T.closePath()}A!==null&&T.fillPath(),E!==null&&T.strokePath()}}if(F.showPositions&&!y.isStatic){var H=y.position.x,K=y.position.y,b=Math.ceil(F.positionSize/2);T.fillStyle(F.positionColor,1),T.fillRect(H-b,K-b,F.positionSize,F.positionSize)}return this},renderConvexHull:function(y,T,C,E){E===void 0&&(E=1);var M=y.parts,P=M.length;if(P>1){var A=y.vertices;T.lineStyle(E,C),T.beginPath(),T.moveTo(A[0].x,A[0].y);for(var R=1;R<A.length;R++)T.lineTo(A[R].x,A[R].y);T.lineTo(A[0].x,A[0].y),T.strokePath()}return this},renderJoints:function(){for(var y=this.debugGraphic,T=n.allConstraints(this.localWorld),C=0;C<T.length;C++){var E=T[C].render,M=E.lineColor,P=E.lineOpacity,A=E.lineThickness,R=E.pinSize,F=E.anchorColor,w=E.anchorSize;this.renderConstraint(T[C],y,M,P,A,R,F,w)}},renderConstraint:function(y,T,C,E,M,P,A,R){var F=y.render;if(!F.visible||!y.pointA||!y.pointB)return this;T.lineStyle(M,C,E);var w=y.bodyA,I=y.bodyB,U,N;if(w?U=x.add(w.position,y.pointA):U=y.pointA,F.type==="pin")T.strokeCircle(U.x,U.y,P);else{if(I?N=x.add(I.position,y.pointB):N=y.pointB,T.beginPath(),T.moveTo(U.x,U.y),F.type==="spring")for(var D=x.sub(N,U),B=x.perp(x.normalise(D)),L=Math.ceil(r.clamp(y.length/5,12,20)),G,O=1;O<L;O+=1)G=O%2===0?1:-1,T.lineTo(U.x+D.x*(O/L)+B.x*G*4,U.y+D.y*(O/L)+B.y*G*4);T.lineTo(N.x,N.y)}return T.strokePath(),F.anchors&&R>0&&(T.fillStyle(A),T.fillCircle(U.x,U.y,R),T.fillCircle(N.x,N.y,R)),this},resetCollisionIDs:function(){return c._nextCollidingGroupId=1,c._nextNonCollidingGroupId=-1,c._nextCategory=1,this},shutdown:function(){f.off(this.engine),this.removeAllListeners(),v.clear(this.localWorld,!1),e.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});p.exports=g}),70410:(p=>{var S={setBounce:function(t){return this.body.restitution=t,this}};p.exports=S}),66968:(p=>{var S={setCollisionCategory:function(t){return this.body.collisionFilter.category=t,this},setCollisionGroup:function(t){return this.body.collisionFilter.group=t,this},setCollidesWith:function(t){var d=0;if(!Array.isArray(t))d=t;else for(var c=0;c<t.length;c++)d|=t[c];return this.body.collisionFilter.mask=d,this},setOnCollide:function(t){return this.body.onCollideCallback=t,this},setOnCollideEnd:function(t){return this.body.onCollideEndCallback=t,this},setOnCollideActive:function(t){return this.body.onCollideActiveCallback=t,this},setOnCollideWith:function(t,d){Array.isArray(t)||(t=[t]);for(var c=0;c<t.length;c++){var h=t[c].hasOwnProperty("body")?t[c].body:t[c];this.body.setOnCollideWith(h,d)}return this}};p.exports=S}),51607:((p,S,t)=>{var d=t(22562),c={applyForce:function(h){return this._tempVec2.set(this.body.position.x,this.body.position.y),d.applyForce(this.body,this._tempVec2,h),this},applyForceFrom:function(h,r){return d.applyForce(this.body,h,r),this},thrust:function(h){var r=this.body.angle;return this._tempVec2.set(h*Math.cos(r),h*Math.sin(r)),d.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustLeft:function(h){var r=this.body.angle-Math.PI/2;return this._tempVec2.set(h*Math.cos(r),h*Math.sin(r)),d.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustRight:function(h){var r=this.body.angle+Math.PI/2;return this._tempVec2.set(h*Math.cos(r),h*Math.sin(r)),d.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustBack:function(h){var r=this.body.angle-Math.PI;return this._tempVec2.set(h*Math.cos(r),h*Math.sin(r)),d.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this}};p.exports=c}),5436:(p=>{var S={setFriction:function(t,d,c){return this.body.friction=t,d!==void 0&&(this.body.frictionAir=d),c!==void 0&&(this.body.frictionStatic=c),this},setFrictionAir:function(t){return this.body.frictionAir=t,this},setFrictionStatic:function(t){return this.body.frictionStatic=t,this}};p.exports=S}),39858:(p=>{var S={setIgnoreGravity:function(t){return this.body.ignoreGravity=t,this}};p.exports=S}),37302:((p,S,t)=>{var d=t(22562),c=t(26099),h={setMass:function(r){return d.setMass(this.body,r),this},setDensity:function(r){return d.setDensity(this.body,r),this},centerOfMass:{get:function(){return new c(this.body.centerOfMass.x,this.body.centerOfMass.y)}}};p.exports=h}),39132:(p=>{var S={setSensor:function(t){return this.body.isSensor=t,this},isSensor:function(){return this.body.isSensor}};p.exports=S}),57772:((p,S,t)=>{var d=t(66280),c=t(22562),h=t(43855),r=t(95540),n=t(19496),e=t(85791),s=t(41598),o={setRectangle:function(i,a,l){return this.setBody({type:"rectangle",width:i,height:a},l)},setCircle:function(i,a){return this.setBody({type:"circle",radius:i},a)},setPolygon:function(i,a,l){return this.setBody({type:"polygon",sides:a,radius:i},l)},setTrapezoid:function(i,a,l,f){return this.setBody({type:"trapezoid",width:i,height:a,slope:l},f)},setExistingBody:function(i,a){a===void 0&&(a=!0),this.body&&this.world.remove(this.body,!0),this.body=i;for(var l=0;l<i.parts.length;l++)i.parts[l].gameObject=this;var f=this;if(i.destroy=function(){f.world.remove(f.body,!0),f.body.gameObject=null},a&&(this.world.has(i)&&this.world.remove(i,!0),this.world.add(i)),this._originComponent){var u=i.render.sprite.xOffset,v=i.render.sprite.yOffset,m=i.centerOfMass.x,x=i.centerOfMass.y;if(h(m,.5)&&h(x,.5))this.setOrigin(u+.5,v+.5);else{var g=i.centerOffset.x,y=i.centerOffset.y;this.setOrigin(u+g/this.displayWidth,v+y/this.displayHeight)}}return this},setBody:function(i,a){if(!i)return this;var l;typeof i=="string"&&(i={type:i});var f=r(i,"type","rectangle"),u=r(i,"x",this._tempVec2.x),v=r(i,"y",this._tempVec2.y),m=r(i,"width",this.width),x=r(i,"height",this.height);switch(f){case"rectangle":l=d.rectangle(u,v,m,x,a);break;case"circle":var g=r(i,"radius",Math.max(m,x)/2),y=r(i,"maxSides",25);l=d.circle(u,v,g,a,y);break;case"trapezoid":var T=r(i,"slope",.5);l=d.trapezoid(u,v,m,x,T,a);break;case"polygon":var C=r(i,"sides",5),E=r(i,"radius",Math.max(m,x)/2);l=d.polygon(u,v,C,E,a);break;case"fromVertices":case"fromVerts":var M=r(i,"verts",null);if(M)if(typeof M=="string"&&(M=s.fromPath(M)),this.body&&!this.body.hasOwnProperty("temp"))c.setVertices(this.body,M),l=this.body;else{var P=r(i,"flagInternal",!1),A=r(i,"removeCollinear",.01),R=r(i,"minimumArea",10);l=d.fromVertices(u,v,M,a,P,A,R)}break;case"fromPhysicsEditor":l=n.parseBody(u,v,i,a);break;case"fromPhysicsTracer":l=e.parseBody(u,v,i,a);break}return l&&this.setExistingBody(l,i.addToWorld),this}};p.exports=o}),38083:((p,S,t)=>{var d=t(1121),c=t(53614),h=t(35810),r={setToSleep:function(){return c.set(this.body,!0),this},setAwake:function(){return c.set(this.body,!1),this},setSleepThreshold:function(n){return n===void 0&&(n=60),this.body.sleepThreshold=n,this},setSleepEvents:function(n,e){return this.setSleepStartEvent(n),this.setSleepEndEvent(e),this},setSleepStartEvent:function(n){if(n){var e=this.world;h.on(this.body,"sleepStart",function(s){e.emit(d.SLEEP_START,s,this)})}else h.off(this.body,"sleepStart");return this},setSleepEndEvent:function(n){if(n){var e=this.world;h.on(this.body,"sleepEnd",function(s){e.emit(d.SLEEP_END,s,this)})}else h.off(this.body,"sleepEnd");return this}};p.exports=r}),90556:((p,S,t)=>{var d=t(22562),c={setStatic:function(h){return d.setStatic(this.body,h),this},isStatic:function(){return this.body.isStatic}};p.exports=c}),85436:((p,S,t)=>{var d=t(22562),c=t(36383),h=t(86554),r=t(30954),n=4,e={x:{get:function(){return this.body.position.x},set:function(s){this._tempVec2.set(s,this.y),d.setPosition(this.body,this._tempVec2)}},y:{get:function(){return this.body.position.y},set:function(s){this._tempVec2.set(this.x,s),d.setPosition(this.body,this._tempVec2)}},scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(s){this.setScale(s,s)}},scaleX:{get:function(){return this._scaleX},set:function(s){var o=1/this._scaleX,i=1/this._scaleY;this._scaleX=s,this._scaleX===0?this.renderFlags&=~n:this.renderFlags|=n,d.scale(this.body,o,i),d.scale(this.body,s,this._scaleY)}},scaleY:{get:function(){return this._scaleY},set:function(s){var o=1/this._scaleX,i=1/this._scaleY;this._scaleY=s,this._scaleY===0?this.renderFlags&=~n:this.renderFlags|=n,d.scale(this.body,o,i),d.scale(this.body,this._scaleX,s)}},angle:{get:function(){return r(this.body.angle*c.RAD_TO_DEG)},set:function(s){this.rotation=r(s)*c.DEG_TO_RAD}},rotation:{get:function(){return this.body.angle},set:function(s){this._rotation=h(s),d.setAngle(this.body,this._rotation)}},setPosition:function(s,o){return s===void 0&&(s=0),o===void 0&&(o=s),this._tempVec2.set(s,o),d.setPosition(this.body,this._tempVec2),this},setRotation:function(s){return s===void 0&&(s=0),this._rotation=h(s),d.setAngle(this.body,s),this},setFixedRotation:function(){return d.setInertia(this.body,1/0),this},setAngle:function(s){return s===void 0&&(s=0),this.angle=s,d.setAngle(this.body,this.rotation),this},setScale:function(s,o,i){s===void 0&&(s=1),o===void 0&&(o=s);var a=1/this._scaleX,l=1/this._scaleY;return this._scaleX=s,this._scaleY=o,d.scale(this.body,a,l,i),d.scale(this.body,s,o,i),this}};p.exports=e}),42081:((p,S,t)=>{var d=t(22562),c={setVelocityX:function(h){return this._tempVec2.set(h,this.body.velocity.y),d.setVelocity(this.body,this._tempVec2),this},setVelocityY:function(h){return this._tempVec2.set(this.body.velocity.x,h),d.setVelocity(this.body,this._tempVec2),this},setVelocity:function(h,r){return this._tempVec2.set(h,r),d.setVelocity(this.body,this._tempVec2),this},getVelocity:function(){return d.getVelocity(this.body)},setAngularVelocity:function(h){return d.setAngularVelocity(this.body,h),this},getAngularVelocity:function(){return d.getAngularVelocity(this.body)},setAngularSpeed:function(h){return d.setAngularSpeed(this.body,h),this},getAngularSpeed:function(){return d.getAngularSpeed(this.body)}};p.exports=c}),31884:((p,S,t)=>{p.exports={Bounce:t(70410),Collision:t(66968),Force:t(51607),Friction:t(5436),Gravity:t(39858),Mass:t(37302),Sensor:t(39132),SetBody:t(57772),Sleep:t(38083),Static:t(90556),Transform:t(85436),Velocity:t(42081)}}),85608:(p=>{p.exports="afteradd"}),1213:(p=>{p.exports="afterremove"}),25968:(p=>{p.exports="afterupdate"}),67205:(p=>{p.exports="beforeadd"}),39438:(p=>{p.exports="beforeremove"}),44823:(p=>{p.exports="beforeupdate"}),92593:(p=>{p.exports="collisionactive"}),60128:(p=>{p.exports="collisionend"}),76861:(p=>{p.exports="collisionstart"}),92362:(p=>{p.exports="dragend"}),76408:(p=>{p.exports="drag"}),93971:(p=>{p.exports="dragstart"}),5656:(p=>{p.exports="pause"}),47861:(p=>{p.exports="resume"}),79099:(p=>{p.exports="sleepend"}),35906:(p=>{p.exports="sleepstart"}),1121:((p,S,t)=>{p.exports={AFTER_ADD:t(85608),AFTER_REMOVE:t(1213),AFTER_UPDATE:t(25968),BEFORE_ADD:t(67205),BEFORE_REMOVE:t(39438),BEFORE_UPDATE:t(44823),COLLISION_ACTIVE:t(92593),COLLISION_END:t(60128),COLLISION_START:t(76861),DRAG_END:t(92362),DRAG:t(76408),DRAG_START:t(93971),PAUSE:t(5656),RESUME:t(47861),SLEEP_END:t(79099),SLEEP_START:t(35906)}}),3875:((p,S,t)=>{p.exports={BodyBounds:t(68174),Components:t(31884),Events:t(1121),Factory:t(28137),MatterGameObject:t(75803),Image:t(23181),Matter:t(19933),MatterPhysics:t(42045),PolyDecomp:t(55973),Sprite:t(34803),TileBody:t(73834),PhysicsEditorParser:t(19496),PhysicsJSONParser:t(85791),PointerConstraint:t(98713),World:t(68243)}}),22562:((p,S,t)=>{var d={};p.exports=d;var c=t(41598),h=t(31725),r=t(53614),n=t(53402),e=t(15647),s=t(66615);(function(){d._timeCorrection=!0,d._inertiaScale=4,d._nextCollidingGroupId=1,d._nextNonCollidingGroupId=-1,d._nextCategory=1,d._baseDelta=16.666666666666668,d.create=function(i){var a={id:n.nextId(),type:"body",label:"Body",parts:[],plugin:{},attractors:i.attractors||[],wrapBounds:null,angle:0,vertices:null,position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},constraintImpulse:{x:0,y:0,angle:0},totalContacts:0,speed:0,angularSpeed:0,velocity:{x:0,y:0},angularVelocity:0,isSensor:!1,isStatic:!1,isSleeping:!1,motion:0,sleepThreshold:60,density:.001,restitution:0,friction:.1,frictionStatic:.5,frictionAir:.01,collisionFilter:{category:1,mask:4294967295,group:0},slop:.05,timeScale:1,events:null,bounds:null,chamfer:null,circleRadius:0,positionPrev:null,anglePrev:0,parent:null,axes:null,area:0,mass:0,inverseMass:0,inertia:0,deltaTime:16.666666666666668,inverseInertia:0,_original:null,render:{visible:!0,opacity:1,sprite:{xOffset:0,yOffset:0},fillColor:null,fillOpacity:null,lineColor:null,lineOpacity:null,lineThickness:null},gameObject:null,scale:{x:1,y:1},centerOfMass:{x:0,y:0},centerOffset:{x:0,y:0},gravityScale:{x:1,y:1},ignoreGravity:!1,ignorePointer:!1,onCollideCallback:null,onCollideEndCallback:null,onCollideActiveCallback:null,onCollideWith:{}};!i.hasOwnProperty("position")&&i.hasOwnProperty("vertices")?i.position=c.centre(i.vertices):i.hasOwnProperty("vertices")||(a.vertices=c.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var l=n.extend(a,i);return o(l,i),l.setOnCollideWith=function(f,u){return u?this.onCollideWith[f.id]=u:delete this.onCollideWith[f.id],this},l},d.nextGroup=function(i){return i?d._nextNonCollidingGroupId--:d._nextCollidingGroupId++},d.nextCategory=function(){return d._nextCategory=d._nextCategory<<1,d._nextCategory};var o=function(i,a){if(a=a||{},d.set(i,{bounds:i.bounds||e.create(i.vertices),positionPrev:i.positionPrev||h.clone(i.position),anglePrev:i.anglePrev||i.angle,vertices:i.vertices,parts:i.parts||[i],isStatic:i.isStatic,isSleeping:i.isSleeping,parent:i.parent||i}),c.rotate(i.vertices,i.angle,i.position),s.rotate(i.axes,i.angle),e.update(i.bounds,i.vertices,i.velocity),d.set(i,{axes:a.axes||i.axes,area:a.area||i.area,mass:a.mass||i.mass,inertia:a.inertia||i.inertia}),i.parts.length===1){var l=i.bounds,f=i.centerOfMass,u=i.centerOffset,v=l.max.x-l.min.x,m=l.max.y-l.min.y;f.x=-(l.min.x-i.position.x)/v,f.y=-(l.min.y-i.position.y)/m,u.x=v*f.x,u.y=m*f.y}};d.set=function(i,a,l){var f;typeof a=="string"&&(f=a,a={},a[f]=l);for(f in a)if(Object.prototype.hasOwnProperty.call(a,f))switch(l=a[f],f){case"isStatic":d.setStatic(i,l);break;case"isSleeping":r.set(i,l);break;case"mass":d.setMass(i,l);break;case"density":d.setDensity(i,l);break;case"inertia":d.setInertia(i,l);break;case"vertices":d.setVertices(i,l);break;case"position":d.setPosition(i,l);break;case"angle":d.setAngle(i,l);break;case"velocity":d.setVelocity(i,l);break;case"angularVelocity":d.setAngularVelocity(i,l);break;case"speed":d.setSpeed(i,l);break;case"angularSpeed":d.setAngularSpeed(i,l);break;case"parts":d.setParts(i,l);break;case"centre":d.setCentre(i,l);break;default:i[f]=l}},d.setStatic=function(i,a){for(var l=0;l<i.parts.length;l++){var f=i.parts[l];a?(f.isStatic||(f._original={restitution:f.restitution,friction:f.friction,mass:f.mass,inertia:f.inertia,density:f.density,inverseMass:f.inverseMass,inverseInertia:f.inverseInertia}),f.restitution=0,f.friction=1,f.mass=f.inertia=f.density=1/0,f.inverseMass=f.inverseInertia=0,f.positionPrev.x=f.position.x,f.positionPrev.y=f.position.y,f.anglePrev=f.angle,f.angularVelocity=0,f.speed=0,f.angularSpeed=0,f.motion=0):f._original&&(f.restitution=f._original.restitution,f.friction=f._original.friction,f.mass=f._original.mass,f.inertia=f._original.inertia,f.density=f._original.density,f.inverseMass=f._original.inverseMass,f.inverseInertia=f._original.inverseInertia,f._original=null),f.isStatic=a}},d.setMass=function(i,a){var l=i.inertia/(i.mass/6);i.inertia=l*(a/6),i.inverseInertia=1/i.inertia,i.mass=a,i.inverseMass=1/i.mass,i.density=i.mass/i.area},d.setDensity=function(i,a){d.setMass(i,a*i.area),i.density=a},d.setInertia=function(i,a){i.inertia=a,i.inverseInertia=1/i.inertia},d.setVertices=function(i,a){a[0].body===i?i.vertices=a:i.vertices=c.create(a,i),i.axes=s.fromVertices(i.vertices),i.area=c.area(i.vertices),d.setMass(i,i.density*i.area);var l=c.centre(i.vertices);c.translate(i.vertices,l,-1),d.setInertia(i,d._inertiaScale*c.inertia(i.vertices,i.mass)),c.translate(i.vertices,i.position),e.update(i.bounds,i.vertices,i.velocity)},d.setParts=function(i,a,l){var f;for(a=a.slice(0),i.parts.length=0,i.parts.push(i),i.parent=i,f=0;f<a.length;f++){var u=a[f];u!==i&&(u.parent=i,i.parts.push(u))}if(i.parts.length!==1){if(l=typeof l<"u"?l:!0,l){var v=[];for(f=0;f<a.length;f++)v=v.concat(a[f].vertices);c.clockwiseSort(v);var m=c.hull(v),x=c.centre(m);d.setVertices(i,m),c.translate(i.vertices,x)}var g=d._totalProperties(i),y=g.centre.x,T=g.centre.y,C=i.bounds,E=i.centerOfMass,M=i.centerOffset;e.update(C,i.vertices,i.velocity),E.x=-(C.min.x-y)/(C.max.x-C.min.x),E.y=-(C.min.y-T)/(C.max.y-C.min.y),M.x=y,M.y=T,i.area=g.area,i.parent=i,i.position.x=y,i.position.y=T,i.positionPrev.x=y,i.positionPrev.y=T,d.setMass(i,g.mass),d.setInertia(i,g.inertia),d.setPosition(i,g.centre)}},d.setCentre=function(i,a,l){l?(i.positionPrev.x+=a.x,i.positionPrev.y+=a.y,i.position.x+=a.x,i.position.y+=a.y):(i.positionPrev.x=a.x-(i.position.x-i.positionPrev.x),i.positionPrev.y=a.y-(i.position.y-i.positionPrev.y),i.position.x=a.x,i.position.y=a.y)},d.setPosition=function(i,a,l){var f=h.sub(a,i.position);l?(i.positionPrev.x=i.position.x,i.positionPrev.y=i.position.y,i.velocity.x=f.x,i.velocity.y=f.y,i.speed=h.magnitude(f)):(i.positionPrev.x+=f.x,i.positionPrev.y+=f.y);for(var u=0;u<i.parts.length;u++){var v=i.parts[u];v.position.x+=f.x,v.position.y+=f.y,c.translate(v.vertices,f),e.update(v.bounds,v.vertices,i.velocity)}},d.setAngle=function(i,a,l){var f=a-i.angle;l?(i.anglePrev=i.angle,i.angularVelocity=f,i.angularSpeed=Math.abs(f)):i.anglePrev+=f;for(var u=0;u<i.parts.length;u++){var v=i.parts[u];v.angle+=f,c.rotate(v.vertices,f,i.position),s.rotate(v.axes,f),e.update(v.bounds,v.vertices,i.velocity),u>0&&h.rotateAbout(v.position,f,i.position,v.position)}},d.setVelocity=function(i,a){var l=i.deltaTime/d._baseDelta;i.positionPrev.x=i.position.x-a.x*l,i.positionPrev.y=i.position.y-a.y*l,i.velocity.x=(i.position.x-i.positionPrev.x)/l,i.velocity.y=(i.position.y-i.positionPrev.y)/l,i.speed=h.magnitude(i.velocity)},d.getVelocity=function(i){var a=d._baseDelta/i.deltaTime;return{x:(i.position.x-i.positionPrev.x)*a,y:(i.position.y-i.positionPrev.y)*a}},d.getSpeed=function(i){return h.magnitude(d.getVelocity(i))},d.setSpeed=function(i,a){d.setVelocity(i,h.mult(h.normalise(d.getVelocity(i)),a))},d.setAngularVelocity=function(i,a){var l=i.deltaTime/d._baseDelta;i.anglePrev=i.angle-a*l,i.angularVelocity=(i.angle-i.anglePrev)/l,i.angularSpeed=Math.abs(i.angularVelocity)},d.getAngularVelocity=function(i){return(i.angle-i.anglePrev)*d._baseDelta/i.deltaTime},d.getAngularSpeed=function(i){return Math.abs(d.getAngularVelocity(i))},d.setAngularSpeed=function(i,a){d.setAngularVelocity(i,n.sign(d.getAngularVelocity(i))*a)},d.translate=function(i,a,l){d.setPosition(i,h.add(i.position,a),l)},d.rotate=function(i,a,l,f){if(!l)d.setAngle(i,i.angle+a,f);else{var u=Math.cos(a),v=Math.sin(a),m=i.position.x-l.x,x=i.position.y-l.y;d.setPosition(i,{x:l.x+(m*u-x*v),y:l.y+(m*v+x*u)},f),d.setAngle(i,i.angle+a,f)}},d.scale=function(i,a,l,f){var u=0,v=0;f=f||i.position;for(var m=i.inertia===1/0,x=0;x<i.parts.length;x++){var g=i.parts[x];g.scale.x=a,g.scale.y=l,c.scale(g.vertices,a,l,f),g.axes=s.fromVertices(g.vertices),g.area=c.area(g.vertices),d.setMass(g,i.density*g.area),c.translate(g.vertices,{x:-g.position.x,y:-g.position.y}),d.setInertia(g,d._inertiaScale*c.inertia(g.vertices,g.mass)),c.translate(g.vertices,{x:g.position.x,y:g.position.y}),x>0&&(u+=g.area,v+=g.inertia),g.position.x=f.x+(g.position.x-f.x)*a,g.position.y=f.y+(g.position.y-f.y)*l,e.update(g.bounds,g.vertices,i.velocity)}i.parts.length>1&&(i.area=u,i.isStatic||(d.setMass(i,i.density*u),d.setInertia(i,v))),i.circleRadius&&(a===l?i.circleRadius*=a:i.circleRadius=null),m&&d.setInertia(i,1/0)},d.update=function(i,a){a=(typeof a<"u"?a:16.666666666666668)*i.timeScale;var l=a*a,f=d._timeCorrection?a/(i.deltaTime||a):1,u=1-i.frictionAir*(a/n._baseDelta),v=(i.position.x-i.positionPrev.x)*f,m=(i.position.y-i.positionPrev.y)*f;i.velocity.x=v*u+i.force.x/i.mass*l,i.velocity.y=m*u+i.force.y/i.mass*l,i.positionPrev.x=i.position.x,i.positionPrev.y=i.position.y,i.position.x+=i.velocity.x,i.position.y+=i.velocity.y,i.deltaTime=a,i.angularVelocity=(i.angle-i.anglePrev)*u*f+i.torque/i.inertia*l,i.anglePrev=i.angle,i.angle+=i.angularVelocity,i.speed=h.magnitude(i.velocity),i.angularSpeed=Math.abs(i.angularVelocity);for(var x=0;x<i.parts.length;x++){var g=i.parts[x];c.translate(g.vertices,i.velocity),x>0&&(g.position.x+=i.velocity.x,g.position.y+=i.velocity.y),i.angularVelocity!==0&&(c.rotate(g.vertices,i.angularVelocity,i.position),s.rotate(g.axes,i.angularVelocity),x>0&&h.rotateAbout(g.position,i.angularVelocity,i.position,g.position)),e.update(g.bounds,g.vertices,i.velocity)}},d.updateVelocities=function(i){var a=d._baseDelta/i.deltaTime,l=i.velocity;l.x=(i.position.x-i.positionPrev.x)*a,l.y=(i.position.y-i.positionPrev.y)*a,i.speed=Math.sqrt(l.x*l.x+l.y*l.y),i.angularVelocity=(i.angle-i.anglePrev)*a,i.angularSpeed=Math.abs(i.angularVelocity)},d.applyForce=function(i,a,l){var f={x:a.x-i.position.x,y:a.y-i.position.y};i.force.x+=l.x,i.force.y+=l.y,i.torque+=f.x*l.y-f.y*l.x},d._totalProperties=function(i){for(var a={mass:0,area:0,inertia:0,centre:{x:0,y:0}},l=i.parts.length===1?0:1;l<i.parts.length;l++){var f=i.parts[l],u=f.mass!==1/0?f.mass:1;a.mass+=u,a.area+=f.area,a.inertia+=f.inertia,a.centre=h.add(a.centre,h.mult(f.position,u))}return a.centre=h.div(a.centre,a.mass),a},d.wrap=function(i,a){var l=e.wrap(i.bounds,a);return l&&d.translate(i,l),l}})()}),69351:((p,S,t)=>{var d={};p.exports=d;var c=t(35810),h=t(53402),r=t(15647),n=t(22562);(function(){d.create=function(e){return h.extend({id:h.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{},wrapBounds:null,cache:{allBodies:null,allConstraints:null,allComposites:null}},e)},d.setModified=function(e,s,o,i){if(c.trigger(e,"compositeModified",e),e.isModified=s,s&&e.cache&&(e.cache.allBodies=null,e.cache.allConstraints=null,e.cache.allComposites=null),o&&e.parent&&d.setModified(e.parent,s,o,i),i)for(var a=0;a<e.composites.length;a++){var l=e.composites[a];d.setModified(l,s,o,i)}},d.add=function(e,s){var o=[].concat(s);c.trigger(e,"beforeAdd",{object:s});for(var i=0;i<o.length;i++){var a=o[i];switch(a.type){case"body":if(a.parent!==a){h.warn("Composite.add: skipped adding a compound body part (you must add its parent instead)");break}d.addBody(e,a);break;case"constraint":d.addConstraint(e,a);break;case"composite":d.addComposite(e,a);break;case"mouseConstraint":d.addConstraint(e,a.constraint);break}}return c.trigger(e,"afterAdd",{object:s}),e},d.remove=function(e,s,o){var i=[].concat(s);c.trigger(e,"beforeRemove",{object:s});for(var a=0;a<i.length;a++){var l=i[a];switch(l.type){case"body":d.removeBody(e,l,o);break;case"constraint":d.removeConstraint(e,l,o);break;case"composite":d.removeComposite(e,l,o);break;case"mouseConstraint":d.removeConstraint(e,l.constraint);break}}return c.trigger(e,"afterRemove",{object:s}),e},d.addComposite=function(e,s){return e.composites.push(s),s.parent=e,d.setModified(e,!0,!0,!1),e},d.removeComposite=function(e,s,o){var i=h.indexOf(e.composites,s);if(i!==-1){var a=d.allBodies(s);d.removeCompositeAt(e,i);for(var l=0;l<a.length;l++)a[l].sleepCounter=0}if(o)for(var l=0;l<e.composites.length;l++)d.removeComposite(e.composites[l],s,!0);return e},d.removeCompositeAt=function(e,s){return e.composites.splice(s,1),d.setModified(e,!0,!0,!1),e},d.addBody=function(e,s){return e.bodies.push(s),d.setModified(e,!0,!0,!1),e},d.removeBody=function(e,s,o){var i=h.indexOf(e.bodies,s);if(i!==-1&&(d.removeBodyAt(e,i),s.sleepCounter=0),o)for(var a=0;a<e.composites.length;a++)d.removeBody(e.composites[a],s,!0);return e},d.removeBodyAt=function(e,s){return e.bodies.splice(s,1),d.setModified(e,!0,!0,!1),e},d.addConstraint=function(e,s){return e.constraints.push(s),d.setModified(e,!0,!0,!1),e},d.removeConstraint=function(e,s,o){var i=h.indexOf(e.constraints,s);if(i!==-1&&d.removeConstraintAt(e,i),o)for(var a=0;a<e.composites.length;a++)d.removeConstraint(e.composites[a],s,!0);return e},d.removeConstraintAt=function(e,s){return e.constraints.splice(s,1),d.setModified(e,!0,!0,!1),e},d.clear=function(e,s,o){if(o)for(var i=0;i<e.composites.length;i++)d.clear(e.composites[i],s,!0);return s?e.bodies=e.bodies.filter(function(a){return a.isStatic}):e.bodies.length=0,e.constraints.length=0,e.composites.length=0,d.setModified(e,!0,!0,!1),e},d.allBodies=function(e){if(e.cache&&e.cache.allBodies)return e.cache.allBodies;for(var s=[].concat(e.bodies),o=0;o<e.composites.length;o++)s=s.concat(d.allBodies(e.composites[o]));return e.cache&&(e.cache.allBodies=s),s},d.allConstraints=function(e){if(e.cache&&e.cache.allConstraints)return e.cache.allConstraints;for(var s=[].concat(e.constraints),o=0;o<e.composites.length;o++)s=s.concat(d.allConstraints(e.composites[o]));return e.cache&&(e.cache.allConstraints=s),s},d.allComposites=function(e){if(e.cache&&e.cache.allComposites)return e.cache.allComposites;for(var s=[].concat(e.composites),o=0;o<e.composites.length;o++)s=s.concat(d.allComposites(e.composites[o]));return e.cache&&(e.cache.allComposites=s),s},d.get=function(e,s,o){var i,a;switch(o){case"body":i=d.allBodies(e);break;case"constraint":i=d.allConstraints(e);break;case"composite":i=d.allComposites(e).concat(e);break}return i?(a=i.filter(function(l){return l.id.toString()===s.toString()}),a.length===0?null:a[0]):null},d.move=function(e,s,o){return d.remove(e,s),d.add(o,s),e},d.rebase=function(e){for(var s=d.allBodies(e).concat(d.allConstraints(e)).concat(d.allComposites(e)),o=0;o<s.length;o++)s[o].id=h.nextId();return e},d.translate=function(e,s,o){for(var i=o?d.allBodies(e):e.bodies,a=0;a<i.length;a++)n.translate(i[a],s);return e},d.rotate=function(e,s,o,i){for(var a=Math.cos(s),l=Math.sin(s),f=i?d.allBodies(e):e.bodies,u=0;u<f.length;u++){var v=f[u],m=v.position.x-o.x,x=v.position.y-o.y;n.setPosition(v,{x:o.x+(m*a-x*l),y:o.y+(m*l+x*a)}),n.rotate(v,s)}return e},d.scale=function(e,s,o,i,a){for(var l=a?d.allBodies(e):e.bodies,f=0;f<l.length;f++){var u=l[f],v=u.position.x-i.x,m=u.position.y-i.y;n.setPosition(u,{x:i.x+v*s,y:i.y+m*o}),n.scale(u,s,o)}return e},d.bounds=function(e){for(var s=d.allBodies(e),o=[],i=0;i<s.length;i+=1){var a=s[i];o.push(a.bounds.min,a.bounds.max)}return r.create(o)},d.wrap=function(e,s){var o=r.wrap(d.bounds(e),s);return o&&d.translate(e,o),o}})()}),4372:((p,S,t)=>{var d={};p.exports=d;var c=t(69351);(function(){d.create=c.create,d.add=c.add,d.remove=c.remove,d.clear=c.clear,d.addComposite=c.addComposite,d.addBody=c.addBody,d.addConstraint=c.addConstraint})()}),52284:((p,S,t)=>{var d={};p.exports=d;var c=t(41598),h=t(4506);(function(){var r=[],n={overlap:0,axis:null},e={overlap:0,axis:null};d.create=function(s,o){return{pair:null,collided:!1,bodyA:s,bodyB:o,parentA:s.parent,parentB:o.parent,depth:0,normal:{x:0,y:0},tangent:{x:0,y:0},penetration:{x:0,y:0},supports:[null,null],supportCount:0}},d.collides=function(s,o,i){if(d._overlapAxes(n,s.vertices,o.vertices,s.axes),n.overlap<=0||(d._overlapAxes(e,o.vertices,s.vertices,o.axes),e.overlap<=0))return null;var a=i&&i.table[h.id(s,o)],l;a?l=a.collision:(l=d.create(s,o),l.collided=!0,l.bodyA=s.id<o.id?s:o,l.bodyB=s.id<o.id?o:s,l.parentA=l.bodyA.parent,l.parentB=l.bodyB.parent),s=l.bodyA,o=l.bodyB;var f;n.overlap<e.overlap?f=n:f=e;var u=l.normal,v=l.tangent,m=l.penetration,x=l.supports,g=f.overlap,y=f.axis,T=y.x,C=y.y,E=o.position.x-s.position.x,M=o.position.y-s.position.y;T*E+C*M>=0&&(T=-T,C=-C),u.x=T,u.y=C,v.x=-C,v.y=T,m.x=T*g,m.y=C*g,l.depth=g;var P=d._findSupports(s,o,u,1),A=0;if(c.contains(s.vertices,P[0])&&(x[A++]=P[0]),c.contains(s.vertices,P[1])&&(x[A++]=P[1]),A<2){var R=d._findSupports(o,s,u,-1);c.contains(o.vertices,R[0])&&(x[A++]=R[0]),A<2&&c.contains(o.vertices,R[1])&&(x[A++]=R[1])}return A===0&&(x[A++]=P[0]),l.supportCount=A,l},d._overlapAxes=function(s,o,i,a){var l=o.length,f=i.length,u=o[0].x,v=o[0].y,m=i[0].x,x=i[0].y,g=a.length,y=Number.MAX_VALUE,T=0,C,E,M,P,A,R;for(A=0;A<g;A++){var F=a[A],w=F.x,I=F.y,U=u*w+v*I,N=m*w+x*I,D=U,B=N;for(R=1;R<l;R+=1)P=o[R].x*w+o[R].y*I,P>D?D=P:P<U&&(U=P);for(R=1;R<f;R+=1)P=i[R].x*w+i[R].y*I,P>B?B=P:P<N&&(N=P);if(E=D-N,M=B-U,C=E<M?E:M,C<y&&(y=C,T=A,C<=0))break}s.axis=a[T],s.overlap=y},d._findSupports=function(s,o,i,a){var l=o.vertices,f=l.length,u=s.position.x,v=s.position.y,m=i.x*a,x=i.y*a,g=l[0],y=g,T=m*(u-y.x)+x*(v-y.y),C,E,M;for(M=1;M<f;M+=1)y=l[M],E=m*(u-y.x)+x*(v-y.y),E<T&&(T=E,g=y);return C=l[(f+g.index-1)%f],T=m*(u-C.x)+x*(v-C.y),y=l[(g.index+1)%f],m*(u-y.x)+x*(v-y.y)<T?(r[0]=g,r[1]=y,r):(r[0]=g,r[1]=C,r)}})()}),43424:(p=>{var S={};p.exports=S,(function(){S.create=function(t){return{vertex:t,normalImpulse:0,tangentImpulse:0}}})()}),81388:((p,S,t)=>{var d={};p.exports=d;var c=t(53402),h=t(52284);(function(){d.create=function(r){var n={bodies:[],collisions:[],pairs:null};return c.extend(n,r)},d.setBodies=function(r,n){r.bodies=n.slice(0)},d.clear=function(r){r.bodies=[],r.collisions=[]},d.collisions=function(r){var n=r.pairs,e=r.bodies,s=e.length,o=d.canCollide,i=h.collides,a=r.collisions,l=0,f,u;for(e.sort(d._compareBoundsX),f=0;f<s;f++){var v=e[f],m=v.bounds,x=v.bounds.max.x,g=v.bounds.max.y,y=v.bounds.min.y,T=v.isStatic||v.isSleeping,C=v.parts.length,E=C===1;for(u=f+1;u<s;u++){var M=e[u],P=M.bounds;if(P.min.x>x)break;if(!(g<P.min.y||y>P.max.y)&&!(T&&(M.isStatic||M.isSleeping))&&o(v.collisionFilter,M.collisionFilter)){var A=M.parts.length;if(E&&A===1){var R=i(v,M,n);R&&(a[l++]=R)}else for(var F=C>1?1:0,w=A>1?1:0,I=F;I<C;I++)for(var U=v.parts[I],m=U.bounds,N=w;N<A;N++){var D=M.parts[N],P=D.bounds;if(!(m.min.x>P.max.x||m.max.x<P.min.x||m.max.y<P.min.y||m.min.y>P.max.y)){var R=i(U,D,n);R&&(a[l++]=R)}}}}}return a.length!==l&&(a.length=l),a},d.canCollide=function(r,n){return r.group===n.group&&r.group!==0?r.group>0:(r.mask&n.category)!==0&&(n.mask&r.category)!==0},d._compareBoundsX=function(r,n){return r.bounds.min.x-n.bounds.min.x}})()}),4506:((p,S,t)=>{var d={};p.exports=d;var c=t(43424);(function(){d.create=function(h,r){var n=h.bodyA,e=h.bodyB,s={id:d.id(n,e),bodyA:n,bodyB:e,collision:h,contacts:[c.create(),c.create()],contactCount:0,separation:0,isActive:!0,isSensor:n.isSensor||e.isSensor,timeCreated:r,timeUpdated:r,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return d.update(s,h,r),s},d.update=function(h,r,n){var e=r.supports,s=r.supportCount,o=h.contacts,i=r.parentA,a=r.parentB;h.isActive=!0,h.timeUpdated=n,h.collision=r,h.separation=r.depth,h.inverseMass=i.inverseMass+a.inverseMass,h.friction=i.friction<a.friction?i.friction:a.friction,h.frictionStatic=i.frictionStatic>a.frictionStatic?i.frictionStatic:a.frictionStatic,h.restitution=i.restitution>a.restitution?i.restitution:a.restitution,h.slop=i.slop>a.slop?i.slop:a.slop,h.contactCount=s,r.pair=h;var l=e[0],f=o[0],u=e[1],v=o[1];(v.vertex===l||f.vertex===u)&&(o[1]=f,o[0]=f=v,v=o[1]),f.vertex=l,v.vertex=u},d.setActive=function(h,r,n){r?(h.isActive=!0,h.timeUpdated=n):(h.isActive=!1,h.contactCount=0)},d.id=function(h,r){return h.id<r.id?h.id.toString(36)+":"+r.id.toString(36):r.id.toString(36)+":"+h.id.toString(36)}})()}),99561:((p,S,t)=>{var d={};p.exports=d;var c=t(4506),h=t(53402);(function(){d.create=function(r){return h.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},r)},d.update=function(r,n,e){var s=c.update,o=c.create,i=c.setActive,a=r.table,l=r.list,f=l.length,u=f,v=r.collisionStart,m=r.collisionEnd,x=r.collisionActive,g=n.length,y=0,T=0,C=0,E,M,P;for(P=0;P<g;P++)E=n[P],M=E.pair,M?(M.isActive&&(x[C++]=M),s(M,E,e)):(M=o(E,e),a[M.id]=M,v[y++]=M,l[u++]=M);for(u=0,f=l.length,P=0;P<f;P++)M=l[P],M.timeUpdated>=e?l[u++]=M:(i(M,!1,e),M.collision.bodyA.sleepCounter>0&&M.collision.bodyB.sleepCounter>0?l[u++]=M:(m[T++]=M,delete a[M.id]));l.length!==u&&(l.length=u),v.length!==y&&(v.length=y),m.length!==T&&(m.length=T),x.length!==C&&(x.length=C)},d.clear=function(r){return r.table={},r.list.length=0,r.collisionStart.length=0,r.collisionActive.length=0,r.collisionEnd.length=0,r}})()}),73296:((p,S,t)=>{var d={};p.exports=d;var c=t(31725),h=t(52284),r=t(15647),n=t(66280),e=t(41598);(function(){d.collides=function(s,o){for(var i=[],a=o.length,l=s.bounds,f=h.collides,u=r.overlaps,v=0;v<a;v++){var m=o[v],x=m.parts.length,g=x===1?0:1;if(s!==m&&u(m.bounds,l))for(var y=g;y<x;y++){var T=m.parts[y];if(u(T.bounds,l)){var C=f(T,s);if(C){i.push(C);break}}}}return i},d.ray=function(s,o,i,a){a=a||1e-100;for(var l=c.angle(o,i),f=c.magnitude(c.sub(o,i)),u=(i.x+o.x)*.5,v=(i.y+o.y)*.5,m=n.rectangle(u,v,f,a,{angle:l}),x=d.collides(m,s),g=0;g<x.length;g+=1){var y=x[g];y.body=y.bodyB=y.bodyA}return x},d.region=function(s,o,i){for(var a=[],l=0;l<s.length;l++){var f=s[l],u=r.overlaps(f.bounds,o);(u&&!i||!u&&i)&&a.push(f)}return a},d.point=function(s,o){for(var i=[],a=0;a<s.length;a++){var l=s[a];if(r.contains(l.bounds,o))for(var f=l.parts.length===1?0:1;f<l.parts.length;f++){var u=l.parts[f];if(r.contains(u.bounds,o)&&e.contains(u.vertices,o)){i.push(l);break}}}return i}})()}),66272:((p,S,t)=>{var d={};p.exports=d;var c=t(41598),h=t(53402),r=t(15647);(function(){d._restingThresh=2,d._restingThreshTangent=Math.sqrt(6),d._positionDampen=.9,d._positionWarming=.8,d._frictionNormalMultiplier=5,d._frictionMaxStatic=Number.MAX_VALUE,d.preSolvePosition=function(n){var e,s,o,i=n.length;for(e=0;e<i;e++)s=n[e],s.isActive&&(o=s.contactCount,s.collision.parentA.totalContacts+=o,s.collision.parentB.totalContacts+=o)},d.solvePosition=function(n,e,s){var o,i,a,l,f,u,v,m,x=d._positionDampen*(s||1),g=h.clamp(e/h._baseDelta,0,1),y=n.length;for(o=0;o<y;o++)i=n[o],!(!i.isActive||i.isSensor)&&(a=i.collision,l=a.parentA,f=a.parentB,u=a.normal,i.separation=a.depth+u.x*(f.positionImpulse.x-l.positionImpulse.x)+u.y*(f.positionImpulse.y-l.positionImpulse.y));for(o=0;o<y;o++)i=n[o],!(!i.isActive||i.isSensor)&&(a=i.collision,l=a.parentA,f=a.parentB,u=a.normal,m=i.separation-i.slop*g,(l.isStatic||f.isStatic)&&(m*=2),l.isStatic||l.isSleeping||(v=x/l.totalContacts,l.positionImpulse.x+=u.x*m*v,l.positionImpulse.y+=u.y*m*v),f.isStatic||f.isSleeping||(v=x/f.totalContacts,f.positionImpulse.x-=u.x*m*v,f.positionImpulse.y-=u.y*m*v))},d.postSolvePosition=function(n){for(var e=d._positionWarming,s=n.length,o=c.translate,i=r.update,a=0;a<s;a++){var l=n[a],f=l.positionImpulse,u=f.x,v=f.y,m=l.velocity;if(l.totalContacts=0,u!==0||v!==0){for(var x=0;x<l.parts.length;x++){var g=l.parts[x];o(g.vertices,f),i(g.bounds,g.vertices,m),g.position.x+=u,g.position.y+=v}l.positionPrev.x+=u,l.positionPrev.y+=v,u*m.x+v*m.y<0?(f.x=0,f.y=0):(f.x*=e,f.y*=e)}}},d.preSolveVelocity=function(n){var e=n.length,s,o;for(s=0;s<e;s++){var i=n[s];if(!(!i.isActive||i.isSensor)){var a=i.contacts,l=i.contactCount,f=i.collision,u=f.parentA,v=f.parentB,m=f.normal,x=f.tangent;for(o=0;o<l;o++){var g=a[o],y=g.vertex,T=g.normalImpulse,C=g.tangentImpulse;if(T!==0||C!==0){var E=m.x*T+x.x*C,M=m.y*T+x.y*C;u.isStatic||u.isSleeping||(u.positionPrev.x+=E*u.inverseMass,u.positionPrev.y+=M*u.inverseMass,u.anglePrev+=u.inverseInertia*((y.x-u.position.x)*M-(y.y-u.position.y)*E)),v.isStatic||v.isSleeping||(v.positionPrev.x-=E*v.inverseMass,v.positionPrev.y-=M*v.inverseMass,v.anglePrev-=v.inverseInertia*((y.x-v.position.x)*M-(y.y-v.position.y)*E))}}}}},d.solveVelocity=function(n,e){var s=e/h._baseDelta,o=s*s,i=o*s,a=-d._restingThresh*s,l=d._restingThreshTangent,f=d._frictionNormalMultiplier*s,u=d._frictionMaxStatic,v=n.length,m,x,g,y;for(g=0;g<v;g++){var T=n[g];if(!(!T.isActive||T.isSensor)){var C=T.collision,E=C.parentA,M=C.parentB,P=C.normal.x,A=C.normal.y,R=C.tangent.x,F=C.tangent.y,w=T.inverseMass,I=T.friction*T.frictionStatic*f,U=T.contacts,N=T.contactCount,D=1/N,B=E.position.x-E.positionPrev.x,L=E.position.y-E.positionPrev.y,G=E.angle-E.anglePrev,O=M.position.x-M.positionPrev.x,X=M.position.y-M.positionPrev.y,z=M.angle-M.anglePrev;for(y=0;y<N;y++){var V=U[y],Y=V.vertex,W=Y.x-E.position.x,H=Y.y-E.position.y,K=Y.x-M.position.x,b=Y.y-M.position.y,J=B-H*G,$=L+W*G,Z=O-b*z,q=X+K*z,_=J-Z,tt=$-q,Q=P*_+A*tt,j=R*_+F*tt,k=T.separation+Q,et=Math.min(k,1);et=k<0?0:et;var nt=et*I;j<-nt||j>nt?(x=j>0?j:-j,m=T.friction*(j>0?1:-1)*i,m<-x?m=-x:m>x&&(m=x)):(m=j,x=u);var lt=W*A-H*P,it=K*A-b*P,st=D/(w+E.inverseInertia*lt*lt+M.inverseInertia*it*it),ft=(1+T.restitution)*Q*st;if(m*=st,Q<a)V.normalImpulse=0;else{var ct=V.normalImpulse;V.normalImpulse+=ft,V.normalImpulse>0&&(V.normalImpulse=0),ft=V.normalImpulse-ct}if(j<-l||j>l)V.tangentImpulse=0;else{var rt=V.tangentImpulse;V.tangentImpulse+=m,V.tangentImpulse<-x&&(V.tangentImpulse=-x),V.tangentImpulse>x&&(V.tangentImpulse=x),m=V.tangentImpulse-rt}var dt=P*ft+R*m,vt=A*ft+F*m;E.isStatic||E.isSleeping||(E.positionPrev.x+=dt*E.inverseMass,E.positionPrev.y+=vt*E.inverseMass,E.anglePrev+=(W*vt-H*dt)*E.inverseInertia),M.isStatic||M.isSleeping||(M.positionPrev.x-=dt*M.inverseMass,M.positionPrev.y-=vt*M.inverseMass,M.anglePrev-=(K*vt-b*dt)*M.inverseInertia)}}}}})()}),48140:((p,S,t)=>{var d={};p.exports=d;var c=t(41598),h=t(31725),r=t(53614),n=t(15647),e=t(66615),s=t(53402);(function(){d._warming=.4,d._torqueDampen=1,d._minLength=1e-6,d.create=function(o){var i=o;i.bodyA&&!i.pointA&&(i.pointA={x:0,y:0}),i.bodyB&&!i.pointB&&(i.pointB={x:0,y:0});var a=i.bodyA?h.add(i.bodyA.position,i.pointA):i.pointA,l=i.bodyB?h.add(i.bodyB.position,i.pointB):i.pointB,f=h.magnitude(h.sub(a,l));i.length=typeof i.length<"u"?i.length:f,i.id=i.id||s.nextId(),i.label=i.label||"Constraint",i.type="constraint",i.stiffness=i.stiffness||(i.length>0?1:.7),i.damping=i.damping||0,i.angularStiffness=i.angularStiffness||0,i.angleA=i.bodyA?i.bodyA.angle:i.angleA,i.angleB=i.bodyB?i.bodyB.angle:i.angleB,i.plugin={};var u={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return i.length===0&&i.stiffness>.1?(u.type="pin",u.anchors=!1):i.stiffness<.9&&(u.type="spring"),i.render=s.extend(u,i.render),i},d.preSolveAll=function(o){for(var i=0;i<o.length;i+=1){var a=o[i],l=a.constraintImpulse;a.isStatic||l.x===0&&l.y===0&&l.angle===0||(a.position.x+=l.x,a.position.y+=l.y,a.angle+=l.angle)}},d.solveAll=function(o,i){for(var a=s.clamp(i/s._baseDelta,0,1),l=0;l<o.length;l+=1){var f=o[l],u=!f.bodyA||f.bodyA&&f.bodyA.isStatic,v=!f.bodyB||f.bodyB&&f.bodyB.isStatic;(u||v)&&d.solve(o[l],a)}for(l=0;l<o.length;l+=1)f=o[l],u=!f.bodyA||f.bodyA&&f.bodyA.isStatic,v=!f.bodyB||f.bodyB&&f.bodyB.isStatic,!u&&!v&&d.solve(o[l],a)},d.solve=function(o,i){var a=o.bodyA,l=o.bodyB,f=o.pointA,u=o.pointB;if(!(!a&&!l)){a&&!a.isStatic&&(h.rotate(f,a.angle-o.angleA,f),o.angleA=a.angle),l&&!l.isStatic&&(h.rotate(u,l.angle-o.angleB,u),o.angleB=l.angle);var v=f,m=u;if(a&&(v=h.add(a.position,f)),l&&(m=h.add(l.position,u)),!(!v||!m)){var x=h.sub(v,m),g=h.magnitude(x);g<d._minLength&&(g=d._minLength);var y=(g-o.length)/g,T=o.stiffness>=1||o.length===0,C=T?o.stiffness*i:o.stiffness*i*i,E=o.damping*i,M=h.mult(x,y*C),P=(a?a.inverseMass:0)+(l?l.inverseMass:0),A=(a?a.inverseInertia:0)+(l?l.inverseInertia:0),R=P+A,F,w,I,U,N;if(E>0){var D=h.create();I=h.div(x,g),N=h.sub(l&&h.sub(l.position,l.positionPrev)||D,a&&h.sub(a.position,a.positionPrev)||D),U=h.dot(I,N)}a&&!a.isStatic&&(w=a.inverseMass/P,a.constraintImpulse.x-=M.x*w,a.constraintImpulse.y-=M.y*w,a.position.x-=M.x*w,a.position.y-=M.y*w,E>0&&(a.positionPrev.x-=E*I.x*U*w,a.positionPrev.y-=E*I.y*U*w),F=h.cross(f,M)/R*d._torqueDampen*a.inverseInertia*(1-o.angularStiffness),a.constraintImpulse.angle-=F,a.angle-=F),l&&!l.isStatic&&(w=l.inverseMass/P,l.constraintImpulse.x+=M.x*w,l.constraintImpulse.y+=M.y*w,l.position.x+=M.x*w,l.position.y+=M.y*w,E>0&&(l.positionPrev.x+=E*I.x*U*w,l.positionPrev.y+=E*I.y*U*w),F=h.cross(u,M)/R*d._torqueDampen*l.inverseInertia*(1-o.angularStiffness),l.constraintImpulse.angle+=F,l.angle+=F)}}},d.postSolveAll=function(o){for(var i=0;i<o.length;i++){var a=o[i],l=a.constraintImpulse;if(!(a.isStatic||l.x===0&&l.y===0&&l.angle===0)){r.set(a,!1);for(var f=0;f<a.parts.length;f++){var u=a.parts[f];c.translate(u.vertices,l),f>0&&(u.position.x+=l.x,u.position.y+=l.y),l.angle!==0&&(c.rotate(u.vertices,l.angle,a.position),e.rotate(u.axes,l.angle),f>0&&h.rotateAbout(u.position,l.angle,a.position,u.position)),n.update(u.bounds,u.vertices,a.velocity)}l.angle*=d._warming,l.x*=d._warming,l.y*=d._warming}}},d.pointAWorld=function(o){return{x:(o.bodyA?o.bodyA.position.x:0)+(o.pointA?o.pointA.x:0),y:(o.bodyA?o.bodyA.position.y:0)+(o.pointA?o.pointA.y:0)}},d.pointBWorld=function(o){return{x:(o.bodyB?o.bodyB.position.x:0)+(o.pointB?o.pointB.x:0),y:(o.bodyB?o.bodyB.position.y:0)+(o.pointB?o.pointB.y:0)}},d.currentLength=function(o){var i=(o.bodyA?o.bodyA.position.x:0)+(o.pointA?o.pointA.x:0),a=(o.bodyA?o.bodyA.position.y:0)+(o.pointA?o.pointA.y:0),l=(o.bodyB?o.bodyB.position.x:0)+(o.pointB?o.pointB.x:0),f=(o.bodyB?o.bodyB.position.y:0)+(o.pointB?o.pointB.y:0),u=i-l,v=a-f;return Math.sqrt(u*u+v*v)}})()}),53402:((p,S,t)=>{var d={};p.exports=d,(function(){d._baseDelta=16.666666666666668,d._nextId=0,d._seed=0,d._nowStartTime=+new Date,d._warnedOnce={},d._decomp=null,d.extend=function(h,r){var n,e;typeof r=="boolean"?(n=2,e=r):(n=1,e=!0);for(var s=n;s<arguments.length;s++){var o=arguments[s];if(o)for(var i in o)e&&o[i]&&o[i].constructor===Object&&(!h[i]||h[i].constructor===Object)?(h[i]=h[i]||{},d.extend(h[i],e,o[i])):h[i]=o[i]}return h},d.clone=function(h,r){return d.extend({},r,h)},d.keys=function(h){if(Object.keys)return Object.keys(h);var r=[];for(var n in h)r.push(n);return r},d.values=function(h){var r=[];if(Object.keys){for(var n=Object.keys(h),e=0;e<n.length;e++)r.push(h[n[e]]);return r}for(var s in h)r.push(h[s]);return r},d.get=function(h,r,n,e){r=r.split(".").slice(n,e);for(var s=0;s<r.length;s+=1)h=h[r[s]];return h},d.set=function(h,r,n,e,s){var o=r.split(".").slice(e,s);return d.get(h,r,0,-1)[o[o.length-1]]=n,n},d.shuffle=function(h){for(var r=h.length-1;r>0;r--){var n=Math.floor(d.random()*(r+1)),e=h[r];h[r]=h[n],h[n]=e}return h},d.choose=function(h){return h[Math.floor(d.random()*h.length)]},d.isElement=function(h){return typeof HTMLElement<"u"?h instanceof HTMLElement:!!(h&&h.nodeType&&h.nodeName)},d.isArray=function(h){return Object.prototype.toString.call(h)==="[object Array]"},d.isFunction=function(h){return typeof h=="function"},d.isPlainObject=function(h){return typeof h=="object"&&h.constructor===Object},d.isString=function(h){return toString.call(h)==="[object String]"},d.clamp=function(h,r,n){return h<r?r:h>n?n:h},d.sign=function(h){return h<0?-1:1},d.now=function(){if(typeof window<"u"&&window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return Date.now?Date.now():new Date-d._nowStartTime},d.random=function(h,r){return h=typeof h<"u"?h:0,r=typeof r<"u"?r:1,h+c()*(r-h)};var c=function(){return d._seed=(d._seed*9301+49297)%233280,d._seed/233280};d.colorToNumber=function(h){return h=h.replace("#",""),h.length==3&&(h=h.charAt(0)+h.charAt(0)+h.charAt(1)+h.charAt(1)+h.charAt(2)+h.charAt(2)),parseInt(h,16)},d.logLevel=1,d.log=function(){console&&d.logLevel>0&&d.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},d.info=function(){console&&d.logLevel>0&&d.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},d.warn=function(){console&&d.logLevel>0&&d.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},d.warnOnce=function(){var h=Array.prototype.slice.call(arguments).join(" ");d._warnedOnce[h]||(d.warn(h),d._warnedOnce[h]=!0)},d.deprecated=function(h,r,n){h[r]=d.chain(function(){d.warnOnce("🔅 deprecated 🔅",n)},h[r])},d.nextId=function(){return d._nextId++},d.indexOf=function(h,r){if(h.indexOf)return h.indexOf(r);for(var n=0;n<h.length;n++)if(h[n]===r)return n;return-1},d.map=function(h,r){if(h.map)return h.map(r);for(var n=[],e=0;e<h.length;e+=1)n.push(r(h[e]));return n},d.topologicalSort=function(h){var r=[],n=[],e=[];for(var s in h)!n[s]&&!e[s]&&d._topologicalSort(s,n,e,h,r);return r},d._topologicalSort=function(h,r,n,e,s){var o=e[h]||[];n[h]=!0;for(var i=0;i<o.length;i+=1){var a=o[i];n[a]||r[a]||d._topologicalSort(a,r,n,e,s)}n[h]=!1,r[h]=!0,s.push(h)},d.chain=function(){for(var h=[],r=0;r<arguments.length;r+=1){var n=arguments[r];n._chained?h.push.apply(h,n._chained):h.push(n)}var e=function(){for(var s,o=new Array(arguments.length),i=0,a=arguments.length;i<a;i++)o[i]=arguments[i];for(i=0;i<h.length;i+=1){var l=h[i].apply(s,o);typeof l<"u"&&(s=l)}return s};return e._chained=h,e},d.chainPathBefore=function(h,r,n){return d.set(h,r,d.chain(n,d.get(h,r)))},d.chainPathAfter=function(h,r,n){return d.set(h,r,d.chain(d.get(h,r),n))},d.setDecomp=function(h){d._decomp=h},d.getDecomp=function(){var h=d._decomp;try{!h&&typeof window<"u"&&(h=window.decomp),!h&&typeof t.g<"u"&&(h=t.g.decomp)}catch{h=null}return h}})()}),48413:((p,S,t)=>{var d={};p.exports=d;var c=t(53614),h=t(66272),r=t(81388),n=t(99561),e=t(35810),s=t(69351),o=t(48140),i=t(53402),a=t(22562);(function(){d._deltaMax=16.666666666666668,d.create=function(l){l=l||{};var f={positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},gravity:{x:0,y:1,scale:.001},timing:{timestamp:0,timeScale:1,lastDelta:0,lastElapsed:0,lastUpdatesPerFrame:0}},u=i.extend(f,l);return u.world=l.world||s.create({label:"World"}),u.pairs=l.pairs||n.create(),u.detector=l.detector||r.create(),u.detector.pairs=u.pairs,u.grid={buckets:[]},u.world.gravity=u.gravity,u.broadphase=u.grid,u.metrics={},u},d.update=function(l,f){var u=i.now(),v=l.world,m=l.detector,x=l.pairs,g=l.timing,y=g.timestamp,T;f>d._deltaMax&&i.warnOnce("Matter.Engine.update: delta argument is recommended to be less than or equal to",d._deltaMax.toFixed(3),"ms."),f=typeof f<"u"?f:i._baseDelta,f*=g.timeScale,g.timestamp+=f,g.lastDelta=f;var C={timestamp:g.timestamp,delta:f};e.trigger(l,"beforeUpdate",C);var E=s.allBodies(v),M=s.allConstraints(v),P=s.allComposites(v);for(v.isModified&&(r.setBodies(m,E),s.setModified(v,!1,!1,!0)),l.enableSleeping&&c.update(E,f),d._bodiesApplyGravity(E,l.gravity),d.wrap(E,P),d.attractors(E),f>0&&d._bodiesUpdate(E,f),e.trigger(l,"beforeSolve",C),o.preSolveAll(E),T=0;T<l.constraintIterations;T++)o.solveAll(M,f);o.postSolveAll(E);var A=r.collisions(m);n.update(x,A,y),l.enableSleeping&&c.afterCollisions(x.list),x.collisionStart.length>0&&e.trigger(l,"collisionStart",{pairs:x.collisionStart,timestamp:g.timestamp,delta:f});var R=i.clamp(20/l.positionIterations,0,1);for(h.preSolvePosition(x.list),T=0;T<l.positionIterations;T++)h.solvePosition(x.list,f,R);for(h.postSolvePosition(E),o.preSolveAll(E),T=0;T<l.constraintIterations;T++)o.solveAll(M,f);for(o.postSolveAll(E),h.preSolveVelocity(x.list),T=0;T<l.velocityIterations;T++)h.solveVelocity(x.list,f);return d._bodiesUpdateVelocities(E),x.collisionActive.length>0&&e.trigger(l,"collisionActive",{pairs:x.collisionActive,timestamp:g.timestamp,delta:f}),x.collisionEnd.length>0&&e.trigger(l,"collisionEnd",{pairs:x.collisionEnd,timestamp:g.timestamp,delta:f}),d._bodiesClearForces(E),e.trigger(l,"afterUpdate",C),l.timing.lastElapsed=i.now()-u,l},d.merge=function(l,f){if(i.extend(l,f),f.world){l.world=f.world,d.clear(l);for(var u=s.allBodies(l.world),v=0;v<u.length;v++){var m=u[v];c.set(m,!1),m.id=i.nextId()}}},d.clear=function(l){n.clear(l.pairs),r.clear(l.detector)},d._bodiesClearForces=function(l){for(var f=l.length,u=0;u<f;u++){var v=l[u];v.force.x=0,v.force.y=0,v.torque=0}},d._bodiesApplyGravity=function(l,f){var u=typeof f.scale<"u"?f.scale:.001,v=l.length;if(!(f.x===0&&f.y===0||u===0))for(var m=0;m<v;m++){var x=l[m];x.ignoreGravity||x.isStatic||x.isSleeping||(x.force.y+=x.mass*f.y*u,x.force.x+=x.mass*f.x*u)}},d._bodiesUpdate=function(l,f){for(var u=l.length,v=0;v<u;v++){var m=l[v];m.isStatic||m.isSleeping||a.update(m,f)}},d._bodiesUpdateVelocities=function(l){for(var f=l.length,u=0;u<f;u++)a.updateVelocities(l[u])},d.wrap=function(l,f){for(var u=0;u<l.length;u+=1){var v=l[u];v.wrapBounds!==null&&a.wrap(v,v.wrapBounds)}for(u=0;u<f.length;u+=1){var m=f[u];m.wrapBounds!==null&&s.wrap(m,m.wrapBounds)}},d.attractors=function(l){for(var f=0;f<l.length;f++){var u=l[f],v=u.attractors;if(v&&v.length>0)for(var m=0;m<l.length;m++){var x=l[m];if(f!==m)for(var g=0;g<v.length;g++){var y=v[g],T=y;i.isFunction(y)&&(T=y(u,x)),T&&a.applyForce(x,x.position,T)}}}}})()}),35810:((p,S,t)=>{var d={};p.exports=d;var c=t(53402);(function(){d.on=function(h,r,n){for(var e=r.split(" "),s,o=0;o<e.length;o++)s=e[o],h.events=h.events||{},h.events[s]=h.events[s]||[],h.events[s].push(n);return n},d.off=function(h,r,n){if(!r){h.events={};return}typeof r=="function"&&(n=r,r=c.keys(h.events).join(" "));for(var e=r.split(" "),s=0;s<e.length;s++){var o=h.events[e[s]],i=[];if(n&&o)for(var a=0;a<o.length;a++)o[a]!==n&&i.push(o[a]);h.events[e[s]]=i}},d.trigger=function(h,r,n){var e,s,o,i,a=h.events;if(a&&c.keys(a).length>0){n||(n={}),e=r.split(" ");for(var l=0;l<e.length;l++)if(s=e[l],o=a[s],o){i=c.clone(n,!1),i.name=s,i.source=h;for(var f=0;f<o.length;f++)o[f].apply(h,[i])}}}})()}),6790:((p,S,t)=>{var d={};p.exports=d;var c=t(73832),h=t(53402);(function(){d.name="matter-js",d.version="0.20.0",d.uses=[],d.used=[],d.use=function(){c.use(d,Array.prototype.slice.call(arguments))},d.before=function(r,n){return r=r.replace(/^Matter./,""),h.chainPathBefore(d,r,n)},d.after=function(r,n){return r=r.replace(/^Matter./,""),h.chainPathAfter(d,r,n)}})()}),73832:((p,S,t)=>{var d={};p.exports=d;var c=t(53402);(function(){d._registry={},d.register=function(h){if(d.isPlugin(h)||c.warn("Plugin.register:",d.toString(h),"does not implement all required fields."),h.name in d._registry){var r=d._registry[h.name],n=d.versionParse(h.version).number,e=d.versionParse(r.version).number;n>e?(c.warn("Plugin.register:",d.toString(r),"was upgraded to",d.toString(h)),d._registry[h.name]=h):n<e?c.warn("Plugin.register:",d.toString(r),"can not be downgraded to",d.toString(h)):h!==r&&c.warn("Plugin.register:",d.toString(h),"is already registered to different plugin object")}else d._registry[h.name]=h;return h},d.resolve=function(h){return d._registry[d.dependencyParse(h).name]},d.toString=function(h){return typeof h=="string"?h:(h.name||"anonymous")+"@"+(h.version||h.range||"0.0.0")},d.isPlugin=function(h){return h&&h.name&&h.version&&h.install},d.isUsed=function(h,r){return h.used.indexOf(r)>-1},d.isFor=function(h,r){var n=h.for&&d.dependencyParse(h.for);return!h.for||r.name===n.name&&d.versionSatisfies(r.version,n.range)},d.use=function(h,r){if(h.uses=(h.uses||[]).concat(r||[]),h.uses.length===0){c.warn("Plugin.use:",d.toString(h),"does not specify any dependencies to install.");return}for(var n=d.dependencies(h),e=c.topologicalSort(n),s=[],o=0;o<e.length;o+=1)if(e[o]!==h.name){var i=d.resolve(e[o]);if(!i){s.push("❌ "+e[o]);continue}d.isUsed(h,i.name)||(d.isFor(i,h)||(c.warn("Plugin.use:",d.toString(i),"is for",i.for,"but installed on",d.toString(h)+"."),i._warned=!0),i.install?i.install(h):(c.warn("Plugin.use:",d.toString(i),"does not specify an install function."),i._warned=!0),i._warned?(s.push("🔶 "+d.toString(i)),delete i._warned):s.push("✅ "+d.toString(i)),h.used.push(i.name))}s.length>0&&!i.silent&&c.info(s.join(" "))},d.dependencies=function(h,r){var n=d.dependencyParse(h),e=n.name;if(r=r||{},!(e in r)){h=d.resolve(h)||h,r[e]=c.map(h.uses||[],function(o){d.isPlugin(o)&&d.register(o);var i=d.dependencyParse(o),a=d.resolve(o);return a&&!d.versionSatisfies(a.version,i.range)?(c.warn("Plugin.dependencies:",d.toString(a),"does not satisfy",d.toString(i),"used by",d.toString(n)+"."),a._warned=!0,h._warned=!0):a||(c.warn("Plugin.dependencies:",d.toString(o),"used by",d.toString(n),"could not be resolved."),h._warned=!0),i.name});for(var s=0;s<r[e].length;s+=1)d.dependencies(r[e][s],r);return r}},d.dependencyParse=function(h){if(c.isString(h)){var r=/^[\w-]+(@(\*|[\^~]?\d+\.\d+\.\d+(-[0-9A-Za-z-+]+)?))?$/;return r.test(h)||c.warn("Plugin.dependencyParse:",h,"is not a valid dependency string."),{name:h.split("@")[0],range:h.split("@")[1]||"*"}}return{name:h.name,range:h.range||h.version}},d.versionParse=function(h){var r=/^(\*)|(\^|~|>=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/;r.test(h)||c.warn("Plugin.versionParse:",h,"is not a valid version or range.");var n=r.exec(h),e=Number(n[4]),s=Number(n[5]),o=Number(n[6]);return{isRange:!!(n[1]||n[2]),version:n[3],range:h,operator:n[1]||n[2]||"",major:e,minor:s,patch:o,parts:[e,s,o],prerelease:n[7],number:e*1e8+s*1e4+o}},d.versionSatisfies=function(h,r){r=r||"*";var n=d.versionParse(r),e=d.versionParse(h);if(n.isRange){if(n.operator==="*"||h==="*")return!0;if(n.operator===">")return e.number>n.number;if(n.operator===">=")return e.number>=n.number;if(n.operator==="~")return e.major===n.major&&e.minor===n.minor&&e.patch>=n.patch;if(n.operator==="^")return n.major>0?e.major===n.major&&e.number>=n.number:n.minor>0?e.minor===n.minor&&e.patch>=n.patch:e.patch===n.patch}return h===r||h==="*"}})()}),13037:((p,S,t)=>{var d={};p.exports=d;var c=t(35810),h=t(48413),r=t(53402);(function(){d._maxFrameDelta=66.66666666666667,d._frameDeltaFallback=16.666666666666668,d._timeBufferMargin=1.5,d._elapsedNextEstimate=1,d._smoothingLowerBound=.1,d._smoothingUpperBound=.9,d.create=function(e){var s={delta:16.666666666666668,frameDelta:null,frameDeltaSmoothing:!0,frameDeltaSnapping:!0,frameDeltaHistory:[],frameDeltaHistorySize:100,frameRequestId:null,timeBuffer:0,timeLastTick:null,maxUpdates:null,maxFrameTime:33.333333333333336,lastUpdatesDeferred:0,enabled:!0},o=r.extend(s,e);return o.fps=0,o},d.run=function(e,s){return e.timeBuffer=d._frameDeltaFallback,(function o(i){e.frameRequestId=d._onNextFrame(e,o),i&&e.enabled&&d.tick(e,s,i)})(),e},d.tick=function(e,s,o){var i=r.now(),a=e.delta,l=0,f=o-e.timeLastTick;if((!f||!e.timeLastTick||f>Math.max(d._maxFrameDelta,e.maxFrameTime))&&(f=e.frameDelta||d._frameDeltaFallback),e.frameDeltaSmoothing){e.frameDeltaHistory.push(f),e.frameDeltaHistory=e.frameDeltaHistory.slice(-e.frameDeltaHistorySize);var u=e.frameDeltaHistory.slice(0).sort(),v=e.frameDeltaHistory.slice(u.length*d._smoothingLowerBound,u.length*d._smoothingUpperBound),m=n(v);f=m||f}e.frameDeltaSnapping&&(f=1e3/Math.round(1e3/f)),e.frameDelta=f,e.timeLastTick=o,e.timeBuffer+=e.frameDelta,e.timeBuffer=r.clamp(e.timeBuffer,0,e.frameDelta+a*d._timeBufferMargin),e.lastUpdatesDeferred=0;var x=e.maxUpdates||Math.ceil(e.maxFrameTime/a),g={timestamp:s.timing.timestamp};c.trigger(e,"beforeTick",g),c.trigger(e,"tick",g);for(var y=r.now();a>0&&e.timeBuffer>=a*d._timeBufferMargin;){c.trigger(e,"beforeUpdate",g),h.update(s,a),c.trigger(e,"afterUpdate",g),e.timeBuffer-=a,l+=1;var T=r.now()-i,C=r.now()-y,E=T+d._elapsedNextEstimate*C/l;if(l>=x||E>e.maxFrameTime){e.lastUpdatesDeferred=Math.round(Math.max(0,e.timeBuffer/a-d._timeBufferMargin));break}}s.timing.lastUpdatesPerFrame=l,c.trigger(e,"afterTick",g),e.frameDeltaHistory.length>=100&&(e.lastUpdatesDeferred&&Math.round(e.frameDelta/a)>x?r.warnOnce("Matter.Runner: runner reached runner.maxUpdates, see docs."):e.lastUpdatesDeferred&&r.warnOnce("Matter.Runner: runner reached runner.maxFrameTime, see docs."),typeof e.isFixed<"u"&&r.warnOnce("Matter.Runner: runner.isFixed is now redundant, see docs."),(e.deltaMin||e.deltaMax)&&r.warnOnce("Matter.Runner: runner.deltaMin and runner.deltaMax were removed, see docs."),e.fps!==0&&r.warnOnce("Matter.Runner: runner.fps was replaced by runner.delta, see docs."))},d.stop=function(e){d._cancelNextFrame(e)},d._onNextFrame=function(e,s){if(typeof window<"u"&&window.requestAnimationFrame)e.frameRequestId=window.requestAnimationFrame(s);else throw new Error("Matter.Runner: missing required global window.requestAnimationFrame.");return e.frameRequestId},d._cancelNextFrame=function(e){if(typeof window<"u"&&window.cancelAnimationFrame)window.cancelAnimationFrame(e.frameRequestId);else throw new Error("Matter.Runner: missing required global window.cancelAnimationFrame.")};var n=function(e){for(var s=0,o=e.length,i=0;i<o;i+=1)s+=e[i];return s/o||0};d._mean=n})()}),53614:((p,S,t)=>{var d={};p.exports=d;var c=t(22562),h=t(35810),r=t(53402);(function(){d._motionWakeThreshold=.18,d._motionSleepThreshold=.08,d._minBias=.9,d.update=function(n,e){for(var s=e/r._baseDelta,o=d._motionSleepThreshold,i=0;i<n.length;i++){var a=n[i],l=c.getSpeed(a),f=c.getAngularSpeed(a),u=l*l+f*f;if(a.force.x!==0||a.force.y!==0){d.set(a,!1);continue}var v=Math.min(a.motion,u),m=Math.max(a.motion,u);a.motion=d._minBias*v+(1-d._minBias)*m,a.sleepThreshold>0&&a.motion<o?(a.sleepCounter+=1,a.sleepCounter>=a.sleepThreshold/s&&d.set(a,!0)):a.sleepCounter>0&&(a.sleepCounter-=1)}},d.afterCollisions=function(n){for(var e=d._motionSleepThreshold,s=0;s<n.length;s++){var o=n[s];if(o.isActive){var i=o.collision,a=i.bodyA.parent,l=i.bodyB.parent;if(!(a.isSleeping&&l.isSleeping||a.isStatic||l.isStatic)&&(a.isSleeping||l.isSleeping)){var f=a.isSleeping&&!a.isStatic?a:l,u=f===a?l:a;!f.isStatic&&u.motion>e&&d.set(f,!1)}}}},d.set=function(n,e){var s=n.isSleeping;e?(n.isSleeping=!0,n.sleepCounter=n.sleepThreshold,n.positionImpulse.x=0,n.positionImpulse.y=0,n.positionPrev.x=n.position.x,n.positionPrev.y=n.position.y,n.anglePrev=n.angle,n.speed=0,n.angularSpeed=0,n.motion=0,s||h.trigger(n,"sleepStart")):(n.isSleeping=!1,n.sleepCounter=0,s&&h.trigger(n,"sleepEnd"))}})()}),66280:((p,S,t)=>{var d={};p.exports=d;var c=t(41598),h=t(53402),r=t(22562),n=t(15647),e=t(31725);(function(){d.rectangle=function(s,o,i,a,l){l=l||{};var f={label:"Rectangle Body",position:{x:s,y:o},vertices:c.fromPath("L 0 0 L "+i+" 0 L "+i+" "+a+" L 0 "+a)};if(l.chamfer){var u=l.chamfer;f.vertices=c.chamfer(f.vertices,u.radius,u.quality,u.qualityMin,u.qualityMax),delete l.chamfer}return r.create(h.extend({},f,l))},d.trapezoid=function(s,o,i,a,l,f){f=f||{},l>=1&&h.warn("Bodies.trapezoid: slope parameter must be < 1."),l*=.5;var u=(1-l*2)*i,v=i*l,m=v+u,x=m+v,g;l<.5?g="L 0 0 L "+v+" "+-a+" L "+m+" "+-a+" L "+x+" 0":g="L 0 0 L "+m+" "+-a+" L "+x+" 0";var y={label:"Trapezoid Body",position:{x:s,y:o},vertices:c.fromPath(g)};if(f.chamfer){var T=f.chamfer;y.vertices=c.chamfer(y.vertices,T.radius,T.quality,T.qualityMin,T.qualityMax),delete f.chamfer}return r.create(h.extend({},y,f))},d.circle=function(s,o,i,a,l){a=a||{};var f={label:"Circle Body",circleRadius:i};l=l||25;var u=Math.ceil(Math.max(10,Math.min(l,i)));return u%2===1&&(u+=1),d.polygon(s,o,u,i,h.extend({},f,a))},d.polygon=function(s,o,i,a,l){if(l=l||{},i<3)return d.circle(s,o,a,l);for(var f=2*Math.PI/i,u="",v=f*.5,m=0;m<i;m+=1){var x=v+m*f,g=Math.cos(x)*a,y=Math.sin(x)*a;u+="L "+g.toFixed(3)+" "+y.toFixed(3)+" "}var T={label:"Polygon Body",position:{x:s,y:o},vertices:c.fromPath(u)};if(l.chamfer){var C=l.chamfer;T.vertices=c.chamfer(T.vertices,C.radius,C.quality,C.qualityMin,C.qualityMax),delete l.chamfer}return r.create(h.extend({},T,l))},d.fromVertices=function(s,o,i,a,l,f,u,v){var m=h.getDecomp(),x,g,y,T,C,E,M,P,A,R,F;for(x=!!(m&&m.quickDecomp),a=a||{},y=[],l=typeof l<"u"?l:!1,f=typeof f<"u"?f:.01,u=typeof u<"u"?u:10,v=typeof v<"u"?v:.01,h.isArray(i[0])||(i=[i]),R=0;R<i.length;R+=1)if(E=i[R],T=c.isConvex(E),C=!T,C&&!x&&h.warnOnce("Bodies.fromVertices: Install the 'poly-decomp' library and use Common.setDecomp or provide 'decomp' as a global to decompose concave vertices."),T||!x)T?E=c.clockwiseSort(E):E=c.hull(E),y.push({position:{x:s,y:o},vertices:E});else{var w=E.map(function(V){return[V.x,V.y]});m.makeCCW(w),f!==!1&&m.removeCollinearPoints(w,f),v!==!1&&m.removeDuplicatePoints&&m.removeDuplicatePoints(w,v);var I=m.quickDecomp(w);for(M=0;M<I.length;M++){var U=I[M],N=U.map(function(V){return{x:V[0],y:V[1]}});u>0&&c.area(N)<u||y.push({position:c.centre(N),vertices:N})}}for(M=0;M<y.length;M++)y[M]=r.create(h.extend(y[M],a));if(l){var D=5;for(M=0;M<y.length;M++){var B=y[M];for(P=M+1;P<y.length;P++){var L=y[P];if(n.overlaps(B.bounds,L.bounds)){var G=B.vertices,O=L.vertices;for(A=0;A<B.vertices.length;A++)for(F=0;F<L.vertices.length;F++){var X=e.magnitudeSquared(e.sub(G[(A+1)%G.length],O[F])),z=e.magnitudeSquared(e.sub(G[A],O[(F+1)%O.length]));X<D&&z<D&&(G[A].isInternal=!0,O[F].isInternal=!0)}}}}}return y.length>1?(g=r.create(h.extend({parts:y.slice(0)},a)),r.setPosition(g,{x:s,y:o}),g):y[0]},d.flagCoincidentParts=function(s,o){o===void 0&&(o=5);for(var i=0;i<s.length;i++)for(var a=s[i],l=i+1;l<s.length;l++){var f=s[l];if(n.overlaps(a.bounds,f.bounds))for(var u=a.vertices,v=f.vertices,m=0;m<a.vertices.length;m++)for(var x=0;x<f.vertices.length;x++){var g=e.magnitudeSquared(e.sub(u[(m+1)%u.length],v[x])),y=e.magnitudeSquared(e.sub(u[m],v[(x+1)%v.length]));g<o&&y<o&&(u[m].isInternal=!0,v[x].isInternal=!0)}}return s}})()}),74116:((p,S,t)=>{var d={};p.exports=d;var c=t(69351),h=t(48140),r=t(53402),n=t(22562),e=t(66280);(function(){d.stack=function(s,o,i,a,l,f,u){for(var v=c.create({label:"Stack"}),m=s,x=o,g,y=0,T=0;T<a;T++){for(var C=0,E=0;E<i;E++){var M=u(m,x,E,T,g,y);if(M){var P=M.bounds.max.y-M.bounds.min.y,A=M.bounds.max.x-M.bounds.min.x;P>C&&(C=P),n.translate(M,{x:A*.5,y:P*.5}),m=M.bounds.max.x+l,c.addBody(v,M),g=M,y+=1}else m+=l}x+=C+f,m=s}return v},d.chain=function(s,o,i,a,l,f){for(var u=s.bodies,v=1;v<u.length;v++){var m=u[v-1],x=u[v],g=m.bounds.max.y-m.bounds.min.y,y=m.bounds.max.x-m.bounds.min.x,T=x.bounds.max.y-x.bounds.min.y,C=x.bounds.max.x-x.bounds.min.x,E={bodyA:m,pointA:{x:y*o,y:g*i},bodyB:x,pointB:{x:C*a,y:T*l}},M=r.extend(E,f);c.addConstraint(s,h.create(M))}return s.label+=" Chain",s},d.mesh=function(s,o,i,a,l){var f=s.bodies,u,v,m,x,g;for(u=0;u<i;u++){for(v=1;v<o;v++)m=f[v-1+u*o],x=f[v+u*o],c.addConstraint(s,h.create(r.extend({bodyA:m,bodyB:x},l)));if(u>0)for(v=0;v<o;v++)m=f[v+(u-1)*o],x=f[v+u*o],c.addConstraint(s,h.create(r.extend({bodyA:m,bodyB:x},l))),a&&v>0&&(g=f[v-1+(u-1)*o],c.addConstraint(s,h.create(r.extend({bodyA:g,bodyB:x},l)))),a&&v<o-1&&(g=f[v+1+(u-1)*o],c.addConstraint(s,h.create(r.extend({bodyA:g,bodyB:x},l))))}return s.label+=" Mesh",s},d.pyramid=function(s,o,i,a,l,f,u){return d.stack(s,o,i,a,l,f,function(v,m,x,g,y,T){var C=Math.min(a,Math.ceil(i/2)),E=y?y.bounds.max.x-y.bounds.min.x:0;if(!(g>C)){g=C-g;var M=g,P=i-1-g;if(!(x<M||x>P)){T===1&&n.translate(y,{x:(x+(i%2===1?1:-1))*E,y:0});var A=y?x*E:0;return u(s+A+x*l,m,x,g,y,T)}}})},d.newtonsCradle=function(s,o,i,a,l){for(var f=c.create({label:"Newtons Cradle"}),u=0;u<i;u++){var v=1.9,m=e.circle(s+u*(a*v),o+l,a,{inertia:1/0,restitution:1,friction:0,frictionAir:1e-4,slop:1}),x=h.create({pointA:{x:s+u*(a*v),y:o},bodyB:m});c.addBody(f,m),c.addConstraint(f,x)}return f},d.car=function(s,o,i,a,l){var f=n.nextGroup(!0),u=20,v=-i*.5+u,m=i*.5-u,x=0,g=c.create({label:"Car"}),y=e.rectangle(s,o,i,a,{collisionFilter:{group:f},chamfer:{radius:a*.5},density:2e-4}),T=e.circle(s+v,o+x,l,{collisionFilter:{group:f},friction:.8}),C=e.circle(s+m,o+x,l,{collisionFilter:{group:f},friction:.8}),E=h.create({bodyB:y,pointB:{x:v,y:x},bodyA:T,stiffness:1,length:0}),M=h.create({bodyB:y,pointB:{x:m,y:x},bodyA:C,stiffness:1,length:0});return c.addBody(g,y),c.addBody(g,T),c.addBody(g,C),c.addConstraint(g,E),c.addConstraint(g,M),g},d.softBody=function(s,o,i,a,l,f,u,v,m,x){m=r.extend({inertia:1/0},m),x=r.extend({stiffness:.2,render:{type:"line",anchors:!1}},x);var g=d.stack(s,o,i,a,l,f,function(y,T){return e.circle(y,T,v,m)});return d.mesh(g,i,a,u,x),g.label="Soft Body",g}})()}),66615:((p,S,t)=>{var d={};p.exports=d;var c=t(31725),h=t(53402);(function(){d.fromVertices=function(r){for(var n={},e=0;e<r.length;e++){var s=(e+1)%r.length,o=c.normalise({x:r[s].y-r[e].y,y:r[e].x-r[s].x}),i=o.y===0?1/0:o.x/o.y;i=i.toFixed(3).toString(),n[i]=o}return h.values(n)},d.rotate=function(r,n){if(n!==0)for(var e=Math.cos(n),s=Math.sin(n),o=0;o<r.length;o++){var i=r[o],a;a=i.x*e-i.y*s,i.y=i.x*s+i.y*e,i.x=a}}})()}),15647:(p=>{var S={};p.exports=S,(function(){S.create=function(t){var d={min:{x:0,y:0},max:{x:0,y:0}};return t&&S.update(d,t),d},S.update=function(t,d,c){t.min.x=1/0,t.max.x=-1/0,t.min.y=1/0,t.max.y=-1/0;for(var h=0;h<d.length;h++){var r=d[h];r.x>t.max.x&&(t.max.x=r.x),r.x<t.min.x&&(t.min.x=r.x),r.y>t.max.y&&(t.max.y=r.y),r.y<t.min.y&&(t.min.y=r.y)}c&&(c.x>0?t.max.x+=c.x:t.min.x+=c.x,c.y>0?t.max.y+=c.y:t.min.y+=c.y)},S.contains=function(t,d){return d.x>=t.min.x&&d.x<=t.max.x&&d.y>=t.min.y&&d.y<=t.max.y},S.overlaps=function(t,d){return t.min.x<=d.max.x&&t.max.x>=d.min.x&&t.max.y>=d.min.y&&t.min.y<=d.max.y},S.translate=function(t,d){t.min.x+=d.x,t.max.x+=d.x,t.min.y+=d.y,t.max.y+=d.y},S.shift=function(t,d){var c=t.max.x-t.min.x,h=t.max.y-t.min.y;t.min.x=d.x,t.max.x=d.x+c,t.min.y=d.y,t.max.y=d.y+h},S.wrap=function(t,d,c){var h=null,r=null;if(typeof d.min.x<"u"&&typeof d.max.x<"u"&&(t.min.x>d.max.x?h=d.min.x-t.max.x:t.max.x<d.min.x&&(h=d.max.x-t.min.x)),typeof d.min.y<"u"&&typeof d.max.y<"u"&&(t.min.y>d.max.y?r=d.min.y-t.max.y:t.max.y<d.min.y&&(r=d.max.y-t.min.y)),h!==null||r!==null)return{x:h||0,y:r||0}}})()}),74058:((p,S,t)=>{var d={};p.exports=d,t(15647);var c=t(53402);(function(){d.pathToVertices=function(h,r){typeof window<"u"&&!("SVGPathSeg"in window)&&c.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var n,e,s,o,i,a,l,f,u,v,m=[],x,g,y=0,T=0,C=0;r=r||15;var E=function(P,A,R){var F=R%2===1&&R>1;if(!u||P!=u.x||A!=u.y){u&&F?(x=u.x,g=u.y):(x=0,g=0);var w={x:x+P,y:g+A};(F||!u)&&(u=w),m.push(w),T=x+P,C=g+A}},M=function(P){var A=P.pathSegTypeAsLetter.toUpperCase();if(A!=="Z"){switch(A){case"M":case"L":case"T":case"C":case"S":case"Q":T=P.x,C=P.y;break;case"H":T=P.x;break;case"V":C=P.y;break}E(T,C,P.pathSegType)}};for(d._svgPathToAbsolute(h),s=h.getTotalLength(),a=[],n=0;n<h.pathSegList.numberOfItems;n+=1)a.push(h.pathSegList.getItem(n));for(l=a.concat();y<s;){if(v=h.getPathSegAtLength(y),i=a[v],i!=f){for(;l.length&&l[0]!=i;)M(l.shift());f=i}switch(i.pathSegTypeAsLetter.toUpperCase()){case"C":case"T":case"S":case"Q":case"A":o=h.getPointAtLength(y),E(o.x,o.y,0);break}y+=r}for(n=0,e=l.length;n<e;++n)M(l[n]);return m},d._svgPathToAbsolute=function(h){for(var r,n,e,s,o,i,a=h.pathSegList,l=0,f=0,u=a.numberOfItems,v=0;v<u;++v){var m=a.getItem(v),x=m.pathSegTypeAsLetter;if(/[MLHVCSQTA]/.test(x))"x"in m&&(l=m.x),"y"in m&&(f=m.y);else switch("x1"in m&&(e=l+m.x1),"x2"in m&&(o=l+m.x2),"y1"in m&&(s=f+m.y1),"y2"in m&&(i=f+m.y2),"x"in m&&(l+=m.x),"y"in m&&(f+=m.y),x){case"m":a.replaceItem(h.createSVGPathSegMovetoAbs(l,f),v);break;case"l":a.replaceItem(h.createSVGPathSegLinetoAbs(l,f),v);break;case"h":a.replaceItem(h.createSVGPathSegLinetoHorizontalAbs(l),v);break;case"v":a.replaceItem(h.createSVGPathSegLinetoVerticalAbs(f),v);break;case"c":a.replaceItem(h.createSVGPathSegCurvetoCubicAbs(l,f,e,s,o,i),v);break;case"s":a.replaceItem(h.createSVGPathSegCurvetoCubicSmoothAbs(l,f,o,i),v);break;case"q":a.replaceItem(h.createSVGPathSegCurvetoQuadraticAbs(l,f,e,s),v);break;case"t":a.replaceItem(h.createSVGPathSegCurvetoQuadraticSmoothAbs(l,f),v);break;case"a":a.replaceItem(h.createSVGPathSegArcAbs(l,f,m.r1,m.r2,m.angle,m.largeArcFlag,m.sweepFlag),v);break;case"z":case"Z":l=r,f=n;break}(x=="M"||x=="m")&&(r=l,n=f)}}})()}),31725:(p=>{var S={};p.exports=S,(function(){S.create=function(t,d){return{x:t||0,y:d||0}},S.clone=function(t){return{x:t.x,y:t.y}},S.magnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},S.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},S.rotate=function(t,d,c){var h=Math.cos(d),r=Math.sin(d);c||(c={});var n=t.x*h-t.y*r;return c.y=t.x*r+t.y*h,c.x=n,c},S.rotateAbout=function(t,d,c,h){var r=Math.cos(d),n=Math.sin(d);h||(h={});var e=c.x+((t.x-c.x)*r-(t.y-c.y)*n);return h.y=c.y+((t.x-c.x)*n+(t.y-c.y)*r),h.x=e,h},S.normalise=function(t){var d=S.magnitude(t);return d===0?{x:0,y:0}:{x:t.x/d,y:t.y/d}},S.dot=function(t,d){return t.x*d.x+t.y*d.y},S.cross=function(t,d){return t.x*d.y-t.y*d.x},S.cross3=function(t,d,c){return(d.x-t.x)*(c.y-t.y)-(d.y-t.y)*(c.x-t.x)},S.add=function(t,d,c){return c||(c={}),c.x=t.x+d.x,c.y=t.y+d.y,c},S.sub=function(t,d,c){return c||(c={}),c.x=t.x-d.x,c.y=t.y-d.y,c},S.mult=function(t,d){return{x:t.x*d,y:t.y*d}},S.div=function(t,d){return{x:t.x/d,y:t.y/d}},S.perp=function(t,d){return d=d===!0?-1:1,{x:d*-t.y,y:d*t.x}},S.neg=function(t){return{x:-t.x,y:-t.y}},S.angle=function(t,d){return Math.atan2(d.y-t.y,d.x-t.x)},S._temp=[S.create(),S.create(),S.create(),S.create(),S.create(),S.create()]})()}),41598:((p,S,t)=>{var d={};p.exports=d;var c=t(31725),h=t(53402);(function(){d.create=function(r,n){for(var e=[],s=0;s<r.length;s++){var o=r[s],i={x:o.x,y:o.y,index:s,body:n,isInternal:!1};e.push(i)}return e},d.fromPath=function(r,n){var e=/L?\s*([-\d.e]+)[\s,]*([-\d.e]+)*/ig,s=[];return r.replace(e,function(o,i,a){s.push({x:parseFloat(i),y:parseFloat(a)})}),d.create(s,n)},d.centre=function(r){for(var n=d.area(r,!0),e={x:0,y:0},s,o,i,a=0;a<r.length;a++)i=(a+1)%r.length,s=c.cross(r[a],r[i]),o=c.mult(c.add(r[a],r[i]),s),e=c.add(e,o);return c.div(e,6*n)},d.mean=function(r){for(var n={x:0,y:0},e=0;e<r.length;e++)n.x+=r[e].x,n.y+=r[e].y;return c.div(n,r.length)},d.area=function(r,n){for(var e=0,s=r.length-1,o=0;o<r.length;o++)e+=(r[s].x-r[o].x)*(r[s].y+r[o].y),s=o;return n?e/2:Math.abs(e)/2},d.inertia=function(r,n){for(var e=0,s=0,o=r,i,a,l=0;l<o.length;l++)a=(l+1)%o.length,i=Math.abs(c.cross(o[a],o[l])),e+=i*(c.dot(o[a],o[a])+c.dot(o[a],o[l])+c.dot(o[l],o[l])),s+=i;return n/6*(e/s)},d.translate=function(r,n,e){e=typeof e<"u"?e:1;var s=r.length,o=n.x*e,i=n.y*e,a;for(a=0;a<s;a++)r[a].x+=o,r[a].y+=i;return r},d.rotate=function(r,n,e){if(n!==0){var s=Math.cos(n),o=Math.sin(n),i=e.x,a=e.y,l=r.length,f,u,v,m;for(m=0;m<l;m++)f=r[m],u=f.x-i,v=f.y-a,f.x=i+(u*s-v*o),f.y=a+(u*o+v*s);return r}},d.contains=function(r,n){for(var e=n.x,s=n.y,o=r.length,i=r[o-1],a,l=0;l<o;l++){if(a=r[l],(e-i.x)*(a.y-i.y)+(s-i.y)*(i.x-a.x)>0)return!1;i=a}return!0},d.scale=function(r,n,e,s){if(n===1&&e===1)return r;s=s||d.centre(r);for(var o,i,a=0;a<r.length;a++)o=r[a],i=c.sub(o,s),r[a].x=s.x+i.x*n,r[a].y=s.y+i.y*e;return r},d.chamfer=function(r,n,e,s,o){typeof n=="number"?n=[n]:n=n||[8],e=typeof e<"u"?e:-1,s=s||2,o=o||14;for(var i=[],a=0;a<r.length;a++){var l=r[a-1>=0?a-1:r.length-1],f=r[a],u=r[(a+1)%r.length],v=n[a<n.length?a:n.length-1];if(v===0){i.push(f);continue}var m=c.normalise({x:f.y-l.y,y:l.x-f.x}),x=c.normalise({x:u.y-f.y,y:f.x-u.x}),g=Math.sqrt(2*Math.pow(v,2)),y=c.mult(h.clone(m),v),T=c.normalise(c.mult(c.add(m,x),.5)),C=c.sub(f,c.mult(T,g)),E=e;e===-1&&(E=Math.pow(v,.32)*1.75),E=h.clamp(E,s,o),E%2===1&&(E+=1);for(var M=Math.acos(c.dot(m,x)),P=M/E,A=0;A<E;A++)i.push(c.add(c.rotate(y,P*A),C))}return i},d.clockwiseSort=function(r){var n=d.mean(r);return r.sort(function(e,s){return c.angle(n,e)-c.angle(n,s)}),r},d.isConvex=function(r){var n=0,e=r.length,s,o,i,a;if(e<3)return null;for(s=0;s<e;s++)if(o=(s+1)%e,i=(s+2)%e,a=(r[o].x-r[s].x)*(r[i].y-r[o].y),a-=(r[o].y-r[s].y)*(r[i].x-r[o].x),a<0?n|=1:a>0&&(n|=2),n===3)return!1;return n!==0?!0:null},d.hull=function(r){var n=[],e=[],s,o;for(r=r.slice(0),r.sort(function(i,a){var l=i.x-a.x;return l!==0?l:i.y-a.y}),o=0;o<r.length;o+=1){for(s=r[o];e.length>=2&&c.cross3(e[e.length-2],e[e.length-1],s)<=0;)e.pop();e.push(s)}for(o=r.length-1;o>=0;o-=1){for(s=r[o];n.length>=2&&c.cross3(n[n.length-2],n[n.length-1],s)<=0;)n.pop();n.push(s)}return n.pop(),e.pop(),n.concat(e)}})()}),55973:(p=>{p.exports={decomp:M,quickDecomp:F,isSimple:A,removeCollinearPoints:w,removeDuplicatePoints:I,makeCCW:u};function S(D,B,L){L=L||0;var G=[0,0],O,X,z,V,Y,W,H;return O=D[1][1]-D[0][1],X=D[0][0]-D[1][0],z=O*D[0][0]+X*D[0][1],V=B[1][1]-B[0][1],Y=B[0][0]-B[1][0],W=V*B[0][0]+Y*B[0][1],H=O*Y-V*X,U(H,0,L)||(G[0]=(Y*z-X*W)/H,G[1]=(O*W-V*z)/H),G}function t(D,B,L,G){var O=B[0]-D[0],X=B[1]-D[1],z=G[0]-L[0],V=G[1]-L[1];if(z*X-V*O===0)return!1;var Y=(O*(L[1]-D[1])+X*(D[0]-L[0]))/(z*X-V*O),W=(z*(D[1]-L[1])+V*(L[0]-D[0]))/(V*O-z*X);return Y>=0&&Y<=1&&W>=0&&W<=1}function d(D,B,L){return(B[0]-D[0])*(L[1]-D[1])-(L[0]-D[0])*(B[1]-D[1])}function c(D,B,L){return d(D,B,L)>0}function h(D,B,L){return d(D,B,L)>=0}function r(D,B,L){return d(D,B,L)<0}function n(D,B,L){return d(D,B,L)<=0}var e=[],s=[];function o(D,B,L,G){if(G){var O=e,X=s;O[0]=B[0]-D[0],O[1]=B[1]-D[1],X[0]=L[0]-B[0],X[1]=L[1]-B[1];var z=O[0]*X[0]+O[1]*X[1],V=Math.sqrt(O[0]*O[0]+O[1]*O[1]),Y=Math.sqrt(X[0]*X[0]+X[1]*X[1]),W=Math.acos(z/(V*Y));return W<G}else return d(D,B,L)===0}function i(D,B){var L=B[0]-D[0],G=B[1]-D[1];return L*L+G*G}function a(D,B){var L=D.length;return D[B<0?B%L+L:B%L]}function l(D){D.length=0}function f(D,B,L,G){for(var O=L;O<G;O++)D.push(B[O])}function u(D){for(var B=0,L=D,G=1;G<D.length;++G)(L[G][1]<L[B][1]||L[G][1]===L[B][1]&&L[G][0]>L[B][0])&&(B=G);return c(a(D,B-1),a(D,B),a(D,B+1))?!1:(v(D),!0)}function v(D){for(var B=[],L=D.length,G=0;G!==L;G++)B.push(D.pop());for(var G=0;G!==L;G++)D[G]=B[G]}function m(D,B){return r(a(D,B-1),a(D,B),a(D,B+1))}var x=[],g=[];function y(D,B,L){var G,O,X=x,z=g;if(h(a(D,B+1),a(D,B),a(D,L))&&n(a(D,B-1),a(D,B),a(D,L)))return!1;O=i(a(D,B),a(D,L));for(var V=0;V!==D.length;++V)if(!((V+1)%D.length===B||V===B)&&h(a(D,B),a(D,L),a(D,V+1))&&n(a(D,B),a(D,L),a(D,V))&&(X[0]=a(D,B),X[1]=a(D,L),z[0]=a(D,V),z[1]=a(D,V+1),G=S(X,z),i(a(D,B),G)<O))return!1;return!0}function T(D,B,L){for(var G=0;G!==D.length;++G)if(!(G===B||G===L||(G+1)%D.length===B||(G+1)%D.length===L)&&t(a(D,B),a(D,L),a(D,G),a(D,G+1)))return!1;return!0}function C(D,B,L,G){var O=G||[];if(l(O),B<L)for(var X=B;X<=L;X++)O.push(D[X]);else{for(var X=0;X<=L;X++)O.push(D[X]);for(var X=B;X<D.length;X++)O.push(D[X])}return O}function E(D){for(var B=[],L=[],G=[],O=[],X=Number.MAX_VALUE,z=0;z<D.length;++z)if(m(D,z)){for(var V=0;V<D.length;++V)if(y(D,z,V)){L=E(C(D,z,V,O)),G=E(C(D,V,z,O));for(var Y=0;Y<G.length;Y++)L.push(G[Y]);L.length<X&&(B=L,X=L.length,B.push([a(D,z),a(D,V)]))}}return B}function M(D){var B=E(D);return B.length>0?P(D,B):[D]}function P(D,B){if(B.length===0)return[D];if(B instanceof Array&&B.length&&B[0]instanceof Array&&B[0].length===2&&B[0][0]instanceof Array){for(var L=[D],G=0;G<B.length;G++)for(var O=B[G],X=0;X<L.length;X++){var z=L[X],V=P(z,O);if(V){L.splice(X,1),L.push(V[0],V[1]);break}}return L}else{var O=B,G=D.indexOf(O[0]),X=D.indexOf(O[1]);return G!==-1&&X!==-1?[C(D,G,X),C(D,X,G)]:!1}}function A(D){var B=D,L;for(L=0;L<B.length-1;L++)for(var G=0;G<L-1;G++)if(t(B[L],B[L+1],B[G],B[G+1]))return!1;for(L=1;L<B.length-2;L++)if(t(B[0],B[B.length-1],B[L],B[L+1]))return!1;return!0}function R(D,B,L,G,O){O=O||0;var X=B[1]-D[1],z=D[0]-B[0],V=X*D[0]+z*D[1],Y=G[1]-L[1],W=L[0]-G[0],H=Y*L[0]+W*L[1],K=X*W-Y*z;return U(K,0,O)?[0,0]:[(W*V-z*H)/K,(X*H-Y*V)/K]}function F(D,B,L,G,O,X,z){X=X||100,z=z||0,O=O||25,B=typeof B<"u"?B:[],L=L||[],G=G||[];var V=[0,0],Y=[0,0],W=[0,0],H=0,K=0,b=0,J=0,$=0,Z=0,q=0,_=[],tt=[],Q=D,j=D;if(j.length<3)return B;if(z++,z>X)return console.warn("quickDecomp: max level ("+X+") reached."),B;for(var k=0;k<D.length;++k)if(m(Q,k)){L.push(Q[k]),H=K=Number.MAX_VALUE;for(var et=0;et<D.length;++et)c(a(Q,k-1),a(Q,k),a(Q,et))&&n(a(Q,k-1),a(Q,k),a(Q,et-1))&&(W=R(a(Q,k-1),a(Q,k),a(Q,et),a(Q,et-1)),r(a(Q,k+1),a(Q,k),W)&&(b=i(Q[k],W),b<K&&(K=b,Y=W,Z=et))),c(a(Q,k+1),a(Q,k),a(Q,et+1))&&n(a(Q,k+1),a(Q,k),a(Q,et))&&(W=R(a(Q,k+1),a(Q,k),a(Q,et),a(Q,et+1)),c(a(Q,k-1),a(Q,k),W)&&(b=i(Q[k],W),b<H&&(H=b,V=W,$=et)));if(Z===($+1)%D.length)W[0]=(Y[0]+V[0])/2,W[1]=(Y[1]+V[1])/2,G.push(W),k<$?(f(_,Q,k,$+1),_.push(W),tt.push(W),Z!==0&&f(tt,Q,Z,Q.length),f(tt,Q,0,k+1)):(k!==0&&f(_,Q,k,Q.length),f(_,Q,0,$+1),_.push(W),tt.push(W),f(tt,Q,Z,k+1));else{if(Z>$&&($+=D.length),J=Number.MAX_VALUE,$<Z)return B;for(var et=Z;et<=$;++et)h(a(Q,k-1),a(Q,k),a(Q,et))&&n(a(Q,k+1),a(Q,k),a(Q,et))&&(b=i(a(Q,k),a(Q,et)),b<J&&T(Q,k,et)&&(J=b,q=et%D.length));k<q?(f(_,Q,k,q+1),q!==0&&f(tt,Q,q,j.length),f(tt,Q,0,k+1)):(k!==0&&f(_,Q,k,j.length),f(_,Q,0,q+1),f(tt,Q,q,k+1))}return _.length<tt.length?(F(_,B,L,G,O,X,z),F(tt,B,L,G,O,X,z)):(F(tt,B,L,G,O,X,z),F(_,B,L,G,O,X,z)),B}return B.push(D),B}function w(D,B){for(var L=0,G=D.length-1;D.length>3&&G>=0;--G)o(a(D,G-1),a(D,G),a(D,G+1),B)&&(D.splice(G%D.length,1),L++);return L}function I(D,B){for(var L=D.length-1;L>=1;--L)for(var G=D[L],O=L-1;O>=0;--O)if(N(G,D[O],B)){D.splice(L,1);continue}}function U(D,B,L){return L=L||0,Math.abs(D-B)<=L}function N(D,B,L){return U(D[0],B[0],L)&&U(D[1],B[1],L)}}),52018:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r){this.pluginManager=r,this.game=r.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});p.exports=c}),42363:(p=>{var S={Global:["game","anims","cache","plugins","registry","scale","sound","textures","renderer"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]};p.exports=S}),37277:(p=>{var S={},t={},d={};d.register=function(c,h,r,n){n===void 0&&(n=!1),S[c]={plugin:h,mapping:r,custom:n}},d.registerCustom=function(c,h,r,n){t[c]={plugin:h,mapping:r,data:n}},d.hasCore=function(c){return S.hasOwnProperty(c)},d.hasCustom=function(c){return t.hasOwnProperty(c)},d.getCore=function(c){return S[c]},d.getCustom=function(c){return t[c]},d.getCustomClass=function(c){return t.hasOwnProperty(c)?t[c].plugin:null},d.remove=function(c){S.hasOwnProperty(c)&&delete S[c]},d.removeCustom=function(c){t.hasOwnProperty(c)&&delete t[c]},d.destroyCorePlugins=function(){for(var c in S)S.hasOwnProperty(c)&&delete S[c]},d.destroyCustomPlugins=function(){for(var c in t)t.hasOwnProperty(c)&&delete t[c]},p.exports=d}),77332:((p,S,t)=>{var d=t(83419),c=t(8443),h=t(50792),r=t(74099),n=t(44603),e=t(39429),s=t(95540),o=t(37277),i=t(72905),a=t(8054),l=new d({Extends:h,initialize:function(u){h.call(this),this.game=u,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],u.isBooted||u.config.renderType===a.HEADLESS?this.boot():u.events.once(c.BOOT,this.boot,this)},boot:function(){var f,u,v,m,x,g,y,T=this.game.config,C=T.installGlobalPlugins;for(C=C.concat(this._pendingGlobal),f=0;f<C.length;f++)u=C[f],v=s(u,"key",null),m=s(u,"plugin",null),x=s(u,"start",!1),g=s(u,"mapping",null),y=s(u,"data",null),v&&(m?this.install(v,m,x,g,y):console.warn("Missing `plugin` for key: "+v));for(C=T.installScenePlugins,C=C.concat(this._pendingScene),f=0;f<C.length;f++)u=C[f],v=s(u,"key",null),m=s(u,"plugin",null),g=s(u,"mapping",null),v&&(m?this.installScenePlugin(v,m,g):console.warn("Missing `plugin` for key: "+v));this._pendingGlobal=[],this._pendingScene=[],this.game.events.once(c.DESTROY,this.destroy,this)},addToScene:function(f,u,v){var m,x,g,y=this.game,T=f.scene,C=f.settings.map,E=f.settings.isBooted;for(m=0;m<u.length;m++)x=u[m],y[x]?(f[x]=y[x],C.hasOwnProperty(x)&&(T[C[x]]=f[x])):x==="game"&&C.hasOwnProperty(x)&&(T[C[x]]=y);for(var M=0;M<v.length;M++)for(g=v[M],m=0;m<g.length;m++)if(x=g[m],!!o.hasCore(x)){var P=o.getCore(x),A=P.mapping,R=new P.plugin(T,this,A);f[A]=R,P.custom?T[A]=R:C.hasOwnProperty(A)&&(T[C[A]]=R),E&&R.boot()}for(g=this.plugins,m=0;m<g.length;m++){var F=g[m];F.mapping&&(T[F.mapping]=F.plugin)}},getDefaultScenePlugins:function(){var f=this.game.config.defaultPlugins;return f=f.concat(this.scenePlugins),f},installScenePlugin:function(f,u,v,m,x){if(x===void 0&&(x=!1),typeof u!="function"){console.warn("Invalid Scene Plugin: "+f);return}if(o.hasCore(f)||o.register(f,u,v,!0),this.scenePlugins.indexOf(f)===-1)this.scenePlugins.push(f);else if(!x&&o.hasCore(f)){console.warn("Scene Plugin key in use: "+f);return}if(m){var g=new u(m,this,f);m.sys[f]=g,v&&v!==""&&(m[v]=g),g.boot()}},install:function(f,u,v,m,x){if(v===void 0&&(v=!1),m===void 0&&(m=null),x===void 0&&(x=null),typeof u!="function")return console.warn("Invalid Plugin: "+f),null;if(o.hasCustom(f))return console.warn("Plugin key in use: "+f),null;if(m!==null&&(v=!0),!this.game.isBooted)this._pendingGlobal.push({key:f,plugin:u,start:v,mapping:m,data:x});else if(o.registerCustom(f,u,m,x),v)return this.start(f);return null},getIndex:function(f){for(var u=this.plugins,v=0;v<u.length;v++){var m=u[v];if(m.key===f)return v}return-1},getEntry:function(f){var u=this.getIndex(f);if(u!==-1)return this.plugins[u]},isActive:function(f){var u=this.getEntry(f);return u&&u.active},start:function(f,u){u===void 0&&(u=f);var v=this.getEntry(u);return v&&!v.active?(v.active=!0,v.plugin.start()):v||(v=this.createEntry(f,u)),v?v.plugin:null},createEntry:function(f,u){var v=o.getCustom(f);if(v){var m=new v.plugin(this);v={key:u,plugin:m,active:!0,mapping:v.mapping,data:v.data},this.plugins.push(v),m.init(v.data),m.start()}return v},stop:function(f){var u=this.getEntry(f);return u&&u.active&&(u.active=!1,u.plugin.stop()),this},get:function(f,u){u===void 0&&(u=!0);var v=this.getEntry(f);if(v)return v.plugin;var m=this.getClass(f);return m&&u?(v=this.createEntry(f,f),v?v.plugin:null):m||null},getClass:function(f){return o.getCustomClass(f)},removeGlobalPlugin:function(f){var u=this.getEntry(f);u&&i(this.plugins,u),o.removeCustom(f)},removeScenePlugin:function(f){i(this.scenePlugins,f),o.remove(f)},registerGameObject:function(f,u,v){return u&&e.register(f,u),v&&n.register(f,v),this},removeGameObject:function(f,u,v){return u===void 0&&(u=!0),v===void 0&&(v=!0),u&&e.remove(f),v&&n.remove(f),this},registerFileType:function(f,u,v){r.register(f,u),v&&v.sys.load&&(v.sys.load[f]=u)},destroy:function(){for(var f=0;f<this.plugins.length;f++)this.plugins[f].plugin.destroy();o.destroyCustomPlugins(),this.game.noReturn&&o.destroyCorePlugins(),this.game=null,this.plugins=[],this.scenePlugins=[]}});p.exports=l}),45145:((p,S,t)=>{var d=t(52018),c=t(83419),h=t(44594),r=new c({Extends:d,initialize:function(e,s,o){d.call(this,s),this.scene=e,this.systems=e.sys,this.pluginKey=o,e.sys.events.once(h.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});p.exports=r}),18922:((p,S,t)=>{p.exports={BasePlugin:t(52018),DefaultPlugins:t(42363),PluginCache:t(37277),PluginManager:t(77332),ScenePlugin:t(45145)}}),63595:(()=>{typeof HTMLVideoElement<"u"&&!("requestVideoFrameCallback"in HTMLVideoElement.prototype)&&"getVideoPlaybackQuality"in HTMLVideoElement.prototype&&(HTMLVideoElement.prototype._rvfcpolyfillmap={},HTMLVideoElement.prototype.requestVideoFrameCallback=function(p){const S=performance.now(),t=this.getVideoPlaybackQuality(),d=this.mozPresentedFrames||this.mozPaintedFrames||t.totalVideoFrames-t.droppedVideoFrames,c=(h,r)=>{const n=this.getVideoPlaybackQuality(),e=this.mozPresentedFrames||this.mozPaintedFrames||n.totalVideoFrames-n.droppedVideoFrames;if(e>d){const s=this.mozFrameDelay||n.totalFrameDelay-t.totalFrameDelay||0,o=r-h;p(r,{presentationTime:r+s*1e3,expectedDisplayTime:r+o,width:this.videoWidth,height:this.videoHeight,mediaTime:Math.max(0,this.currentTime||0)+o/1e3,presentedFrames:e,processingDuration:s}),delete this._rvfcpolyfillmap[S]}else this._rvfcpolyfillmap[S]=requestAnimationFrame(s=>c(r,s))};return this._rvfcpolyfillmap[S]=requestAnimationFrame(h=>c(S,h)),S},HTMLVideoElement.prototype.cancelVideoFrameCallback=function(p){cancelAnimationFrame(this._rvfcpolyfillmap[p]),delete this._rvfcpolyfillmap[p]})}),10312:(p=>{p.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}}),29795:(p=>{var S={DEFAULT:0,LINEAR:0,NEAREST:1};p.exports=S}),68627:((p,S,t)=>{var d=t(19715),c=t(32880),h=t(83419),r=t(8054),n=t(50792),e=t(92503),s=t(56373),o=t(97480),i=t(69442),a=t(8443),l=t(61340),f=new h({Extends:n,initialize:function(v){n.call(this);var m=v.config;this.config={clearBeforeRender:m.clearBeforeRender,backgroundColor:m.backgroundColor,antialias:m.antialias,roundPixels:m.roundPixels,transparent:m.transparent},this.game=v,this.type=r.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=v.canvas;var x={alpha:m.transparent,desynchronized:m.desynchronized,willReadFrequently:!1};this.gameContext=m.context?m.context:this.gameCanvas.getContext("2d",x),this.currentContext=this.gameContext,this.antialias=m.antialias,this.blendModes=s(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new l,this._tempMatrix2=new l,this._tempMatrix3=new l,this.isBooted=!1,this.init()},init:function(){var u=this.game;u.events.once(a.BOOT,function(){var v=this.config;if(!v.transparent){var m=this.gameContext,x=this.gameCanvas;m.fillStyle=v.backgroundColor.rgba,m.fillRect(0,0,x.width,x.height)}},this),u.textures.once(i.READY,this.boot,this)},boot:function(){var u=this.game,v=u.scale.baseSize;this.width=v.width,this.height=v.height,this.isBooted=!0,u.scale.on(o.RESIZE,this.onResize,this),this.resize(v.width,v.height)},onResize:function(u,v){(v.width!==this.width||v.height!==this.height)&&this.resize(v.width,v.height)},resize:function(u,v){this.width=u,this.height=v,this.emit(e.RESIZE,u,v)},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(u){return this.currentContext.globalCompositeOperation=u,this},setContext:function(u){return this.currentContext=u||this.gameContext,this},setAlpha:function(u){return this.currentContext.globalAlpha=u,this},preRender:function(){var u=this.gameContext,v=this.config,m=this.width,x=this.height;u.globalAlpha=1,u.globalCompositeOperation="source-over",u.setTransform(1,0,0,1,0,0),this.emit(e.PRE_RENDER_CLEAR),v.clearBeforeRender&&(u.clearRect(0,0,m,x),v.transparent||(u.fillStyle=v.backgroundColor.rgba,u.fillRect(0,0,m,x))),u.save(),this.drawCount=0,this.emit(e.PRE_RENDER)},render:function(u,v,m){var x=v.length;this.emit(e.RENDER,u,m);var g=m.x,y=m.y,T=m.width,C=m.height,E=m.renderToTexture?m.context:u.sys.context;E.save(),this.game.scene.customViewports&&(E.beginPath(),E.rect(g,y,T,C),E.clip()),m.emit(d.PRE_RENDER,m),this.currentContext=E;var M=m.mask;M&&M.preRenderCanvas(this,null,m._maskCamera),m.transparent||(E.fillStyle=m.backgroundColor.rgba,E.fillRect(g,y,T,C)),E.globalAlpha=m.alpha,E.globalCompositeOperation="source-over",this.drawCount+=x,m.renderToTexture&&m.emit(d.PRE_RENDER,m),m.matrix.copyToContext(E);for(var P=0;P<x;P++){var A=v[P];A.mask&&A.mask.preRenderCanvas(this,A,m),A.renderCanvas(this,A,m),A.mask&&A.mask.postRenderCanvas(this,A,m)}E.setTransform(1,0,0,1,0,0),E.globalCompositeOperation="source-over",E.globalAlpha=1,m.flashEffect.postRenderCanvas(E),m.fadeEffect.postRenderCanvas(E),m.dirty=!1,M&&M.postRenderCanvas(this),E.restore(),m.renderToTexture&&(m.emit(d.POST_RENDER,m),m.renderToGame&&u.sys.context.drawImage(m.canvas,g,y)),m.emit(d.POST_RENDER,m)},postRender:function(){var u=this.gameContext;u.restore(),this.emit(e.POST_RENDER);var v=this.snapshotState;v.callback&&(c(this.gameCanvas,v),v.callback=null)},snapshotCanvas:function(u,v,m,x,g,y,T,C,E){m===void 0&&(m=!1),this.snapshotArea(x,g,y,T,v,C,E);var M=this.snapshotState;return M.getPixel=m,c(u,M),M.callback=null,this},snapshot:function(u,v,m){return this.snapshotArea(0,0,this.gameCanvas.width,this.gameCanvas.height,u,v,m)},snapshotArea:function(u,v,m,x,g,y,T){var C=this.snapshotState;return C.callback=g,C.type=y,C.encoder=T,C.getPixel=!1,C.x=u,C.y=v,C.width=Math.min(m,this.gameCanvas.width),C.height=Math.min(x,this.gameCanvas.height),this},snapshotPixel:function(u,v,m){return this.snapshotArea(u,v,1,1,m),this.snapshotState.getPixel=!0,this},batchSprite:function(u,v,m,x){var g=m.alpha*u.alpha;if(g!==0){var y=this.currentContext,T=this._tempMatrix1,C=this._tempMatrix2,E=v.canvasData,M=E.x,P=E.y,A=v.cutWidth,R=v.cutHeight,F=v.customPivot,w=v.source.resolution,I=u.displayOriginX,U=u.displayOriginY,N=-I+v.x,D=-U+v.y;if(u.isCropped){var B=u._crop;(B.flipX!==u.flipX||B.flipY!==u.flipY)&&v.updateCropUVs(B,u.flipX,u.flipY),A=B.cw,R=B.ch,M=B.cx,P=B.cy,N=-I+B.x,D=-U+B.y,u.flipX&&(N>=0?N=-(N+A):N<0&&(N=Math.abs(N)-A)),u.flipY&&(D>=0?D=-(D+R):D<0&&(D=Math.abs(D)-R))}var L=1,G=1;u.flipX&&(F||(N+=-v.realWidth+I*2),L=-1),u.flipY&&(F||(D+=-v.realHeight+U*2),G=-1);var O=u.x,X=u.y;if(m.roundPixels&&(O=Math.floor(O),X=Math.floor(X)),C.applyITRS(O,X,u.rotation,u.scaleX*L,u.scaleY*G),T.copyFrom(m.matrix),x?(T.multiplyWithOffset(x,-m.scrollX*u.scrollFactorX,-m.scrollY*u.scrollFactorY),C.e=O,C.f=X):(C.e-=m.scrollX*u.scrollFactorX,C.f-=m.scrollY*u.scrollFactorY),T.multiply(C),m.renderRoundPixels&&(T.e=Math.floor(T.e+.5),T.f=Math.floor(T.f+.5)),y.save(),T.setToContext(y),y.globalCompositeOperation=this.blendModes[u.blendMode],y.globalAlpha=g,y.imageSmoothingEnabled=!v.source.scaleMode,u.mask&&u.mask.preRenderCanvas(this,u,m),A>0&&R>0){var z=A/w,V=R/w;m.roundPixels&&(N=Math.floor(N+.5),D=Math.floor(D+.5),z+=.5,V+=.5),y.drawImage(v.source.image,M,P,A,R,N,D,z,V)}u.mask&&u.mask.postRenderCanvas(this,u,m),y.restore()}},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}});p.exports=f}),55830:((p,S,t)=>{p.exports={CanvasRenderer:t(68627),GetBlendModes:t(56373),SetTransform:t(20926)}}),56373:((p,S,t)=>{var d=t(10312),c=t(89289),h=function(){var r=[],n=c.supportNewBlendModes,e="source-over";return r[d.NORMAL]=e,r[d.ADD]="lighter",r[d.MULTIPLY]=n?"multiply":e,r[d.SCREEN]=n?"screen":e,r[d.OVERLAY]=n?"overlay":e,r[d.DARKEN]=n?"darken":e,r[d.LIGHTEN]=n?"lighten":e,r[d.COLOR_DODGE]=n?"color-dodge":e,r[d.COLOR_BURN]=n?"color-burn":e,r[d.HARD_LIGHT]=n?"hard-light":e,r[d.SOFT_LIGHT]=n?"soft-light":e,r[d.DIFFERENCE]=n?"difference":e,r[d.EXCLUSION]=n?"exclusion":e,r[d.HUE]=n?"hue":e,r[d.SATURATION]=n?"saturation":e,r[d.COLOR]=n?"color":e,r[d.LUMINOSITY]=n?"luminosity":e,r[d.ERASE]="destination-out",r[d.SOURCE_IN]="source-in",r[d.SOURCE_OUT]="source-out",r[d.SOURCE_ATOP]="source-atop",r[d.DESTINATION_OVER]="destination-over",r[d.DESTINATION_IN]="destination-in",r[d.DESTINATION_OUT]="destination-out",r[d.DESTINATION_ATOP]="destination-atop",r[d.LIGHTER]="lighter",r[d.COPY]="copy",r[d.XOR]="xor",r};p.exports=h}),20926:((p,S,t)=>{var d=t(91296),c=function(h,r,n,e,s){var o=e.alpha*n.alpha;if(o<=0)return!1;var i=d(n,e,s).calc;return r.globalCompositeOperation=h.blendModes[n.blendMode],r.globalAlpha=o,r.save(),i.setToContext(r),r.imageSmoothingEnabled=n.frame?!n.frame.source.scaleMode:h.antialias,!0};p.exports=c}),63899:(p=>{p.exports="losewebgl"}),6119:(p=>{p.exports="postrender"}),48070:(p=>{p.exports="prerender"}),15640:(p=>{p.exports="render"}),8912:(p=>{p.exports="resize"}),87124:(p=>{p.exports="restorewebgl"}),92503:((p,S,t)=>{p.exports={LOSE_WEBGL:t(63899),POST_RENDER:t(6119),PRE_RENDER:t(48070),RENDER:t(15640),RESIZE:t(8912),RESTORE_WEBGL:t(87124)}}),36909:((p,S,t)=>{p.exports={Events:t(92503),Snapshot:t(89966)},p.exports.Canvas=t(55830),p.exports.WebGL=t(4159)}),32880:((p,S,t)=>{var d=t(27919),c=t(40987),h=t(95540),r=function(n,e){var s=h(e,"callback"),o=h(e,"type","image/png"),i=h(e,"encoder",.92),a=Math.abs(Math.round(h(e,"x",0))),l=Math.abs(Math.round(h(e,"y",0))),f=Math.floor(h(e,"width",n.width)),u=Math.floor(h(e,"height",n.height)),v=h(e,"getPixel",!1);if(v){var m=n.getContext("2d",{willReadFrequently:!1}),x=m.getImageData(a,l,1,1),g=x.data;s.call(null,new c(g[0],g[1],g[2],g[3]))}else if(a!==0||l!==0||f!==n.width||u!==n.height){var y=d.createWebGL(this,f,u),T=y.getContext("2d",{willReadFrequently:!0});f>0&&u>0&&T.drawImage(n,a,l,f,u,0,0,f,u);var C=new Image;C.onerror=function(){s.call(null),d.remove(y)},C.onload=function(){s.call(null,C),d.remove(y)},C.src=y.toDataURL(o,i)}else{var E=new Image;E.onerror=function(){s.call(null)},E.onload=function(){s.call(null,E)},E.src=n.toDataURL(o,i)}};p.exports=r}),88815:((p,S,t)=>{var d=t(27919),c=t(40987),h=t(95540),r=function(n,e){var s=n,o=h(e,"callback"),i=h(e,"type","image/png"),a=h(e,"encoder",.92),l=Math.abs(Math.round(h(e,"x",0))),f=Math.abs(Math.round(h(e,"y",0))),u=h(e,"getPixel",!1),v=h(e,"isFramebuffer",!1),m=v?h(e,"bufferWidth",1):s.drawingBufferWidth,x=v?h(e,"bufferHeight",1):s.drawingBufferHeight;if(u){var g=new Uint8Array(4),y=v?f:x-f;s.readPixels(l,y,1,1,s.RGBA,s.UNSIGNED_BYTE,g),o.call(null,new c(g[0],g[1],g[2],g[3]))}else{var T=Math.floor(h(e,"width",m)),C=Math.floor(h(e,"height",x)),E=T*C*4,M=new Uint8Array(E);s.readPixels(l,x-f-C,T,C,s.RGBA,s.UNSIGNED_BYTE,M);for(var P=d.createWebGL(this,T,C),A=P.getContext("2d",{willReadFrequently:!0}),R=A.getImageData(0,0,T,C),F=R.data,w=0;w<C;w++)for(var I=0;I<T;I++){var U=((C-w-1)*T+I)*4,N=v?E-(w*T+(T-I))*4:(w*T+I)*4;F[N+0]=M[U+0],F[N+1]=M[U+1],F[N+2]=M[U+2],F[N+3]=M[U+3]}A.putImageData(R,0,0);var D=new Image;D.onerror=function(){o.call(null),d.remove(P)},D.onload=function(){o.call(null,D),d.remove(P)},D.src=P.toDataURL(i,a)}};p.exports=r}),89966:((p,S,t)=>{p.exports={Canvas:t(32880),WebGL:t(88815)}}),7530:((p,S,t)=>{var d=t(83419),c=t(36060),h=t(90330),r=t(82264),n=t(95540),e=t(32302),s=t(63448),o=t(31302),i=t(58918),a=t(14811),l=t(92651),f=t(96569),u=t(56527),v=t(57516),m=t(43439),x=t(81041),g=t(12385),y=t(7589),T=t(95428),C=t(72905),E=new d({initialize:function(P){this.game=P.game,this.renderer=P,this.classes=new h([[c.UTILITY_PIPELINE,y],[c.MULTI_PIPELINE,v],[c.BITMAPMASK_PIPELINE,o],[c.SINGLE_PIPELINE,g],[c.ROPE_PIPELINE,x],[c.LIGHT_PIPELINE,f],[c.POINTLIGHT_PIPELINE,m],[c.MOBILE_PIPELINE,u]]),this.postPipelineClasses=new h,this.pipelines=new h,this.postPipelineInstances=[],this.default=null,this.current=null,this.previous=null,this.MULTI_PIPELINE=null,this.BITMAPMASK_PIPELINE=null,this.UTILITY_PIPELINE=null,this.MOBILE_PIPELINE=null,this.FX_PIPELINE=null,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderTargets=[],this.maxDimension=0,this.frameInc=32,this.targetIndex=0},boot:function(M,P,A){var R=this.renderer,F=this.renderTargets;this.frameInc=Math.floor(n(M,"frameInc",32));var w=R.width,I=R.height,U=this.game.config.disablePreFX,N=this.game.config.disablePostFX;if(N||this.postPipelineClasses.setAll([[String(a.BARREL),i.Barrel],[String(a.BLOOM),i.Bloom],[String(a.BLUR),i.Blur],[String(a.BOKEH),i.Bokeh],[String(a.CIRCLE),i.Circle],[String(a.COLOR_MATRIX),i.ColorMatrix],[String(a.DISPLACEMENT),i.Displacement],[String(a.GLOW),i.Glow],[String(a.GRADIENT),i.Gradient],[String(a.PIXELATE),i.Pixelate],[String(a.SHADOW),i.Shadow],[String(a.SHINE),i.Shine],[String(a.VIGNETTE),i.Vignette],[String(a.WIPE),i.Wipe]]),!U){this.classes.set(c.FX_PIPELINE,l);for(var D=Math.min(w,I),B=Math.ceil(D/this.frameInc),L=1;L<B;L++){var G=L*this.frameInc;F.push(new e(R,G,G)),F.push(new e(R,G,G)),F.push(new e(R,G,G)),this.maxDimension=G}F.push(new e(R,w,I,1,0,!0,!0)),F.push(new e(R,w,I,1,0,!0,!0)),F.push(new e(R,w,I,1,0,!0,!0))}var O,X,z=this,V=this.game;if(this.classes.each(function(W,H){O=z.add(W,new H({game:V})),W===c.UTILITY_PIPELINE&&(z.UTILITY_PIPELINE=O,z.fullFrame1=O.fullFrame1,z.fullFrame2=O.fullFrame2,z.halfFrame1=O.halfFrame1,z.halfFrame2=O.halfFrame2)}),this.MULTI_PIPELINE=this.get(c.MULTI_PIPELINE),this.BITMAPMASK_PIPELINE=this.get(c.BITMAPMASK_PIPELINE),this.MOBILE_PIPELINE=this.get(c.MOBILE_PIPELINE),U||(this.FX_PIPELINE=this.get(c.FX_PIPELINE)),M)for(X in M){var Y=M[X];O=new Y(V),O.name=X,O.isPostFX?this.postPipelineClasses.set(X,Y):this.has(X)||(this.classes.set(X,Y),this.add(X,O))}this.default=this.get(P),A&&!r.os.desktop&&(this.default=this.MOBILE_PIPELINE)},setDefaultPipeline:function(M){var P=this.get(M);return P&&(this.default=P),P},add:function(M,P){if(P.isPostFX){console.warn(M+" is a Post Pipeline. Use `addPostPipeline` instead");return}var A=this.pipelines,R=this.renderer;return A.has(M)?console.warn("Pipeline exists: "+M):(P.name=M,P.manager=this,A.set(M,P)),P.hasBooted||P.boot(),R.width!==0&&R.height!==0&&!P.isPreFX&&P.resize(R.width,R.height),P},addPostPipeline:function(M,P){this.postPipelineClasses.has(M)||this.postPipelineClasses.set(M,P)},flush:function(){this.current&&this.current.flush()},has:function(M){var P=this.pipelines;return typeof M=="string"?P.has(M):!!P.contains(M)},get:function(M){var P=this.pipelines;if(typeof M=="string")return P.get(M);if(P.contains(M))return M},getPostPipeline:function(M,P,A){var R=this.postPipelineClasses,F,w="",I=typeof M;if(I==="string"||I==="number"?(F=R.get(M),w=M):I==="function"?(R.contains(M)&&(F=M),w=M.name):I==="object"&&(F=R.get(M.name),w=M.name),F){var U=new F(this.game,A);return U.name=w,P&&(U.gameObject=P),this.postPipelineInstances.push(U),U}},removePostPipeline:function(M){C(this.postPipelineInstances,M)},remove:function(M,P,A){P===void 0&&(P=!0),A===void 0&&(A=!0),this.pipelines.delete(M),P&&this.classes.delete(M),A&&this.postPipelineClasses.delete(M)},set:function(M,P,A){if(!M.isPostFX)return this.isCurrent(M,A)||(this.flush(),this.current&&this.current.unbind(),this.current=M,M.bind(A)),M.updateProjectionMatrix(),M.onBind(P),M},preBatch:function(M){if(M.hasPostPipeline){this.flush();for(var P=M.postPipelines,A=P.length-1;A>=0;A--){var R=P[A];R.active&&R.preBatch(M)}}},postBatch:function(M){if(M.hasPostPipeline){this.flush();for(var P=M.postPipelines,A=0;A<P.length;A++){var R=P[A];R.active&&R.postBatch(M)}}},preBatchCamera:function(M){if(M.hasPostPipeline){this.flush();for(var P=M.postPipelines,A=P.length-1;A>=0;A--){var R=P[A];R.active&&R.preBatch(M)}}},postBatchCamera:function(M){if(M.hasPostPipeline){this.flush();for(var P=M.postPipelines,A=0;A<P.length;A++){var R=P[A];R.active&&R.postBatch(M)}}},isCurrent:function(M,P){var A=this.renderer,R=this.current;return R&&!P&&(P=R.currentShader),!(R!==M||P.program!==A.currentProgram)},copyFrame:function(M,P,A,R,F){return this.setUtility(this.UTILITY_PIPELINE.copyShader).copyFrame(M,P,A,R,F),this},copyToGame:function(M){return this.setUtility(this.UTILITY_PIPELINE.copyShader).copyToGame(M),this},drawFrame:function(M,P,A,R){return this.setUtility(this.UTILITY_PIPELINE.colorMatrixShader).drawFrame(M,P,A,R),this},blendFrames:function(M,P,A,R,F){return this.setUtility(this.UTILITY_PIPELINE.linearShader).blendFrames(M,P,A,R,F),this},blendFramesAdditive:function(M,P,A,R,F){return this.setUtility(this.UTILITY_PIPELINE.addShader).blendFramesAdditive(M,P,A,R,F),this},clearFrame:function(M,P){return this.UTILITY_PIPELINE.clearFrame(M,P),this},blitFrame:function(M,P,A,R,F,w){return this.setUtility(this.UTILITY_PIPELINE.copyShader).blitFrame(M,P,A,R,F,w),this},copyFrameRect:function(M,P,A,R,F,w,I,U){return this.UTILITY_PIPELINE.copyFrameRect(M,P,A,R,F,w,I,U),this},forceZero:function(){return this.current&&this.current.forceZero},setMulti:function(){return this.set(this.MULTI_PIPELINE)},setUtility:function(M){return this.UTILITY_PIPELINE.bind(M)},setFX:function(){return this.set(this.FX_PIPELINE)},restoreContext:function(){this.rebind(),this.pipelines.each(function(M,P){P.restoreContext()}),T(this.postPipelineInstances,function(M){M.restoreContext()})},rebind:function(M){M===void 0&&this.previous&&(M=this.previous);var P=this.renderer,A=P.gl;A.disable(A.DEPTH_TEST),A.disable(A.CULL_FACE),P.hasActiveStencilMask()?A.clear(A.DEPTH_BUFFER_BIT):(A.disable(A.STENCIL_TEST),A.clear(A.DEPTH_BUFFER_BIT|A.STENCIL_BUFFER_BIT)),A.viewport(0,0,P.width,P.height),P.currentProgram=null,P.setBlendMode(0,!0);var R=P.vaoExtension;R&&R.bindVertexArrayOES(null);var F=this.pipelines.entries;for(var w in F)F[w].glReset=!0;M&&(this.current=M,M.rebind())},clear:function(){var M=this.renderer;this.flush(),this.current?(this.current.unbind(),this.previous=this.current,this.current=null):this.previous=null,M.currentProgram=null,M.setBlendMode(0,!0);var P=M.vaoExtension;P&&P.bindVertexArrayOES(null)},getRenderTarget:function(M){var P=this.renderTargets,A=3;if(M>this.maxDimension)return this.targetIndex=P.length-A,P[this.targetIndex];var R=(s(M,this.frameInc,0,!0)-1)*A;return this.targetIndex=R,P[R]},getSwapRenderTarget:function(){return this.renderTargets[this.targetIndex+1]},getAltSwapRenderTarget:function(){return this.renderTargets[this.targetIndex+2]},destroy:function(){this.flush(),this.classes.clear(),this.postPipelineClasses.clear(),this.pipelines.clear(),this.renderer=null,this.game=null,this.classes=null,this.postPipelineClasses=null,this.pipelines=null,this.default=null,this.current=null,this.previous=null}});p.exports=E}),32302:((p,S,t)=>{var d=t(83419),c=t(92503),h=new d({initialize:function(n,e,s,o,i,a,l,f,u){o===void 0&&(o=1),i===void 0&&(i=0),a===void 0&&(a=!0),l===void 0&&(l=!1),f===void 0&&(f=!0),u===void 0&&(u=!0),this.renderer=n,this.framebuffer=null,this.texture=null,this.width=0,this.height=0,this.scale=o,this.minFilter=i,this.autoClear=a,this.autoResize=!0,this.hasDepthBuffer=f,this.forceClamp=u,this.init(e,s),l?this.renderer.on(c.RESIZE,this.resize,this):this.autoResize=!1},init:function(r,n){var e=this.renderer;this.texture=e.createTextureFromSource(null,r,n,this.minFilter,this.forceClamp),this.framebuffer=e.createFramebuffer(r,n,this.texture,this.hasDepthBuffer),this.width=r,this.height=n},setAutoResize:function(r){return r&&!this.autoResize?(this.renderer.on(c.RESIZE,this.resize,this),this.autoResize=!0):!r&&this.autoResize&&(this.renderer.off(c.RESIZE,this.resize,this),this.autoResize=!1),this},resize:function(r,n){if(this.autoResize&&this.willResize(r,n)){var e=this.renderer;e.deleteFramebuffer(this.framebuffer),e.deleteTexture(this.texture),this.texture=e.createTextureFromSource(null,r,n,this.minFilter,this.forceClamp),this.framebuffer=e.createFramebuffer(r,n,this.texture,this.hasDepthBuffer),this.width=r,this.height=n}return this},willResize:function(r,n){return typeof r!="number"||typeof n!="number"?!1:(r=Math.round(r*this.scale),n=Math.round(n*this.scale),r=Math.max(r,1),n=Math.max(n,1),r!==this.width||n!==this.height)},bind:function(r,n,e){r===void 0&&(r=!1);var s=this.renderer;if(r&&s.flush(),n&&e&&this.resize(n,e),s.pushFramebuffer(this.framebuffer,!1,!1),r&&this.adjustViewport(),this.autoClear){var o=this.renderer.gl;o.clearColor(0,0,0,0),o.clear(o.COLOR_BUFFER_BIT)}s.clearStencilMask()},adjustViewport:function(){var r=this.renderer.gl;r.viewport(0,0,this.width,this.height),r.disable(r.SCISSOR_TEST)},clear:function(r,n,e,s){var o=this.renderer,i=o.gl;o.pushFramebuffer(this.framebuffer),r!==void 0&&n!==void 0&&e!==void 0&&s!==void 0?(i.enable(i.SCISSOR_TEST),i.scissor(r,n,e,s)):i.disable(i.SCISSOR_TEST),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),o.popFramebuffer(),o.resetScissor()},unbind:function(r){r===void 0&&(r=!1);var n=this.renderer;return r&&n.flush(),n.popFramebuffer()},destroy:function(){var r=this.renderer;r.off(c.RESIZE,this.resize,this),r.deleteFramebuffer(this.framebuffer),r.deleteTexture(this.texture),this.renderer=null,this.framebuffer=null,this.texture=null}});p.exports=h}),70554:(p=>{p.exports={getTintFromFloats:function(S,t,d,c){var h=(S*255|0)&255,r=(t*255|0)&255,n=(d*255|0)&255,e=(c*255|0)&255;return(e<<24|h<<16|r<<8|n)>>>0},getTintAppendFloatAlpha:function(S,t){var d=(t*255|0)&255;return(d<<24|S)>>>0},getTintAppendFloatAlphaAndSwap:function(S,t){var d=(S>>16|0)&255,c=(S>>8|0)&255,h=(S|0)&255,r=(t*255|0)&255;return(r<<24|h<<16|c<<8|d)>>>0},getFloatsFromUintRGB:function(S){var t=(S>>16|0)&255,d=(S>>8|0)&255,c=(S|0)&255;return[t/255,d/255,c/255]},checkShaderMax:function(S,t){var d=Math.min(16,S.getParameter(S.MAX_TEXTURE_IMAGE_UNITS));return!t||t===-1?d:Math.min(d,t)},parseFragmentShaderMaxTextures:function(S,t){if(!S)return"";for(var d="",c=0;c<t;c++)c>0&&(d+=`
|
|
else `),c<t-1&&(d+="if (outTexId < "+c+".5)"),d+=`
|
|
{`,d+=`
|
|
texture = texture2D(uMainSampler[`+c+"], outTexCoord);",d+=`
|
|
}`;return S=S.replace(/%count%/gi,t.toString()),S.replace(/%forloop%/gi,d)},setGlowQuality:function(S,t,d,c){return d===void 0&&(d=t.config.glowFXQuality),c===void 0&&(c=t.config.glowFXDistance),S=S.replace(/__SIZE__/gi,(1/d/c).toFixed(7)),S=S.replace(/__DIST__/gi,c.toFixed(0)+".0"),S}}}),29100:((p,S,t)=>{var d=t(83419),c=t(62644),h=t(50792),r=t(77085),n=t(95540),e=t(37867),s=t(92503),o=t(32302),i=t(70554),a=t(38683),l=new d({Extends:h,initialize:function(u){h.call(this);var v=u.game,m=v.renderer,x=m.gl;this.name=n(u,"name","WebGLPipeline"),this.game=v,this.renderer=m,this.manager,this.gl=x,this.view=v.canvas,this.width=0,this.height=0,this.vertexCount=0,this.vertexCapacity=0,this.vertexData,this.vertexBuffer,this.activeBuffer,this.topology=n(u,"topology",x.TRIANGLES),this.bytes,this.vertexViewF32,this.vertexViewU32,this.active=!0,this.forceZero=n(u,"forceZero",!1),this.hasBooted=!1,this.isPostFX=!1,this.isPreFX=!1,this.renderTargets=[],this.currentRenderTarget,this.shaders=[],this.currentShader,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.config=u,this.glReset=!1,this.batch=[],this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,this.activeTextures=[],this.resizeUniform=n(u,"resizeUniform","")},boot:function(){var f,u=this.gl,v=this.config,m=this.renderer;this.isPostFX||(this.projectionMatrix=new e().identity());var x=this.renderTargets,g=n(v,"renderTarget",!1);typeof g=="boolean"&&g&&(g=1);var y=m.width,T=m.height;if(typeof g=="number")for(f=0;f<g;f++)x.push(new o(m,y,T,1,0,!0));else if(Array.isArray(g))for(f=0;f<g.length;f++){var C=n(g[f],"scale",1),E=n(g[f],"minFilter",0),M=n(g[f],"autoClear",1),P=n(g[f],"autoResize",!1),A=n(g[f],"width",null),R=n(g[f],"height",A);A?x.push(new o(m,A,R,1,E,M,P)):x.push(new o(m,y,T,C,E,M,P))}x.length&&(this.currentRenderTarget=x[0]),this.setShadersFromConfig(v);var F=this.shaders,w=0;for(f=0;f<F.length;f++)F[f].vertexSize>w&&(w=F[f].vertexSize);var I=n(v,"batchSize",m.config.batchSize);this.vertexCapacity=I*6;var U=new ArrayBuffer(this.vertexCapacity*w);this.vertexData=U,this.bytes=new Uint8Array(U),this.vertexViewF32=new Float32Array(U),this.vertexViewU32=new Uint32Array(U);var N=n(v,"vertices",null);for(N?(this.vertexViewF32.set(N),this.vertexBuffer=m.createVertexBuffer(U,u.STATIC_DRAW)):this.vertexBuffer=m.createVertexBuffer(U.byteLength,u.DYNAMIC_DRAW),this.setVertexBuffer(),f=F.length-1;f>=0;f--)F[f].rebind();this.hasBooted=!0,m.on(s.RESIZE,this.resize,this),m.on(s.PRE_RENDER,this.onPreRender,this),m.on(s.RENDER,this.onRender,this),m.on(s.POST_RENDER,this.onPostRender,this),this.emit(r.BOOT,this),this.onBoot()},onBoot:function(){},onResize:function(){},setShader:function(f,u,v){var m=this.renderer;if(f!==this.currentShader||m.currentProgram!==this.currentShader.program){this.flush();var x=this.setVertexBuffer(v);x&&!u&&(u=!0),f.bind(u,!1),this.currentShader=f}return this},getShaderByName:function(f){for(var u=this.shaders,v=0;v<u.length;v++)if(u[v].name===f)return u[v]},setShadersFromConfig:function(f){var u,v=this.shaders,m=this.renderer;for(u=0;u<v.length;u++)v[u].destroy();var x="vertShader",g="fragShader",y="attributes",T=n(f,x,null),C=i.parseFragmentShaderMaxTextures(n(f,g,null),m.maxTextures),E=n(f,y,null),M=n(f,"shaders",[]),P=M.length;if(P===0)T&&C&&(this.shaders=[new a(this,"default",T,C,c(E))]);else{var A=[];for(u=0;u<P;u++){var R=M[u],F,w,I,U;if(typeof R=="string"?(F="default",w=T,I=i.parseFragmentShaderMaxTextures(R,m.maxTextures),U=E):(F=n(R,"name","default"),w=n(R,x,T),I=i.parseFragmentShaderMaxTextures(n(R,g,C),m.maxTextures),U=n(R,y,E)),F==="default"){var N=I.split(`
|
|
`),D=N[0].trim();D.indexOf("#define SHADER_NAME")>-1&&(F=D.substring(20))}w&&I&&A.push(new a(this,F,w,I,c(U)))}this.shaders=A}return this.shaders.length===0?console.warn("Pipeline: "+this.name+" - Invalid shader config"):this.currentShader=this.shaders[0],this},createBatch:function(f){return this.currentBatch={start:this.vertexCount,count:0,texture:[f],unit:0,maxUnit:0},this.currentUnit=0,this.currentTexture=f,this.batch.push(this.currentBatch),0},addTextureToBatch:function(f){var u=this.currentBatch;u&&(u.texture.push(f),u.unit++,u.maxUnit++)},pushBatch:function(f){if(!this.currentBatch||this.forceZero&&f!==this.currentTexture)return this.createBatch(f);if(f===this.currentTexture)return this.currentUnit;var u=this.currentBatch,v=u.texture.indexOf(f);return v===-1?u.texture.length===this.renderer.maxTextures?this.createBatch(f):(u.unit++,u.maxUnit++,u.texture.push(f),this.currentUnit=u.unit,this.currentTexture=f,u.unit):(this.currentUnit=v,this.currentTexture=f,v)},setGameObject:function(f,u){return u===void 0&&(u=f.frame),this.pushBatch(u.source.glTexture)},shouldFlush:function(f){return f===void 0&&(f=0),this.vertexCount+f>this.vertexCapacity},vertexAvailable:function(){return this.vertexCapacity-this.vertexCount},resize:function(f,u){(f!==this.width||u!==this.height)&&this.flush(),this.width=f,this.height=u;for(var v=this.renderTargets,m=0;m<v.length;m++)v[m].resize(f,u);return this.setProjectionMatrix(f,u),this.resizeUniform&&this.set2f(this.resizeUniform,f,u),this.emit(r.RESIZE,f,u,this),this.onResize(f,u),this},setProjectionMatrix:function(f,u){var v=this.projectionMatrix;if(!v)return this;this.projectionWidth=f,this.projectionHeight=u,v.ortho(0,f,u,0,-1e3,1e3);for(var m=this.shaders,x="uProjectionMatrix",g=0;g<m.length;g++){var y=m[g];y.hasUniform(x)&&(y.resetUniform(x),y.setMatrix4fv(x,!1,v.val,y))}return this},flipProjectionMatrix:function(f){f===void 0&&(f=!0);var u=this.projectionMatrix;if(!u)return this;var v=this.projectionWidth,m=this.projectionHeight;f?u.ortho(0,v,0,m,-1e3,1e3):u.ortho(0,v,m,0,-1e3,1e3),this.setMatrix4fv("uProjectionMatrix",!1,u.val)},updateProjectionMatrix:function(){if(this.projectionMatrix){var f=this.renderer.projectionWidth,u=this.renderer.projectionHeight;(this.projectionWidth!==f||this.projectionHeight!==u)&&this.setProjectionMatrix(f,u)}},bind:function(f){if(f===void 0&&(f=this.currentShader),this.glReset)return this.rebind(f);var u=!1,v=this.gl;return v.getParameter(v.ARRAY_BUFFER_BINDING)!==this.vertexBuffer&&(v.bindBuffer(v.ARRAY_BUFFER,this.vertexBuffer.webGLBuffer),this.activeBuffer=this.vertexBuffer,u=!0),f.bind(u),this.currentShader=f,this.activeTextures.length=0,this.emit(r.BIND,this,f),this.onActive(f),this},rebind:function(f){this.activeBuffer=null,this.setVertexBuffer();for(var u=this.shaders,v=u.length-1;v>=0;v--){var m=u[v].rebind();(!f||m===f)&&(this.currentShader=m)}return this.activeTextures.length=0,this.emit(r.REBIND,this.currentShader),this.onActive(this.currentShader),this.onRebind(),this.glReset=!1,this},restoreContext:function(){var f=this.shaders,u=!!this.vertexBuffer;this.activeBuffer=null,this.activeTextures.length=0,this.batch.length=0,this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,u&&this.setVertexBuffer();for(var v=0;v<f.length;v++){var m=f[v];m.syncUniforms(),u&&m.rebind()}},setVertexBuffer:function(f){if(f===void 0&&(f=this.vertexBuffer),f!==this.activeBuffer){var u=this.gl;return this.gl.bindBuffer(u.ARRAY_BUFFER,f.webGLBuffer),this.activeBuffer=f,!0}return!1},preBatch:function(f){return this.currentRenderTarget&&this.currentRenderTarget.bind(),this.onPreBatch(f),this},postBatch:function(f){return this.onDraw(this.currentRenderTarget),this.onPostBatch(f),this},onDraw:function(){},unbind:function(){this.currentRenderTarget&&this.currentRenderTarget.unbind()},flush:function(f){if(f===void 0&&(f=!1),this.vertexCount>0){this.emit(r.BEFORE_FLUSH,this,f),this.onBeforeFlush(f);var u=this.gl,v=this.vertexCount,m=this.currentShader.vertexSize,x=this.topology;if(this.active){this.setVertexBuffer(),v===this.vertexCapacity?u.bufferData(u.ARRAY_BUFFER,this.vertexData,u.DYNAMIC_DRAW):u.bufferSubData(u.ARRAY_BUFFER,0,this.bytes.subarray(0,v*m));var g,y,T,C=this.batch,E=this.activeTextures;if(this.forceZero)for(E[0]||u.activeTexture(u.TEXTURE0),g=0;g<C.length;g++)y=C[g],T=y.texture[0],E[0]!==T&&(u.bindTexture(u.TEXTURE_2D,T.webGLTexture),E[0]=T),u.drawArrays(x,y.start,y.count);else for(g=0;g<C.length;g++){y=C[g];for(var M=0;M<=y.maxUnit;M++)T=y.texture[M],E[M]!==T&&(u.activeTexture(u.TEXTURE0+M),u.bindTexture(u.TEXTURE_2D,T.webGLTexture),E[M]=T);u.drawArrays(x,y.start,y.count)}}this.vertexCount=0,this.batch.length=0,this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,this.emit(r.AFTER_FLUSH,this,f),this.onAfterFlush(f)}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(f,u,v,m,x,g,y){var T=this.vertexViewF32,C=this.vertexViewU32,E=this.vertexCount*this.currentShader.vertexComponentCount-1;T[++E]=f,T[++E]=u,T[++E]=v,T[++E]=m,T[++E]=x,T[++E]=g,C[++E]=y,this.vertexCount++,this.currentBatch.count=this.vertexCount-this.currentBatch.start},batchQuad:function(f,u,v,m,x,g,y,T,C,E,M,P,A,R,F,w,I,U,N,D){D===void 0&&(D=this.currentUnit);var B=!1;this.shouldFlush(6)&&(this.flush(),B=!0),this.currentBatch||(D=this.setTexture2D(N));var L=this.vertexViewF32,G=this.vertexViewU32,O=this.vertexCount*this.currentShader.vertexComponentCount-1;return L[++O]=u,L[++O]=v,L[++O]=E,L[++O]=M,L[++O]=D,L[++O]=U,G[++O]=R,L[++O]=m,L[++O]=x,L[++O]=E,L[++O]=A,L[++O]=D,L[++O]=U,G[++O]=w,L[++O]=g,L[++O]=y,L[++O]=P,L[++O]=A,L[++O]=D,L[++O]=U,G[++O]=I,L[++O]=u,L[++O]=v,L[++O]=E,L[++O]=M,L[++O]=D,L[++O]=U,G[++O]=R,L[++O]=g,L[++O]=y,L[++O]=P,L[++O]=A,L[++O]=D,L[++O]=U,G[++O]=I,L[++O]=T,L[++O]=C,L[++O]=P,L[++O]=M,L[++O]=D,L[++O]=U,G[++O]=F,this.vertexCount+=6,this.currentBatch.count=this.vertexCount-this.currentBatch.start,this.onBatch(f),B},batchTri:function(f,u,v,m,x,g,y,T,C,E,M,P,A,R,F,w,I){I===void 0&&(I=this.currentUnit);var U=!1;this.shouldFlush(3)&&(this.flush(),U=!0),this.currentBatch||(I=this.setTexture2D(w));var N=this.vertexViewF32,D=this.vertexViewU32,B=this.vertexCount*this.currentShader.vertexComponentCount-1;return N[++B]=u,N[++B]=v,N[++B]=T,N[++B]=C,N[++B]=I,N[++B]=F,D[++B]=P,N[++B]=m,N[++B]=x,N[++B]=T,N[++B]=M,N[++B]=I,N[++B]=F,D[++B]=A,N[++B]=g,N[++B]=y,N[++B]=E,N[++B]=M,N[++B]=I,N[++B]=F,D[++B]=R,this.vertexCount+=3,this.currentBatch.count=this.vertexCount-this.currentBatch.start,this.onBatch(f),U},drawFillRect:function(f,u,v,m,x,g,y,T){y===void 0&&(y=this.renderer.whiteTexture),T===void 0&&(T=!0),f=Math.floor(f),u=Math.floor(u);var C=Math.floor(f+v),E=Math.floor(u+m),M=this.setTexture2D(y),P=i.getTintAppendFloatAlphaAndSwap(x,g),A=0,R=0,F=1,w=1;T&&(R=1,w=0),this.batchQuad(null,f,u,f,E,C,E,C,u,A,R,F,w,P,P,P,P,0,y,M)},setTexture2D:function(f){return f===void 0&&(f=this.renderer.whiteTexture),this.pushBatch(f)},bindTexture:function(f,u){u===void 0&&(u=0);var v=this.gl;return v.activeTexture(v.TEXTURE0+u),v.bindTexture(v.TEXTURE_2D,f.webGLTexture),this},bindRenderTarget:function(f,u){return this.bindTexture(f.texture,u)},setTime:function(f,u){return this.set1f(f,this.game.loop.getDuration(),u),this},setBoolean:function(f,u,v){return v===void 0&&(v=this.currentShader),v.setBoolean(f,u),this},set1f:function(f,u,v){return v===void 0&&(v=this.currentShader),v.set1f(f,u),this},set2f:function(f,u,v,m){return m===void 0&&(m=this.currentShader),m.set2f(f,u,v),this},set3f:function(f,u,v,m,x){return x===void 0&&(x=this.currentShader),x.set3f(f,u,v,m),this},set4f:function(f,u,v,m,x,g){return g===void 0&&(g=this.currentShader),g.set4f(f,u,v,m,x),this},set1fv:function(f,u,v){return v===void 0&&(v=this.currentShader),v.set1fv(f,u),this},set2fv:function(f,u,v){return v===void 0&&(v=this.currentShader),v.set2fv(f,u),this},set3fv:function(f,u,v){return v===void 0&&(v=this.currentShader),v.set3fv(f,u),this},set4fv:function(f,u,v){return v===void 0&&(v=this.currentShader),v.set4fv(f,u),this},set1iv:function(f,u,v){return v===void 0&&(v=this.currentShader),v.set1iv(f,u),this},set2iv:function(f,u,v){return v===void 0&&(v=this.currentShader),v.set2iv(f,u),this},set3iv:function(f,u,v){return v===void 0&&(v=this.currentShader),v.set3iv(f,u),this},set4iv:function(f,u,v){return v===void 0&&(v=this.currentShader),v.set4iv(f,u),this},set1i:function(f,u,v){return v===void 0&&(v=this.currentShader),v.set1i(f,u),this},set2i:function(f,u,v,m){return m===void 0&&(m=this.currentShader),m.set2i(f,u,v),this},set3i:function(f,u,v,m,x){return x===void 0&&(x=this.currentShader),x.set3i(f,u,v,m),this},set4i:function(f,u,v,m,x,g){return g===void 0&&(g=this.currentShader),g.set4i(f,u,v,m,x),this},setMatrix2fv:function(f,u,v,m){return m===void 0&&(m=this.currentShader),m.setMatrix2fv(f,u,v),this},setMatrix3fv:function(f,u,v,m){return m===void 0&&(m=this.currentShader),m.setMatrix3fv(f,u,v),this},setMatrix4fv:function(f,u,v,m){return m===void 0&&(m=this.currentShader),m.setMatrix4fv(f,u,v),this},destroy:function(){this.emit(r.DESTROY,this);var f,u=this.shaders;for(f=0;f<u.length;f++)u[f].destroy();var v=this.renderTargets;for(f=0;f<v.length;f++)v[f].destroy();var m=this.renderer;return m.deleteBuffer(this.vertexBuffer),m.off(s.RESIZE,this.resize,this),m.off(s.PRE_RENDER,this.onPreRender,this),m.off(s.RENDER,this.onRender,this),m.off(s.POST_RENDER,this.onPostRender,this),this.removeAllListeners(),this.game=null,this.renderer=null,this.manager=null,this.gl=null,this.view=null,this.shaders=null,this.renderTargets=null,this.bytes=null,this.vertexViewF32=null,this.vertexViewU32=null,this.vertexData=null,this.vertexBuffer=null,this.currentShader=null,this.currentRenderTarget=null,this.activeTextures=null,this}});p.exports=l}),74797:((p,S,t)=>{var d=t(95428),c=t(72905),h=t(19715),r=t(83419),n=t(8054),e=t(50792),s=t(92503),o=t(50030),i=t(37867),a=t(29747),l=t(7530),f=t(32302),u=t(97480),v=t(69442),m=t(70554),x=t(88815),g=t(26128),y=t(1482),T=t(82751),C=t(84387),E=t(93567),M=t(57183),P=new r({Extends:e,initialize:function(R){e.call(this);var F=R.config,w={alpha:F.transparent,desynchronized:F.desynchronized,depth:!0,antialias:F.antialiasGL,premultipliedAlpha:F.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:F.failIfMajorPerformanceCaveat,powerPreference:F.powerPreference,preserveDrawingBuffer:F.preserveDrawingBuffer,willReadFrequently:!1};this.config={clearBeforeRender:F.clearBeforeRender,antialias:F.antialias,backgroundColor:F.backgroundColor,contextCreation:w,roundPixels:F.roundPixels,maxTextures:F.maxTextures,maxTextureSize:F.maxTextureSize,batchSize:F.batchSize,maxLights:F.maxLights,mipmapFilter:F.mipmapFilter},this.game=R,this.type=n.WEBGL,this.pipelines=null,this.width=0,this.height=0,this.canvas=R.canvas,this.blendModes=[],this.contextLost=!1,this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92,isFramebuffer:!1,bufferWidth:0,bufferHeight:0},this.maxTextures=0,this.textureIndexes,this.glBufferWrappers=[],this.glProgramWrappers=[],this.glTextureWrappers=[],this.glFramebufferWrappers=[],this.glAttribLocationWrappers=[],this.glUniformLocationWrappers=[],this.currentFramebuffer=null,this.fboStack=[],this.currentProgram=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.contextLostHandler=a,this.contextRestoredHandler=a,this.previousContextLostHandler=a,this.previousContextRestoredHandler=a,this.gl=null,this.supportedExtensions=null,this.instancedArraysExtension=null,this.vaoExtension=null,this.extensions={},this.glFormats,this.compression,this.drawingBufferHeight=0,this.blankTexture=null,this.normalTexture=null,this.whiteTexture=null,this.maskCount=0,this.maskStack=[],this.currentMask={mask:null,camera:null},this.currentCameraMask={mask:null,camera:null},this.glFuncMap=null,this.currentType="",this.newType=!1,this.nextTypeMatch=!1,this.finalType=!1,this.mipmapFilter=null,this.defaultScissor=[0,0,0,0],this.isBooted=!1,this.renderTarget=null,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.maskSource=null,this.maskTarget=null,this.spector=null,this._debugCapture=!1,this.init(this.config)},init:function(A){var R,F=this.game,w=this.canvas,I=A.backgroundColor;if(F.config.context?R=F.config.context:R=w.getContext("webgl",A.contextCreation)||w.getContext("experimental-webgl",A.contextCreation),!R||R.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=R,this.setExtensions(),this.setContextHandlers(),F.context=R;for(var U=0;U<=27;U++)this.blendModes.push({func:[R.ONE,R.ONE_MINUS_SRC_ALPHA],equation:R.FUNC_ADD});this.blendModes[1].func=[R.ONE,R.DST_ALPHA],this.blendModes[2].func=[R.DST_COLOR,R.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[R.ONE,R.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[R.ZERO,R.ONE_MINUS_SRC_ALPHA],equation:R.FUNC_REVERSE_SUBTRACT},this.glFormats=[R.BYTE,R.SHORT,R.UNSIGNED_BYTE,R.UNSIGNED_SHORT,R.FLOAT],this.glFuncMap={mat2:{func:R.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:R.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:R.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:R.uniform1f,length:1},"1fv":{func:R.uniform1fv,length:1},"1i":{func:R.uniform1i,length:1},"1iv":{func:R.uniform1iv,length:1},"2f":{func:R.uniform2f,length:2},"2fv":{func:R.uniform2fv,length:1},"2i":{func:R.uniform2i,length:2},"2iv":{func:R.uniform2iv,length:1},"3f":{func:R.uniform3f,length:3},"3fv":{func:R.uniform3fv,length:1},"3i":{func:R.uniform3i,length:3},"3iv":{func:R.uniform3iv,length:1},"4f":{func:R.uniform4f,length:4},"4fv":{func:R.uniform4fv,length:1},"4i":{func:R.uniform4i,length:4},"4iv":{func:R.uniform4iv,length:1}},(!A.maxTextures||A.maxTextures===-1)&&(A.maxTextures=R.getParameter(R.MAX_TEXTURE_IMAGE_UNITS)),A.maxTextureSize||(A.maxTextureSize=R.getParameter(R.MAX_TEXTURE_SIZE)),this.compression=this.getCompressedTextures(),R.disable(R.DEPTH_TEST),R.disable(R.CULL_FACE),R.enable(R.BLEND),R.clearColor(I.redGL,I.greenGL,I.blueGL,I.alphaGL),R.clear(R.COLOR_BUFFER_BIT);var N=["NEAREST","LINEAR","NEAREST_MIPMAP_NEAREST","LINEAR_MIPMAP_NEAREST","NEAREST_MIPMAP_LINEAR","LINEAR_MIPMAP_LINEAR"];return N.indexOf(A.mipmapFilter)!==-1&&(this.mipmapFilter=R[A.mipmapFilter]),this.maxTextures=m.checkShaderMax(R,A.maxTextures),this.textureIndexes=[],this.createTemporaryTextures(),this.pipelines=new l(this),this.setBlendMode(n.BlendModes.NORMAL),this.projectionMatrix=new i().identity(),F.textures.once(v.READY,this.boot,this),this},boot:function(){var A=this.game,R=this.pipelines,F=A.scale.baseSize,w=F.width,I=F.height;this.width=w,this.height=I,this.isBooted=!0,this.renderTarget=new f(this,w,I,1,0,!0,!0),this.maskTarget=new f(this,w,I,1,0,!0,!0),this.maskSource=new f(this,w,I,1,0,!0,!0);var U=A.config;R.boot(U.pipeline,U.defaultPipeline,U.autoMobilePipeline),this.blankTexture=A.textures.getFrame("__DEFAULT").glTexture,this.normalTexture=A.textures.getFrame("__NORMAL").glTexture,this.whiteTexture=A.textures.getFrame("__WHITE").glTexture;var N=this.gl;N.bindFramebuffer(N.FRAMEBUFFER,null),N.enable(N.SCISSOR_TEST),A.scale.on(u.RESIZE,this.onResize,this),this.resize(w,I)},setExtensions:function(){var A=this.gl,R=A.getSupportedExtensions();this.supportedExtensions=R;var F="ANGLE_instanced_arrays";this.instancedArraysExtension=R.indexOf(F)>-1?A.getExtension(F):null;var w="OES_vertex_array_object";this.vaoExtension=R.indexOf(w)>-1?A.getExtension(w):null},setContextHandlers:function(A,R){this.previousContextLostHandler&&this.canvas.removeEventListener("webglcontextlost",this.previousContextLostHandler,!1),this.previousContextRestoredHandler&&this.canvas.removeEventListener("webglcontextlost",this.previousContextRestoredHandler,!1),typeof A=="function"?this.contextLostHandler=A.bind(this):this.contextLostHandler=this.dispatchContextLost.bind(this),typeof R=="function"?this.contextRestoredHandler=R.bind(this):this.contextRestoredHandler=this.dispatchContextRestored.bind(this),this.canvas.addEventListener("webglcontextlost",this.contextLostHandler,!1),this.canvas.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),this.previousContextLostHandler=this.contextLostHandler,this.previousContextRestoredHandler=this.contextRestoredHandler},dispatchContextLost:function(A){this.contextLost=!0,console&&console.warn("WebGL Context lost. Renderer disabled"),this.emit(s.LOSE_WEBGL,this),A.preventDefault()},dispatchContextRestored:function(A){var R=this.gl;if(R.isContextLost()){console&&console.log("WebGL Context restored, but context is still lost");return}this.currentProgram=null,this.currentFramebuffer=null,this.setBlendMode(n.BlendModes.NORMAL),R.disable(R.BLEND),R.disable(R.DEPTH_TEST),R.enable(R.CULL_FACE),this.compression=this.getCompressedTextures();var F=function(w){w.createResource()};d(this.glTextureWrappers,F),d(this.glBufferWrappers,F),d(this.glFramebufferWrappers,F),d(this.glProgramWrappers,F),d(this.glAttribLocationWrappers,F),d(this.glUniformLocationWrappers,F),this.createTemporaryTextures(),this.pipelines.restoreContext(),this.resize(this.game.scale.baseSize.width,this.game.scale.baseSize.height),this.setExtensions(),this.contextLost=!1,console&&console.warn("WebGL Context restored. Renderer running again."),this.emit(s.RESTORE_WEBGL,this),A.preventDefault()},createTemporaryTextures:function(){for(var A=this.gl,R=0;R<this.maxTextures;R++){var F=A.createTexture();A.activeTexture(A.TEXTURE0+R),A.bindTexture(A.TEXTURE_2D,F),A.texImage2D(A.TEXTURE_2D,0,A.RGBA,1,1,0,A.RGBA,A.UNSIGNED_BYTE,new Uint8Array([0,0,255,255])),this.textureIndexes.push(R)}},captureFrame:function(A,R){},captureNextFrame:function(){},getFps:function(){},log:function(){},startCapture:function(A,R,F){},stopCapture:function(){},onCapture:function(A){},onResize:function(A,R){(R.width!==this.width||R.height!==this.height)&&this.resize(R.width,R.height)},beginCapture:function(A,R){A===void 0&&(A=this.width),R===void 0&&(R=this.height),this.renderTarget.bind(!0,A,R),this.setProjectionMatrix(A,R)},endCapture:function(){return this.renderTarget.unbind(!0),this.resetProjectionMatrix(),this.renderTarget},resize:function(A,R){var F=this.gl;return this.width=A,this.height=R,this.setProjectionMatrix(A,R),F.viewport(0,0,A,R),this.drawingBufferHeight=F.drawingBufferHeight,F.scissor(0,F.drawingBufferHeight-R,A,R),this.defaultScissor[2]=A,this.defaultScissor[3]=R,this.emit(s.RESIZE,A,R),this},getCompressedTextures:function(){var A="WEBGL_compressed_texture_",R="WEBKIT_"+A,F="EXT_texture_compression_",w=function(U,N){var D=U.getExtension(A+N)||U.getExtension(R+N)||U.getExtension(F+N);if(D){var B={};for(var L in D)B[D[L]]=L;return B}},I=this.gl;return{ETC:w(I,"etc"),ETC1:w(I,"etc1"),ATC:w(I,"atc"),ASTC:w(I,"astc"),BPTC:w(I,"bptc"),RGTC:w(I,"rgtc"),PVRTC:w(I,"pvrtc"),S3TC:w(I,"s3tc"),S3TCSRGB:w(I,"s3tc_srgb"),IMG:!0}},getCompressedTextureName:function(A,R){var F=this.compression[A.toUpperCase()];if(R in F)return F[R]},supportsCompressedTexture:function(A,R){var F=this.compression[A.toUpperCase()];return F?R?R in F:!0:!1},getAspectRatio:function(){return this.width/this.height},setProjectionMatrix:function(A,R){return(A!==this.projectionWidth||R!==this.projectionHeight)&&(this.projectionWidth=A,this.projectionHeight=R,this.projectionMatrix.ortho(0,A,R,0,-1e3,1e3)),this},resetProjectionMatrix:function(){return this.setProjectionMatrix(this.width,this.height)},hasExtension:function(A){return this.supportedExtensions?this.supportedExtensions.indexOf(A):!1},getExtension:function(A){return this.hasExtension(A)?(A in this.extensions||(this.extensions[A]=this.gl.getExtension(A)),this.extensions[A]):null},flush:function(){this.pipelines.flush()},pushScissor:function(A,R,F,w,I){I===void 0&&(I=this.drawingBufferHeight);var U=this.scissorStack,N=[A,R,F,w];return U.push(N),this.setScissor(A,R,F,w,I),this.currentScissor=N,N},setScissor:function(A,R,F,w,I){I===void 0&&(I=this.drawingBufferHeight);var U=this.gl,N=this.currentScissor,D=F>0&&w>0;if(N&&D){var B=N[0],L=N[1],G=N[2],O=N[3];D=B!==A||L!==R||G!==F||O!==w}D&&(this.flush(),U.scissor(A,I-R-w,F,w))},resetScissor:function(){var A=this.gl;A.enable(A.SCISSOR_TEST);var R=this.currentScissor;if(R){var F=R[0],w=R[1],I=R[2],U=R[3];I>0&&U>0&&A.scissor(F,this.drawingBufferHeight-w-U,I,U)}},popScissor:function(){var A=this.scissorStack;A.pop();var R=A[A.length-1];R&&this.setScissor(R[0],R[1],R[2],R[3]),this.currentScissor=R},hasActiveStencilMask:function(){var A=this.currentMask.mask,R=this.currentCameraMask.mask;return A&&A.isStencil||R&&R.isStencil},resetViewport:function(){var A=this.gl;A.viewport(0,0,this.width,this.height),this.drawingBufferHeight=A.drawingBufferHeight},setBlendMode:function(A,R){R===void 0&&(R=!1);var F=this.gl,w=this.blendModes[A];return R||A!==n.BlendModes.SKIP_CHECK&&this.currentBlendMode!==A?(this.flush(),F.enable(F.BLEND),F.blendEquation(w.equation),w.func.length>2?F.blendFuncSeparate(w.func[0],w.func[1],w.func[2],w.func[3]):F.blendFunc(w.func[0],w.func[1]),this.currentBlendMode=A,!0):!1},addBlendMode:function(A,R){var F=this.blendModes.push({func:A,equation:R});return F-1},updateBlendMode:function(A,R,F){return this.blendModes[A]&&(this.blendModes[A].func=R,F&&(this.blendModes[A].equation=F)),this},removeBlendMode:function(A){return A>17&&this.blendModes[A]&&this.blendModes.splice(A,1),this},pushFramebuffer:function(A,R,F,w,I){return A===this.currentFramebuffer?this:(this.fboStack.push(A),this.setFramebuffer(A,R,F,w,I))},setFramebuffer:function(A,R,F,w,I){if(R===void 0&&(R=!1),F===void 0&&(F=!0),w===void 0&&(w=null),I===void 0&&(I=!1),A===this.currentFramebuffer)return this;var U=this.gl,N=this.width,D=this.height;return A&&A.renderTexture&&F?(N=A.renderTexture.width,D=A.renderTexture.height):this.flush(),A?U.bindFramebuffer(U.FRAMEBUFFER,A.webGLFramebuffer):U.bindFramebuffer(U.FRAMEBUFFER,null),F&&U.viewport(0,0,N,D),w&&U.framebufferTexture2D(U.FRAMEBUFFER,U.COLOR_ATTACHMENT0,U.TEXTURE_2D,w.webGLTexture,0),I&&(U.clearColor(0,0,0,0),U.clear(U.COLOR_BUFFER_BIT)),R&&(A?(this.drawingBufferHeight=D,this.pushScissor(0,0,N,D)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=A,this},popFramebuffer:function(A,R){A===void 0&&(A=!1),R===void 0&&(R=!0);var F=this.fboStack;F.pop();var w=F[F.length-1];return w||(w=null),this.setFramebuffer(w,A,R),w},restoreFramebuffer:function(A,R){A===void 0&&(A=!1),R===void 0&&(R=!0);var F=this.fboStack,w=F[F.length-1];w||(w=null),this.currentFramebuffer=null,this.setFramebuffer(w,A,R)},setProgram:function(A){return A!==this.currentProgram?(this.flush(),this.gl.useProgram(A.webGLProgram),this.currentProgram=A,!0):!1},resetProgram:function(){return this.gl.useProgram(this.currentProgram.webGLProgramWrapper),this},createTextureFromSource:function(A,R,F,w,I){I===void 0&&(I=!1);var U=this.gl,N=U.NEAREST,D=U.NEAREST,B=U.CLAMP_TO_EDGE,L=null;R=A?A.width:R,F=A?A.height:F;var G=o(R,F);if(G&&!I&&(B=U.REPEAT),w===n.ScaleModes.LINEAR&&this.config.antialias){var O=A&&A.compressed,X=!O&&G||O&&A.mipmaps.length>1;N=this.mipmapFilter&&X?this.mipmapFilter:U.LINEAR,D=U.LINEAR}return!A&&typeof R=="number"&&typeof F=="number"?L=this.createTexture2D(0,N,D,B,B,U.RGBA,null,R,F):L=this.createTexture2D(0,N,D,B,B,U.RGBA,A),L},createTexture2D:function(A,R,F,w,I,U,N,D,B,L,G,O){typeof D!="number"&&(D=N?N.width:1),typeof B!="number"&&(B=N?N.height:1);var X=new T(this.gl,A,R,F,w,I,U,N,D,B,L,G,O);return this.glTextureWrappers.push(X),X},createFramebuffer:function(A,R,F,w){this.currentFramebuffer=null;var I=new C(this.gl,A,R,F,w);return this.glFramebufferWrappers.push(I),I},beginBitmapMask:function(A,R){var F=this.gl;F&&(this.flush(),this.maskTarget.bind(!0),this.currentCameraMask.mask!==A&&(this.currentMask.mask=A,this.currentMask.camera=R))},drawBitmapMask:function(A,R,F){this.flush(),this.maskSource.bind(),this.setBlendMode(0,!0),A.renderWebGL(this,A,R),this.maskSource.unbind(!0),this.maskTarget.unbind();var w=this.gl,I=this.getCurrentStencilMask();I?(w.enable(w.STENCIL_TEST),I.mask.applyStencil(this,I.camera,!0)):this.currentMask.mask=null,this.pipelines.set(F),w.activeTexture(w.TEXTURE0),w.bindTexture(w.TEXTURE_2D,this.maskTarget.texture.webGLTexture),w.activeTexture(w.TEXTURE1),w.bindTexture(w.TEXTURE_2D,this.maskSource.texture.webGLTexture)},createProgram:function(A,R){var F=new y(this.gl,A,R);return this.glProgramWrappers.push(F),F},createVertexBuffer:function(A,R){var F=this.gl,w=new g(F,A,F.ARRAY_BUFFER,R);return this.glBufferWrappers.push(w),w},createAttribLocation:function(A,R){var F=new E(this.gl,A,R);return this.glAttribLocationWrappers.push(F),F},createUniformLocation:function(A,R){var F=new M(this.gl,A,R);return this.glUniformLocationWrappers.push(F),F},createIndexBuffer:function(A,R){var F=this.gl,w=new g(F,A,F.ELEMENT_ARRAY_BUFFER,R);return this.glBufferWrappers.push(w),w},deleteTexture:function(A){if(A)return c(this.glTextureWrappers,A),A.destroy(),this},deleteFramebuffer:function(A){return A?(c(this.fboStack,A),c(this.glFramebufferWrappers,A),A.destroy(),this):this},deleteProgram:function(A){return A&&(c(this.glProgramWrappers,A),A.destroy()),this},deleteAttribLocation:function(A){return A&&(c(this.glAttribLocationWrappers,A),A.destroy()),this},deleteUniformLocation:function(A){return A&&(c(this.glUniformLocationWrappers,A),A.destroy()),this},deleteBuffer:function(A){return A?(c(this.glBufferWrappers,A),A.destroy(),this):this},preRenderCamera:function(A){var R=A.x,F=A.y,w=A.width,I=A.height,U=A.backgroundColor;if(A.emit(h.PRE_RENDER,A),this.pipelines.preBatchCamera(A),this.pushScissor(R,F,w,I),A.mask&&(this.currentCameraMask.mask=A.mask,this.currentCameraMask.camera=A._maskCamera,A.mask.preRenderWebGL(this,A,A._maskCamera)),U.alphaGL>0){var N=this.pipelines.setMulti();N.drawFillRect(R,F,w,I,m.getTintFromFloats(U.blueGL,U.greenGL,U.redGL,1),U.alphaGL)}},getCurrentStencilMask:function(){var A=null,R=this.maskStack,F=this.currentCameraMask;return R.length>0?A=R[R.length-1]:F.mask&&F.mask.isStencil&&(A=F),A},postRenderCamera:function(A){var R=A.flashEffect,F=A.fadeEffect;if(R.isRunning||F.isRunning||F.isComplete){var w=this.pipelines.setMulti();R.postRenderWebGL(w,m.getTintFromFloats),F.postRenderWebGL(w,m.getTintFromFloats)}A.dirty=!1,this.popScissor(),A.mask&&(this.currentCameraMask.mask=null,A.mask.postRenderWebGL(this,A._maskCamera)),this.pipelines.postBatchCamera(A),A.emit(h.POST_RENDER,A)},preRender:function(){if(!this.contextLost){var A=this.gl;if(A.bindFramebuffer(A.FRAMEBUFFER,null),this.emit(s.PRE_RENDER_CLEAR),this.config.clearBeforeRender){var R=this.config.backgroundColor;A.clearColor(R.redGL,R.greenGL,R.blueGL,R.alphaGL),A.clear(A.COLOR_BUFFER_BIT|A.DEPTH_BUFFER_BIT|A.STENCIL_BUFFER_BIT)}A.enable(A.SCISSOR_TEST),this.currentScissor=this.defaultScissor,this.scissorStack.length=0,this.scissorStack.push(this.currentScissor),this.game.scene.customViewports&&A.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.emit(s.PRE_RENDER)}},render:function(A,R,F){if(!this.contextLost){var w=R.length;if(this.emit(s.RENDER,A,F),this.preRenderCamera(F),w===0){this.setBlendMode(n.BlendModes.NORMAL),this.postRenderCamera(F);return}this.currentType="";for(var I=this.currentMask,U=0;U<w;U++){this.finalType=U===w-1;var N=R[U],D=N.mask;I=this.currentMask,I.mask&&I.mask!==D&&I.mask.postRenderWebGL(this,I.camera),D&&I.mask!==D&&D.preRenderWebGL(this,N,F),N.blendMode!==this.currentBlendMode&&this.setBlendMode(N.blendMode);var B=N.type;B!==this.currentType&&(this.newType=!0,this.currentType=B),this.finalType?this.nextTypeMatch=!1:this.nextTypeMatch=R[U+1].type===this.currentType,N.renderWebGL(this,N,F),this.newType=!1}I=this.currentMask,I.mask&&I.mask.postRenderWebGL(this,I.camera),this.setBlendMode(n.BlendModes.NORMAL),this.postRenderCamera(F)}},postRender:function(){if(!this.contextLost){this.flush(),this.emit(s.POST_RENDER);var A=this.snapshotState;A.callback&&(x(this.gl,A),A.callback=null)}},clearStencilMask:function(){this.gl.disable(this.gl.STENCIL_TEST)},restoreStencilMask:function(){var A=this.gl,R=this.getCurrentStencilMask();if(R){var F=R.mask;A.enable(A.STENCIL_TEST),F.invertAlpha?A.stencilFunc(A.NOTEQUAL,F.level,255):A.stencilFunc(A.EQUAL,F.level,255)}},snapshot:function(A,R,F){return this.snapshotArea(0,0,this.gl.drawingBufferWidth,this.gl.drawingBufferHeight,A,R,F)},snapshotArea:function(A,R,F,w,I,U,N){var D=this.snapshotState;return D.callback=I,D.type=U,D.encoder=N,D.getPixel=!1,D.x=A,D.y=R,D.width=F,D.height=w,this},snapshotPixel:function(A,R,F){return this.snapshotArea(A,R,1,1,F),this.snapshotState.getPixel=!0,this},snapshotFramebuffer:function(A,R,F,w,I,U,N,D,B,L,G){I===void 0&&(I=!1),U===void 0&&(U=0),N===void 0&&(N=0),D===void 0&&(D=R),B===void 0&&(B=F),L==="pixel"&&(I=!0,L="image/png");var O=this.currentFramebuffer;this.snapshotArea(U,N,D,B,w,L,G);var X=this.snapshotState;return X.getPixel=I,X.isFramebuffer=!0,X.bufferWidth=R,X.bufferHeight=F,X.width=Math.min(X.width,R),X.height=Math.min(X.height,F),this.setFramebuffer(A),x(this.gl,X),this.setFramebuffer(O),X.callback=null,X.isFramebuffer=!1,this},canvasToTexture:function(A,R,F,w){F===void 0&&(F=!1),w===void 0&&(w=!1);var I=this.gl,U=I.NEAREST,N=I.NEAREST,D=A.width,B=A.height,L=I.CLAMP_TO_EDGE,G=o(D,B);return!F&&G&&(L=I.REPEAT),this.config.antialias&&(U=G&&this.mipmapFilter?this.mipmapFilter:I.LINEAR,N=I.LINEAR),R?(R.update(A,D,B,w,L,L,U,N,R.format),R):this.createTexture2D(0,U,N,L,L,I.RGBA,A,D,B,!0,!1,w)},createCanvasTexture:function(A,R,F){return R===void 0&&(R=!1),F===void 0&&(F=!1),this.canvasToTexture(A,null,R,F)},updateCanvasTexture:function(A,R,F,w){return F===void 0&&(F=!1),w===void 0&&(w=!1),this.canvasToTexture(A,R,w,F)},videoToTexture:function(A,R,F,w){F===void 0&&(F=!1),w===void 0&&(w=!1);var I=this.gl,U=I.NEAREST,N=I.NEAREST,D=A.videoWidth,B=A.videoHeight,L=I.CLAMP_TO_EDGE,G=o(D,B);return!F&&G&&(L=I.REPEAT),this.config.antialias&&(U=G&&this.mipmapFilter?this.mipmapFilter:I.LINEAR,N=I.LINEAR),R?(R.update(A,D,B,w,L,L,U,N,R.format),R):this.createTexture2D(0,U,N,L,L,I.RGBA,A,D,B,!0,!0,w)},createVideoTexture:function(A,R,F){return R===void 0&&(R=!1),F===void 0&&(F=!1),this.videoToTexture(A,null,R,F)},updateVideoTexture:function(A,R,F,w){return F===void 0&&(F=!1),w===void 0&&(w=!1),this.videoToTexture(A,R,w,F)},createUint8ArrayTexture:function(A,R,F){var w=this.gl,I=w.NEAREST,U=w.NEAREST,N=w.CLAMP_TO_EDGE,D=o(R,F);return D&&(N=w.REPEAT),this.createTexture2D(0,I,U,N,N,w.RGBA,A,R,F)},setTextureFilter:function(A,R){var F=this.gl,w=R===0?F.LINEAR:F.NEAREST;F.activeTexture(F.TEXTURE0);var I=F.getParameter(F.TEXTURE_BINDING_2D);return F.bindTexture(F.TEXTURE_2D,A.webGLTexture),F.texParameteri(F.TEXTURE_2D,F.TEXTURE_MIN_FILTER,w),F.texParameteri(F.TEXTURE_2D,F.TEXTURE_MAG_FILTER,w),A.minFilter=w,A.magFilter=w,I&&F.bindTexture(F.TEXTURE_2D,I),this},getMaxTextureSize:function(){return this.config.maxTextureSize},destroy:function(){this.canvas.removeEventListener("webglcontextlost",this.contextLostHandler,!1),this.canvas.removeEventListener("webglcontextrestored",this.contextRestoredHandler,!1);var A=function(R){R.destroy()};d(this.glAttribLocationWrappers,A),d(this.glBufferWrappers,A),d(this.glFramebufferWrappers,A),d(this.glProgramWrappers,A),d(this.glTextureWrappers,A),d(this.glUniformLocationWrappers,A),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}});p.exports=P}),38683:((p,S,t)=>{var d=t(83419),c=t(95428),h=t(95540),r=t(14500),n=new d({initialize:function(s,o,i,a,l){this.pipeline=s,this.name=o,this.renderer=s.renderer,this.gl=this.renderer.gl,this.fragSrc=a,this.vertSrc=i,this.program=this.renderer.createProgram(i,a),this.attributes,this.vertexComponentCount=0,this.vertexSize=0,this.uniforms={},this.createAttributes(l),this.createUniforms()},createAttributes:function(e){var s=0,o=0,i=[];this.vertexComponentCount=0;for(var a=0;a<e.length;a++){var l=e[a],f=l.name,u=h(l,"size",1),v=h(l,"type",r.FLOAT),m=v.enum,x=v.size,g=!!l.normalized;i.push({name:f,size:u,type:m,normalized:g,offset:o,enabled:!1,location:-1}),x===4?s+=u:s++,o+=u*x}this.vertexSize=o,this.vertexComponentCount=s,this.attributes=i},bind:function(e,s){return e===void 0&&(e=!1),s===void 0&&(s=!1),s&&this.pipeline.flush(),this.renderer.setProgram(this.program),e&&this.setAttribPointers(),this},rebind:function(){return this.renderer.setProgram(this.program),this.setAttribPointers(!0),this},setAttribPointers:function(e){e===void 0&&(e=!1);for(var s=this.gl,o=this.renderer,i=this.vertexSize,a=this.attributes,l=this.program,f=0;f<a.length;f++){var u=a[f],v=u.size,m=u.type,x=u.offset,g=u.enabled,y=u.location,T=!!u.normalized;if(e){y!==-1&&o.deleteAttribLocation(y);var C=this.renderer.createAttribLocation(l,u.name);C.webGLAttribLocation>=0?(s.enableVertexAttribArray(C.webGLAttribLocation),s.vertexAttribPointer(C.webGLAttribLocation,v,m,T,i,x),u.enabled=!0,u.location=C):C.webGLAttribLocation!==-1&&s.disableVertexAttribArray(C.webGLAttribLocation)}else g?s.vertexAttribPointer(y.webGLAttribLocation,v,m,T,i,x):!g&&y!==-1&&y.webGLAttribLocation>-1&&(s.disableVertexAttribArray(y.webGLAttribLocation),u.location=-1)}return this},createUniforms:function(){var e=this.gl,s=this.program,o=this.uniforms,i,a,l,f=e.getProgramParameter(s.webGLProgram,e.ACTIVE_UNIFORMS);for(i=0;i<f;i++){var u=e.getActiveUniform(s.webGLProgram,i);if(u){a=u.name,l=this.renderer.createUniformLocation(s,a),l!==null&&(o[a]={name:a,location:l,setter:null,value1:null,value2:null,value3:null,value4:null});var v=a.indexOf("[");v>0&&(a=a.substr(0,v),o.hasOwnProperty(a)||(l=this.renderer.createUniformLocation(s,a),l!==null&&(o[a]={name:a,location:l,setter:null,value1:null,value2:null,value3:null,value4:null})))}}return this},syncUniforms:function(){var e=this.gl;this.renderer.setProgram(this.program);for(var s in this.uniforms){var o=this.uniforms[s];o.setter&&o.setter.call(e,o.location.webGLUniformLocation,o.value1,o.value2,o.value3,o.value4)}},hasUniform:function(e){return this.uniforms.hasOwnProperty(e)},resetUniform:function(e){var s=this.uniforms[e];return s&&(s.value1=null,s.value2=null,s.value3=null,s.value4=null),this},setUniform1:function(e,s,o,i){var a=this.uniforms[s];return a?((i||a.value1!==o)&&(a.setter||(a.setter=e),a.value1=o,this.renderer.setProgram(this.program),e.call(this.gl,a.location.webGLUniformLocation,o),this.pipeline.currentShader=this),this):this},setUniform2:function(e,s,o,i,a){var l=this.uniforms[s];return l?((a||l.value1!==o||l.value2!==i)&&(l.setter||(l.setter=e),l.value1=o,l.value2=i,this.renderer.setProgram(this.program),e.call(this.gl,l.location.webGLUniformLocation,o,i),this.pipeline.currentShader=this),this):this},setUniform3:function(e,s,o,i,a,l){var f=this.uniforms[s];return f?((l||f.value1!==o||f.value2!==i||f.value3!==a)&&(f.setter||(f.setter=e),f.value1=o,f.value2=i,f.value3=a,this.renderer.setProgram(this.program),e.call(this.gl,f.location.webGLUniformLocation,o,i,a),this.pipeline.currentShader=this),this):this},setUniform4:function(e,s,o,i,a,l,f){var u=this.uniforms[s];return u?((f||u.value1!==o||u.value2!==i||u.value3!==a||u.value4!==l)&&(u.setter||(u.setter=e),u.value1=o,u.value2=i,u.value3=a,u.value4=l,this.renderer.setProgram(this.program),e.call(this.gl,u.location.webGLUniformLocation,o,i,a,l),this.pipeline.currentShader=this),this):this},setBoolean:function(e,s){return this.setUniform1(this.gl.uniform1i,e,Number(s))},set1f:function(e,s){return this.setUniform1(this.gl.uniform1f,e,s)},set2f:function(e,s,o){return this.setUniform2(this.gl.uniform2f,e,s,o)},set3f:function(e,s,o,i){return this.setUniform3(this.gl.uniform3f,e,s,o,i)},set4f:function(e,s,o,i,a){return this.setUniform4(this.gl.uniform4f,e,s,o,i,a)},set1fv:function(e,s){return this.setUniform1(this.gl.uniform1fv,e,s,!0)},set2fv:function(e,s){return this.setUniform1(this.gl.uniform2fv,e,s,!0)},set3fv:function(e,s){return this.setUniform1(this.gl.uniform3fv,e,s,!0)},set4fv:function(e,s){return this.setUniform1(this.gl.uniform4fv,e,s,!0)},set1iv:function(e,s){return this.setUniform1(this.gl.uniform1iv,e,s,!0)},set2iv:function(e,s){return this.setUniform1(this.gl.uniform2iv,e,s,!0)},set3iv:function(e,s){return this.setUniform1(this.gl.uniform3iv,e,s,!0)},set4iv:function(e,s){return this.setUniform1(this.gl.uniform4iv,e,s,!0)},set1i:function(e,s){return this.setUniform1(this.gl.uniform1i,e,s)},set2i:function(e,s,o){return this.setUniform2(this.gl.uniform2i,e,s,o)},set3i:function(e,s,o,i){return this.setUniform3(this.gl.uniform3i,e,s,o,i)},set4i:function(e,s,o,i,a){return this.setUniform4(this.gl.uniform4i,e,s,o,i,a)},setMatrix2fv:function(e,s,o){return this.setUniform2(this.gl.uniformMatrix2fv,e,s,o,!0)},setMatrix3fv:function(e,s,o){return this.setUniform2(this.gl.uniformMatrix3fv,e,s,o,!0)},setMatrix4fv:function(e,s,o){return this.setUniform2(this.gl.uniformMatrix4fv,e,s,o,!0)},createProgram:function(e,s){return e===void 0&&(e=this.vertSrc),s===void 0&&(s=this.fragSrc),this.program&&this.renderer.deleteProgram(this.program),this.vertSrc=e,this.fragSrc=s,this.program=this.renderer.createProgram(e,s),this.createUniforms(),this.rebind()},destroy:function(){var e=this.renderer;c(this.uniforms,function(s){e.deleteUniformLocation(s.location)}),this.uniforms=null,c(this.attributes,function(s){e.deleteAttribLocation(s.location)}),this.attributes=null,e.deleteProgram(this.program),this.pipeline=null,this.renderer=null,this.gl=null,this.program=null}});p.exports=n}),14500:(p=>{var S={BYTE:{enum:5120,size:1},UNSIGNED_BYTE:{enum:5121,size:1},SHORT:{enum:5122,size:2},UNSIGNED_SHORT:{enum:5123,size:2},INT:{enum:5124,size:4},UNSIGNED_INT:{enum:5125,size:4},FLOAT:{enum:5126,size:4}};p.exports=S}),4159:((p,S,t)=>{var d=t(14500),c=t(79291),h={PipelineManager:t(7530),Pipelines:t(96615),RenderTarget:t(32302),Utils:t(70554),WebGLPipeline:t(29100),WebGLRenderer:t(74797),WebGLShader:t(38683),Wrappers:t(9503)};h=c(!1,h,d),p.exports=h}),31302:((p,S,t)=>{var d=t(83419),c=t(95540),h=t(78908),r=t(85191),n=t(14500),e=t(29100),s=new d({Extends:e,initialize:function(i){i.fragShader=c(i,"fragShader",h),i.vertShader=c(i,"vertShader",r),i.batchSize=c(i,"batchSize",1),i.vertices=c(i,"vertices",[-1,1,-1,-7,7,1]),i.attributes=c(i,"attributes",[{name:"inPosition",size:2,type:n.FLOAT}]),e.call(this,i)},boot:function(){e.prototype.boot.call(this),this.set1i("uMainSampler",0),this.set1i("uMaskSampler",1)},resize:function(o,i){e.prototype.resize.call(this,o,i),this.set2f("uResolution",o,i)},beginMask:function(o,i,a){this.renderer.beginBitmapMask(o,a)},endMask:function(o,i,a){var l=this.gl,f=this.renderer,u=o.bitmapMask;u&&l&&(f.drawBitmapMask(u,i,this),a&&this.set2f("uResolution",a.width,a.height),this.set1i("uInvertMaskAlpha",o.invertAlpha),l.drawArrays(this.topology,0,3),a&&this.set2f("uResolution",this.width,this.height),l.bindTexture(l.TEXTURE_2D,null))}});p.exports=s}),92651:((p,S,t)=>{var d=t(83419),c=t(58918),h=t(14811),r=t(95540),n=t(43558),e=t(89350),s=t(70554),o=new d({Extends:n,initialize:function(a){a.shaders=[s.setGlowQuality(e.FXGlowFrag,a.game),e.FXShadowFrag,e.FXPixelateFrag,e.FXVignetteFrag,e.FXShineFrag,e.FXBlurLowFrag,e.FXBlurMedFrag,e.FXBlurHighFrag,e.FXGradientFrag,e.FXBloomFrag,e.ColorMatrixFrag,e.FXCircleFrag,e.FXBarrelFrag,e.FXDisplacementFrag,e.FXWipeFrag,e.FXBokehFrag],n.call(this,a);var l=this.game;this.glow=new c.Glow(l),this.shadow=new c.Shadow(l),this.pixelate=new c.Pixelate(l),this.vignette=new c.Vignette(l),this.shine=new c.Shine(l),this.gradient=new c.Gradient(l),this.circle=new c.Circle(l),this.barrel=new c.Barrel(l),this.wipe=new c.Wipe(l),this.bokeh=new c.Bokeh(l);var f=[];f[h.GLOW]=this.onGlow,f[h.SHADOW]=this.onShadow,f[h.PIXELATE]=this.onPixelate,f[h.VIGNETTE]=this.onVignette,f[h.SHINE]=this.onShine,f[h.BLUR]=this.onBlur,f[h.GRADIENT]=this.onGradient,f[h.BLOOM]=this.onBloom,f[h.COLOR_MATRIX]=this.onColorMatrix,f[h.CIRCLE]=this.onCircle,f[h.BARREL]=this.onBarrel,f[h.DISPLACEMENT]=this.onDisplacement,f[h.WIPE]=this.onWipe,f[h.BOKEH]=this.onBokeh,this.fxHandlers=f,this.source,this.target,this.swap},onDraw:function(i,a,l){this.source=i,this.target=a,this.swap=l;var f=i.width,u=i.height,v=this.tempSprite,m=this.fxHandlers;if(v&&v.preFX)for(var x=v.preFX.list,g=0;g<x.length;g++){var y=x[g];y.active&&m[y.type].call(this,y,f,u)}this.drawToGame(this.source)},runDraw:function(){var i=this.source,a=this.target;this.copy(i,a),this.source=a,this.target=i},onGlow:function(i,a,l){var f=this.shaders[h.GLOW];this.setShader(f),this.glow.onPreRender(i,f,a,l),this.runDraw()},onShadow:function(i){var a=this.shaders[h.SHADOW];this.setShader(a),this.shadow.onPreRender(i,a),this.runDraw()},onPixelate:function(i,a,l){var f=this.shaders[h.PIXELATE];this.setShader(f),this.pixelate.onPreRender(i,f,a,l),this.runDraw()},onVignette:function(i){var a=this.shaders[h.VIGNETTE];this.setShader(a),this.vignette.onPreRender(i,a),this.runDraw()},onShine:function(i,a,l){var f=this.shaders[h.SHINE];this.setShader(f),this.shine.onPreRender(i,f,a,l),this.runDraw()},onBlur:function(i,a,l){var f=r(i,"quality"),u=this.shaders[h.BLUR+f];this.setShader(u),this.set1i("uMainSampler",0),this.set2f("resolution",a,l),this.set1f("strength",r(i,"strength")),this.set3fv("color",r(i,"glcolor"));for(var v=r(i,"x"),m=r(i,"y"),x=r(i,"steps"),g=0;g<x;g++)this.set2f("offset",v,0),this.runDraw(),this.set2f("offset",0,m),this.runDraw()},onGradient:function(i){var a=this.shaders[h.GRADIENT];this.setShader(a),this.gradient.onPreRender(i,a),this.runDraw()},onBloom:function(i,a,l){var f=this.shaders[h.BLOOM];this.copySprite(this.source,this.swap),this.setShader(f),this.set1i("uMainSampler",0),this.set1f("strength",r(i,"blurStrength")),this.set3fv("color",r(i,"glcolor"));for(var u=2/a*r(i,"offsetX"),v=2/l*r(i,"offsetY"),m=r(i,"steps"),x=0;x<m;x++)this.set2f("offset",u,0),this.runDraw(),this.set2f("offset",0,v),this.runDraw();this.blendFrames(this.swap,this.source,this.target,r(i,"strength")),this.copySprite(this.target,this.source)},onColorMatrix:function(i){this.setShader(this.colorMatrixShader),this.set1fv("uColorMatrix",i.getData()),this.set1f("uAlpha",i.alpha),this.runDraw()},onCircle:function(i,a,l){var f=this.shaders[h.CIRCLE];this.setShader(f),this.circle.onPreRender(i,f,a,l),this.runDraw()},onBarrel:function(i){var a=this.shaders[h.BARREL];this.setShader(a),this.barrel.onPreRender(i,a),this.runDraw()},onDisplacement:function(i){this.setShader(this.shaders[h.DISPLACEMENT]),this.set1i("uDisplacementSampler",1),this.set2f("amount",i.x,i.y),this.bindTexture(i.glTexture,1),this.runDraw()},onWipe:function(i){var a=this.shaders[h.WIPE];this.setShader(a),this.wipe.onPreRender(i,a),this.runDraw()},onBokeh:function(i,a,l){var f=this.shaders[h.BOKEH];this.setShader(f),this.bokeh.onPreRender(i,f,a,l),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,n.prototype.destroy.call(this),this}});p.exports=o}),96569:((p,S,t)=>{var d=t(83419),c=t(95540),h=t(31063),r=t(57516),n=t(61340),e=t(26099),s=t(29100),o=new d({Extends:r,initialize:function(a){var l=c(a,"fragShader",h);a.fragShader=l.replace("%LIGHT_COUNT%",a.game.renderer.config.maxLights),r.call(this,a),this.inverseRotationMatrix=new Float32Array([1,0,0,0,1,0,0,0,1]),this.currentNormalMap,this.lightsActive=!0,this.tempVec2=new e,this._tempMatrix=new n,this._tempMatrix2=new n},boot:function(){s.prototype.boot.call(this)},onRender:function(i,a){var l=i.sys.lights;if(this.lightsActive=!1,!(!l||!l.active)){var f=l.getLights(a),u=f.length;this.lightsActive=!0;var v,m=this.renderer,x=m.height,g=a.matrix,y=this.tempVec2;for(this.set1i("uMainSampler",0),this.set1i("uNormSampler",1),this.set2f("uResolution",this.width/2,this.height/2),this.set4f("uCamera",a.x,a.y,a.rotation,a.zoom),this.set3f("uAmbientLightColor",l.ambientColor.r,l.ambientColor.g,l.ambientColor.b),this.set1i("uLightCount",u),v=0;v<u;v++){var T=f[v].light,C=T.color,E="uLights["+v+"].";g.transformPoint(T.x,T.y,y),this.set2f(E+"position",y.x-a.scrollX*T.scrollFactorX*a.zoom,x-(y.y-a.scrollY*T.scrollFactorY*a.zoom)),this.set3f(E+"color",C.r,C.g,C.b),this.set1f(E+"intensity",T.intensity),this.set1f(E+"radius",T.radius)}this.currentNormalMapRotation=null}},setNormalMapRotation:function(i){if(i!==this.currentNormalMapRotation||this.vertexCount===0){this.vertexCount>0&&this.flush();var a=this.inverseRotationMatrix;if(i){var l=-i,f=Math.cos(l),u=Math.sin(l);a[1]=u,a[3]=-u,a[0]=a[4]=f}else a[0]=a[4]=1,a[1]=a[3]=0;this.setMatrix3fv("uInverseRotationMatrix",!1,a),this.currentNormalMapRotation=i}},setTexture2D:function(i,a){var l=this.renderer;i===void 0&&(i=l.whiteTexture);var f=this.getNormalMap(a);this.isNewNormalMap(i,f)&&(this.flush(),this.createBatch(i),this.addTextureToBatch(f),this.currentNormalMap=f);var u=0;if(a&&a.parentContainer){var v=a.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);u=v.rotationNormalized}else a&&(u=a.rotation);return this.currentBatch===null&&(this.createBatch(i),this.addTextureToBatch(f)),this.setNormalMapRotation(u),0},setGameObject:function(i,a){a===void 0&&(a=i.frame);var l=a.glTexture,f=this.getNormalMap(i);if(this.isNewNormalMap(l,f)&&(this.flush(),this.createBatch(l),this.addTextureToBatch(f),this.currentNormalMap=f),i.parentContainer){var u=i.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);this.setNormalMapRotation(u.rotationNormalized)}else this.setNormalMapRotation(i.rotation);return this.currentBatch===null&&(this.createBatch(l),this.addTextureToBatch(f)),0},isNewNormalMap:function(i,a){return this.currentTexture!==i||this.currentNormalMap!==a},getNormalMap:function(i){var a;if(i)i.displayTexture?a=i.displayTexture.dataSource[i.displayFrame.sourceIndex]:i.texture?a=i.texture.dataSource[i.frame.sourceIndex]:i.tileset&&(Array.isArray(i.tileset)?a=i.tileset[0].image.dataSource[0]:a=i.tileset.image.dataSource[0]);else return this.renderer.normalTexture;return a?a.glTexture:this.renderer.normalTexture},batchSprite:function(i,a,l){this.lightsActive&&r.prototype.batchSprite.call(this,i,a,l)},batchTexture:function(i,a,l,f,u,v,m,x,g,y,T,C,E,M,P,A,R,F,w,I,U,N,D,B,L,G,O,X,z,V,Y,W){this.lightsActive&&r.prototype.batchTexture.call(this,i,a,l,f,u,v,m,x,g,y,T,C,E,M,P,A,R,F,w,I,U,N,D,B,L,G,O,X,z,V,Y,W)},batchTextureFrame:function(i,a,l,f,u,v,m){this.lightsActive&&r.prototype.batchTextureFrame.call(this,i,a,l,f,u,v,m)}});p.exports=o}),56527:((p,S,t)=>{var d=t(83419),c=t(95540),h=t(57516),r=t(45561),n=t(60722),e=t(14500),s=t(29100),o=new d({Extends:h,initialize:function(a){a.fragShader=c(a,"fragShader",r),a.vertShader=c(a,"vertShader",n),a.attributes=c(a,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),a.forceZero=!0,a.resizeUniform="uResolution",h.call(this,a)},boot:function(){s.prototype.boot.call(this);var i=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",i.width,i.height)}});p.exports=o}),57516:((p,S,t)=>{var d=t(83419),c=t(94811),h=t(95540),r=t(98840),n=t(44667),e=t(61340),s=t(70554),o=t(14500),i=t(29100),a=new d({Extends:i,initialize:function(f){var u=f.game.renderer,v=h(f,"fragShader",r);f.fragShader=s.parseFragmentShaderMaxTextures(v,u.maxTextures),f.vertShader=h(f,"vertShader",n),f.attributes=h(f,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:o.UNSIGNED_BYTE,normalized:!0}]),f.resizeUniform="uResolution",i.call(this,f),this._tempMatrix1=new e,this._tempMatrix2=new e,this._tempMatrix3=new e,this.calcMatrix=new e,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},boot:function(){i.prototype.boot.call(this);var l=this.renderer;this.set1iv("uMainSampler",l.textureIndexes),this.set2f("uResolution",l.width,l.height)},batchSprite:function(l,f,u){this.manager.set(this,l);var v=this._tempMatrix1,m=this._tempMatrix2,x=this._tempMatrix3,g=l.frame,y=g.glTexture,T=g.u0,C=g.v0,E=g.u1,M=g.v1,P=g.x,A=g.y,R=g.cutWidth,F=g.cutHeight,w=g.customPivot,I=l.displayOriginX,U=l.displayOriginY,N=-I+P,D=-U+A;if(l.isCropped){var B=l._crop;(B.flipX!==l.flipX||B.flipY!==l.flipY)&&g.updateCropUVs(B,l.flipX,l.flipY),T=B.u0,C=B.v0,E=B.u1,M=B.v1,R=B.width,F=B.height,P=B.x,A=B.y,N=-I+P,D=-U+A}var L=1,G=1;l.flipX&&(w||(N+=-g.realWidth+I*2),L=-1),l.flipY&&(w||(D+=-g.realHeight+U*2),G=-1);var O=l.x,X=l.y;f.roundPixels&&(O=Math.floor(O),X=Math.floor(X)),m.applyITRS(O,X,l.rotation,l.scaleX*L,l.scaleY*G),v.copyFrom(f.matrix),u?(v.multiplyWithOffset(u,-f.scrollX*l.scrollFactorX,-f.scrollY*l.scrollFactorY),m.e=O,m.f=X):(m.e-=f.scrollX*l.scrollFactorX,m.f-=f.scrollY*l.scrollFactorY),v.multiply(m,x);var z=x.setQuad(N,D,N+R,D+F,f.renderRoundPixels),V=s.getTintAppendFloatAlpha,Y=f.alpha,W=V(l.tintTopLeft,Y*l._alphaTL),H=V(l.tintTopRight,Y*l._alphaTR),K=V(l.tintBottomLeft,Y*l._alphaBL),b=V(l.tintBottomRight,Y*l._alphaBR);this.shouldFlush(6)&&this.flush();var J=this.setGameObject(l,g);this.manager.preBatch(l),this.batchQuad(l,z[0],z[1],z[2],z[3],z[4],z[5],z[6],z[7],T,C,E,M,W,H,K,b,l.tintFill,y,J),this.manager.postBatch(l)},batchTexture:function(l,f,u,v,m,x,g,y,T,C,E,M,P,A,R,F,w,I,U,N,D,B,L,G,O,X,z,V,Y,W,H,K,b){b===void 0&&(b=!1),this.manager.set(this,l);var J=this._tempMatrix1,$=this._tempMatrix2,Z=this._tempMatrix3,q=I/u+z,_=U/v+V,tt=(I+N)/u+z,Q=(U+D)/v+V,j=g,k=y,et=-F,nt=-w;if(l.isCropped){var lt=l._crop,it=lt.width,st=lt.height;j=it,k=st,g=it,y=st,I=lt.x,U=lt.y;var ft=I,ct=U;M&&(ft=N-lt.x-it),P&&(ct=D-lt.y-st),q=ft/u+z,_=ct/v+V,tt=(ft+it)/u+z,Q=(ct+st)/v+V,et=-F+I,nt=-w+U}P=P^(!H&&f.isRenderTexture?1:0),M&&(j*=-1,et+=g),P&&(k*=-1,nt+=y),Y.roundPixels&&(m=Math.floor(m),x=Math.floor(x)),$.applyITRS(m,x,E,T,C),J.copyFrom(Y.matrix),W?(J.multiplyWithOffset(W,-Y.scrollX*A,-Y.scrollY*R),$.e=m,$.f=x):($.e-=Y.scrollX*A,$.f-=Y.scrollY*R),J.multiply($,Z);var rt=Z.setQuad(et,nt,et+j,nt+k,Y.renderRoundPixels);K==null&&(K=this.setTexture2D(f)),l&&!b&&this.manager.preBatch(l),this.batchQuad(l,rt[0],rt[1],rt[2],rt[3],rt[4],rt[5],rt[6],rt[7],q,_,tt,Q,B,L,G,O,X,f,K),l&&!b&&this.manager.postBatch(l)},batchTextureFrame:function(l,f,u,v,m,x,g){this.manager.set(this);var y=this._tempMatrix1.copyFrom(x),T=this._tempMatrix2;g?y.multiply(g,T):T=y;var C=T.setQuad(f,u,f+l.width,u+l.height),E=this.setTexture2D(l.source.glTexture);v=s.getTintAppendFloatAlpha(v,m),this.batchQuad(null,C[0],C[1],C[2],C[3],C[4],C[5],C[6],C[7],l.u0,l.v0,l.u1,l.v1,v,v,v,v,0,l.glTexture,E)},batchFillRect:function(l,f,u,v,m,x){this.renderer.pipelines.set(this);var g=this.calcMatrix;x&&x.multiply(m,g);var y=g.setQuad(l,f,l+u,f+v),T=this.fillTint;this.batchQuad(null,y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],0,0,1,1,T.TL,T.TR,T.BL,T.BR,2)},batchFillTriangle:function(l,f,u,v,m,x,g,y){this.renderer.pipelines.set(this);var T=this.calcMatrix;y&&y.multiply(g,T);var C=T.getX(l,f),E=T.getY(l,f),M=T.getX(u,v),P=T.getY(u,v),A=T.getX(m,x),R=T.getY(m,x),F=this.fillTint;this.batchTri(null,C,E,M,P,A,R,0,0,1,1,F.TL,F.TR,F.BL,2)},batchStrokeTriangle:function(l,f,u,v,m,x,g,y,T){var C=this.tempTriangle;C[0].x=l,C[0].y=f,C[0].width=g,C[1].x=u,C[1].y=v,C[1].width=g,C[2].x=m,C[2].y=x,C[2].width=g,C[3].x=l,C[3].y=f,C[3].width=g,this.batchStrokePath(C,g,!1,y,T)},batchFillPath:function(l,f,u){this.renderer.pipelines.set(this);var v=this.calcMatrix;u&&u.multiply(f,v);for(var m=l.length,x=this.polygonCache,g,y,T=this.fillTint.TL,C=this.fillTint.TR,E=this.fillTint.BL,M=0;M<m;++M)y=l[M],x.push(y.x,y.y);g=c(x),m=g.length;for(var P=0;P<m;P+=3){var A=g[P+0]*2,R=g[P+1]*2,F=g[P+2]*2,w=x[A+0],I=x[A+1],U=x[R+0],N=x[R+1],D=x[F+0],B=x[F+1],L=v.getX(w,I),G=v.getY(w,I),O=v.getX(U,N),X=v.getY(U,N),z=v.getX(D,B),V=v.getY(D,B);this.batchTri(null,L,G,O,X,z,V,0,0,1,1,T,C,E,2)}x.length=0},batchStrokePath:function(l,f,u,v,m){this.renderer.pipelines.set(this),this.prevQuad[4]=0,this.firstQuad[4]=0;for(var x=l.length-1,g=0;g<x;g++){var y=l[g],T=l[g+1];this.batchLine(y.x,y.y,T.x,T.y,y.width/2,T.width/2,f,g,!u&&g===x-1,v,m)}},batchLine:function(l,f,u,v,m,x,g,y,T,C,E){this.renderer.pipelines.set(this);var M=this.calcMatrix;E&&E.multiply(C,M);var P=u-l,A=v-f,R=Math.sqrt(P*P+A*A);if(R!==0){var F=m*(v-f)/R,w=m*(l-u)/R,I=x*(v-f)/R,U=x*(l-u)/R,N=u-I,D=v-U,B=l-F,L=f-w,G=u+I,O=v+U,X=l+F,z=f+w,V=M.getX(N,D),Y=M.getY(N,D),W=M.getX(B,L),H=M.getY(B,L),K=M.getX(G,O),b=M.getY(G,O),J=M.getX(X,z),$=M.getY(X,z),Z=this.strokeTint,q=Z.TL,_=Z.TR,tt=Z.BL,Q=Z.BR;if(this.batchQuad(null,J,$,W,H,V,Y,K,b,0,0,1,1,q,_,tt,Q,2),!(g<=2)){var j=this.prevQuad,k=this.firstQuad;y>0&&j[4]?this.batchQuad(null,J,$,W,H,j[0],j[1],j[2],j[3],0,0,1,1,q,_,tt,Q,2):(k[0]=J,k[1]=$,k[2]=W,k[3]=H,k[4]=1),T&&k[4]?this.batchQuad(null,V,Y,K,b,k[0],k[1],k[2],k[3],0,0,1,1,q,_,tt,Q,2):(j[0]=V,j[1]=Y,j[2]=K,j[3]=b,j[4]=1)}}},destroy:function(){return this._tempMatrix1.destroy(),this._tempMatrix2.destroy(),this._tempMatrix3.destroy(),this._tempMatrix1=null,this._tempMatrix1=null,this._tempMatrix1=null,i.prototype.destroy.call(this),this}});p.exports=a}),43439:((p,S,t)=>{var d=t(83419),c=t(95540),h=t(4127),r=t(89924),n=t(29100),e=new d({Extends:n,initialize:function(o){o.vertShader=c(o,"vertShader",r),o.fragShader=c(o,"fragShader",h),o.attributes=c(o,"attributes",[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius"},{name:"inLightAttenuation"},{name:"inLightColor",size:4}]),n.call(this,o)},onRender:function(s,o){this.set2f("uResolution",this.width,this.height),this.set1f("uCameraZoom",o.zoom)},batchPointLight:function(s,o,i,a,l,f,u,v,m,x,g,y){var T=s.color,C=s.intensity,E=s.radius,M=s.attenuation,P=T.r*C,A=T.g*C,R=T.b*C,F=o.alpha*s.alpha;this.shouldFlush(6)&&this.flush(),this.currentBatch||this.setTexture2D(),this.batchLightVert(i,a,g,y,E,M,P,A,R,F),this.batchLightVert(l,f,g,y,E,M,P,A,R,F),this.batchLightVert(u,v,g,y,E,M,P,A,R,F),this.batchLightVert(i,a,g,y,E,M,P,A,R,F),this.batchLightVert(u,v,g,y,E,M,P,A,R,F),this.batchLightVert(m,x,g,y,E,M,P,A,R,F),this.currentBatch.count=this.vertexCount-this.currentBatch.start},batchLightVert:function(s,o,i,a,l,f,u,v,m,x){var g=this.vertexViewF32,y=this.vertexCount*this.currentShader.vertexComponentCount-1;g[++y]=s,g[++y]=o,g[++y]=i,g[++y]=a,g[++y]=l,g[++y]=f,g[++y]=u,g[++y]=v,g[++y]=m,g[++y]=x,this.vertexCount++}});p.exports=e}),84057:((p,S,t)=>{var d=t(83419),c=t(89422),h=t(95540),r=t(27681),n=t(49627),e=t(29100),s=new d({Extends:e,initialize:function(i){i.renderTarget=h(i,"renderTarget",1),i.fragShader=h(i,"fragShader",r),i.vertShader=h(i,"vertShader",n),i.attributes=h(i,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),i.batchSize=1,i.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],e.call(this,i),this.isPostFX=!0,this.gameObject,this.controller,this.colorMatrix=new c,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderer.isBooted&&(this.manager=this.renderer.pipelines)},bootFX:function(){e.prototype.boot.call(this);var o=this.manager.UTILITY_PIPELINE;this.fullFrame1=o.fullFrame1,this.fullFrame2=o.fullFrame2,this.halfFrame1=o.halfFrame1,this.halfFrame2=o.halfFrame2;var i=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",i.width,i.height);for(var a=this.renderTargets,l=0;l<a.length;l++)a[l].autoResize=!0},postBatch:function(o){return this.hasBooted||(this.bootFX(),this.currentRenderTarget&&this.currentRenderTarget.bind()),this.onDraw(this.currentRenderTarget),this.onPostBatch(o),this},onDraw:function(o){this.bindAndDraw(o)},getController:function(o){return o!==void 0?o:this.controller?this.controller:this},copySprite:function(o,i,a){a===void 0&&(a=!1);var l=this.gl;l.activeTexture(l.TEXTURE0),l.bindTexture(l.TEXTURE_2D,o.texture.webGLTexture);var f=l.getParameter(l.FRAMEBUFFER_BINDING);l.bindFramebuffer(l.FRAMEBUFFER,i.framebuffer.webGLFramebuffer),l.framebufferTexture2D(l.FRAMEBUFFER,l.COLOR_ATTACHMENT0,l.TEXTURE_2D,i.texture.webGLTexture,0),l.clearColor(0,0,0,0),l.clear(l.COLOR_BUFFER_BIT),l.bufferData(l.ARRAY_BUFFER,this.vertexData,l.STATIC_DRAW),l.drawArrays(l.TRIANGLES,0,6),a&&(l.bindTexture(l.TEXTURE_2D,null),l.bindFramebuffer(l.FRAMEBUFFER,f))},copyFrame:function(o,i,a,l,f){this.manager.copyFrame(o,i,a,l,f)},copyToGame:function(o){this.manager.copyToGame(o)},drawFrame:function(o,i,a){this.manager.drawFrame(o,i,a,this.colorMatrix)},blendFrames:function(o,i,a,l,f){this.manager.blendFrames(o,i,a,l,f)},blendFramesAdditive:function(o,i,a,l,f){this.manager.blendFramesAdditive(o,i,a,l,f)},clearFrame:function(o,i){this.manager.clearFrame(o,i)},blitFrame:function(o,i,a,l,f,u){this.manager.blitFrame(o,i,a,l,f,u)},copyFrameRect:function(o,i,a,l,f,u,v,m){this.manager.copyFrameRect(o,i,a,l,f,u,v,m)},bindAndDraw:function(o,i,a,l,f){a===void 0&&(a=!0),l===void 0&&(l=!0);var u=this.gl,v=this.renderer;this.bind(f),this.set1i("uMainSampler",0),i?(u.viewport(0,0,i.width,i.height),u.bindFramebuffer(u.FRAMEBUFFER,i.framebuffer.webGLFramebuffer),u.framebufferTexture2D(u.FRAMEBUFFER,u.COLOR_ATTACHMENT0,u.TEXTURE_2D,i.texture.webGLTexture,0),a&&(l?u.clearColor(0,0,0,0):u.clearColor(0,0,0,1),u.clear(u.COLOR_BUFFER_BIT))):(v.popFramebuffer(!1,!1),v.currentFramebuffer||u.viewport(0,0,v.width,v.height)),v.restoreStencilMask(),u.activeTexture(u.TEXTURE0),u.bindTexture(u.TEXTURE_2D,o.texture.webGLTexture),u.bufferData(u.ARRAY_BUFFER,this.vertexData,u.STATIC_DRAW),u.drawArrays(u.TRIANGLES,0,6),i&&(u.bindTexture(u.TEXTURE_2D,null),u.bindFramebuffer(u.FRAMEBUFFER,v.currentFramebuffer.webGLFramebuffer))},destroy:function(){return this.controller&&this.controller.destroy(),this.gameObject=null,this.controller=null,this.colorMatrix=null,this.fullFrame1=null,this.fullFrame2=null,this.halfFrame1=null,this.halfFrame2=null,this.manager.removePostPipeline(this),e.prototype.destroy.call(this),this}});p.exports=s}),43558:((p,S,t)=>{var d=t(10312),c=t(67502),h=t(83419),r=t(96293),n=t(95540),e=t(57516),s=t(27681),o=t(87841),i=t(32302),a=t(45561),l=t(60722),f=t(29100),u=new h({Extends:e,initialize:function(m){var x=n(m,"fragShader",s),g=n(m,"vertShader",l),y=n(m,"drawShader",s),T=[{name:"DrawSprite",fragShader:a,vertShader:l},{name:"CopySprite",fragShader:x,vertShader:g},{name:"DrawGame",fragShader:y,vertShader:l},{name:"ColorMatrix",fragShader:r}],C=n(m,"shaders",[]);m.shaders=T.concat(C),m.vertShader||(m.vertShader=g),m.batchSize=1,e.call(this,m),this.isPreFX=!0,this.customMainSampler=null,this.drawSpriteShader,this.copyShader,this.gameShader,this.colorMatrixShader,this.quadVertexData,this.quadVertexBuffer,this.quadVertexViewF32,this.spriteBounds=new o,this.targetBounds=new o,this.fsTarget,this.tempSprite,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){f.prototype.boot.call(this);var v=this.shaders,m=this.renderer;this.drawSpriteShader=v[0],this.copyShader=v[1],this.gameShader=v[2],this.colorMatrixShader=v[3],this.fsTarget=new i(m,m.width,m.height,1,0,!0,!0),this.renderTargets=this.manager.renderTargets.concat(this.fsTarget);var x=new ArrayBuffer(168);this.quadVertexData=x,this.quadVertexViewF32=new Float32Array(x),this.quadVertexBuffer=m.createVertexBuffer(x,this.gl.STATIC_DRAW),this.onResize(m.width,m.height),this.currentShader=this.copyShader,this.set2f("uResolution",m.width,m.height)},onResize:function(v,m){var x=this.quadVertexViewF32;x[1]=m,x[22]=m,x[14]=v,x[28]=v,x[35]=v,x[36]=m},batchQuad:function(v,m,x,g,y,T,C,E,M,P,A,R,F,w,I,U,N,D,B){var L=Math.min(m,g,T,E),G=Math.min(x,y,C,M),O=Math.max(m,g,T,E),X=Math.max(x,y,C,M),z=O-L,V=X-G,Y=this.spriteBounds.setTo(L,G,z,V),W=v?v.preFX.padding:0,H=z+W*2,K=V+W*2,b=Math.abs(Math.max(H,K)),J=this.manager.getRenderTarget(b),$=this.targetBounds.setTo(0,0,J.width,J.height);c($,Math.round(Y.centerX),Math.round(Y.centerY)),this.tempSprite=v;var Z=this.gl,q=this.renderer;q.clearStencilMask(),this.setShader(this.drawSpriteShader),this.set1i("uMainSampler",0),this.set2f("uResolution",q.width,q.height),this.flipProjectionMatrix(!0),v&&(this.onDrawSprite(v,J),v.preFX.onFX(this));var _=this.fsTarget;return this.flush(),Z.viewport(0,0,q.width,q.height),Z.bindFramebuffer(Z.FRAMEBUFFER,_.framebuffer.webGLFramebuffer),Z.framebufferTexture2D(Z.FRAMEBUFFER,Z.COLOR_ATTACHMENT0,Z.TEXTURE_2D,_.texture.webGLTexture,0),Z.clearColor(0,0,0,0),Z.clear(Z.COLOR_BUFFER_BIT),this.setTexture2D(B),this.batchVert(m,x,P,A,0,D,w),this.batchVert(g,y,P,F,0,D,U),this.batchVert(T,C,R,F,0,D,N),this.batchVert(m,x,P,A,0,D,w),this.batchVert(T,C,R,F,0,D,N),this.batchVert(E,M,R,A,0,D,I),this.flush(),this.flipProjectionMatrix(!1),Z.activeTexture(Z.TEXTURE0),Z.bindTexture(Z.TEXTURE_2D,J.texture.webGLTexture),Z.copyTexSubImage2D(Z.TEXTURE_2D,0,0,0,$.x,$.y,$.width,$.height),Z.bindFramebuffer(Z.FRAMEBUFFER,null),Z.bindTexture(Z.TEXTURE_2D,null),this.onBatch(v),this.currentShader=this.copyShader,this.onDraw(J,this.manager.getSwapRenderTarget(),this.manager.getAltSwapRenderTarget()),!0},onDrawSprite:function(){},onCopySprite:function(){},copySprite:function(v,m,x,g,y,T,C){x===void 0&&(x=!0),g===void 0&&(g=!0),y===void 0&&(y=!1),C===void 0&&(C=this.copyShader);var E=this.gl,M=this.tempSprite;T&&(C=this.colorMatrixShader),this.currentShader=C;var P=this.setVertexBuffer(this.quadVertexBuffer);C.bind(P,!1);var A=this.renderer;if(this.set1i("uMainSampler",0),this.set2f("uResolution",A.width,A.height),M.preFX.onFXCopy(this),this.onCopySprite(v,m,M),T&&(this.set1fv("uColorMatrix",T.getData()),this.set1f("uAlpha",T.alpha)),E.activeTexture(E.TEXTURE0),E.bindTexture(E.TEXTURE_2D,v.texture.webGLTexture),v.height>m.height)E.viewport(0,0,v.width,v.height),this.setTargetUVs(v,m);else{var R=m.height-v.height;E.viewport(0,R,v.width,v.height),this.resetUVs()}if(E.bindFramebuffer(E.FRAMEBUFFER,m.framebuffer.webGLFramebuffer),E.framebufferTexture2D(E.FRAMEBUFFER,E.COLOR_ATTACHMENT0,E.TEXTURE_2D,m.texture.webGLTexture,0),x&&(E.clearColor(0,0,0,+!g),E.clear(E.COLOR_BUFFER_BIT)),y){var F=this.renderer.currentBlendMode;this.renderer.setBlendMode(d.ERASE)}E.bufferData(E.ARRAY_BUFFER,this.quadVertexData,E.STATIC_DRAW),E.drawArrays(E.TRIANGLES,0,6),y&&this.renderer.setBlendMode(F),E.bindFramebuffer(E.FRAMEBUFFER,null)},copy:function(v,m){var x=this.gl;this.set1i("uMainSampler",0),x.activeTexture(x.TEXTURE0),x.bindTexture(x.TEXTURE_2D,v.texture.webGLTexture),x.viewport(0,0,v.width,v.height),this.setUVs(0,0,0,1,1,1,1,0),x.bindFramebuffer(x.FRAMEBUFFER,m.framebuffer.webGLFramebuffer),x.framebufferTexture2D(x.FRAMEBUFFER,x.COLOR_ATTACHMENT0,x.TEXTURE_2D,m.texture.webGLTexture,0),x.clearColor(0,0,0,0),x.clear(x.COLOR_BUFFER_BIT),x.bufferData(x.ARRAY_BUFFER,this.quadVertexData,x.STATIC_DRAW),x.drawArrays(x.TRIANGLES,0,6),x.bindFramebuffer(x.FRAMEBUFFER,null)},blendFrames:function(v,m,x,g,y){this.manager.blendFrames(v,m,x,g,y)},blendFramesAdditive:function(v,m,x,g,y){this.manager.blendFramesAdditive(v,m,x,g,y)},drawToGame:function(v){this.currentShader=null,this.setShader(this.copyShader),this.bindAndDraw(v)},copyToGame:function(v){this.currentShader=null,this.setShader(this.gameShader),this.bindAndDraw(v)},bindAndDraw:function(v){var m=this.gl,x=this.renderer;this.set1i("uMainSampler",0),this.customMainSampler?this.setTexture2D(this.customMainSampler):this.setTexture2D(v.texture);var g=this._tempMatrix1.loadIdentity(),y=this.targetBounds.x,T=this.targetBounds.y,C=y+v.width,E=T+v.height,M=g.getX(y,T),P=g.getX(y,E),A=g.getX(C,E),R=g.getX(C,T),F=g.getY(y,T),w=g.getY(y,E),I=g.getY(C,E),U=g.getY(C,T),N=16777215;this.batchVert(M,F,0,0,0,0,N),this.batchVert(P,w,0,1,0,0,N),this.batchVert(A,I,1,1,0,0,N),this.batchVert(M,F,0,0,0,0,N),this.batchVert(A,I,1,1,0,0,N),this.batchVert(R,U,1,0,0,0,N),x.restoreFramebuffer(!1,!0),x.currentFramebuffer||m.viewport(0,0,x.width,x.height),x.restoreStencilMask(),this.flush(),this.tempSprite=null},onDraw:function(v){this.drawToGame(v)},setUVs:function(v,m,x,g,y,T,C,E){var M=this.quadVertexViewF32;M[2]=v,M[3]=m,M[9]=x,M[10]=g,M[16]=y,M[17]=T,M[23]=v,M[24]=m,M[30]=y,M[31]=T,M[37]=C,M[38]=E},setTargetUVs:function(v,m){var x=m.height/v.height;x>.5?x=.5-(x-.5):x=.5+(.5-x),this.setUVs(0,x,0,1+x,1,1+x,1,x)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)},destroy:function(){return this.renderer.deleteBuffer(this.quadVertexBuffer),this.drawSpriteShader=null,this.copyShader=null,this.gameShader=null,this.colorMatrixShader=null,this.quadVertexData=null,this.quadVertexBuffer=null,this.quadVertexViewF32=null,this.fsTarget=null,this.tempSprite=null,e.prototype.destroy.call(this),this}});p.exports=u}),81041:((p,S,t)=>{var d=t(83419),c=t(95540),h=t(57516),r=new d({Extends:h,initialize:function(e){e.topology=5,e.batchSize=c(e,"batchSize",256),h.call(this,e)}});p.exports=r}),12385:((p,S,t)=>{var d=t(83419),c=t(95540),h=t(57516),r=t(45561),n=t(60722),e=t(29100),s=new d({Extends:h,initialize:function(i){i.fragShader=c(i,"fragShader",r),i.vertShader=c(i,"vertShader",n),i.forceZero=!0,h.call(this,i)},boot:function(){e.prototype.boot.call(this);var o=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",o.width,o.height)}});p.exports=s}),7589:((p,S,t)=>{var d=t(35407),c=t(10312),h=t(83419),r=t(89422),n=t(96293),e=t(36682),s=t(95540),o=t(48247),i=t(49627),a=t(29100),l=new h({Extends:a,initialize:function(u){u.renderTarget=s(u,"renderTarget",[{scale:1,autoResize:!0},{scale:1,autoResize:!0},{scale:.5,autoResize:!0},{scale:.5,autoResize:!0}]),u.vertShader=s(u,"vertShader",i),u.shaders=s(u,"shaders",[{name:"Copy",fragShader:e},{name:"AddBlend",fragShader:d},{name:"LinearBlend",fragShader:o},{name:"ColorMatrix",fragShader:n}]),u.attributes=s(u,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),u.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],u.batchSize=1,a.call(this,u),this.colorMatrix=new r,this.copyShader,this.addShader,this.linearShader,this.colorMatrixShader,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2},boot:function(){a.prototype.boot.call(this);var f=this.shaders,u=this.renderTargets;this.copyShader=f[0],this.addShader=f[1],this.linearShader=f[2],this.colorMatrixShader=f[3],this.fullFrame1=u[0],this.fullFrame2=u[1],this.halfFrame1=u[2],this.halfFrame2=u[3]},copyFrame:function(f,u,v,m,x){v===void 0&&(v=1),m===void 0&&(m=!0),x===void 0&&(x=!0);var g=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",v),g.activeTexture(g.TEXTURE0),g.bindTexture(g.TEXTURE_2D,f.texture.webGLTexture),u?(g.viewport(0,0,u.width,u.height),g.bindFramebuffer(g.FRAMEBUFFER,u.framebuffer.webGLFramebuffer),g.framebufferTexture2D(g.FRAMEBUFFER,g.COLOR_ATTACHMENT0,g.TEXTURE_2D,u.texture.webGLTexture,0)):g.viewport(0,0,f.width,f.height),m&&(x?g.clearColor(0,0,0,0):g.clearColor(0,0,0,1),g.clear(g.COLOR_BUFFER_BIT)),g.bufferData(g.ARRAY_BUFFER,this.vertexData,g.STATIC_DRAW),g.drawArrays(g.TRIANGLES,0,6),g.bindFramebuffer(g.FRAMEBUFFER,null),g.bindTexture(g.TEXTURE_2D,null)},blitFrame:function(f,u,v,m,x,g,y){v===void 0&&(v=1),m===void 0&&(m=!0),x===void 0&&(x=!0),g===void 0&&(g=!1),y===void 0&&(y=!1);var T=this.gl;if(this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",v),T.activeTexture(T.TEXTURE0),T.bindTexture(T.TEXTURE_2D,f.texture.webGLTexture),f.height>u.height)T.viewport(0,0,f.width,f.height),this.setTargetUVs(f,u);else{var C=u.height-f.height;T.viewport(0,C,f.width,f.height)}if(T.bindFramebuffer(T.FRAMEBUFFER,u.framebuffer.webGLFramebuffer),T.framebufferTexture2D(T.FRAMEBUFFER,T.COLOR_ATTACHMENT0,T.TEXTURE_2D,u.texture.webGLTexture,0),m&&(x?T.clearColor(0,0,0,0):T.clearColor(0,0,0,1),T.clear(T.COLOR_BUFFER_BIT)),g){var E=this.renderer.currentBlendMode;this.renderer.setBlendMode(c.ERASE)}y&&this.flipY(),T.bufferData(T.ARRAY_BUFFER,this.vertexData,T.STATIC_DRAW),T.drawArrays(T.TRIANGLES,0,6),g&&this.renderer.setBlendMode(E),T.bindFramebuffer(T.FRAMEBUFFER,null),T.bindTexture(T.TEXTURE_2D,null),this.resetUVs()},copyFrameRect:function(f,u,v,m,x,g,y,T){y===void 0&&(y=!0),T===void 0&&(T=!0);var C=this.gl;C.bindFramebuffer(C.FRAMEBUFFER,f.framebuffer.webGLFramebuffer),C.framebufferTexture2D(C.FRAMEBUFFER,C.COLOR_ATTACHMENT0,C.TEXTURE_2D,f.texture.webGLTexture,0),y&&(T?C.clearColor(0,0,0,0):C.clearColor(0,0,0,1),C.clear(C.COLOR_BUFFER_BIT)),C.activeTexture(C.TEXTURE0),C.bindTexture(C.TEXTURE_2D,u.texture.webGLTexture),C.copyTexSubImage2D(C.TEXTURE_2D,0,0,0,v,m,x,g),C.bindFramebuffer(C.FRAMEBUFFER,null),C.bindTexture(C.TEXTURE_2D,null)},copyToGame:function(f){var u=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",1),this.renderer.popFramebuffer(),u.activeTexture(u.TEXTURE0),u.bindTexture(u.TEXTURE_2D,f.texture.webGLTexture),u.bufferData(u.ARRAY_BUFFER,this.vertexData,u.STATIC_DRAW),u.drawArrays(u.TRIANGLES,0,6)},drawFrame:function(f,u,v,m){v===void 0&&(v=!0),m===void 0&&(m=this.colorMatrix);var x=this.gl;this.setShader(this.colorMatrixShader),this.set1i("uMainSampler",0),this.set1fv("uColorMatrix",m.getData()),this.set1f("uAlpha",m.alpha),x.activeTexture(x.TEXTURE0),x.bindTexture(x.TEXTURE_2D,f.texture.webGLTexture),u?(x.viewport(0,0,u.width,u.height),x.bindFramebuffer(x.FRAMEBUFFER,u.framebuffer.webGLFramebuffer),x.framebufferTexture2D(x.FRAMEBUFFER,x.COLOR_ATTACHMENT0,x.TEXTURE_2D,u.texture.webGLTexture,0)):x.viewport(0,0,f.width,f.height),v?x.clearColor(0,0,0,0):x.clearColor(0,0,0,1),x.clear(x.COLOR_BUFFER_BIT),x.bufferData(x.ARRAY_BUFFER,this.vertexData,x.STATIC_DRAW),x.drawArrays(x.TRIANGLES,0,6),x.bindFramebuffer(x.FRAMEBUFFER,null),x.bindTexture(x.TEXTURE_2D,null)},blendFrames:function(f,u,v,m,x,g){m===void 0&&(m=1),x===void 0&&(x=!0),g===void 0&&(g=this.linearShader);var y=this.gl;this.setShader(g),this.set1i("uMainSampler1",0),this.set1i("uMainSampler2",1),this.set1f("uStrength",m),y.activeTexture(y.TEXTURE0),y.bindTexture(y.TEXTURE_2D,f.texture.webGLTexture),y.activeTexture(y.TEXTURE1),y.bindTexture(y.TEXTURE_2D,u.texture.webGLTexture),v?(y.bindFramebuffer(y.FRAMEBUFFER,v.framebuffer.webGLFramebuffer),y.framebufferTexture2D(y.FRAMEBUFFER,y.COLOR_ATTACHMENT0,y.TEXTURE_2D,v.texture.webGLTexture,0),y.viewport(0,0,v.width,v.height)):y.viewport(0,0,f.width,f.height),x?y.clearColor(0,0,0,0):y.clearColor(0,0,0,1),y.clear(y.COLOR_BUFFER_BIT),y.bufferData(y.ARRAY_BUFFER,this.vertexData,y.STATIC_DRAW),y.drawArrays(y.TRIANGLES,0,6),y.bindFramebuffer(y.FRAMEBUFFER,null),y.bindTexture(y.TEXTURE_2D,null)},blendFramesAdditive:function(f,u,v,m,x){this.blendFrames(f,u,v,m,x,this.addShader)},clearFrame:function(f,u){u===void 0&&(u=!0);var v=this.gl;v.viewport(0,0,f.width,f.height),v.bindFramebuffer(v.FRAMEBUFFER,f.framebuffer.webGLFramebuffer),u?v.clearColor(0,0,0,0):v.clearColor(0,0,0,1),v.clear(v.COLOR_BUFFER_BIT);var m=this.renderer.currentFramebuffer;v.bindFramebuffer(v.FRAMEBUFFER,m.webGLFramebuffer)},setUVs:function(f,u,v,m,x,g,y,T){var C=this.vertexViewF32;C[2]=f,C[3]=u,C[6]=v,C[7]=m,C[10]=x,C[11]=g,C[14]=f,C[15]=u,C[18]=x,C[19]=g,C[22]=y,C[23]=T},setTargetUVs:function(f,u){var v=u.height/f.height;v>.5?v=.5-(v-.5):v=.5+(.5-v),this.setUVs(0,v,0,1+v,1,1+v,1,v)},flipX:function(){this.setUVs(1,0,1,1,0,1,0,0)},flipY:function(){this.setUVs(0,1,0,0,1,0,1,1)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)}});p.exports=l}),36060:(p=>{var S={BITMAPMASK_PIPELINE:"BitmapMaskPipeline",LIGHT_PIPELINE:"Light2D",POINTLIGHT_PIPELINE:"PointLightPipeline",SINGLE_PIPELINE:"SinglePipeline",MULTI_PIPELINE:"MultiPipeline",ROPE_PIPELINE:"RopePipeline",GRAPHICS_PIPELINE:"GraphicsPipeline",POSTFX_PIPELINE:"PostFXPipeline",UTILITY_PIPELINE:"UtilityPipeline",MOBILE_PIPELINE:"MobilePipeline",FX_PIPELINE:"FxPipeline"};p.exports=S}),84817:(p=>{p.exports="pipelineafterflush"}),36712:(p=>{p.exports="pipelinebeforeflush"}),40285:(p=>{p.exports="pipelinebind"}),65918:(p=>{p.exports="pipelineboot"}),92852:(p=>{p.exports="pipelinedestroy"}),56072:(p=>{p.exports="pipelinerebind"}),57566:(p=>{p.exports="pipelineresize"}),77085:((p,S,t)=>{p.exports={AFTER_FLUSH:t(84817),BEFORE_FLUSH:t(36712),BIND:t(40285),BOOT:t(65918),DESTROY:t(92852),REBIND:t(56072),RESIZE:t(57566)}}),54812:((p,S,t)=>{var d=t(83419),c=t(99155),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),this.amount=1},onPreRender:function(n,e){n=this.getController(n),this.set1f("amount",n.amount,e)}});p.exports=r}),67329:((p,S,t)=>{var d=t(83419),c=t(24400),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),this.steps=4,this.offsetX=1,this.offsetY=1,this.blurStrength=1,this.strength=1,this.glcolor=[1,1,1]},onPreRender:function(n){n=this.getController(n),this.set1f("strength",n.blurStrength),this.set3fv("color",n.glcolor)},onDraw:function(n){var e=this.getController(),s=this.fullFrame1,o=this.fullFrame2;this.copyFrame(n,o);for(var i=2/n.width*e.offsetX,a=2/n.height*e.offsetY,l=0;l<e.steps;l++)this.set2f("offset",i,0),this.copySprite(n,s),this.set2f("offset",0,a),this.copySprite(s,n);this.blendFrames(o,n,s,e.strength),this.copyToGame(s)}});p.exports=r}),8861:((p,S,t)=>{var d=t(83419),c=t(41514),h=t(51078),r=t(94328),n=t(84057),e=new d({Extends:n,initialize:function(o){n.call(this,{game:o,shaders:[{name:"Gaussian5",fragShader:c},{name:"Gaussian9",fragShader:h},{name:"Gaussian13",fragShader:r}]}),this.activeShader=this.shaders[0],this.x=2,this.y=2,this.steps=4,this.strength=1,this.glcolor=[1,1,1]},setQualityLow:function(){return this.activeShader=this.shaders[0],this},setQualityMedium:function(){return this.activeShader=this.shaders[1],this},setQualityHigh:function(){return this.activeShader=this.shaders[2],this},onDraw:function(s){var o=this.getController(),i=this.gl,a=this.fullFrame1,l=i.getParameter(i.FRAMEBUFFER_BINDING);this.bind(this.shaders[o.quality]),i.activeTexture(i.TEXTURE0),i.viewport(0,0,s.width,s.height),this.set1i("uMainSampler",0),this.set2f("resolution",s.width,s.height),this.set1f("strength",o.strength),this.set3fv("color",o.glcolor);for(var f=0;f<o.steps;f++)this.set2f("offset",o.x,0),this.copySprite(s,a),this.set2f("offset",0,o.y),this.copySprite(a,s);i.bindFramebuffer(i.FRAMEBUFFER,l),i.bindTexture(i.TEXTURE_2D,null),this.copyToGame(s)}});p.exports=e}),51051:((p,S,t)=>{var d=t(83419),c=t(90610),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),this.isTiltShift=!1,this.strength=1,this.blurX=1,this.blurY=1,this.radius=.5,this.amount=1,this.contrast=.2},onPreRender:function(n,e,s,o){n=this.getController(n),this.set1f("radius",n.radius,e),this.set1f("amount",n.amount,e),this.set1f("contrast",n.contrast,e),this.set1f("strength",n.strength,e),this.set2f("blur",n.blurX,n.blurY,e),this.setBoolean("isTiltShift",n.isTiltShift,e),s&&o&&this.set2f("resolution",s,o,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});p.exports=r}),89428:((p,S,t)=>{var d=t(83419),c=t(91899),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),this.scale=1,this.feather=.005,this.thickness=8,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4]},onPreRender:function(n,e,s,o){n=this.getController(n),this.set1f("scale",n.scale,e),this.set1f("feather",n.feather,e),this.set1f("thickness",n.thickness,e),this.set3fv("color",n.glcolor,e),this.set4fv("backgroundColor",n.glcolor2,e),s&&o&&this.set2f("resolution",s,o,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});p.exports=r}),88904:((p,S,t)=>{var d=t(83419),c=t(84057),h=new d({Extends:c,initialize:function(n){c.call(this,{game:n})},onDraw:function(r){var n=this.fullFrame1;this.controller?this.manager.drawFrame(r,n,!0,this.controller):this.drawFrame(r,n),this.copyToGame(n)}});p.exports=h}),63563:((p,S,t)=>{var d=t(83419),c=t(47838),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),this.x=.005,this.y=.005,this.glTexture},onBoot:function(){this.setTexture("__WHITE")},setTexture:function(n){var e=this.game.textures.getFrame(n);e&&(this.glTexture=e.glTexture)},onDraw:function(n){var e=this.getController(),s=this.fullFrame1;this.bind(),this.set1i("uMainSampler",0),this.set1i("uDisplacementSampler",1),this.set2f("amount",e.x,e.y),this.bindTexture(e.glTexture,1),this.copySprite(n,s),this.copyToGame(s)}});p.exports=r}),94045:((p,S,t)=>{var d=t(83419),c=t(95540),h=t(98656),r=t(84057),n=t(70554),e=new d({Extends:r,initialize:function(o,i){var a=c(i,"quality",.1),l=c(i,"distance",10);r.call(this,{game:o,fragShader:n.setGlowQuality(h,o,a,l)}),this.outerStrength=4,this.innerStrength=0,this.knockout=!1,this.glcolor=[1,1,1,1]},onPreRender:function(s,o,i,a){s=this.getController(s),this.set1f("outerStrength",s.outerStrength,o),this.set1f("innerStrength",s.innerStrength,o),this.set4fv("glowColor",s.glcolor,o),this.setBoolean("knockout",s.knockout,o),i&&a&&this.set2f("resolution",i,a,o)},onDraw:function(s){this.set2f("resolution",s.width,s.height),this.bindAndDraw(s)}});p.exports=e}),74088:((p,S,t)=>{var d=t(83419),c=t(70463),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),this.alpha=.2,this.size=0,this.fromX=0,this.fromY=0,this.toX=0,this.toY=1,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0]},onPreRender:function(n,e){n=this.getController(n),this.set1f("alpha",n.alpha,e),this.set1i("size",n.size,e),this.set3fv("color1",n.glcolor1,e),this.set3fv("color2",n.glcolor2,e),this.set2f("positionFrom",n.fromX,n.fromY,e),this.set2f("positionTo",n.toX,n.toY,e)}});p.exports=r}),99636:((p,S,t)=>{var d=t(83419),c=t(50831),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),this.amount=1},onPreRender:function(n,e,s,o){n=this.getController(n),this.set1f("amount",n.amount,e),s&&o&&this.set2f("resolution",s,o,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});p.exports=r}),34700:((p,S,t)=>{var d=t(83419),c=t(92595),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),this.x=0,this.y=0,this.decay=.1,this.power=1,this.glcolor=[0,0,0,1],this.samples=6,this.intensity=1},onPreRender:function(n,e){n=this.getController(n);var s=n.samples;this.set1i("samples",s,e),this.set1f("intensity",n.intensity,e),this.set1f("decay",n.decay,e),this.set1f("power",n.power/s,e),this.set2f("lightPosition",n.x,n.y,e),this.set4fv("color",n.glcolor,e)}});p.exports=r}),91157:((p,S,t)=>{var d=t(83419),c=t(72464),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),this.speed=.5,this.lineWidth=.5,this.gradient=3,this.reveal=!1},onPreRender:function(n,e,s,o){n=this.getController(n),this.setTime("time",e),this.set1f("speed",n.speed,e),this.set1f("lineWidth",n.lineWidth,e),this.set1f("gradient",n.gradient,e),this.setBoolean("reveal",n.reveal,e),s&&o&&this.set2f("resolution",s,o,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});p.exports=r}),27797:((p,S,t)=>{var d=t(83419),c=t(39249),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),this.x=.5,this.y=.5,this.radius=.5,this.strength=.5},onPreRender:function(n,e){n=this.getController(n),this.set1f("radius",n.radius,e),this.set1f("strength",n.strength,e),this.set2f("position",n.x,n.y,e)}});p.exports=r}),67603:((p,S,t)=>{var d=t(83419),c=t(2878),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),this.progress=0,this.wipeWidth=.1,this.direction=0,this.axis=0,this.reveal=!1},onPreRender:function(n,e){n=this.getController(n);var s=n.progress,o=n.wipeWidth,i=n.direction,a=n.axis;this.set4f("config",s,o,i,a,e),this.setBoolean("reveal",n.reveal,e)}});p.exports=r}),58918:((p,S,t)=>{var d={Barrel:t(54812),Bloom:t(67329),Blur:t(8861),Bokeh:t(51051),Circle:t(89428),ColorMatrix:t(88904),Displacement:t(63563),Glow:t(94045),Gradient:t(74088),Pixelate:t(99636),Shadow:t(34700),Shine:t(91157),Vignette:t(27797),Wipe:t(67603)};p.exports=d}),96615:((p,S,t)=>{var d=t(36060),c=t(79291),h={FX:t(58918),BitmapMaskPipeline:t(31302),Events:t(77085),FXPipeline:t(92651),LightPipeline:t(96569),MobilePipeline:t(56527),MultiPipeline:t(57516),PointLightPipeline:t(43439),PostFXPipeline:t(84057),PreFXPipeline:t(43558),RopePipeline:t(81041),SinglePipeline:t(12385),UtilityPipeline:t(7589)};h=c(!1,h,d),p.exports=h}),35407:(p=>{p.exports=["#define SHADER_NAME PHASER_ADD_BLEND_FS","precision mediump float;","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","varying vec2 outTexCoord;","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);"," gl_FragColor = frame1 + frame2 * uStrength;","}"].join(`
|
|
`)}),78908:(p=>{p.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_FS","precision mediump float;","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool uInvertMaskAlpha;","void main ()","{"," vec2 uv = gl_FragCoord.xy / uResolution;"," vec4 mainColor = texture2D(uMainSampler, uv);"," vec4 maskColor = texture2D(uMaskSampler, uv);"," if (!uInvertMaskAlpha)"," {"," mainColor *= maskColor.a;"," }"," else"," {"," mainColor *= (1.0 - maskColor.a);"," }"," gl_FragColor = mainColor;","}"].join(`
|
|
`)}),85191:(p=>{p.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","precision mediump float;","attribute vec2 inPosition;","void main ()","{"," gl_Position = vec4(inPosition, 0.0, 1.0);","}"].join(`
|
|
`)}),96293:(p=>{p.exports=["#define SHADER_NAME PHASER_COLORMATRIX_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float uColorMatrix[20];","uniform float uAlpha;","varying vec2 outTexCoord;","void main ()","{"," vec4 c = texture2D(uMainSampler, outTexCoord);"," if (uAlpha == 0.0)"," {"," gl_FragColor = c;"," return;"," }"," if (c.a > 0.0)"," {"," c.rgb /= c.a;"," }"," vec4 result;"," result.r = (uColorMatrix[0] * c.r) + (uColorMatrix[1] * c.g) + (uColorMatrix[2] * c.b) + (uColorMatrix[3] * c.a) + uColorMatrix[4];"," result.g = (uColorMatrix[5] * c.r) + (uColorMatrix[6] * c.g) + (uColorMatrix[7] * c.b) + (uColorMatrix[8] * c.a) + uColorMatrix[9];"," result.b = (uColorMatrix[10] * c.r) + (uColorMatrix[11] * c.g) + (uColorMatrix[12] * c.b) + (uColorMatrix[13] * c.a) + uColorMatrix[14];"," result.a = (uColorMatrix[15] * c.r) + (uColorMatrix[16] * c.g) + (uColorMatrix[17] * c.b) + (uColorMatrix[18] * c.a) + uColorMatrix[19];"," vec3 rgb = mix(c.rgb, result.rgb, uAlpha);"," rgb *= result.a;"," gl_FragColor = vec4(rgb, result.a);","}"].join(`
|
|
`)}),36682:(p=>{p.exports=["#define SHADER_NAME PHASER_COPY_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float uBrightness;","varying vec2 outTexCoord;","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord) * uBrightness;","}"].join(`
|
|
`)}),99155:(p=>{p.exports=["#define SHADER_NAME BARREL_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float amount;","varying vec2 outTexCoord;","vec2 Distort(vec2 p)","{"," float theta = atan(p.y, p.x);"," float radius = length(p);"," radius = pow(radius, amount);"," p.x = radius * cos(theta);"," p.y = radius * sin(theta);"," return 0.5 * (p + 1.0);","}","void main()","{"," vec2 xy = 2.0 * outTexCoord - 1.0;"," vec2 texCoord = outTexCoord;"," if (length(xy) < 1.0)"," {"," texCoord = Distort(xy);"," }"," gl_FragColor = texture2D(uMainSampler, texCoord);","}"].join(`
|
|
`)}),24400:(p=>{p.exports=["#define SHADER_NAME BLOOM_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec4 sum = texture2D(uMainSampler, outTexCoord) * 0.204164 * strength;"," sum = sum + texture2D(uMainSampler, outTexCoord + offset * 1.407333) * 0.304005;"," sum = sum + texture2D(uMainSampler, outTexCoord - offset * 1.407333) * 0.304005;"," sum = sum + texture2D(uMainSampler, outTexCoord + offset * 3.294215) * 0.093913;"," gl_FragColor = (sum + texture2D(uMainSampler, outTexCoord - offset * 3.294215) * 0.093913) * vec4(color, 1);","}"].join(`
|
|
`)}),94328:(p=>{p.exports=["#define SHADER_NAME BLUR_HIGH_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 off1 = vec2(1.411764705882353) * offset * strength;"," vec2 off2 = vec2(3.2941176470588234) * offset * strength;"," vec2 off3 = vec2(5.176470588235294) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.1964825501511404;"," col += texture2D(uMainSampler, uv + (off1 / resolution)) * 0.2969069646728344;"," col += texture2D(uMainSampler, uv - (off1 / resolution)) * 0.2969069646728344;"," col += texture2D(uMainSampler, uv + (off2 / resolution)) * 0.09447039785044732;"," col += texture2D(uMainSampler, uv - (off2 / resolution)) * 0.09447039785044732;"," col += texture2D(uMainSampler, uv + (off3 / resolution)) * 0.010381362401148057;"," col += texture2D(uMainSampler, uv - (off3 / resolution)) * 0.010381362401148057;"," gl_FragColor = col * vec4(color, 1.0);","}"].join(`
|
|
`)}),41514:(p=>{p.exports=["#define SHADER_NAME BLUR_LOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 offset = vec2(1.333) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.29411764705882354;"," col += texture2D(uMainSampler, uv + (offset / resolution)) * 0.35294117647058826;"," col += texture2D(uMainSampler, uv - (offset / resolution)) * 0.35294117647058826;"," gl_FragColor = col * vec4(color, 1.0);","}"].join(`
|
|
`)}),51078:(p=>{p.exports=["#define SHADER_NAME BLUR_MED_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 off1 = vec2(1.3846153846) * offset * strength;"," vec2 off2 = vec2(3.2307692308) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.2270270270;"," col += texture2D(uMainSampler, uv + (off1 / resolution)) * 0.3162162162;"," col += texture2D(uMainSampler, uv - (off1 / resolution)) * 0.3162162162;"," col += texture2D(uMainSampler, uv + (off2 / resolution)) * 0.0702702703;"," col += texture2D(uMainSampler, uv - (off2 / resolution)) * 0.0702702703;"," gl_FragColor = col * vec4(color, 1.0);","}"].join(`
|
|
`)}),90610:(p=>{p.exports=["#define SHADER_NAME BOKEH_FS","precision mediump float;","#define ITERATIONS 100.0","#define ONEOVER_ITR 1.0 / ITERATIONS","#define PI 3.141596","#define GOLDEN_ANGLE 2.39996323","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform float radius;","uniform float amount;","uniform float contrast;","uniform bool isTiltShift;","uniform float strength;","uniform vec2 blur;","varying vec2 outTexCoord;","vec2 Sample (in float theta, inout float r)","{"," r += 1.0 / r;"," return (r - 1.0) * vec2(cos(theta), sin(theta)) * 0.06;","}","vec3 Bokeh (sampler2D tex, vec2 uv, float radius)","{"," vec3 acc = vec3(0.0);"," vec3 div = vec3(0.0);"," vec2 pixel = vec2(resolution.y / resolution.x, 1.0) * radius * .025;"," float r = 1.0;"," for (float j = 0.0; j < GOLDEN_ANGLE * ITERATIONS; j += GOLDEN_ANGLE)"," {"," vec3 col = texture2D(tex, uv + pixel * Sample(j, r)).xyz;"," col = contrast > 0.0 ? col * col * (1.0 + contrast) : col;"," vec3 bokeh = vec3(0.5) + pow(col, vec3(10.0)) * amount;"," acc += col * bokeh;"," div += bokeh;"," }"," return acc / div;","}","void main ()","{"," float shift = 1.0;"," if (isTiltShift)"," {"," vec2 uv = vec2(gl_FragCoord.xy / resolution + vec2(-0.5, -0.5)) * 2.0;"," float centerStrength = 1.0;"," shift = length(uv * blur * strength) * centerStrength;"," }"," gl_FragColor = vec4(Bokeh(uMainSampler, outTexCoord * vec2(1.0, 1.0), radius * shift), 0.0);","}"].join(`
|
|
`)}),91899:(p=>{p.exports=["#define SHADER_NAME CIRCLE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec3 color;","uniform vec4 backgroundColor;","uniform float thickness;","uniform float scale;","uniform float feather;","varying vec2 outTexCoord;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec2 position = (gl_FragCoord.xy / resolution.xy) * 2.0 - 1.0;"," float aspectRatio = resolution.x / resolution.y;"," position.x *= aspectRatio;"," float grad = length(position);"," float outer = aspectRatio;"," float inner = outer - (thickness * 2.0 / resolution.y);"," if (aspectRatio >= 1.0)"," {"," float f = 2.0 + (resolution.y / resolution.x);"," outer = 1.0;"," inner = 1.0 - (thickness * f / resolution.x);"," }"," outer *= scale;"," inner *= scale;"," float circle = smoothstep(outer, outer - 0.01, grad);"," float ring = circle - smoothstep(inner, inner - feather, grad);"," texture = mix(backgroundColor * backgroundColor.a, texture, texture.a);"," texture = (texture * (circle - ring));"," gl_FragColor = vec4(texture.rgb + (ring * color), texture.a);","}"].join(`
|
|
`)}),47838:(p=>{p.exports=["#define SHADER_NAME DISPLACEMENT_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform sampler2D uDisplacementSampler;","uniform vec2 amount;","varying vec2 outTexCoord;","void main ()","{"," vec2 disp = (-vec2(0.5, 0.5) + texture2D(uDisplacementSampler, outTexCoord).rr) * amount;"," gl_FragColor = texture2D(uMainSampler, outTexCoord + disp).rgba;","}"].join(`
|
|
`)}),98656:(p=>{p.exports=["#define SHADER_NAME GLOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","uniform float outerStrength;","uniform float innerStrength;","uniform vec2 resolution;","uniform vec4 glowColor;","uniform bool knockout;","const float PI = 3.14159265358979323846264;","const float DIST = __DIST__;","const float SIZE = min(__SIZE__, PI * 2.0);","const float STEP = ceil(PI * 2.0 / SIZE);","const float MAX_ALPHA = STEP * DIST * (DIST + 1.0) / 2.0;","void main ()","{"," vec2 px = vec2(1.0 / resolution.x, 1.0 / resolution.y);"," float totalAlpha = 0.0;"," vec2 direction;"," vec2 displaced;"," vec4 color;"," for (float angle = 0.0; angle < PI * 2.0; angle += SIZE)"," {"," direction = vec2(cos(angle), sin(angle)) * px;"," for (float curDistance = 0.0; curDistance < DIST; curDistance++)"," {"," displaced = outTexCoord + direction * (curDistance + 1.0);"," color = texture2D(uMainSampler, displaced);"," totalAlpha += (DIST - curDistance) * color.a;"," }"," }"," color = texture2D(uMainSampler, outTexCoord);"," float alphaRatio = (totalAlpha / MAX_ALPHA);"," float innerGlowAlpha = (1.0 - alphaRatio) * innerStrength * color.a;"," float innerGlowStrength = min(1.0, innerGlowAlpha);"," vec4 innerColor = mix(color, glowColor, innerGlowStrength);"," float outerGlowAlpha = alphaRatio * outerStrength * (1.0 - color.a);"," float outerGlowStrength = min(1.0 - innerColor.a, outerGlowAlpha);"," vec4 outerGlowColor = outerGlowStrength * glowColor.rgba;"," if (knockout)"," {"," float resultAlpha = outerGlowAlpha + innerGlowAlpha;"," gl_FragColor = vec4(glowColor.rgb * resultAlpha, resultAlpha);"," }"," else"," {"," gl_FragColor = innerColor + outerGlowColor;"," }","}"].join(`
|
|
`)}),70463:(p=>{p.exports=["#define SHADER_NAME GRADIENT_FS","#define SRGB_TO_LINEAR(c) pow((c), vec3(2.2))","#define LINEAR_TO_SRGB(c) pow((c), vec3(1.0 / 2.2))","#define SRGB(r, g, b) SRGB_TO_LINEAR(vec3(float(r), float(g), float(b)) / 255.0)","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 positionFrom;","uniform vec2 positionTo;","uniform vec3 color1;","uniform vec3 color2;","uniform float alpha;","uniform int size;","varying vec2 outTexCoord;","float gradientNoise(in vec2 uv)","{"," const vec3 magic = vec3(0.06711056, 0.00583715, 52.9829189);"," return fract(magic.z * fract(dot(uv, magic.xy)));","}","float stepped (in float s, in float scale, in int steps)","{"," return steps > 0 ? floor( s / ((1.0 * scale) / float(steps))) * 1.0 / float(steps - 1) : s;","}","void main ()","{"," vec2 a = positionFrom;"," vec2 b = positionTo;"," vec2 ba = b - a;"," float d = dot(outTexCoord - a, ba) / dot(ba, ba);"," float t = size > 0 ? stepped(d, 1.0, size) : d;"," t = smoothstep(0.0, 1.0, clamp(t, 0.0, 1.0));"," vec3 color = mix(SRGB(color1.r, color1.g, color1.b), SRGB(color2.r, color2.g, color2.b), t);"," color = LINEAR_TO_SRGB(color);"," color += (1.0 / 255.0) * gradientNoise(outTexCoord) - (0.5 / 255.0);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," gl_FragColor = vec4(mix(color.rgb, texture.rgb, alpha), 1.0) * texture.a;","}"].join(`
|
|
`)}),50831:(p=>{p.exports=["#define SHADER_NAME PIXELATE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform float amount;","varying vec2 outTexCoord;","void main ()","{"," float pixelSize = floor(2.0 + amount);"," vec2 center = pixelSize * floor(outTexCoord * resolution / pixelSize) + pixelSize * vec2(0.5, 0.5);"," vec2 corner1 = center + pixelSize * vec2(-0.5, -0.5);"," vec2 corner2 = center + pixelSize * vec2(+0.5, -0.5);"," vec2 corner3 = center + pixelSize * vec2(+0.5, +0.5);"," vec2 corner4 = center + pixelSize * vec2(-0.5, +0.5);"," vec4 pixel = 0.4 * texture2D(uMainSampler, center / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner1 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner2 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner3 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner4 / resolution);"," gl_FragColor = pixel;","}"].join(`
|
|
`)}),92595:(p=>{p.exports=["#define SHADER_NAME SHADOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","uniform vec2 lightPosition;","uniform vec4 color;","uniform float decay;","uniform float power;","uniform float intensity;","uniform int samples;","const int MAX = 12;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec2 pc = (lightPosition - outTexCoord) * intensity;"," float shadow = 0.0;"," float limit = max(float(MAX), float(samples));"," for (int i = 0; i < MAX; ++i)"," {"," if (i >= samples)"," {"," break;"," }"," shadow += texture2D(uMainSampler, outTexCoord + float(i) * decay / limit * pc).a * power;"," }"," float mask = 1.0 - texture.a;"," gl_FragColor = mix(texture, color, shadow * mask);","}"].join(`
|
|
`)}),72464:(p=>{p.exports=["#define SHADER_NAME SHINE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform bool reveal;","uniform float speed;","uniform float time;","uniform float lineWidth;","uniform float gradient;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = gl_FragCoord.xy / resolution.xy;"," vec4 tex = texture2D(uMainSampler, outTexCoord);"," vec4 col1 = vec4(0.3, 0.0, 0.0, 1.0);"," vec4 col2 = vec4(0.85, 0.85, 0.85, 1.0);"," uv.x = uv.x - mod(time * speed, 2.0) + 0.5;"," float y = uv.x * gradient;"," float s = smoothstep(y - lineWidth, y, uv.y) - smoothstep(y, y + lineWidth, uv.y);"," gl_FragColor = (((s * col1) + (s * col2)) * tex);"," if (!reveal)"," {"," gl_FragColor += tex;"," }","}"].join(`
|
|
`)}),39249:(p=>{p.exports=["#define SHADER_NAME VIGNETTE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float radius;","uniform float strength;","uniform vec2 position;","varying vec2 outTexCoord;","void main ()","{"," vec4 col = vec4(1.0);"," float d = length(outTexCoord - position);"," if (d <= radius)"," {"," float g = d / radius;"," g = sin(g * 3.14 * strength);"," col = vec4(g * g * g);"," }"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," gl_FragColor = texture * (1.0 - col);","}"].join(`
|
|
`)}),2878:(p=>{p.exports=["#define SHADER_NAME WIPE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec4 config;","uniform bool reveal;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 color0;"," vec4 color1;"," if (reveal)"," {"," color0 = vec4(0);"," color1 = texture2D(uMainSampler, uv);"," }"," else"," {"," color0 = texture2D(uMainSampler, uv);"," color1 = vec4(0);"," }"," float distance = config.x;"," float width = config.y;"," float direction = config.z;"," float axis = uv.x;"," if (config.w == 1.0)"," {"," axis = uv.y;"," }"," float adjust = mix(width, -width, distance);"," float value = smoothstep(distance - width, distance + width, abs(direction - axis) + adjust);"," gl_FragColor = mix(color1, color0, value);","}"].join(`
|
|
`)}),31063:(p=>{p.exports=["#define SHADER_NAME PHASER_LIGHT_FS","precision mediump float;","struct Light","{"," vec2 position;"," vec3 color;"," float intensity;"," float radius;","};","const int kMaxLights = %LIGHT_COUNT%;","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform mat3 uInverseRotationMatrix;","uniform int uLightCount;","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec3 finalColor = vec3(0.0, 0.0, 0.0);"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;"," vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));"," vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;"," for (int index = 0; index < kMaxLights; ++index)"," {"," if (index < uLightCount)"," {"," Light light = uLights[index];"," vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);"," vec3 lightNormal = normalize(lightDir);"," float distToSurf = length(lightDir) * uCamera.w;"," float diffuseFactor = max(dot(normal, lightNormal), 0.0);"," float radius = (light.radius / res.x * uCamera.w) * uCamera.w;"," float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);"," vec3 diffuse = light.color * diffuseFactor;"," finalColor += (attenuation * diffuse) * light.intensity;"," }"," }"," vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);"," gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);","}"].join(`
|
|
`)}),48247:(p=>{p.exports=["#define SHADER_NAME PHASER_LINEAR_BLEND_FS","precision mediump float;","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","varying vec2 outTexCoord;","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);"," gl_FragColor = mix(frame1, frame2 * uStrength, 0.5);","}"].join(`
|
|
`)}),41214:(p=>{p.exports=["#define SHADER_NAME PHASER_MESH_FS","precision mediump float;","uniform vec3 uLightPosition;","uniform vec3 uLightAmbient;","uniform vec3 uLightDiffuse;","uniform vec3 uLightSpecular;","uniform vec3 uFogColor;","uniform float uFogNear;","uniform float uFogFar;","uniform vec3 uMaterialAmbient;","uniform vec3 uMaterialDiffuse;","uniform vec3 uMaterialSpecular;","uniform float uMaterialShine;","uniform vec3 uCameraPosition;","uniform sampler2D uTexture;","varying vec2 vTextureCoord;","varying vec3 vNormal;","varying vec3 vPosition;","void main (void)","{"," vec4 color = texture2D(uTexture, vTextureCoord);"," vec3 ambient = uLightAmbient * uMaterialAmbient;"," vec3 norm = normalize(vNormal);"," vec3 lightDir = normalize(uLightPosition - vPosition);"," float diff = max(dot(norm, lightDir), 0.0);"," vec3 diffuse = uLightDiffuse * (diff * uMaterialDiffuse);"," vec3 viewDir = normalize(uCameraPosition - vPosition);"," vec3 reflectDir = reflect(-lightDir, norm);"," float spec = pow(max(dot(viewDir, reflectDir), 0.0), uMaterialShine);"," vec3 specular = uLightSpecular * (spec * uMaterialSpecular);"," vec3 result = (ambient + diffuse + specular) * color.rgb;"," float depth = gl_FragCoord.z / gl_FragCoord.w;"," float fogFactor = smoothstep(uFogNear, uFogFar, depth);"," gl_FragColor.rgb = mix(result.rgb, uFogColor, fogFactor);"," gl_FragColor.a = color.a;","}"].join(`
|
|
`)}),39653:(p=>{p.exports=["#define SHADER_NAME PHASER_MESH_VS","precision mediump float;","attribute vec3 aVertexPosition;","attribute vec3 aVertexNormal;","attribute vec2 aTextureCoord;","uniform mat4 uViewProjectionMatrix;","uniform mat4 uModelMatrix;","uniform mat4 uNormalMatrix;","varying vec2 vTextureCoord;","varying vec3 vNormal;","varying vec3 vPosition;","void main ()","{"," vTextureCoord = aTextureCoord;"," vPosition = vec3(uModelMatrix * vec4(aVertexPosition, 1.0));"," vNormal = vec3(uNormalMatrix * vec4(aVertexNormal, 1.0));"," gl_Position = uViewProjectionMatrix * uModelMatrix * vec4(aVertexPosition, 1.0);","}"].join(`
|
|
`)}),62143:(p=>{p.exports=["#define SHADER_NAME PHASER_MOBILE_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join(`
|
|
`)}),47940:(p=>{p.exports=["#define SHADER_NAME PHASER_MOBILE_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join(`
|
|
`)}),98840:(p=>{p.exports=["#define SHADER_NAME PHASER_MULTI_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler[%count%];","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texture;"," %forloop%"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join(`
|
|
`)}),44667:(p=>{p.exports=["#define SHADER_NAME PHASER_MULTI_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," outTexCoord = inTexCoord;"," outTexId = inTexId;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join(`
|
|
`)}),4127:(p=>{p.exports=["#define SHADER_NAME PHASER_POINTLIGHT_FS","precision mediump float;","uniform vec2 uResolution;","uniform float uCameraZoom;","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","void main ()","{"," vec2 center = (lightPosition.xy + 1.0) * (uResolution.xy * 0.5);"," float distToSurf = length(center - gl_FragCoord.xy);"," float radius = 1.0 - distToSurf / (lightRadius * uCameraZoom);"," float intensity = smoothstep(0.0, 1.0, radius * lightAttenuation);"," vec4 color = vec4(intensity, intensity, intensity, 0.0) * lightColor;"," gl_FragColor = vec4(color.rgb * lightColor.a, color.a);","}"].join(`
|
|
`)}),89924:(p=>{p.exports=["#define SHADER_NAME PHASER_POINTLIGHT_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","attribute vec2 inPosition;","attribute vec2 inLightPosition;","attribute vec4 inLightColor;","attribute float inLightRadius;","attribute float inLightAttenuation;","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","void main ()","{"," lightColor = inLightColor;"," lightRadius = inLightRadius;"," lightAttenuation = inLightAttenuation;"," lightPosition = uProjectionMatrix * vec4(inLightPosition, 1.0, 1.0);"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);","}"].join(`
|
|
`)}),27681:(p=>{p.exports=["#define SHADER_NAME PHASER_POSTFX_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord);","}"].join(`
|
|
`)}),49627:(p=>{p.exports=["#define SHADER_NAME PHASER_QUAD_VS","precision mediump float;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","varying vec2 outFragCoord;","varying vec2 outTexCoord;","void main ()","{"," outFragCoord = inPosition.xy * 0.5 + 0.5;"," outTexCoord = inTexCoord;"," gl_Position = vec4(inPosition, 0, 1);","}"].join(`
|
|
`)}),45561:(p=>{p.exports=["#define SHADER_NAME PHASER_SINGLE_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join(`
|
|
`)}),60722:(p=>{p.exports=["#define SHADER_NAME PHASER_SINGLE_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join(`
|
|
`)}),89350:((p,S,t)=>{p.exports={AddBlendFrag:t(35407),BitmapMaskFrag:t(78908),BitmapMaskVert:t(85191),ColorMatrixFrag:t(96293),CopyFrag:t(36682),FXBarrelFrag:t(99155),FXBloomFrag:t(24400),FXBlurHighFrag:t(94328),FXBlurLowFrag:t(41514),FXBlurMedFrag:t(51078),FXBokehFrag:t(90610),FXCircleFrag:t(91899),FXDisplacementFrag:t(47838),FXGlowFrag:t(98656),FXGradientFrag:t(70463),FXPixelateFrag:t(50831),FXShadowFrag:t(92595),FXShineFrag:t(72464),FXVignetteFrag:t(39249),FXWipeFrag:t(2878),LightFrag:t(31063),LinearBlendFrag:t(48247),MeshFrag:t(41214),MeshVert:t(39653),MobileFrag:t(62143),MobileVert:t(47940),MultiFrag:t(98840),MultiVert:t(44667),PointLightFrag:t(4127),PointLightVert:t(89924),PostFXFrag:t(27681),QuadVert:t(49627),SingleFrag:t(45561),SingleVert:t(60722)}}),93567:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r,n,e){this.webGLAttribLocation=-1,this.gl=r,this.program=n,this.name=e,this.createResource()},createResource:function(){if(this.program.webGLProgram===null){this.webGLAttribLocation=-1;return}var h=this.gl;h.isContextLost()||(this.webGLAttribLocation=h.getAttribLocation(this.program.webGLProgram,this.name))},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLAttribLocation=-1}});p.exports=c}),26128:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r,n,e,s){this.webGLBuffer=null,this.gl=r,this.initialDataOrSize=n,this.bufferType=e,this.bufferUsage=s,this.createResource()},createResource:function(){if(this.initialDataOrSize!==null){var h=this.gl;if(!h.isContextLost()){var r=this.bufferType,n=h.createBuffer();this.webGLBuffer=n,h.bindBuffer(r,this.webGLBuffer),h.bufferData(r,this.initialDataOrSize,this.bufferUsage),h.bindBuffer(r,null)}}},destroy:function(){var h=this.gl;h.isContextLost()||h.deleteBuffer(this.webGLBuffer),this.webGLBuffer=null,this.initialDataOrSize=null,this.gl=null}});p.exports=c}),84387:((p,S,t)=>{var d=t(83419),c={36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"},h=new d({initialize:function(n,e,s,o,i){this.webGLFramebuffer=null,this.gl=n,this.width=e,this.height=s,this.renderTexture=o,this.addDepthStencilBuffer=!!i,this.createResource()},createResource:function(){var r=this.gl;if(!r.isContextLost()){var n=this.renderTexture,e=0,s=r.createFramebuffer();if(this.webGLFramebuffer=s,r.bindFramebuffer(r.FRAMEBUFFER,s),n.isRenderTexture=!0,n.isAlphaPremultiplied=!1,r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,n.webGLTexture,0),e=r.checkFramebufferStatus(r.FRAMEBUFFER),e!==r.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer status: "+(c[e]||e));if(this.addDepthStencilBuffer){var o=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,o),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,this.width,this.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,o)}r.bindFramebuffer(r.FRAMEBUFFER,null)}},destroy:function(){if(this.webGLFramebuffer!==null){var r=this.gl;if(!r.isContextLost()){r.bindFramebuffer(r.FRAMEBUFFER,this.webGLFramebuffer);var n=r.getFramebufferAttachmentParameter(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME);n!==null&&(r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,null,0),r.deleteTexture(n));var e=r.getFramebufferAttachmentParameter(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME);e!==null&&r.deleteRenderbuffer(e),r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(this.webGLFramebuffer)}this.renderTexture=null,this.webGLFramebuffer=null,this.gl=null}}});p.exports=h}),1482:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r,n,e){this.webGLProgram=null,this.gl=r,this.vertexSource=n,this.fragmentSource=e,this.createResource()},createResource:function(){var h=this.gl;if(!h.isContextLost()){var r=h.createProgram(),n=h.createShader(h.VERTEX_SHADER),e=h.createShader(h.FRAGMENT_SHADER);h.shaderSource(n,this.vertexSource),h.shaderSource(e,this.fragmentSource),h.compileShader(n),h.compileShader(e);var s=`Shader failed:
|
|
`;if(!h.getShaderParameter(n,h.COMPILE_STATUS))throw new Error("Vertex "+s+h.getShaderInfoLog(n));if(!h.getShaderParameter(e,h.COMPILE_STATUS))throw new Error("Fragment "+s+h.getShaderInfoLog(e));if(h.attachShader(r,n),h.attachShader(r,e),h.linkProgram(r),!h.getProgramParameter(r,h.LINK_STATUS))throw new Error("Link "+s+h.getProgramInfoLog(r));h.useProgram(r),this.webGLProgram=r}},destroy:function(){this.webGLProgram&&(this.gl.isContextLost()||this.gl.deleteProgram(this.webGLProgram),this.webGLProgram=null,this.gl=null)}});p.exports=c}),82751:((p,S,t)=>{var d=t(83419),c=t(50030),h=new d({initialize:function(n,e,s,o,i,a,l,f,u,v,m,x,g){this.webGLTexture=null,this.isRenderTexture=!1,this.gl=n,this.mipLevel=e,this.minFilter=s,this.magFilter=o,this.wrapT=i,this.wrapS=a,this.format=l,this.pixels=f,this.width=u,this.height=v,this.pma=m??!0,this.forceSize=!!x,this.flipY=!!g,this.__SPECTOR_Metadata={},this.createResource()},createResource:function(){var r=this.gl;if(!r.isContextLost()){if(this.pixels instanceof h){this.webGLTexture=this.pixels.webGLTexture;return}var n=r.createTexture();n.__SPECTOR_Metadata=this.__SPECTOR_Metadata,this.webGLTexture=n,this._processTexture()}},update:function(r,n,e,s,o,i,a,l,f){if(!(n===0||e===0)){this.pixels=r,this.width=n,this.height=e,this.flipY=s,this.wrapS=o,this.wrapT=i,this.minFilter=a,this.magFilter=l,this.format=f;var u=this.gl;u.isContextLost()||this._processTexture()}},_processTexture:function(){var r=this.gl;r.activeTexture(r.TEXTURE0);var n=r.getParameter(r.TEXTURE_BINDING_2D);r.bindTexture(r.TEXTURE_2D,this.webGLTexture),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,this.minFilter),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,this.magFilter),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this.wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this.wrapT),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.pma),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,this.flipY);var e=this.pixels,s=this.mipLevel,o=this.width,i=this.height,a=this.format,l=!1;if(e==null)r.texImage2D(r.TEXTURE_2D,s,a,o,i,0,a,r.UNSIGNED_BYTE,null),l=c(o,i);else if(e.compressed){o=e.width,i=e.height,l=e.generateMipmap;for(var f=0;f<e.mipmaps.length;f++)r.compressedTexImage2D(r.TEXTURE_2D,f,e.internalFormat,e.mipmaps[f].width,e.mipmaps[f].height,0,e.mipmaps[f].data)}else e instanceof Uint8Array?(r.texImage2D(r.TEXTURE_2D,s,a,o,i,0,a,r.UNSIGNED_BYTE,e),l=c(o,i)):(this.forceSize||(o=e.width,i=e.height),r.texImage2D(r.TEXTURE_2D,s,a,a,r.UNSIGNED_BYTE,e),l=c(o,i));l&&r.generateMipmap(r.TEXTURE_2D),n?r.bindTexture(r.TEXTURE_2D,n):r.bindTexture(r.TEXTURE_2D,null)},spectorMetadata:{get:function(){return this.__SPECTOR_Metadata},set:function(r){this.__SPECTOR_Metadata=r,this.gl.isContextLost()||(this.webGLTexture.__SPECTOR_Metadata=r)}},destroy:function(){this.webGLTexture!==null&&(this.gl.isContextLost()||this.pixels instanceof h||this.gl.deleteTexture(this.webGLTexture),this.pixels=null,this.webGLTexture=null,this.gl=null)}});p.exports=h}),57183:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r,n,e){this.webGLUniformLocation=null,this.gl=r,this.program=n,this.name=e,this.createResource()},createResource:function(){if(this.program.webGLProgram===null){this.webGLUniformLocation=null;return}var h=this.gl;h.isContextLost()||(this.webGLUniformLocation=h.getUniformLocation(this.program.webGLProgram,this.name))},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLUniformLocation=null}});p.exports=c}),9503:((p,S,t)=>{var d={WebGLAttribLocationWrapper:t(93567),WebGLBufferWrapper:t(26128),WebGLProgramWrapper:t(1482),WebGLTextureWrapper:t(82751),WebGLFramebufferWrapper:t(84387),WebGLUniformLocationWrapper:t(57183)};p.exports=d}),76531:((p,S,t)=>{var d=t(13560),c=t(83419),h=t(45319),r=t(50792),n=t(97480),e=t(8443),s=t(57811),o=t(74403),i=t(45818),a=t(29747),l=t(87841),f=t(86555),u=t(56583),v=t(26099),m=t(38058),x=new c({Extends:r,initialize:function(y){r.call(this),this.game=y,this.canvas,this.canvasBounds=new l,this.parent=null,this.parentIsWindow=!1,this.parentSize=new f,this.gameSize=new f,this.baseSize=new f,this.displaySize=new f,this.scaleMode=d.SCALE_MODE.NONE,this.zoom=1,this._resetZoom=!1,this.displayScale=new v(1,1),this.autoRound=!1,this.autoCenter=d.CENTER.NO_CENTER,this.orientation=d.ORIENTATION.LANDSCAPE,this.fullscreen,this.fullscreenTarget=null,this._createdFullscreenTarget=!1,this.dirty=!1,this.resizeInterval=500,this._lastCheck=0,this._checkOrientation=!1,this.domlisteners={orientationChange:a,windowResize:a,fullScreenChange:a,fullScreenError:a}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(e.BOOT,this.boot,this)},boot:function(){var g=this.game;this.canvas=g.canvas,this.fullscreen=g.device.fullscreen;var y=this.scaleMode;y!==d.SCALE_MODE.RESIZE&&y!==d.SCALE_MODE.EXPAND&&this.displaySize.setAspectMode(y),y===d.SCALE_MODE.NONE?this.resize(this.width,this.height):(this.getParentBounds(),this.parentSize.width>0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),g.events.on(e.PRE_STEP,this.step,this),g.events.once(e.READY,this.refresh,this),g.events.once(e.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(g){this.getParent(g),this.getParentBounds();var y=g.width,T=g.height,C=g.scaleMode,E=g.zoom,M=g.autoRound;if(typeof y=="string")if(y.substr(-1)!=="%")y=parseInt(y,10);else{var P=this.parentSize.width;P===0&&(P=window.innerWidth);var A=parseInt(y,10)/100;y=Math.floor(P*A)}if(typeof T=="string")if(T.substr(-1)!=="%")T=parseInt(T,10);else{var R=this.parentSize.height;R===0&&(R=window.innerHeight);var F=parseInt(T,10)/100;T=Math.floor(R*F)}this.scaleMode=C,this.autoRound=M,this.autoCenter=g.autoCenter,this.resizeInterval=g.resizeInterval,M&&(y=Math.floor(y),T=Math.floor(T)),this.gameSize.setSize(y,T),E===d.ZOOM.MAX_ZOOM&&(E=this.getMaxZoom()),this.zoom=E,E!==1&&(this._resetZoom=!0),this.baseSize.setSize(y,T),M&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),g.minWidth>0&&this.displaySize.setMin(g.minWidth*E,g.minHeight*E),g.maxWidth>0&&this.displaySize.setMax(g.maxWidth*E,g.maxHeight*E),this.displaySize.setSize(y,T),(g.snapWidth>0||g.snapHeight>0)&&this.displaySize.setSnap(g.snapWidth,g.snapHeight),this.orientation=i(y,T)},getParent:function(g){var y=g.parent;if(y!==null){if(this.parent=o(y),this.parentIsWindow=this.parent===document.body,g.expandParent&&g.scaleMode!==d.SCALE_MODE.NONE){var T=this.parent.getBoundingClientRect();(this.parentIsWindow||T.height===0)&&(document.documentElement.style.height="100%",document.body.style.height="100%",T=this.parent.getBoundingClientRect(),!this.parentIsWindow&&T.height===0&&(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}g.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=o(g.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var g=this.parentSize,y=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(y.height=s(!0));var T=y.width,C=y.height;if(g.width!==T||g.height!==C)return g.setSize(T,C),!0;if(this.canvas){var E=this.canvasBounds,M=this.canvas.getBoundingClientRect();if(M.x!==E.x||M.y!==E.y)return!0}return!1},lockOrientation:function(g){var y=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return y?y.call(screen,g):!1},setParentSize:function(g,y){return this.parentSize.setSize(g,y),this.refresh()},setGameSize:function(g,y){var T=this.autoRound;T&&(g=Math.floor(g),y=Math.floor(y));var C=this.width,E=this.height;return this.gameSize.resize(g,y),this.baseSize.resize(g,y),T&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setAspectRatio(g/y),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(C,E)},resize:function(g,y){var T=this.zoom,C=this.autoRound;C&&(g=Math.floor(g),y=Math.floor(y));var E=this.width,M=this.height;this.gameSize.resize(g,y),this.baseSize.resize(g,y),C&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(g*T,y*T),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var P=this.canvas.style,A=g*T,R=y*T;return C&&(A=Math.floor(A),R=Math.floor(R)),(A!==g||R!==y)&&(P.width=A+"px",P.height=R+"px"),this.refresh(E,M)},setZoom:function(g){return this.zoom=g,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},setSnap:function(g,y){return g===void 0&&(g=0),y===void 0&&(y=g),this.displaySize.setSnap(g,y),this.refresh()},refresh:function(g,y){g===void 0&&(g=this.width),y===void 0&&(y=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var T=this.game.domContainer;if(T){this.baseSize.setCSS(T);var C=this.canvas.style,E=T.style;E.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",E.marginLeft=C.marginLeft,E.marginTop=C.marginTop}return this.emit(n.RESIZE,this.gameSize,this.baseSize,this.displaySize,g,y),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var g=i(this.width,this.height);g!==this.orientation&&(this.orientation=g,this.emit(n.ORIENTATION_CHANGE,g))}},updateScale:function(){var g=this.canvas.style,y=this.gameSize.width,T=this.gameSize.height,C,E,M=this.zoom,P=this.autoRound;if(this.scaleMode===d.SCALE_MODE.NONE)this.displaySize.setSize(y*M,T*M),C=this.displaySize.width,E=this.displaySize.height,P&&(C=Math.floor(C),E=Math.floor(E)),this._resetZoom&&(g.width=C+"px",g.height=E+"px",this._resetZoom=!1);else if(this.scaleMode===d.SCALE_MODE.RESIZE)this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(this.displaySize.width,this.displaySize.height),C=this.displaySize.width,E=this.displaySize.height,P&&(C=Math.floor(C),E=Math.floor(E)),this.canvas.width=C,this.canvas.height=E;else if(this.scaleMode===d.SCALE_MODE.EXPAND){var A=this.game.config.width,R=this.game.config.height,F=this.parentSize.width,w=this.parentSize.height,I=F/A,U=w/R,N,D;I<U?(N=A,D=I!==0?w/I:R):(N=U!==0?F/U:A,D=R);var B=h(N,this.displaySize.minWidth,this.displaySize.maxWidth),L=h(D,this.displaySize.minHeight,this.displaySize.maxHeight);this.baseSize.setSize(B,L),this.gameSize.setSize(B,L),P&&(B=Math.floor(B),L=Math.floor(L)),this.canvas.width=B,this.canvas.height=L;var G=F*(B/N),O=w*(L/D);this.displaySize.setSize(G,O),C=this.displaySize.width,E=this.displaySize.height,P&&(C=Math.floor(C),E=Math.floor(E)),g.width=C+"px",g.height=E+"px"}else this.displaySize.setSize(this.parentSize.width,this.parentSize.height),C=this.displaySize.width,E=this.displaySize.height,P&&(C=Math.floor(C),E=Math.floor(E)),g.width=C+"px",g.height=E+"px";this.getParentBounds(),this.updateCenter()},getMaxZoom:function(){var g=u(this.parentSize.width,this.gameSize.width,0,!0),y=u(this.parentSize.height,this.gameSize.height,0,!0);return Math.max(Math.min(g,y),1)},updateCenter:function(){var g=this.autoCenter;if(g!==d.CENTER.NO_CENTER){var y=this.canvas,T=y.style,C=y.getBoundingClientRect(),E=C.width,M=C.height,P=Math.floor((this.parentSize.width-E)/2),A=Math.floor((this.parentSize.height-M)/2);g===d.CENTER.CENTER_HORIZONTALLY?A=0:g===d.CENTER.CENTER_VERTICALLY&&(P=0),T.marginLeft=P+"px",T.marginTop=A+"px"}},updateBounds:function(){var g=this.canvasBounds,y=this.canvas.getBoundingClientRect();g.x=y.left+(window.pageXOffset||0)-(document.documentElement.clientLeft||0),g.y=y.top+(window.pageYOffset||0)-(document.documentElement.clientTop||0),g.width=y.width,g.height=y.height},transformX:function(g){return(g-this.canvasBounds.left)*this.displayScale.x},transformY:function(g){return(g-this.canvasBounds.top)*this.displayScale.y},startFullscreen:function(g){g===void 0&&(g={navigationUI:"hide"});var y=this.fullscreen;if(!y.available){this.emit(n.FULLSCREEN_UNSUPPORTED);return}if(!y.active){var T=this.getFullscreenTarget();y.keyboard?T[y.request](Element.ALLOW_KEYBOARD_INPUT):T[y.request](g)}},fullscreenSuccessHandler:function(){this.getParentBounds(),this.refresh(),this.emit(n.ENTER_FULLSCREEN)},fullscreenErrorHandler:function(g){this.removeFullscreenTarget(),this.emit(n.FULLSCREEN_FAILED,g)},getFullscreenTarget:function(){if(!this.fullscreenTarget){var g=document.createElement("div");g.style.margin="0",g.style.padding="0",g.style.width="100%",g.style.height="100%",this.fullscreenTarget=g,this._createdFullscreenTarget=!0}if(this._createdFullscreenTarget){var y=this.canvas.parentNode;y.insertBefore(this.fullscreenTarget,this.canvas),this.fullscreenTarget.appendChild(this.canvas)}return this.fullscreenTarget},removeFullscreenTarget:function(){if(this._createdFullscreenTarget){var g=this.fullscreenTarget;if(g&&g.parentNode){var y=g.parentNode;y.insertBefore(this.canvas,g),y.removeChild(g)}}},stopFullscreen:function(){var g=this.fullscreen;if(!g.available)return this.emit(n.FULLSCREEN_UNSUPPORTED),!1;g.active&&document[g.cancel](),this.removeFullscreenTarget()},leaveFullScreenSuccessHandler:function(){this.getParentBounds(),this.emit(n.LEAVE_FULLSCREEN),this.refresh()},toggleFullscreen:function(g){this.fullscreen.active?this.stopFullscreen():this.startFullscreen(g)},startListeners:function(){var g=this,y=this.domlisteners;if(y.orientationChange=function(){g.updateBounds(),g._checkOrientation=!0,g.dirty=!0,g.refresh()},y.windowResize=function(){g.updateBounds(),g.dirty=!0},screen.orientation&&screen.orientation.addEventListener?screen.orientation.addEventListener("change",y.orientationChange,!1):window.addEventListener("orientationchange",y.orientationChange,!1),window.addEventListener("resize",y.windowResize,!1),this.fullscreen.available){y.fullScreenChange=function(C){return g.onFullScreenChange(C)},y.fullScreenError=function(C){return g.onFullScreenError(C)};var T=["webkit","moz",""];T.forEach(function(C){document.addEventListener(C+"fullscreenchange",y.fullScreenChange,!1),document.addEventListener(C+"fullscreenerror",y.fullScreenError,!1)}),document.addEventListener("MSFullscreenChange",y.fullScreenChange,!1),document.addEventListener("MSFullscreenError",y.fullScreenError,!1)}},onFullScreenChange:function(){document.fullscreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.mozFullScreenElement?this.fullscreenSuccessHandler():(this.stopFullscreen(),this.leaveFullScreenSuccessHandler())},onFullScreenError:function(){this.removeFullscreenTarget()},getViewPort:function(g,y){g instanceof m||(y=g,g=void 0),y===void 0&&(y=new l);var T=this.baseSize,C=this.parentSize,E=this.canvasBounds,M=this.displayScale,P=E.x>=0?0:-(E.x*M.x),A=E.y>=0?0:-(E.y*M.y),R;C.width>=E.width?R=T.width:R=T.width-(E.width-C.width)*M.x;var F;return C.height>=E.height?F=T.height:F=T.height-(E.height-C.height)*M.y,y.setTo(P,A,R,F),g&&(y.width/=g.zoomX,y.height/=g.zoomY,y.centerX=g.centerX+g.scrollX,y.centerY=g.centerY+g.scrollY),y},step:function(g,y){this.parent&&(this._lastCheck+=y,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var g=this.domlisteners;screen.orientation&&screen.orientation.addEventListener?screen.orientation.removeEventListener("change",g.orientationChange,!1):window.removeEventListener("orientationchange",g.orientationChange,!1),window.removeEventListener("resize",g.windowResize,!1);var y=["webkit","moz",""];y.forEach(function(T){document.removeEventListener(T+"fullscreenchange",g.fullScreenChange,!1),document.removeEventListener(T+"fullscreenerror",g.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",g.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",g.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===d.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===d.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});p.exports=x}),64743:(p=>{p.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}}),39218:(p=>{p.exports={LANDSCAPE:"landscape-primary",LANDSCAPE_SECONDARY:"landscape-secondary",PORTRAIT:"portrait-primary",PORTRAIT_SECONDARY:"portrait-secondary"}}),81050:(p=>{p.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5,EXPAND:6}}),80805:(p=>{p.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}}),13560:((p,S,t)=>{var d={CENTER:t(64743),ORIENTATION:t(39218),SCALE_MODE:t(81050),ZOOM:t(80805)};p.exports=d}),56139:(p=>{p.exports="enterfullscreen"}),2336:(p=>{p.exports="fullscreenfailed"}),47412:(p=>{p.exports="fullscreenunsupported"}),51452:(p=>{p.exports="leavefullscreen"}),20666:(p=>{p.exports="orientationchange"}),47945:(p=>{p.exports="resize"}),97480:((p,S,t)=>{p.exports={ENTER_FULLSCREEN:t(56139),FULLSCREEN_FAILED:t(2336),FULLSCREEN_UNSUPPORTED:t(47412),LEAVE_FULLSCREEN:t(51452),ORIENTATION_CHANGE:t(20666),RESIZE:t(47945)}}),93364:((p,S,t)=>{var d=t(79291),c=t(13560),h={Center:t(64743),Events:t(97480),Orientation:t(39218),ScaleManager:t(76531),ScaleModes:t(81050),Zoom:t(80805)};h=d(!1,h,c.CENTER),h=d(!1,h,c.ORIENTATION),h=d(!1,h,c.SCALE_MODE),h=d(!1,h,c.ZOOM),p.exports=h}),27397:((p,S,t)=>{var d=t(95540),c=t(35355),h=function(r){var n=r.game.config.defaultPhysicsSystem,e=d(r.settings,"physics",!1);if(!(!n&&!e)){var s=[];if(n&&s.push(c(n+"Physics")),e)for(var o in e)o=c(o.concat("Physics")),s.indexOf(o)===-1&&s.push(o);return s}};p.exports=h}),52106:((p,S,t)=>{var d=t(95540),c=function(h){var r=h.plugins.getDefaultScenePlugins(),n=d(h.settings,"plugins",!1);return Array.isArray(n)?n:r||[]};p.exports=c}),87033:(p=>{var S={game:"game",renderer:"renderer",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"};p.exports=S}),97482:((p,S,t)=>{var d=t(83419),c=t(2368),h=new d({initialize:function(n){this.sys=new c(this,n),this.game,this.anims,this.cache,this.registry,this.sound,this.textures,this.events,this.cameras,this.add,this.make,this.scene,this.children,this.lights,this.data,this.input,this.load,this.time,this.tweens,this.physics,this.matter,this.scale,this.plugins,this.renderer},update:function(){}});p.exports=h}),60903:((p,S,t)=>{var d=t(83419),c=t(89993),h=t(44594),r=t(8443),n=t(35154),e=t(54899),s=t(29747),o=t(97482),i=t(2368),a=new d({initialize:function(f,u){if(this.game=f,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,this.systemScene,u){Array.isArray(u)||(u=[u]);for(var v=0;v<u.length;v++)this._pending.push({key:"default",scene:u[v],autoStart:v===0,data:{}})}f.events.once(r.READY,this.bootQueue,this)},bootQueue:function(){if(!this.isBooted){this.systemScene=this.createSceneFromInstance("__SYSTEM",new o),this.game.events.emit(r.SYSTEM_READY,this.systemScene,this);var l,f,u,v;for(l=0;l<this._pending.length;l++){f=this._pending[l],u=f.key,v=f.scene;var m;v instanceof o?m=this.createSceneFromInstance(u,v):typeof v=="object"?m=this.createSceneFromObject(u,v):typeof v=="function"&&(m=this.createSceneFromFunction(u,v)),u=m.sys.settings.key,this.keys[u]=m,this.scenes.push(m),this._data[u]&&(m.sys.settings.data=this._data[u].data,this._data[u].autoStart&&(f.autoStart=!0)),(f.autoStart||m.sys.settings.active)&&this._start.push(u)}for(this._pending.length=0,this._data={},this.isBooted=!0,l=0;l<this._start.length;l++)f=this._start[l],this.start(f);this._start.length=0}},processQueue:function(){var l=this._pending.length,f=this._queue.length;if(!(l===0&&f===0)){var u,v;if(l){for(u=0;u<l;u++)v=this._pending[u],this.add(v.key,v.scene,v.autoStart,v.data);for(u=0;u<this._start.length;u++)v=this._start[u],this.start(v);this._start.length=0,this._pending.length=0}for(u=0;u<this._queue.length;u++)v=this._queue[u],this[v.op](v.keyA,v.keyB,v.data);this._queue.length=0}},add:function(l,f,u,v){if(u===void 0&&(u=!1),v===void 0&&(v={}),this.isProcessing||!this.isBooted)return this._pending.push({key:l,scene:f,autoStart:u,data:v}),this.isBooted||(this._data[l]={data:v}),null;l=this.getKey(l,f);var m;return f instanceof o?m=this.createSceneFromInstance(l,f):typeof f=="object"?(f.key=l,m=this.createSceneFromObject(l,f)):typeof f=="function"&&(m=this.createSceneFromFunction(l,f)),m.sys.settings.data=v,l=m.sys.settings.key,this.keys[l]=m,this.scenes.push(m),(u||m.sys.settings.active)&&(this._pending.length?this._start.push(l):this.start(l)),m},remove:function(l){if(this.isProcessing)return this.queueOp("remove",l);var f=this.getScene(l);if(!f||f.sys.isTransitioning())return this;var u=this.scenes.indexOf(f),v=f.sys.settings.key;return u>-1&&(delete this.keys[v],this.scenes.splice(u,1),this._start.indexOf(v)>-1&&(u=this._start.indexOf(v),this._start.splice(u,1)),f.sys.destroy()),this},bootScene:function(l){var f=l.sys,u=f.settings;f.sceneUpdate=s,l.init&&(l.init.call(l,u.data),u.status=c.INIT,u.isTransition&&f.events.emit(h.TRANSITION_INIT,u.transitionFrom,u.transitionDuration));var v;f.load&&(v=f.load,v.reset()),v&&l.preload?(l.preload.call(l),u.status=c.LOADING,v.once(e.COMPLETE,this.loadComplete,this),v.start()):this.create(l)},loadComplete:function(l){this.create(l.scene)},payloadComplete:function(l){this.bootScene(l.scene)},update:function(l,f){this.processQueue(),this.isProcessing=!0;for(var u=this.scenes.length-1;u>=0;u--){var v=this.scenes[u].sys;v.settings.status>c.START&&v.settings.status<=c.RUNNING&&v.step(l,f),v.scenePlugin&&v.scenePlugin._target&&v.scenePlugin.step(l,f)}},render:function(l){for(var f=0;f<this.scenes.length;f++){var u=this.scenes[f].sys;u.settings.visible&&u.settings.status>=c.LOADING&&u.settings.status<c.SLEEPING&&u.render(l)}this.isProcessing=!1},create:function(l){var f=l.sys,u=f.settings;l.create&&(u.status=c.CREATING,l.create.call(l,u.data),u.status===c.DESTROYED)||(u.isTransition&&f.events.emit(h.TRANSITION_START,u.transitionFrom,u.transitionDuration),l.update&&(f.sceneUpdate=l.update),u.status=c.RUNNING,f.events.emit(h.CREATE,l))},createSceneFromFunction:function(l,f){var u=new f;if(u instanceof o){var v=u.sys.settings.key;if(v!==""&&(l=v),this.keys.hasOwnProperty(l))throw new Error("Cannot add Scene with duplicate key: "+l);return this.createSceneFromInstance(l,u)}else return u.sys=new i(u),u.sys.settings.key=l,u.sys.init(this.game),u},createSceneFromInstance:function(l,f){var u=f.sys.settings.key;return u===""&&(f.sys.settings.key=l),f.sys.init(this.game),f},createSceneFromObject:function(l,f){var u=new o(f),v=u.sys.settings.key;v!==""?l=v:u.sys.settings.key=l,u.sys.init(this.game);for(var m=["init","preload","create","update","render"],x=0;x<m.length;x++){var g=n(f,m[x],null);g&&(u[m[x]]=g)}if(f.hasOwnProperty("extend")){for(var y in f.extend)if(f.extend.hasOwnProperty(y)){var T=f.extend[y];y==="data"&&u.hasOwnProperty("data")&&typeof T=="object"?u.data.merge(T):y!=="sys"&&(u[y]=T)}}return u},getKey:function(l,f){if(l||(l="default"),typeof f=="function")return l;if(f instanceof o?l=f.sys.settings.key:typeof f=="object"&&f.hasOwnProperty("key")&&(l=f.key),this.keys.hasOwnProperty(l))throw new Error("Cannot add Scene with duplicate key: "+l);return l},getScenes:function(l,f){l===void 0&&(l=!0),f===void 0&&(f=!1);for(var u=[],v=this.scenes,m=0;m<v.length;m++){var x=v[m];x&&(!l||l&&x.sys.isActive())&&u.push(x)}return f?u.reverse():u},getScene:function(l){if(typeof l=="string"){if(this.keys[l])return this.keys[l]}else for(var f=0;f<this.scenes.length;f++)if(l===this.scenes[f])return l;return null},isActive:function(l){var f=this.getScene(l);return f?f.sys.isActive():null},isPaused:function(l){var f=this.getScene(l);return f?f.sys.isPaused():null},isVisible:function(l){var f=this.getScene(l);return f?f.sys.isVisible():null},isSleeping:function(l){var f=this.getScene(l);return f?f.sys.isSleeping():null},pause:function(l,f){var u=this.getScene(l);return u&&u.sys.pause(f),this},resume:function(l,f){var u=this.getScene(l);return u&&u.sys.resume(f),this},sleep:function(l,f){var u=this.getScene(l);return u&&!u.sys.isTransitioning()&&u.sys.sleep(f),this},wake:function(l,f){var u=this.getScene(l);return u&&u.sys.wake(f),this},run:function(l,f){var u=this.getScene(l);if(!u){for(var v=0;v<this._pending.length;v++)if(this._pending[v].key===l){this.queueOp("start",l,f);break}return this}u.sys.isSleeping()?u.sys.wake(f):u.sys.isPaused()?u.sys.resume(f):this.start(l,f)},start:function(l,f){if(!this.isBooted)return this._data[l]={autoStart:!0,data:f},this;var u=this.getScene(l);if(!u)return console.warn("Scene key not found: "+l),this;var v=u.sys,m=v.settings.status;if(m>=c.START&&m<=c.CREATING)return this;if(m>=c.RUNNING&&m<=c.SLEEPING)v.shutdown(),v.sceneUpdate=s,v.start(f);else{v.sceneUpdate=s,v.start(f);var x;if(v.load&&(x=v.load),x&&v.settings.hasOwnProperty("pack")&&(x.reset(),x.addPack({payload:v.settings.pack})))return v.settings.status=c.LOADING,x.once(e.COMPLETE,this.payloadComplete,this),x.start(),this}return this.bootScene(u),this},stop:function(l,f){var u=this.getScene(l);if(u&&!u.sys.isTransitioning()&&u.sys.settings.status!==c.SHUTDOWN){var v=u.sys.load;v&&(v.off(e.COMPLETE,this.loadComplete,this),v.off(e.COMPLETE,this.payloadComplete,this)),u.sys.shutdown(f)}return this},switch:function(l,f,u){var v=this.getScene(l),m=this.getScene(f);return v&&m&&v!==m&&(this.sleep(l),this.isSleeping(f)?this.wake(f,u):this.start(f,u)),this},getAt:function(l){return this.scenes[l]},getIndex:function(l){var f=this.getScene(l);return this.scenes.indexOf(f)},bringToTop:function(l){if(this.isProcessing)return this.queueOp("bringToTop",l);var f=this.getIndex(l),u=this.scenes;if(f!==-1&&f<u.length){var v=this.getScene(l);u.splice(f,1),u.push(v)}return this},sendToBack:function(l){if(this.isProcessing)return this.queueOp("sendToBack",l);var f=this.getIndex(l);if(f!==-1&&f>0){var u=this.getScene(l);this.scenes.splice(f,1),this.scenes.unshift(u)}return this},moveDown:function(l){if(this.isProcessing)return this.queueOp("moveDown",l);var f=this.getIndex(l);if(f>0){var u=f-1,v=this.getScene(l),m=this.getAt(u);this.scenes[f]=m,this.scenes[u]=v}return this},moveUp:function(l){if(this.isProcessing)return this.queueOp("moveUp",l);var f=this.getIndex(l);if(f<this.scenes.length-1){var u=f+1,v=this.getScene(l),m=this.getAt(u);this.scenes[f]=m,this.scenes[u]=v}return this},moveAbove:function(l,f){if(l===f)return this;if(this.isProcessing)return this.queueOp("moveAbove",l,f);var u=this.getIndex(l),v=this.getIndex(f);if(u!==-1&&v!==-1&&v<u){var m=this.getAt(v);this.scenes.splice(v,1),this.scenes.splice(u+(v>u),0,m)}return this},moveBelow:function(l,f){if(l===f)return this;if(this.isProcessing)return this.queueOp("moveBelow",l,f);var u=this.getIndex(l),v=this.getIndex(f);if(u!==-1&&v!==-1&&v>u){var m=this.getAt(v);this.scenes.splice(v,1),u===0?this.scenes.unshift(m):this.scenes.splice(u-(v<u),0,m)}return this},queueOp:function(l,f,u,v){return this._queue.push({op:l,keyA:f,keyB:u,data:v}),this},swapPosition:function(l,f){if(l===f)return this;if(this.isProcessing)return this.queueOp("swapPosition",l,f);var u=this.getIndex(l),v=this.getIndex(f);if(u!==v&&u!==-1&&v!==-1){var m=this.getAt(u);this.scenes[u]=this.scenes[v],this.scenes[v]=m}return this},dump:function(){for(var l=[],f=["pending","init","start","loading","creating","running","paused","sleeping","shutdown","destroyed"],u=0;u<this.scenes.length;u++){var v=this.scenes[u].sys,m=v.settings.visible&&(v.settings.status===c.RUNNING||v.settings.status===c.PAUSED)?"[*] ":"[-] ";m+=v.settings.key+" ("+f[v.settings.status]+")",l.push(m)}console.log(l.join(`
|
|
`))},destroy:function(){for(var l=0;l<this.scenes.length;l++){var f=this.scenes[l].sys;f.destroy()}this.systemScene.sys.destroy(),this.update=s,this.scenes=[],this._pending=[],this._start=[],this._queue=[],this.game=null,this.systemScene=null}});p.exports=a}),52209:((p,S,t)=>{var d=t(45319),c=t(83419),h=t(44594),r=t(95540),n=t(37277),e=new c({initialize:function(o){this.scene=o,this.systems=o.sys,this.settings=o.sys.settings,this.key=o.sys.settings.key,this.manager=o.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,o.sys.events.once(h.BOOT,this.boot,this),o.sys.events.on(h.START,this.pluginStart,this)},boot:function(){this.systems.events.once(h.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(h.SHUTDOWN,this.shutdown,this)},start:function(s,o){return s===void 0&&(s=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",s,o),this},restart:function(s){var o=this.key;return this.manager.queueOp("stop",o),this.manager.queueOp("start",o,s),this},transition:function(s){s===void 0&&(s={});var o=r(s,"target",!1),i=this.manager.getScene(o);if(!o||!this.checkValidTransition(i))return!1;var a=r(s,"duration",1e3);this._elapsed=0,this._target=i,this._duration=a,this._willSleep=r(s,"sleep",!1),this._willRemove=r(s,"remove",!1);var l=r(s,"onUpdate",null);l&&(this._onUpdate=l,this._onUpdateScope=r(s,"onUpdateScope",this.scene));var f=r(s,"allowInput",!1);this.settings.transitionAllowInput=f;var u=i.sys.settings;u.isTransition=!0,u.transitionFrom=this.scene,u.transitionDuration=a,u.transitionAllowInput=f,r(s,"moveAbove",!1)?this.manager.moveAbove(this.key,o):r(s,"moveBelow",!1)&&this.manager.moveBelow(this.key,o),i.sys.isSleeping()?i.sys.wake(r(s,"data")):this.manager.start(o,r(s,"data"));var v=r(s,"onStart",null),m=r(s,"onStartScope",this.scene);return v&&v.call(m,this.scene,i,a),this.systems.events.emit(h.TRANSITION_OUT,i,a),!0},checkValidTransition:function(s){return!(!s||s.sys.isActive()||s.sys.isTransitioning()||s===this.scene||this.systems.isTransitioning())},step:function(s,o){this._elapsed+=o,this.transitionProgress=d(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var s=this._target.sys,o=this._target.sys.settings;s.events.emit(h.TRANSITION_COMPLETE,this.scene),o.isTransition=!1,o.transitionFrom=null,this._duration=0,this._target=null,this._onUpdate=null,this._onUpdateScope=null,this._willRemove?this.manager.remove(this.key):this._willSleep?this.systems.sleep():this.manager.stop(this.key)},add:function(s,o,i,a){return this.manager.add(s,o,i,a)},launch:function(s,o){return s&&s!==this.key&&this.manager.queueOp("start",s,o),this},run:function(s,o){return s&&s!==this.key&&this.manager.queueOp("run",s,o),this},pause:function(s,o){return s===void 0&&(s=this.key),this.manager.queueOp("pause",s,o),this},resume:function(s,o){return s===void 0&&(s=this.key),this.manager.queueOp("resume",s,o),this},sleep:function(s,o){return s===void 0&&(s=this.key),this.manager.queueOp("sleep",s,o),this},wake:function(s,o){return s===void 0&&(s=this.key),this.manager.queueOp("wake",s,o),this},switch:function(s,o){return s!==this.key&&this.manager.queueOp("switch",this.key,s,o),this},stop:function(s,o){return s===void 0&&(s=this.key),this.manager.queueOp("stop",s,o),this},setActive:function(s,o,i){o===void 0&&(o=this.key);var a=this.manager.getScene(o);return a&&a.sys.setActive(s,i),this},setVisible:function(s,o){o===void 0&&(o=this.key);var i=this.manager.getScene(o);return i&&i.sys.setVisible(s),this},isSleeping:function(s){return s===void 0&&(s=this.key),this.manager.isSleeping(s)},isActive:function(s){return s===void 0&&(s=this.key),this.manager.isActive(s)},isPaused:function(s){return s===void 0&&(s=this.key),this.manager.isPaused(s)},isVisible:function(s){return s===void 0&&(s=this.key),this.manager.isVisible(s)},swapPosition:function(s,o){return o===void 0&&(o=this.key),s!==o&&this.manager.swapPosition(s,o),this},moveAbove:function(s,o){return o===void 0&&(o=this.key),s!==o&&this.manager.moveAbove(s,o),this},moveBelow:function(s,o){return o===void 0&&(o=this.key),s!==o&&this.manager.moveBelow(s,o),this},remove:function(s){return s===void 0&&(s=this.key),this.manager.remove(s),this},moveUp:function(s){return s===void 0&&(s=this.key),this.manager.moveUp(s),this},moveDown:function(s){return s===void 0&&(s=this.key),this.manager.moveDown(s),this},bringToTop:function(s){return s===void 0&&(s=this.key),this.manager.bringToTop(s),this},sendToBack:function(s){return s===void 0&&(s=this.key),this.manager.sendToBack(s),this},get:function(s){return this.manager.getScene(s)},getStatus:function(s){var o=this.manager.getScene(s);if(o)return o.sys.getStatus()},getIndex:function(s){return s===void 0&&(s=this.key),this.manager.getIndex(s)},shutdown:function(){var s=this.systems.events;s.off(h.SHUTDOWN,this.shutdown,this),s.off(h.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(h.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});n.register("ScenePlugin",e,"scenePlugin"),p.exports=e}),55681:((p,S,t)=>{var d=t(89993),c=t(35154),h=t(46975),r=t(87033),n={create:function(e){return typeof e=="string"?e={key:e}:e===void 0&&(e={}),{status:d.PENDING,key:c(e,"key",""),active:c(e,"active",!1),visible:c(e,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:c(e,"pack",!1),cameras:c(e,"cameras",null),map:c(e,"map",h(r,c(e,"mapAdd",{}))),physics:c(e,"physics",{}),loader:c(e,"loader",{}),plugins:c(e,"plugins",!1),input:c(e,"input",{})}}};p.exports=n}),2368:((p,S,t)=>{var d=t(83419),c=t(89993),h=t(42363),r=t(44594),n=t(27397),e=t(52106),s=t(29747),o=t(55681),i=new d({initialize:function(l,f){this.scene=l,this.game,this.renderer,this.config=f,this.settings=o.create(f),this.canvas,this.context,this.anims,this.cache,this.plugins,this.registry,this.scale,this.sound,this.textures,this.add,this.cameras,this.displayList,this.events,this.make,this.scenePlugin,this.updateList,this.sceneUpdate=s},init:function(a){this.settings.status=c.INIT,this.sceneUpdate=s,this.game=a,this.renderer=a.renderer,this.canvas=a.canvas,this.context=a.context;var l=a.plugins;this.plugins=l,l.addToScene(this,h.Global,[h.CoreScene,e(this),n(this)]),this.events.emit(r.BOOT,this),this.settings.isBooted=!0},step:function(a,l){var f=this.events;f.emit(r.PRE_UPDATE,a,l),f.emit(r.UPDATE,a,l),this.sceneUpdate.call(this.scene,a,l),f.emit(r.POST_UPDATE,a,l)},render:function(a){var l=this.displayList;l.depthSort(),this.events.emit(r.PRE_RENDER,a),this.cameras.render(a,l),this.events.emit(r.RENDER,a)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(a){var l=this.settings,f=this.getStatus();return f!==c.CREATING&&f!==c.RUNNING?console.warn("Cannot pause non-running Scene",l.key):this.settings.active&&(l.status=c.PAUSED,l.active=!1,this.events.emit(r.PAUSE,this,a)),this},resume:function(a){var l=this.events,f=this.settings;return this.settings.active||(f.status=c.RUNNING,f.active=!0,l.emit(r.RESUME,this,a)),this},sleep:function(a){var l=this.settings,f=this.getStatus();return f!==c.CREATING&&f!==c.RUNNING?console.warn("Cannot sleep non-running Scene",l.key):(l.status=c.SLEEPING,l.active=!1,l.visible=!1,this.events.emit(r.SLEEP,this,a)),this},wake:function(a){var l=this.events,f=this.settings;return f.status=c.RUNNING,f.active=!0,f.visible=!0,l.emit(r.WAKE,this,a),f.isTransition&&l.emit(r.TRANSITION_WAKE,f.transitionFrom,f.transitionDuration),this},getData:function(){return this.settings.data},getStatus:function(){return this.settings.status},canInput:function(){var a=this.settings.status;return a>c.PENDING&&a<=c.RUNNING},isSleeping:function(){return this.settings.status===c.SLEEPING},isActive:function(){return this.settings.status===c.RUNNING},isPaused:function(){return this.settings.status===c.PAUSED},isTransitioning:function(){return this.settings.isTransition||this.scenePlugin._target!==null},isTransitionOut:function(){return this.scenePlugin._target!==null&&this.scenePlugin._duration>0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(a){return this.settings.visible=a,this},setActive:function(a,l){return a?this.resume(l):this.pause(l)},start:function(a){var l=this.events,f=this.settings;a&&(f.data=a),f.status=c.START,f.active=!0,f.visible=!0,l.emit(r.START,this),l.emit(r.READY,this,a)},shutdown:function(a){var l=this.events,f=this.settings;l.off(r.TRANSITION_INIT),l.off(r.TRANSITION_START),l.off(r.TRANSITION_COMPLETE),l.off(r.TRANSITION_OUT),f.status=c.SHUTDOWN,f.active=!1,f.visible=!1,l.emit(r.SHUTDOWN,this,a)},destroy:function(){var a=this.events,l=this.settings;l.status=c.DESTROYED,l.active=!1,l.visible=!1,a.emit(r.DESTROY,this),a.removeAllListeners();for(var f=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],u=0;u<f.length;u++)this[f[u]]=null}});p.exports=i}),89993:(p=>{var S={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9};p.exports=S}),69830:(p=>{p.exports="addedtoscene"}),7919:(p=>{p.exports="boot"}),46763:(p=>{p.exports="create"}),11763:(p=>{p.exports="destroy"}),71555:(p=>{p.exports="pause"}),36735:(p=>{p.exports="postupdate"}),3809:(p=>{p.exports="prerender"}),90716:(p=>{p.exports="preupdate"}),58262:(p=>{p.exports="ready"}),91633:(p=>{p.exports="removedfromscene"}),10319:(p=>{p.exports="render"}),87132:(p=>{p.exports="resume"}),81961:(p=>{p.exports="shutdown"}),90194:(p=>{p.exports="sleep"}),6265:(p=>{p.exports="start"}),33178:(p=>{p.exports="transitioncomplete"}),43063:(p=>{p.exports="transitioninit"}),11259:(p=>{p.exports="transitionout"}),61611:(p=>{p.exports="transitionstart"}),45209:(p=>{p.exports="transitionwake"}),22966:(p=>{p.exports="update"}),21747:(p=>{p.exports="wake"}),44594:((p,S,t)=>{p.exports={ADDED_TO_SCENE:t(69830),BOOT:t(7919),CREATE:t(46763),DESTROY:t(11763),PAUSE:t(71555),POST_UPDATE:t(36735),PRE_RENDER:t(3809),PRE_UPDATE:t(90716),READY:t(58262),REMOVED_FROM_SCENE:t(91633),RENDER:t(10319),RESUME:t(87132),SHUTDOWN:t(81961),SLEEP:t(90194),START:t(6265),TRANSITION_COMPLETE:t(33178),TRANSITION_INIT:t(43063),TRANSITION_OUT:t(11259),TRANSITION_START:t(61611),TRANSITION_WAKE:t(45209),UPDATE:t(22966),WAKE:t(21747)}}),62194:((p,S,t)=>{var d=t(89993),c=t(79291),h={Events:t(44594),GetPhysicsPlugins:t(27397),GetScenePlugins:t(52106),SceneManager:t(60903),ScenePlugin:t(52209),Settings:t(55681),Systems:t(2368)};h=c(!1,h,d),p.exports=h}),30341:((p,S,t)=>{var d=t(83419),c=t(50792),h=t(14463),r=t(79291),n=t(29747),e=new d({Extends:c,initialize:function(o,i,a){c.call(this),this.manager=o,this.key=i,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},this.currentConfig=this.config,this.config=r(this.config,a),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(s){return!s||!s.name||typeof s.name!="string"?!1:this.markers[s.name]?(console.error("addMarker "+s.name+" already exists in Sound"),!1):(s=r(!0,{name:"",start:0,duration:this.totalDuration-(s.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0}},s),this.markers[s.name]=s,!0)},updateMarker:function(s){return!s||!s.name||typeof s.name!="string"?!1:this.markers[s.name]?(this.markers[s.name]=r(!0,this.markers[s.name],s),!0):(console.warn("Audio Marker: "+s.name+" missing in Sound: "+this.key),!1)},removeMarker:function(s){var o=this.markers[s];return o?(this.markers[s]=null,o):null},play:function(s,o){if(s===void 0&&(s=""),typeof s=="object"&&(o=s,s=""),typeof s!="string")return!1;if(!s)this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;else{if(!this.markers[s])return console.warn("Marker: "+s+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[s],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}return this.resetConfig(),this.currentConfig=r(this.currentConfig,o),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return this.isPaused||!this.isPlaying?!1:(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!this.isPaused||this.isPlaying?!1:(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!this.isPaused&&!this.isPlaying?!1:(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop,this.pan=this.currentConfig.pan},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:n,calculateRate:function(){var s=1.0005777895065548,o=this.currentConfig.detune+this.manager.detune,i=Math.pow(s,o);this.totalRate=this.currentConfig.rate*this.manager.rate*i},destroy:function(){this.pendingRemove||(this.stop(),this.emit(h.DESTROY,this),this.removeAllListeners(),this.pendingRemove=!0,this.manager=null,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});p.exports=e}),85034:((p,S,t)=>{var d=t(83419),c=t(41786),h=t(50792),r=t(14463),n=t(8443),e=t(46710),s=t(58731),o=t(29747),i=t(26099),a=new d({Extends:h,initialize:function(f){h.call(this),this.game=f,this.jsonCache=f.cache.json,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,this.gameLostFocus=!1,this.listenerPosition=new i;var u=f.events;u.on(n.BLUR,this.onGameBlur,this),u.on(n.FOCUS,this.onGameFocus,this),u.on(n.PRE_STEP,this.update,this),u.once(n.DESTROY,this.destroy,this)},add:o,addAudioSprite:function(l,f){f===void 0&&(f={});var u=this.add(l,f);u.spritemap=this.jsonCache.get(l).spritemap;for(var v in u.spritemap)if(u.spritemap.hasOwnProperty(v)){var m=c(f),x=u.spritemap[v];m.loop=x.hasOwnProperty("loop")?x.loop:!1,u.addMarker({name:v,start:x.start,duration:x.end-x.start,config:m})}return u},get:function(l){return s(this.sounds,"key",l)},getAll:function(l){return l?e(this.sounds,"key",l):e(this.sounds)},getAllPlaying:function(){return e(this.sounds,"isPlaying",!0)},play:function(l,f){var u=this.add(l);return u.once(r.COMPLETE,u.destroy,u),f?f.name?(u.addMarker(f),u.play(f.name)):u.play(f):u.play()},playAudioSprite:function(l,f,u){var v=this.addAudioSprite(l);return v.once(r.COMPLETE,v.destroy,v),v.play(f,u)},remove:function(l){var f=this.sounds.indexOf(l);return f!==-1?(l.destroy(),this.sounds.splice(f,1),!0):!1},removeAll:function(){this.sounds.forEach(function(l){l.destroy()}),this.sounds.length=0},removeByKey:function(l){for(var f=0,u=this.sounds.length-1;u>=0;u--){var v=this.sounds[u];v.key===l&&(v.destroy(),this.sounds.splice(u,1),f++)}return f},pauseAll:function(){this.forEachActiveSound(function(l){l.pause()}),this.emit(r.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(l){l.resume()}),this.emit(r.RESUME_ALL,this)},setListenerPosition:o,stopAll:function(){this.forEachActiveSound(function(l){l.stop()}),this.emit(r.STOP_ALL,this)},stopByKey:function(l){var f=0;return this.getAll(l).forEach(function(u){u.stop()&&f++}),f},isPlaying:function(l){var f=this.sounds,u=f.length-1,v;if(l===void 0){for(;u>=0;u--)if(v=this.sounds[u],v.isPlaying)return!0}else for(;u>=0;u--)if(v=this.sounds[u],v.key===l&&v.isPlaying)return!0;return!1},unlock:o,onBlur:o,onFocus:o,onGameBlur:function(){this.gameLostFocus=!0,this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.gameLostFocus=!1,this.pauseOnBlur&&this.onFocus()},update:function(l,f){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(r.UNLOCKED,this));for(var u=this.sounds.length-1;u>=0;u--)this.sounds[u].pendingRemove&&this.sounds.splice(u,1);this.sounds.forEach(function(v){v.update(l,f)})},destroy:function(){this.game.events.off(n.BLUR,this.onGameBlur,this),this.game.events.off(n.FOCUS,this.onGameFocus,this),this.game.events.off(n.PRE_STEP,this.update,this),this.removeAllListeners(),this.removeAll(),this.sounds.length=0,this.sounds=null,this.listenerPosition=null,this.game=null},forEachActiveSound:function(l,f){var u=this;this.sounds.forEach(function(v,m){v&&!v.pendingRemove&&l.call(f||u,v,m,u.sounds)})},setRate:function(l){return this.rate=l,this},rate:{get:function(){return this._rate},set:function(l){this._rate=l,this.forEachActiveSound(function(f){f.calculateRate()}),this.emit(r.GLOBAL_RATE,this,l)}},setDetune:function(l){return this.detune=l,this},detune:{get:function(){return this._detune},set:function(l){this._detune=l,this.forEachActiveSound(function(f){f.calculateRate()}),this.emit(r.GLOBAL_DETUNE,this,l)}}});p.exports=a}),14747:((p,S,t)=>{var d=t(33684),c=t(25960),h=t(57490),r={create:function(n){var e=n.config.audio,s=n.device.audio;return e.noAudio||!s.webAudio&&!s.audioData?new c(n):s.webAudio&&!e.disableWebAudio?new h(n):new d(n)}};p.exports=r}),19723:(p=>{p.exports="complete"}),98882:(p=>{p.exports="decodedall"}),57506:(p=>{p.exports="decoded"}),73146:(p=>{p.exports="destroy"}),11305:(p=>{p.exports="detune"}),40577:(p=>{p.exports="detune"}),30333:(p=>{p.exports="mute"}),20394:(p=>{p.exports="rate"}),21802:(p=>{p.exports="volume"}),1299:(p=>{p.exports="looped"}),99190:(p=>{p.exports="loop"}),97125:(p=>{p.exports="mute"}),89259:(p=>{p.exports="pan"}),79986:(p=>{p.exports="pauseall"}),17586:(p=>{p.exports="pause"}),19618:(p=>{p.exports="play"}),42306:(p=>{p.exports="rate"}),10387:(p=>{p.exports="resumeall"}),48959:(p=>{p.exports="resume"}),9960:(p=>{p.exports="seek"}),19180:(p=>{p.exports="stopall"}),98328:(p=>{p.exports="stop"}),50401:(p=>{p.exports="unlocked"}),52498:(p=>{p.exports="volume"}),14463:((p,S,t)=>{p.exports={COMPLETE:t(19723),DECODED:t(57506),DECODED_ALL:t(98882),DESTROY:t(73146),DETUNE:t(11305),GLOBAL_DETUNE:t(40577),GLOBAL_MUTE:t(30333),GLOBAL_RATE:t(20394),GLOBAL_VOLUME:t(21802),LOOP:t(99190),LOOPED:t(1299),MUTE:t(97125),PAN:t(89259),PAUSE_ALL:t(79986),PAUSE:t(17586),PLAY:t(19618),RATE:t(42306),RESUME_ALL:t(10387),RESUME:t(48959),SEEK:t(9960),STOP_ALL:t(19180),STOP:t(98328),UNLOCKED:t(50401),VOLUME:t(52498)}}),64895:((p,S,t)=>{var d=t(30341),c=t(83419),h=t(14463),r=t(45319),n=new c({Extends:d,initialize:function(s,o,i){if(i===void 0&&(i={}),this.tags=s.game.cache.audio.get(o),!this.tags)throw new Error('No cached audio asset with key "'+o);this.audio=null,this.startTime=0,this.previousTime=0,this.duration=this.tags[0].duration,this.totalDuration=this.tags[0].duration,d.call(this,s,o,i)},play:function(e,s){return this.manager.isLocked(this,"play",[e,s])||!d.prototype.play.call(this,e,s)||!this.pickAndPlayAudioTag()?!1:(this.emit(h.PLAY,this),!0)},pause:function(){return this.manager.isLocked(this,"pause")||this.startTime>0||!d.prototype.pause.call(this)?!1:(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(h.PAUSE,this),!0)},resume:function(){return this.manager.isLocked(this,"resume")||this.startTime>0||!d.prototype.resume.call(this)||!this.pickAndPlayAudioTag()?!1:(this.emit(h.RESUME,this),!0)},stop:function(){return this.manager.isLocked(this,"stop")||!d.prototype.stop.call(this)?!1:(this.stopAndReleaseAudioTag(),this.emit(h.STOP,this),!0)},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var e=this.currentConfig.seek,s=this.currentConfig.delay,o=(this.currentMarker?this.currentMarker.start:0)+e;return this.previousTime=o,this.audio.currentTime=o,this.applyConfig(),s===0?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+s*1e3,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var e=0;e<this.tags.length;e++){var s=this.tags[e];if(s.dataset.used==="false")return s.dataset.used="true",this.audio=s,!0}if(!this.manager.override)return!1;var o=[];this.manager.forEachActiveSound(function(a){a.key===this.key&&a.audio&&o.push(a)},this),o.sort(function(a,l){return a.loop===l.loop?l.seek/l.duration-a.seek/a.duration:a.loop?1:-1});var i=o[0];return this.audio=i.audio,i.reset(),i.audio=null,i.startTime=0,i.previousTime=0,!0},playCatchPromise:function(){var e=this.audio.play();e&&e.catch(function(s){console.warn(s)})},stopAndReleaseAudioTag:function(){this.startTime=0,this.previousTime=0,this.audio&&(this.audio.pause(),this.audio.dataset.used="false",this.audio=null)},reset:function(){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(e){if(this.isPlaying){if(this.startTime>0){this.startTime<e-this.manager.audioPlayDelay&&(this.audio.currentTime+=Math.max(0,e-this.startTime)/1e3,this.startTime=0,this.previousTime=this.audio.currentTime,this.playCatchPromise());return}var s=this.currentMarker?this.currentMarker.start:0,o=s+this.duration,i=this.audio.currentTime;if(this.currentConfig.loop)i>=o-this.manager.loopEndOffset?(this.audio.currentTime=s+Math.max(0,i-o),i=this.audio.currentTime):i<s&&(this.audio.currentTime+=s,i=this.audio.currentTime),i<this.previousTime&&this.emit(h.LOOPED,this);else if(i>=o){this.reset(),this.stopAndReleaseAudioTag(),this.emit(h.COMPLETE,this);return}this.previousTime=i}},destroy:function(){d.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},updateMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},updateVolume:function(){this.audio&&(this.audio.volume=r(this.currentConfig.volume*this.manager.volume,0,1))},calculateRate:function(){d.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(e){this.currentConfig.mute=e,!this.manager.isLocked(this,"mute",e)&&(this.updateMute(),this.emit(h.MUTE,this,e))}},setMute:function(e){return this.mute=e,this},volume:{get:function(){return this.currentConfig.volume},set:function(e){this.currentConfig.volume=e,!this.manager.isLocked(this,"volume",e)&&(this.updateVolume(),this.emit(h.VOLUME,this,e))}},setVolume:function(e){return this.volume=e,this},rate:{get:function(){return this.currentConfig.rate},set:function(e){this.currentConfig.rate=e,!this.manager.isLocked(this,h.RATE,e)&&(this.calculateRate(),this.emit(h.RATE,this,e))}},setRate:function(e){return this.rate=e,this},detune:{get:function(){return this.currentConfig.detune},set:function(e){this.currentConfig.detune=e,!this.manager.isLocked(this,h.DETUNE,e)&&(this.calculateRate(),this.emit(h.DETUNE,this,e))}},setDetune:function(e){return this.detune=e,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(e){this.manager.isLocked(this,"seek",e)||this.startTime>0||(this.isPlaying||this.isPaused)&&(e=Math.min(Math.max(0,e),this.duration),this.isPlaying?(this.previousTime=e,this.audio.currentTime=e):this.isPaused&&(this.currentConfig.seek=e),this.emit(h.SEEK,this,e))}},setSeek:function(e){return this.seek=e,this},loop:{get:function(){return this.currentConfig.loop},set:function(e){this.currentConfig.loop=e,!this.manager.isLocked(this,"loop",e)&&(this.audio&&(this.audio.loop=e),this.emit(h.LOOP,this,e))}},setLoop:function(e){return this.loop=e,this},pan:{get:function(){return this.currentConfig.pan},set:function(e){this.currentConfig.pan=e,this.emit(h.PAN,this,e)}},setPan:function(e){return this.pan=e,this}});p.exports=n}),33684:((p,S,t)=>{var d=t(85034),c=t(83419),h=t(14463),r=t(64895),n=new c({Extends:d,initialize:function(s){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,d.call(this,s)},add:function(e,s){var o=new r(this,e,s);return this.sounds.push(o),o},unlock:function(){this.locked=!1;var e=this;if(this.game.cache.audio.entries.each(function(a,l){for(var f=0;f<l.length;f++)if(l[f].dataset.locked==="true")return e.locked=!0,!1;return!0}),!!this.locked){var s=!1,o=function(){s=!0},i=function(){if(s){s=!1;return}document.body.removeEventListener("touchmove",o),document.body.removeEventListener("touchend",i);var a=[];if(e.game.cache.audio.entries.each(function(f,u){for(var v=0;v<u.length;v++){var m=u[v];m.dataset.locked==="true"&&a.push(m)}return!0}),a.length!==0){var l=a[a.length-1];l.oncanplaythrough=function(){l.oncanplaythrough=null,a.forEach(function(f){f.dataset.locked="false"}),e.unlocked=!0},a.forEach(function(f){f.load()})}};this.once(h.UNLOCKED,function(){for(this.forEachActiveSound(function(l){l.currentMarker===null&&l.duration===0&&(l.duration=l.tags[0].duration),l.totalDuration=l.tags[0].duration});this.lockedActionsQueue.length;){var a=this.lockedActionsQueue.shift();a.sound[a.prop].apply?a.sound[a.prop].apply(a.sound,a.value||[]):a.sound[a.prop]=a.value}},this),document.body.addEventListener("touchmove",o,!1),document.body.addEventListener("touchend",i,!1)}},onBlur:function(){this.forEachActiveSound(function(e){e.isPlaying&&(this.onBlurPausedSounds.push(e),e.onBlur())})},onFocus:function(){this.onBlurPausedSounds.forEach(function(e){e.onFocus()}),this.onBlurPausedSounds.length=0},destroy:function(){d.prototype.destroy.call(this),this.onBlurPausedSounds.length=0,this.onBlurPausedSounds=null},isLocked:function(e,s,o){return e.tags[0].dataset.locked==="true"?(this.lockedActionsQueue.push({sound:e,prop:s,value:o}),!0):!1},setMute:function(e){return this.mute=e,this},mute:{get:function(){return this._mute},set:function(e){this._mute=e,this.forEachActiveSound(function(s){s.updateMute()}),this.emit(h.GLOBAL_MUTE,this,e)}},setVolume:function(e){return this.volume=e,this},volume:{get:function(){return this._volume},set:function(e){this._volume=e,this.forEachActiveSound(function(s){s.updateVolume()}),this.emit(h.GLOBAL_VOLUME,this,e)}}});p.exports=n}),23717:((p,S,t)=>{p.exports={SoundManagerCreator:t(14747),Events:t(14463),BaseSound:t(30341),BaseSoundManager:t(85034),WebAudioSound:t(71741),WebAudioSoundManager:t(57490),HTML5AudioSound:t(64895),HTML5AudioSoundManager:t(33684),NoAudioSound:t(4603),NoAudioSoundManager:t(25960)}}),4603:((p,S,t)=>{var d=t(30341),c=t(83419),h=t(50792),r=t(79291),n=t(29747),e=function(){return!1},s=function(){return null},o=function(){return this},i=new c({Extends:h,initialize:function(l,f,u){u===void 0&&(u={}),h.call(this),this.manager=l,this.key=f,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=r({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},u),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.pan=0,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:e,updateMarker:e,removeMarker:s,play:e,pause:e,resume:e,stop:e,setMute:o,setVolume:o,setRate:o,setDetune:o,setSeek:o,setLoop:o,setPan:o,applyConfig:s,resetConfig:s,update:n,calculateRate:s,destroy:function(){d.prototype.destroy.call(this)}});p.exports=i}),25960:((p,S,t)=>{var d=t(85034),c=t(83419),h=t(50792),r=t(4603),n=t(29747),e=new c({Extends:h,initialize:function(o){h.call(this),this.game=o,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(s,o){var i=new r(this,s,o);return this.sounds.push(i),i},addAudioSprite:function(s,o){var i=this.add(s,o);return i.spritemap={},i},get:function(s){return d.prototype.get.call(this,s)},getAll:function(s){return d.prototype.getAll.call(this,s)},play:function(s,o){return!1},playAudioSprite:function(s,o,i){return!1},remove:function(s){return d.prototype.remove.call(this,s)},removeAll:function(){return d.prototype.removeAll.call(this)},removeByKey:function(s){return d.prototype.removeByKey.call(this,s)},stopByKey:function(s){return d.prototype.stopByKey.call(this,s)},onBlur:n,onFocus:n,onGameBlur:n,onGameFocus:n,pauseAll:n,resumeAll:n,stopAll:n,update:n,setRate:n,setDetune:n,setMute:n,setVolume:n,unlock:n,forEachActiveSound:function(s,o){d.prototype.forEachActiveSound.call(this,s,o)},destroy:function(){d.prototype.destroy.call(this)}});p.exports=e}),71741:((p,S,t)=>{var d=t(30341),c=t(83419),h=t(14463),r=t(95540),n=new c({Extends:d,initialize:function(s,o,i){if(i===void 0&&(i={}),this.audioBuffer=s.game.cache.audio.get(o),!this.audioBuffer)throw new Error('Audio key "'+o+'" not found in cache');this.source=null,this.loopSource=null,this.muteNode=s.context.createGain(),this.volumeNode=s.context.createGain(),this.pannerNode=null,this.spatialNode=null,this.spatialSource=null,this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),s.context.createPanner&&(this.spatialNode=s.context.createPanner(),this.volumeNode.connect(this.spatialNode)),s.context.createStereoPanner?(this.pannerNode=s.context.createStereoPanner(),s.context.createPanner?this.spatialNode.connect(this.pannerNode):this.volumeNode.connect(this.pannerNode),this.pannerNode.connect(s.destination)):s.context.createPanner?this.spatialNode.connect(s.destination):this.volumeNode.connect(s.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,d.call(this,s,o,i)},play:function(e,s){return d.prototype.play.call(this,e,s)?(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(h.PLAY,this),!0):!1},pause:function(){return this.manager.context.currentTime<this.startTime||!d.prototype.pause.call(this)?!1:(this.currentConfig.seek=this.getCurrentTime(),this.stopAndRemoveBufferSource(),this.emit(h.PAUSE,this),!0)},resume:function(){return this.manager.context.currentTime<this.startTime||!d.prototype.resume.call(this)?!1:(this.createAndStartBufferSource(),this.emit(h.RESUME,this),!0)},stop:function(){return d.prototype.stop.call(this)?(this.stopAndRemoveBufferSource(),this.emit(h.STOP,this),!0):!1},createAndStartBufferSource:function(){var e=this.currentConfig.seek,s=this.currentConfig.delay,o=this.manager.context.currentTime+s,i=(this.currentMarker?this.currentMarker.start:0)+e,a=this.duration-e;this.playTime=o-e,this.startTime=o,this.source=this.createBufferSource(),this.applyConfig(),this.source.start(Math.max(0,o),Math.max(0,i),Math.max(0,a)),this.resetConfig()},createAndStartLoopBufferSource:function(){var e=this.getLoopTime(),s=this.currentMarker?this.currentMarker.start:0,o=this.duration;this.loopTime=e,this.loopSource=this.createBufferSource(),this.loopSource.playbackRate.setValueAtTime(this.totalRate,0),this.loopSource.start(Math.max(0,e),Math.max(0,s),Math.max(0,o))},createBufferSource:function(){var e=this,s=this.manager.context.createBufferSource();return s.buffer=this.audioBuffer,s.connect(this.muteNode),s.onended=function(o){var i=o.target;(i===e.source||i===e.loopSource)&&(e.currentConfig.loop?e.hasLooped=!0:e.hasEnded=!0)},s},stopAndRemoveBufferSource:function(){if(this.source){var e=this.source;this.source=null,e.stop(),e.disconnect()}this.playTime=0,this.startTime=0,this.hasEnded=!1,this.stopAndRemoveLoopBufferSource()},stopAndRemoveLoopBufferSource:function(){this.loopSource&&(this.loopSource.stop(),this.loopSource.disconnect(),this.loopSource=null),this.loopTime=0},applyConfig:function(){this.rateUpdates.length=0,this.rateUpdates.push({time:0,rate:1});var e=this.currentConfig.source;if(e&&this.manager.context.createPanner){var s=this.spatialNode;s.panningModel=r(e,"panningModel","equalpower"),s.distanceModel=r(e,"distanceModel","inverse"),s.orientationX.value=r(e,"orientationX",0),s.orientationY.value=r(e,"orientationY",0),s.orientationZ.value=r(e,"orientationZ",-1),s.refDistance=r(e,"refDistance",1),s.maxDistance=r(e,"maxDistance",1e4),s.rolloffFactor=r(e,"rolloffFactor",1),s.coneInnerAngle=r(e,"coneInnerAngle",360),s.coneOuterAngle=r(e,"coneOuterAngle",0),s.coneOuterGain=r(e,"coneOuterGain",0),this.spatialSource=r(e,"follow",null),this.spatialSource||(s.positionX.value=r(e,"x",0),s.positionY.value=r(e,"y",0),s.positionZ.value=r(e,"z",0))}d.prototype.applyConfig.call(this)},x:{get:function(){return this.spatialNode?this.spatialNode.positionX:0},set:function(e){this.spatialNode&&(this.spatialNode.positionX.value=e)}},y:{get:function(){return this.spatialNode?this.spatialNode.positionY:0},set:function(e){this.spatialNode&&(this.spatialNode.positionY.value=e)}},update:function(){if(this.isPlaying&&this.spatialSource){var e=r(this.spatialSource,"x",null),s=r(this.spatialSource,"y",null);e&&e!==this._spatialx&&(this._spatialx=this.spatialNode.positionX.value=e),s&&s!==this._spatialy&&(this._spatialy=this.spatialNode.positionY.value=s)}this.hasEnded?(d.prototype.stop.call(this),this.stopAndRemoveBufferSource(),this.emit(h.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(h.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 e=this.manager.context.currentTime;this.source&&typeof this.totalRate=="number"&&this.source.playbackRate.setValueAtTime(this.totalRate,e),this.isPlaying&&(this.rateUpdates.push({time:Math.max(this.startTime,e)-this.playTime,rate:this.totalRate}),this.loopSource&&(this.stopAndRemoveLoopBufferSource(),this.createAndStartLoopBufferSource()))},getCurrentTime:function(){for(var e=0,s=0;s<this.rateUpdates.length;s++){var o=0;s<this.rateUpdates.length-1?o=this.rateUpdates[s+1].time:o=this.manager.context.currentTime-this.playTime,e+=(o-this.rateUpdates[s].time)*this.rateUpdates[s].rate}return e},getLoopTime:function(){for(var e=0,s=0;s<this.rateUpdates.length-1;s++)e+=(this.rateUpdates[s+1].time-this.rateUpdates[s].time)*this.rateUpdates[s].rate;var o=this.rateUpdates[this.rateUpdates.length-1];return this.playTime+o.time+(this.duration-e)/o.rate},rate:{get:function(){return this.currentConfig.rate},set:function(e){this.currentConfig.rate=e,this.calculateRate(),this.emit(h.RATE,this,e)}},setRate:function(e){return this.rate=e,this},detune:{get:function(){return this.currentConfig.detune},set:function(e){this.currentConfig.detune=e,this.calculateRate(),this.emit(h.DETUNE,this,e)}},setDetune:function(e){return this.detune=e,this},mute:{get:function(){return this.muteNode.gain.value===0},set:function(e){this.currentConfig.mute=e,this.muteNode.gain.setValueAtTime(e?0:1,0),this.emit(h.MUTE,this,e)}},setMute:function(e){return this.mute=e,this},volume:{get:function(){return this.volumeNode.gain.value},set:function(e){this.currentConfig.volume=e,this.volumeNode.gain.setValueAtTime(e,0),this.emit(h.VOLUME,this,e)}},setVolume:function(e){return this.volume=e,this},seek:{get:function(){return this.isPlaying?this.manager.context.currentTime<this.startTime?this.startTime-this.playTime:this.getCurrentTime():this.isPaused?this.currentConfig.seek:0},set:function(e){this.manager.context.currentTime<this.startTime||(this.isPlaying||this.isPaused)&&(e=Math.min(Math.max(0,e),this.duration),this.currentConfig.seek=e,this.isPlaying&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource()),this.emit(h.SEEK,this,e))}},setSeek:function(e){return this.seek=e,this},loop:{get:function(){return this.currentConfig.loop},set:function(e){this.currentConfig.loop=e,this.isPlaying&&(this.stopAndRemoveLoopBufferSource(),e&&this.createAndStartLoopBufferSource()),this.emit(h.LOOP,this,e)}},setLoop:function(e){return this.loop=e,this},pan:{get:function(){return this.pannerNode?this.pannerNode.pan.value:0},set:function(e){this.currentConfig.pan=e,this.pannerNode&&this.pannerNode.pan.setValueAtTime(e,this.manager.context.currentTime),this.emit(h.PAN,this,e)}},setPan:function(e){return this.pan=e,this}});p.exports=n}),57490:((p,S,t)=>{var d=t(53134),c=t(85034),h=t(83419),r=t(14463),n=t(8443),e=t(71741),s=t(95540),o=new h({Extends:c,initialize:function(a){this.context=this.createAudioContext(a),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked=this.context.state==="suspended",c.call(this,a),this.locked&&(a.isBooted?this.unlock():a.events.once(n.BOOT,this.unlock,this)),a.events.on(n.VISIBLE,this.onGameVisible,this)},onGameVisible:function(){var i=this.context;window.setTimeout(function(){i&&(i.suspend(),i.resume())},100)},createAudioContext:function(i){var a=i.config.audio;if(a.context)return a.context.resume(),a.context;if(window.hasOwnProperty("AudioContext"))return new AudioContext;if(window.hasOwnProperty("webkitAudioContext"))return new window.webkitAudioContext},setAudioContext:function(i){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=i,this.masterMuteNode=i.createGain(),this.masterVolumeNode=i.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(i.destination),this.destination=this.masterMuteNode,this},add:function(i,a){var l=new e(this,i,a);return this.sounds.push(l),l},decodeAudio:function(i,a){var l;Array.isArray(i)?l=i:l=[{key:i,data:a}];for(var f=this.game.cache.audio,u=l.length,v=0;v<l.length;v++){var m=l[v],x=m.key,g=m.data;typeof g=="string"&&(g=d(g));var y=(function(C,E){f.add(C,E),this.emit(r.DECODED,C),u--,u===0&&this.emit(r.DECODED_ALL)}).bind(this,x),T=(function(C,E){console.error("Error decoding audio: "+C+" - ",E?E.message:""),u--,u===0&&this.emit(r.DECODED_ALL)}).bind(this,x);this.context.decodeAudioData(g,y,T)}},setListenerPosition:function(i,a){return i===void 0&&(i=this.game.scale.width/2),a===void 0&&(a=this.game.scale.height/2),this.listenerPosition.set(i,a),this},unlock:function(){var i=this,a=document.body,l=function f(){if(i.context&&a){var u=a.removeEventListener.bind(a);i.context.resume().then(function(){u("touchstart",f),u("touchend",f),u("mousedown",f),u("mouseup",f),u("keydown",f),i.unlocked=!0},function(){u("touchstart",f),u("touchend",f),u("mousedown",f),u("mouseup",f),u("keydown",f)})}};a&&(a.addEventListener("touchstart",l,!1),a.addEventListener("touchend",l,!1),a.addEventListener("mousedown",l,!1),a.addEventListener("mouseup",l,!1),a.addEventListener("keydown",l,!1))},onBlur:function(){this.locked||this.context.suspend()},onFocus:function(){var i=this.context;i&&!this.locked&&(i.state==="suspended"||i.state==="interrupted")&&i.resume()},update:function(i,a){var l=this.context.listener,f=s(this.listenerPosition,"x",null),u=s(this.listenerPosition,"y",null);if(l&&l.positionX!==void 0)f&&f!==this._spatialx&&(this._spatialx=l.positionX.value=f),u&&u!==this._spatialy&&(this._spatialy=l.positionY.value=u);else if(l){f&&f!==this._spatialx&&(this._spatialx=f),u&&u!==this._spatialy&&(this._spatialy=u);var v=s(l,"z",0);l.setPosition(this._spatialx||0,this._spatialy||0,v)}c.prototype.update.call(this,i,a),this.gameLostFocus||this.onFocus()},destroy:function(){if(this.destination=null,this.masterVolumeNode.disconnect(),this.masterVolumeNode=null,this.masterMuteNode.disconnect(),this.masterMuteNode=null,this.game.config.audio.context)this.context.suspend();else{var i=this;this.context.close().then(function(){i.context=null})}this.game.events.off(n.VISIBLE,this.onGameVisible,this),c.prototype.destroy.call(this)},setMute:function(i){return this.mute=i,this},mute:{get:function(){return this.masterMuteNode.gain.value===0},set:function(i){this.masterMuteNode.gain.setValueAtTime(i?0:1,0),this.emit(r.GLOBAL_MUTE,this,i)}},setVolume:function(i){return this.volume=i,this},volume:{get:function(){return this.masterVolumeNode.gain.value},set:function(i){this.masterVolumeNode.gain.setValueAtTime(i,0),this.emit(r.GLOBAL_VOLUME,this,i)}}});p.exports=o}),73162:((p,S,t)=>{var d=t(37105),c=t(83419),h=t(29747),r=t(19186),n=new c({initialize:function(s){this.parent=s,this.list=[],this.position=0,this.addCallback=h,this.removeCallback=h,this._sortKey=""},add:function(e,s){return s?d.Add(this.list,e):d.Add(this.list,e,0,this.addCallback,this)},addAt:function(e,s,o){return o?d.AddAt(this.list,e,s):d.AddAt(this.list,e,s,0,this.addCallback,this)},getAt:function(e){return this.list[e]},getIndex:function(e){return this.list.indexOf(e)},sort:function(e,s){return e?(s===void 0&&(s=function(o,i){return o[e]-i[e]}),r(this.list,s),this):this},getByName:function(e){return d.GetFirst(this.list,"name",e)},getRandom:function(e,s){return d.GetRandom(this.list,e,s)},getFirst:function(e,s,o,i){return d.GetFirst(this.list,e,s,o,i)},getAll:function(e,s,o,i){return d.GetAll(this.list,e,s,o,i)},count:function(e,s){return d.CountAllMatching(this.list,e,s)},swap:function(e,s){d.Swap(this.list,e,s)},moveTo:function(e,s){return d.MoveTo(this.list,e,s)},moveAbove:function(e,s){return d.MoveAbove(this.list,e,s)},moveBelow:function(e,s){return d.MoveBelow(this.list,e,s)},remove:function(e,s){return s?d.Remove(this.list,e):d.Remove(this.list,e,this.removeCallback,this)},removeAt:function(e,s){return s?d.RemoveAt(this.list,e):d.RemoveAt(this.list,e,this.removeCallback,this)},removeBetween:function(e,s,o){return o?d.RemoveBetween(this.list,e,s):d.RemoveBetween(this.list,e,s,this.removeCallback,this)},removeAll:function(e){for(var s=this.list.length;s--;)this.remove(this.list[s],e);return this},bringToTop:function(e){return d.BringToTop(this.list,e)},sendToBack:function(e){return d.SendToBack(this.list,e)},moveUp:function(e){return d.MoveUp(this.list,e),e},moveDown:function(e){return d.MoveDown(this.list,e),e},reverse:function(){return this.list.reverse(),this},shuffle:function(){return d.Shuffle(this.list),this},replace:function(e,s){return d.Replace(this.list,e,s)},exists:function(e){return this.list.indexOf(e)>-1},setAll:function(e,s,o,i){return d.SetAll(this.list,e,s,o,i),this},each:function(e,s){for(var o=[null],i=2;i<arguments.length;i++)o.push(arguments[i]);for(i=0;i<this.list.length;i++)o[0]=this.list[i],e.apply(s,o)},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}}});p.exports=n}),90330:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r){this.entries={},this.size=0,this.setAll(r)},setAll:function(h){if(Array.isArray(h))for(var r=0;r<h.length;r++)this.set(h[r][0],h[r][1]);return this},set:function(h,r){return this.has(h)||this.size++,this.entries[h]=r,this},get:function(h){if(this.has(h))return this.entries[h]},getArray:function(){var h=[],r=this.entries;for(var n in r)h.push(r[n]);return h},has:function(h){return this.entries.hasOwnProperty(h)},delete:function(h){return this.has(h)&&(delete this.entries[h],this.size--),this},clear:function(){return Object.keys(this.entries).forEach(function(h){delete this.entries[h]},this),this.size=0,this},keys:function(){return Object.keys(this.entries)},values:function(){var h=[],r=this.entries;for(var n in r)h.push(r[n]);return h},dump:function(){var h=this.entries;console.group("Map");for(var r in h)console.log(r,h[r]);console.groupEnd()},each:function(h){var r=this.entries;for(var n in r)if(h(n,r[n])===!1)break;return this},contains:function(h){var r=this.entries;for(var n in r)if(r[n]===h)return!0;return!1},merge:function(h,r){r===void 0&&(r=!1);var n=this.entries,e=h.entries;for(var s in e)n.hasOwnProperty(s)&&r?n[s]=e[s]:this.set(s,e[s]);return this}});p.exports=c}),25774:((p,S,t)=>{var d=t(83419),c=t(50792),h=t(82348),r=new d({Extends:c,initialize:function(){c.call(this),this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,this.checkQueue=!1},isActive:function(n){return this._active.indexOf(n)>-1},isPending:function(n){return this._toProcess>0&&this._pending.indexOf(n)>-1},isDestroying:function(n){return this._destroy.indexOf(n)>-1},add:function(n){return this.checkQueue&&this.isActive(n)&&!this.isDestroying(n)||this.isPending(n)||(this._pending.push(n),this._toProcess++),n},remove:function(n){if(this.isPending(n)){var e=this._pending,s=e.indexOf(n);s!==-1&&e.splice(s,1)}else this.isActive(n)&&(this._destroy.push(n),this._toProcess++);return n},removeAll:function(){for(var n=this._active,e=this._destroy,s=n.length;s--;)e.push(n[s]),this._toProcess++;return this},update:function(){if(this._toProcess===0)return this._active;var n=this._destroy,e=this._active,s,o;for(s=0;s<n.length;s++){o=n[s];var i=e.indexOf(o);i!==-1&&(e.splice(i,1),this.emit(h.PROCESS_QUEUE_REMOVE,o))}for(n.length=0,n=this._pending,s=0;s<n.length;s++)o=n[s],(!this.checkQueue||this.checkQueue&&e.indexOf(o)===-1)&&(e.push(o),this.emit(h.PROCESS_QUEUE_ADD,o));return n.length=0,this._toProcess=0,e},getActive:function(){return this._active},length:{get:function(){return this._active.length}},destroy:function(){this._toProcess=0,this._pending=[],this._active=[],this._destroy=[]}});p.exports=r}),59542:((p,S,t)=>{var d=t(43886);function c(g){if(!(this instanceof c))return new c(g);this._maxEntries=Math.max(4,g||9),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}c.prototype={all:function(){return this._all(this.data,[])},search:function(g){var y=this.data,T=[],C=this.toBBox;if(!v(g,y))return T;for(var E=[],M,P,A,R;y;){for(M=0,P=y.children.length;M<P;M++)A=y.children[M],R=y.leaf?C(A):A,v(g,R)&&(y.leaf?T.push(A):u(g,R)?this._all(A,T):E.push(A));y=E.pop()}return T},collides:function(g){var y=this.data,T=this.toBBox;if(!v(g,y))return!1;for(var C=[],E,M,P,A;y;){for(E=0,M=y.children.length;E<M;E++)if(P=y.children[E],A=y.leaf?T(P):P,v(g,A)){if(y.leaf||u(g,A))return!0;C.push(P)}y=C.pop()}return!1},load:function(g){if(!(g&&g.length))return this;if(g.length<this._minEntries){for(var y=0,T=g.length;y<T;y++)this.insert(g[y]);return this}var C=this._build(g.slice(),0,g.length-1,0);if(!this.data.children.length)this.data=C;else if(this.data.height===C.height)this._splitRoot(this.data,C);else{if(this.data.height<C.height){var E=this.data;this.data=C,C=E}this._insert(C,this.data.height-C.height-1,!0)}return this},insert:function(g){return g&&this._insert(g,this.data.height-1),this},clear:function(){return this.data=m([]),this},remove:function(g,y){if(!g)return this;for(var T=this.data,C=this.toBBox(g),E=[],M=[],P,A,R,F;T||E.length;){if(T||(T=E.pop(),A=E[E.length-1],P=M.pop(),F=!0),T.leaf&&(R=h(g,T.children,y),R!==-1))return T.children.splice(R,1),E.push(T),this._condense(E),this;!F&&!T.leaf&&u(T,C)?(E.push(T),M.push(P),P=0,A=T,T=T.children[0]):A?(P++,T=A.children[P],F=!1):T=null}return this},toBBox:function(g){return g},compareMinX:s,compareMinY:o,toJSON:function(){return this.data},fromJSON:function(g){return this.data=g,this},_all:function(g,y){for(var T=[];g;)g.leaf?y.push.apply(y,g.children):T.push.apply(T,g.children),g=T.pop();return y},_build:function(g,y,T,C){var E=T-y+1,M=this._maxEntries,P;if(E<=M)return P=m(g.slice(y,T+1)),r(P,this.toBBox),P;C||(C=Math.ceil(Math.log(E)/Math.log(M)),M=Math.ceil(E/Math.pow(M,C-1))),P=m([]),P.leaf=!1,P.height=C;var A=Math.ceil(E/M),R=A*Math.ceil(Math.sqrt(M)),F,w,I,U;for(x(g,y,T,R,this.compareMinX),F=y;F<=T;F+=R)for(I=Math.min(F+R-1,T),x(g,F,I,A,this.compareMinY),w=F;w<=I;w+=A)U=Math.min(w+A-1,I),P.children.push(this._build(g,w,U,C-1));return r(P,this.toBBox),P},_chooseSubtree:function(g,y,T,C){for(var E,M,P,A,R,F,w,I;C.push(y),!(y.leaf||C.length-1===T);){for(w=I=1/0,E=0,M=y.children.length;E<M;E++)P=y.children[E],R=i(P),F=l(g,P)-R,F<I?(I=F,w=R<w?R:w,A=P):F===I&&R<w&&(w=R,A=P);y=A||y.children[0]}return y},_insert:function(g,y,T){var C=this.toBBox,E=T?g:C(g),M=[],P=this._chooseSubtree(E,this.data,y,M);for(P.children.push(g),e(P,E);y>=0&&M[y].children.length>this._maxEntries;)this._split(M,y),y--;this._adjustParentBBoxes(E,M,y)},_split:function(g,y){var T=g[y],C=T.children.length,E=this._minEntries;this._chooseSplitAxis(T,E,C);var M=this._chooseSplitIndex(T,E,C),P=m(T.children.splice(M,T.children.length-M));P.height=T.height,P.leaf=T.leaf,r(T,this.toBBox),r(P,this.toBBox),y?g[y-1].children.push(P):this._splitRoot(T,P)},_splitRoot:function(g,y){this.data=m([g,y]),this.data.height=g.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},_chooseSplitIndex:function(g,y,T){var C,E,M,P,A,R,F,w;for(R=F=1/0,C=y;C<=T-y;C++)E=n(g,0,C,this.toBBox),M=n(g,C,T,this.toBBox),P=f(E,M),A=i(E)+i(M),P<R?(R=P,w=C,F=A<F?A:F):P===R&&A<F&&(F=A,w=C);return w},_chooseSplitAxis:function(g,y,T){var C=g.leaf?this.compareMinX:s,E=g.leaf?this.compareMinY:o,M=this._allDistMargin(g,y,T,C),P=this._allDistMargin(g,y,T,E);M<P&&g.children.sort(C)},_allDistMargin:function(g,y,T,C){g.children.sort(C);var E=this.toBBox,M=n(g,0,y,E),P=n(g,T-y,T,E),A=a(M)+a(P),R,F;for(R=y;R<T-y;R++)F=g.children[R],e(M,g.leaf?E(F):F),A+=a(M);for(R=T-y-1;R>=y;R--)F=g.children[R],e(P,g.leaf?E(F):F),A+=a(P);return A},_adjustParentBBoxes:function(g,y,T){for(var C=T;C>=0;C--)e(y[C],g)},_condense:function(g){for(var y=g.length-1,T;y>=0;y--)g[y].children.length===0?y>0?(T=g[y-1].children,T.splice(T.indexOf(g[y]),1)):this.clear():r(g[y],this.toBBox)},compareMinX:function(g,y){return g.left-y.left},compareMinY:function(g,y){return g.top-y.top},toBBox:function(g){return{minX:g.left,minY:g.top,maxX:g.right,maxY:g.bottom}}};function h(g,y,T){if(!T)return y.indexOf(g);for(var C=0;C<y.length;C++)if(T(g,y[C]))return C;return-1}function r(g,y){n(g,0,g.children.length,y,g)}function n(g,y,T,C,E){E||(E=m(null)),E.minX=1/0,E.minY=1/0,E.maxX=-1/0,E.maxY=-1/0;for(var M=y,P;M<T;M++)P=g.children[M],e(E,g.leaf?C(P):P);return E}function e(g,y){return g.minX=Math.min(g.minX,y.minX),g.minY=Math.min(g.minY,y.minY),g.maxX=Math.max(g.maxX,y.maxX),g.maxY=Math.max(g.maxY,y.maxY),g}function s(g,y){return g.minX-y.minX}function o(g,y){return g.minY-y.minY}function i(g){return(g.maxX-g.minX)*(g.maxY-g.minY)}function a(g){return g.maxX-g.minX+(g.maxY-g.minY)}function l(g,y){return(Math.max(y.maxX,g.maxX)-Math.min(y.minX,g.minX))*(Math.max(y.maxY,g.maxY)-Math.min(y.minY,g.minY))}function f(g,y){var T=Math.max(g.minX,y.minX),C=Math.max(g.minY,y.minY),E=Math.min(g.maxX,y.maxX),M=Math.min(g.maxY,y.maxY);return Math.max(0,E-T)*Math.max(0,M-C)}function u(g,y){return g.minX<=y.minX&&g.minY<=y.minY&&y.maxX<=g.maxX&&y.maxY<=g.maxY}function v(g,y){return y.minX<=g.maxX&&y.minY<=g.maxY&&y.maxX>=g.minX&&y.maxY>=g.minY}function m(g){return{children:g,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function x(g,y,T,C,E){for(var M=[y,T],P;M.length;)T=M.pop(),y=M.pop(),!(T-y<=C)&&(P=y+Math.ceil((T-y)/C/2)*C,d(g,P,y,T,E),M.push(y,P,P,T))}p.exports=c}),35072:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r){if(this.entries=[],Array.isArray(r))for(var n=0;n<r.length;n++)this.set(r[n])},set:function(h){return this.entries.indexOf(h)===-1&&this.entries.push(h),this},get:function(h,r){for(var n=0;n<this.entries.length;n++){var e=this.entries[n];if(e[h]===r)return e}},getArray:function(){return this.entries.slice(0)},delete:function(h){var r=this.entries.indexOf(h);return r>-1&&this.entries.splice(r,1),this},dump:function(){console.group("Set");for(var h=0;h<this.entries.length;h++){var r=this.entries[h];console.log(r)}console.groupEnd()},each:function(h,r){var n,e=this.entries.slice(),s=e.length;if(r)for(n=0;n<s&&h.call(r,e[n],n)!==!1;n++);else for(n=0;n<s&&h(e[n],n)!==!1;n++);return this},iterate:function(h,r){var n,e=this.entries.length;if(r)for(n=0;n<e&&h.call(r,this.entries[n],n)!==!1;n++);else for(n=0;n<e&&h(this.entries[n],n)!==!1;n++);return this},iterateLocal:function(h){var r,n=[];for(r=1;r<arguments.length;r++)n.push(arguments[r]);var e=this.entries.length;for(r=0;r<e;r++){var s=this.entries[r];s[h].apply(s,n)}return this},clear:function(){return this.entries.length=0,this},contains:function(h){return this.entries.indexOf(h)>-1},union:function(h){var r=new c;return h.entries.forEach(function(n){r.set(n)}),this.entries.forEach(function(n){r.set(n)}),r},intersect:function(h){var r=new c;return this.entries.forEach(function(n){h.contains(n)&&r.set(n)}),r},difference:function(h){var r=new c;return this.entries.forEach(function(n){h.contains(n)||r.set(n)}),r},size:{get:function(){return this.entries.length},set:function(h){return h<this.entries.length?this.entries.length=h:this.entries.length}}});p.exports=c}),86555:((p,S,t)=>{var d=t(45319),c=t(83419),h=t(56583),r=t(26099),n=new c({initialize:function(s,o,i,a){s===void 0&&(s=0),o===void 0&&(o=s),i===void 0&&(i=0),a===void 0&&(a=null),this._width=s,this._height=o,this._parent=a,this.aspectMode=i,this.aspectRatio=o===0?1:s/o,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new r},setAspectMode:function(e){return e===void 0&&(e=0),this.aspectMode=e,this.setSize(this._width,this._height)},setSnap:function(e,s){return e===void 0&&(e=0),s===void 0&&(s=e),this.snapTo.set(e,s),this.setSize(this._width,this._height)},setParent:function(e){return this._parent=e,this.setSize(this._width,this._height)},setMin:function(e,s){return e===void 0&&(e=0),s===void 0&&(s=e),this.minWidth=d(e,0,this.maxWidth),this.minHeight=d(s,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(e,s){return e===void 0&&(e=Number.MAX_VALUE),s===void 0&&(s=e),this.maxWidth=d(e,this.minWidth,Number.MAX_VALUE),this.maxHeight=d(s,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(e,s){switch(e===void 0&&(e=0),s===void 0&&(s=e),this.aspectMode){case n.NONE:this._width=this.getNewWidth(h(e,this.snapTo.x)),this._height=this.getNewHeight(h(s,this.snapTo.y)),this.aspectRatio=this._height===0?1:this._width/this._height;break;case n.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(h(e,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case n.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(h(s,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case n.FIT:this.constrain(e,s,!0);break;case n.ENVELOP:this.constrain(e,s,!1);break}return this},setAspectRatio:function(e){return this.aspectRatio=e,this.setSize(this._width,this._height)},resize:function(e,s){return this._width=this.getNewWidth(h(e,this.snapTo.x)),this._height=this.getNewHeight(h(s,this.snapTo.y)),this.aspectRatio=this._height===0?1:this._width/this._height,this},getNewWidth:function(e,s){return s===void 0&&(s=!0),e=d(e,this.minWidth,this.maxWidth),s&&this._parent&&e>this._parent.width&&(e=Math.max(this.minWidth,this._parent.width)),e},getNewHeight:function(e,s){return s===void 0&&(s=!0),e=d(e,this.minHeight,this.maxHeight),s&&this._parent&&e>this._parent.height&&(e=Math.max(this.minHeight,this._parent.height)),e},constrain:function(e,s,o){e===void 0&&(e=0),s===void 0&&(s=e),o===void 0&&(o=!0),e=this.getNewWidth(e),s=this.getNewHeight(s);var i=this.snapTo,a=s===0?1:e/s;return o&&this.aspectRatio>a||!o&&this.aspectRatio<a?(e=h(e,i.x),s=e/this.aspectRatio,i.y>0&&(s=h(s,i.y),e=s*this.aspectRatio)):(o&&this.aspectRatio<a||!o&&this.aspectRatio>a)&&(s=h(s,i.y),e=s*this.aspectRatio,i.x>0&&(e=h(e,i.x),s=e*(1/this.aspectRatio))),this._width=e,this._height=s,this},fitTo:function(e,s){return this.constrain(e,s,!0)},envelop:function(e,s){return this.constrain(e,s,!1)},setWidth:function(e){return this.setSize(e,this._height)},setHeight:function(e){return this.setSize(this._width,e)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(e){e&&e.style&&(e.style.width=this._width+"px",e.style.height=this._height+"px")},copy:function(e){return e.setAspectMode(this.aspectMode),e.aspectRatio=this.aspectRatio,e.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(e){this.setSize(e,this._height)}},height:{get:function(){return this._height},set:function(e){this.setSize(this._width,e)}}});n.NONE=0,n.WIDTH_CONTROLS_HEIGHT=1,n.HEIGHT_CONTROLS_WIDTH=2,n.FIT=3,n.ENVELOP=4,p.exports=n}),15238:(p=>{p.exports="add"}),56187:(p=>{p.exports="remove"}),82348:((p,S,t)=>{p.exports={PROCESS_QUEUE_ADD:t(15238),PROCESS_QUEUE_REMOVE:t(56187)}}),41392:((p,S,t)=>{p.exports={Events:t(82348),List:t(73162),Map:t(90330),ProcessQueue:t(25774),RTree:t(59542),Set:t(35072),Size:t(86555)}}),57382:((p,S,t)=>{var d=t(83419),c=t(45319),h=t(40987),r=t(8054),n=t(50030),e=t(79237),s=new d({Extends:e,initialize:function(i,a,l,f,u){e.call(this,i,a,l,f,u),this.add("__BASE",0,0,0,f,u),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this.width=f,this.height=u,this.imageData=this.context.getImageData(0,0,f,u),this.data=null,this.imageData&&(this.data=this.imageData.data),this.pixels=null,this.buffer,this.data&&(this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data)},update:function(){return this.imageData=this.context.getImageData(0,0,this.width,this.height),this.data=this.imageData.data,this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data,this.manager.game.config.renderType===r.WEBGL&&this.refresh(),this},draw:function(o,i,a,l){return l===void 0&&(l=!0),this.context.drawImage(a,o,i),l&&this.update(),this},drawFrame:function(o,i,a,l,f){a===void 0&&(a=0),l===void 0&&(l=0),f===void 0&&(f=!0);var u=this.manager.getFrame(o,i);if(u){var v=u.canvasData,m=u.cutWidth,x=u.cutHeight,g=u.source.resolution;this.context.drawImage(u.source.image,v.x,v.y,m,x,a,l,m/g,x/g),f&&this.update()}return this},setPixel:function(o,i,a,l,f,u){u===void 0&&(u=255),o=Math.abs(Math.floor(o)),i=Math.abs(Math.floor(i));var v=this.getIndex(o,i);if(v>-1){var m=this.context.getImageData(o,i,1,1);m.data[0]=a,m.data[1]=l,m.data[2]=f,m.data[3]=u,this.context.putImageData(m,o,i)}return this},putData:function(o,i,a,l,f,u,v){return l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=o.width),v===void 0&&(v=o.height),this.context.putImageData(o,i,a,l,f,u,v),this},getData:function(o,i,a,l){o=c(Math.floor(o),0,this.width-1),i=c(Math.floor(i),0,this.height-1),a=c(a,1,this.width-o),l=c(l,1,this.height-i);var f=this.context.getImageData(o,i,a,l);return f},getPixel:function(o,i,a){a||(a=new h);var l=this.getIndex(o,i);if(l>-1){var f=this.data,u=f[l+0],v=f[l+1],m=f[l+2],x=f[l+3];a.setTo(u,v,m,x)}return a},getPixels:function(o,i,a,l){o===void 0&&(o=0),i===void 0&&(i=0),a===void 0&&(a=this.width),l===void 0&&(l=a),o=Math.abs(Math.round(o)),i=Math.abs(Math.round(i));for(var f=c(o,0,this.width),u=c(o+a,0,this.width),v=c(i,0,this.height),m=c(i+l,0,this.height),x=new h,g=[],y=v;y<m;y++){for(var T=[],C=f;C<u;C++)x=this.getPixel(C,y,x),T.push({x:C,y,color:x.color,alpha:x.alphaGL});g.push(T)}return g},getIndex:function(o,i){return o=Math.abs(Math.round(o)),i=Math.abs(Math.round(i)),o<this.width&&i<this.height?(o+i*this.width)*4:-1},refresh:function(){return this._source.update(),this},getCanvas:function(){return this.canvas},getContext:function(){return this.context},clear:function(o,i,a,l,f){return o===void 0&&(o=0),i===void 0&&(i=0),a===void 0&&(a=this.width),l===void 0&&(l=this.height),f===void 0&&(f=!0),this.context.clearRect(o,i,a,l),f&&this.update(),this},setSize:function(o,i){return i===void 0&&(i=o),(o!==this.width||i!==this.height)&&(this.canvas.width=o,this.canvas.height=i,this._source.width=o,this._source.height=i,this._source.isPowerOf2=n(o,i),this.frames.__BASE.setSize(o,i,0,0),this.width=o,this.height=i,this.refresh()),this},destroy:function(){e.prototype.destroy.call(this),this._source=null,this.canvas=null,this.context=null,this.imageData=null,this.data=null,this.pixels=null,this.buffer=null}});p.exports=s}),81320:((p,S,t)=>{var d=t(10312),c=t(38058),h=t(27919),r=t(83419),n=t(8054),e=t(4327),s=t(95540),o=t(36060),i=t(32302),a=t(79237),l=t(70554),f=new r({Extends:a,initialize:function(v,m,x,g,y){x===void 0&&(x=256),g===void 0&&(g=256),y===void 0&&(y=!0),this.type="DynamicTexture";var T=v.game.renderer,C=T&&T.type===n.CANVAS,E=C?h.create2D(this,x,g):[this];a.call(this,v,m,E,x,g),this.add("__BASE",0,0,0,x,g),this.renderer=T,this.width=-1,this.height=-1,this.isDrawing=!1,this.canvas=C?E:null,this.context=C?E.getContext("2d",{willReadFrequently:!0}):null,this.dirty=!1,this.isSpriteTexture=!0,this._eraseMode=!1,this.camera=new c(0,0,x,g).setScene(v.game.scene.systemScene,!1),this.renderTarget=C?null:new i(T,x,g,1,0,!1,!1,!0,!1),this.pipeline=C?null:T.pipelines.get(o.SINGLE_PIPELINE),this.setSize(x,g,y)},setSize:function(u,v,m){v===void 0&&(v=u),m===void 0&&(m=!0),m&&(u=Math.floor(u),v=Math.floor(v),u%2!==0&&u++,v%2!==0&&v++);var x=this.get(),g=x.source;if(u!==this.width||v!==this.height){this.canvas&&(this.canvas.width=u,this.canvas.height=v);var y=this.renderTarget;y&&(y.willResize(u,v)&&y.resize(u,v),y.texture!==g.glTexture&&this.renderer.deleteTexture(g.glTexture),this.setFromRenderTarget()),this.camera.setSize(u,v),g.width=u,g.height=v,x.setSize(u,v),this.width=u,this.height=v}else{var T=this.getSourceImage();x.cutX+u>T.width&&(u=T.width-x.cutX),x.cutY+v>T.height&&(v=T.height-x.cutY),x.setSize(u,v,x.cutX,x.cutY)}return this},setFromRenderTarget:function(){var u=this.get(),v=u.source,m=this.renderTarget;return v.isRenderTexture=!0,v.isGLTexture=!0,v.glTexture=m.texture,this},setIsSpriteTexture:function(u){return this.isSpriteTexture=u,this},fill:function(u,v,m,x,g,y){var T=this.camera,C=this.renderer;v===void 0&&(v=1),m===void 0&&(m=0),x===void 0&&(x=0),g===void 0&&(g=this.width),y===void 0&&(y=this.height);var E=u>>16&255,M=u>>8&255,P=u&255,A=this.renderTarget;if(T.preRender(),A){A.bind(!0);var R=this.pipeline.manager.set(this.pipeline),F=C.width/A.width,w=C.height/A.height,I=A.height-(x+y);R.drawFillRect(m*F,I*w,g*F,y*w,l.getTintFromFloats(P/255,M/255,E/255,1),v),A.unbind(!0)}else{var U=this.context;C.setContext(U),U.globalCompositeOperation="source-over",U.fillStyle="rgba("+E+","+M+","+P+","+v+")",U.fillRect(m,x,g,y),C.setContext()}return this.dirty=!0,this},clear:function(u,v,m,x){if(this.dirty){var g=this.context,y=this.renderTarget;y?y.clear(u,v,m,x):g&&(u!==void 0&&v!==void 0&&m!==void 0&&x!==void 0?g.clearRect(u,v,m,x):(g.save(),g.setTransform(1,0,0,1,0,0),g.clearRect(0,0,this.width,this.height),g.restore())),this.dirty=!1}return this},stamp:function(u,v,m,x,g){m===void 0&&(m=0),x===void 0&&(x=0);var y=s(g,"alpha",1),T=s(g,"tint",16777215),C=s(g,"angle",0),E=s(g,"rotation",0),M=s(g,"scale",1),P=s(g,"scaleX",M),A=s(g,"scaleY",M),R=s(g,"originX",.5),F=s(g,"originY",.5),w=s(g,"blendMode",0),I=s(g,"erase",!1),U=s(g,"skipBatch",!1),N=this.manager.resetStamp(y,T);return N.setAngle(0),C!==0?N.setAngle(C):E!==0&&N.setRotation(E),N.setScale(P,A),N.setTexture(u,v),N.setOrigin(R,F),N.setBlendMode(w),I&&(this._eraseMode=!0),U?this.batchGameObject(N,m,x):this.draw(N,m,x),I&&(this._eraseMode=!1),this},erase:function(u,v,m){return this._eraseMode=!0,this.draw(u,v,m),this._eraseMode=!1,this},draw:function(u,v,m,x,g){return this.beginDraw(),this.batchDraw(u,v,m,x,g),this.endDraw(),this},drawFrame:function(u,v,m,x,g,y){return this.beginDraw(),this.batchDrawFrame(u,v,m,x,g,y),this.endDraw(),this},repeat:function(u,v,m,x,g,y,T,C,E){if(m===void 0&&(m=0),x===void 0&&(x=0),g===void 0&&(g=this.width),y===void 0&&(y=this.height),T===void 0&&(T=1),C===void 0&&(C=16777215),E===void 0&&(E=!1),u instanceof e?v=u:v=this.manager.getFrame(u,v),!v)return this;var M=this.manager.resetStamp(T,C);M.setFrame(v),M.setOrigin(0);var P=v.width,A=v.height;g=Math.floor(g),y=Math.floor(y);var R=Math.ceil(g/P),F=Math.ceil(y/A),w=R*P-g,I=F*A-y;w>0&&(w=P-w),I>0&&(I=A-I),m<0&&(R+=Math.ceil(Math.abs(m)/P)),x<0&&(F+=Math.ceil(Math.abs(x)/A));var U=m,N=x,D=!1,B=this.manager.stampCrop.setTo(0,0,P,A);E||this.beginDraw();for(var L=0;L<F;L++){if(N+A<0){N+=A;continue}for(var G=0;G<R;G++){if(D=!1,U+P<0){U+=P;continue}else U<0&&(D=!0,B.width=P+U,B.x=P-B.width);N<0&&(D=!0,B.height=A+N,B.y=A-B.height),w>0&&G===R-1&&(D=!0,B.width=w),I>0&&L===F-1&&(D=!0,B.height=I),D&&M.setCrop(B),this.batchGameObject(M,U,N),M.isCropped=!1,B.setTo(0,0,P,A),U+=P}U=m,N+=A}return E||this.endDraw(),this},beginDraw:function(){if(!this.isDrawing){var u=this.camera,v=this.renderer,m=this.renderTarget;u.preRender(),m?v.beginCapture(m.width,m.height):v.setContext(this.context),this.isDrawing=!0}return this},batchDraw:function(u,v,m,x,g){return Array.isArray(u)||(u=[u]),this.batchList(u,v,m,x,g),this},batchDrawFrame:function(u,v,m,x,g,y){m===void 0&&(m=0),x===void 0&&(x=0),g===void 0&&(g=1),y===void 0&&(y=16777215);var T=this.manager.getFrame(u,v);return T&&(this.renderTarget?this.pipeline.batchTextureFrame(T,m,x,y,g,this.camera.matrix,null):this.batchTextureFrame(T,m,x,g,y)),this},endDraw:function(u){if(u===void 0&&(u=this._eraseMode),this.isDrawing){var v=this.renderer,m=this.renderTarget;if(m){var x=v.endCapture(),g=v.pipelines.setUtility();g.blitFrame(x,m,1,!1,!1,u,this.isSpriteTexture),v.resetScissor(),v.resetViewport()}else v.setContext();this.dirty=!0,this.isDrawing=!1}return this},batchList:function(u,v,m,x,g){var y=u.length;if(y!==0)for(var T=0;T<y;T++){var C=u[T];!C||C===this||(C.renderWebGL||C.renderCanvas?this.batchGameObject(C,v,m):C.isParent||C.list?this.batchGroup(C.getChildren(),v,m):typeof C=="string"?this.batchTextureFrameKey(C,null,v,m,x,g):C instanceof e?this.batchTextureFrame(C,v,m,x,g):Array.isArray(C)&&this.batchList(C,v,m,x,g))}},batchGroup:function(u,v,m){v===void 0&&(v=0),m===void 0&&(m=0);for(var x=0;x<u.length;x++){var g=u[x];g.willRender(this.camera)&&this.batchGameObject(g,g.x+v,g.y+m)}},batchGameObject:function(u,v,m){v===void 0&&(v=u.x),m===void 0&&(m=u.y);var x=u.x,g=u.y,y=this.camera,T=this.renderer,C=this._eraseMode,E=u.mask;if(u.setPosition(v,m),this.canvas){if(C){var M=u.blendMode;u.blendMode=d.ERASE}E&&E.preRenderCanvas(T,u,y),u.renderCanvas(T,u,y,null),E&&E.postRenderCanvas(T,u,y),C&&(u.blendMode=M)}else T&&(E&&E.preRenderWebGL(T,u,y),C||T.setBlendMode(u.blendMode),u.renderWebGL(T,u,y),E&&E.postRenderWebGL(T,y,this.renderTarget));u.setPosition(x,g)},batchTextureFrameKey:function(u,v,m,x,g,y){var T=this.manager.getFrame(u,v);T&&this.batchTextureFrame(T,m,x,g,y)},batchTextureFrame:function(u,v,m,x,g){v===void 0&&(v=0),m===void 0&&(m=0),x===void 0&&(x=1),g===void 0&&(g=16777215);var y=this.camera.matrix,T=this.renderTarget;if(T)this.pipeline.batchTextureFrame(u,v,m,g,x,y,null);else{var C=this.context,E=u.canvasData,M=u.source.image;C.save(),C.globalCompositeOperation=this._eraseMode?"destination-out":"source-over",C.globalAlpha=x,y.setToContext(C),E.width>0&&E.height>0&&C.drawImage(M,E.x,E.y,E.width,E.height,v,m,E.width,E.height),C.restore()}},snapshotArea:function(u,v,m,x,g,y,T){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,g,!1,u,v,m,x,y,T):this.renderer.snapshotCanvas(this.canvas,g,!1,u,v,m,x,y,T),this},snapshot:function(u,v,m){return this.snapshotArea(0,0,this.width,this.height,u,v,m)},snapshotPixel:function(u,v,m){return this.snapshotArea(u,v,1,1,m,"pixel")},getWebGLTexture:function(){if(this.renderTarget)return this.renderTarget.texture},renderWebGL:function(u,v,m,x){var g=this.manager.resetStamp();g.setTexture(this),g.setOrigin(0),g.renderWebGL(u,g,m,x)},renderCanvas:function(){},destroy:function(){var u=this.manager.stamp;u&&u.texture===this&&this.manager.resetStamp(),a.prototype.destroy.call(this),h.remove(this.canvas),this.renderTarget&&this.renderTarget.destroy(),this.camera.destroy(),this.canvas=null,this.context=null,this.renderer=null}});p.exports=f}),4327:((p,S,t)=>{var d=t(83419),c=t(45319),h=t(79291),r=new d({initialize:function(e,s,o,i,a,l,f){this.texture=e,this.name=s,this.source=e.source[o],this.sourceIndex=o,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0},is3Slice:!1,scale9:!1,scale9Borders:{x:0,y:0,w:0,h:0}},this.setSize(l,f,i,a)},setCutPosition:function(n,e){return n===void 0&&(n=0),e===void 0&&(e=0),this.cutX=n,this.cutY=e,this.updateUVs()},setCutSize:function(n,e){return this.cutWidth=n,this.cutHeight=e,this.updateUVs()},setSize:function(n,e,s,o){s===void 0&&(s=0),o===void 0&&(o=0),this.setCutPosition(s,o),this.setCutSize(n,e),this.width=n,this.height=e,this.halfWidth=Math.floor(n*.5),this.halfHeight=Math.floor(e*.5),this.centerX=Math.floor(n/2),this.centerY=Math.floor(e/2);var i=this.data,a=i.cut;a.x=s,a.y=o,a.w=n,a.h=e,a.r=s+n,a.b=o+e,i.sourceSize.w=n,i.sourceSize.h=e,i.spriteSourceSize.w=n,i.spriteSourceSize.h=e,i.radius=.5*Math.sqrt(n*n+e*e);var l=i.drawImage;return l.x=s,l.y=o,l.width=n,l.height=e,this.updateUVs()},setTrim:function(n,e,s,o,i,a){var l=this.data,f=l.spriteSourceSize;return l.trim=!0,l.sourceSize.w=n,l.sourceSize.h=e,f.x=s,f.y=o,f.w=i,f.h=a,f.r=s+i,f.b=o+a,this.x=s,this.y=o,this.width=i,this.height=a,this.halfWidth=i*.5,this.halfHeight=a*.5,this.centerX=Math.floor(i/2),this.centerY=Math.floor(a/2),this.updateUVs()},setScale9:function(n,e,s,o){var i=this.data;return i.scale9=!0,i.is3Slice=e===0&&o===this.height,i.scale9Borders.x=n,i.scale9Borders.y=e,i.scale9Borders.w=s,i.scale9Borders.h=o,this},setCropUVs:function(n,e,s,o,i,a,l){var f=this.cutX,u=this.cutY,v=this.cutWidth,m=this.cutHeight,x=this.realWidth,g=this.realHeight;e=c(e,0,x),s=c(s,0,g),o=c(o,0,x-e),i=c(i,0,g-s);var y=f+e,T=u+s,C=o,E=i,M=this.data;if(M.trim){var P=M.spriteSourceSize;o=c(o,0,P.x+v-e),i=c(i,0,P.y+m-s);var A=e+o,R=s+i,F=!(P.r<e||P.b<s||P.x>A||P.y>R);if(F){var w=Math.max(P.x,e),I=Math.max(P.y,s),U=Math.min(P.r,A)-w,N=Math.min(P.b,R)-I;C=U,E=N,a?y=f+(v-(w-P.x)-U):y=f+(w-P.x),l?T=u+(m-(I-P.y)-N):T=u+(I-P.y),e=w,s=I,o=U,i=N}else y=0,T=0,C=0,E=0}else a&&(y=f+(v-e-o)),l&&(T=u+(m-s-i));var D=this.source.width,B=this.source.height;return n.u0=Math.max(0,y/D),n.v0=Math.max(0,T/B),n.u1=Math.min(1,(y+C)/D),n.v1=Math.min(1,(T+E)/B),n.x=e,n.y=s,n.cx=y,n.cy=T,n.cw=C,n.ch=E,n.width=o,n.height=i,n.flipX=a,n.flipY=l,n},updateCropUVs:function(n,e,s){return this.setCropUVs(n,n.x,n.y,n.width,n.height,e,s)},setUVs:function(n,e,s,o,i,a){var l=this.data.drawImage;return l.width=n,l.height=e,this.u0=s,this.v0=o,this.u1=i,this.v1=a,this},updateUVs:function(){var n=this.cutX,e=this.cutY,s=this.cutWidth,o=this.cutHeight,i=this.data.drawImage;i.width=s,i.height=o;var a=this.source.width,l=this.source.height;return this.u0=n/a,this.v0=e/l,this.u1=(n+s)/a,this.v1=(e+o)/l,this},updateUVsInverted:function(){var n=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/n,this.v0=this.cutY/e,this.u1=this.cutX/n,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var n=new r(this.texture,this.name,this.sourceIndex);return n.cutX=this.cutX,n.cutY=this.cutY,n.cutWidth=this.cutWidth,n.cutHeight=this.cutHeight,n.x=this.x,n.y=this.y,n.width=this.width,n.height=this.height,n.halfWidth=this.halfWidth,n.halfHeight=this.halfHeight,n.centerX=this.centerX,n.centerY=this.centerY,n.rotated=this.rotated,n.data=h(!0,n.data,this.data),n.updateUVs(),n},destroy:function(){this.texture=null,this.source=null,this.customData=null,this.data=null},glTexture:{get:function(){return this.source.glTexture}},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},scale9:{get:function(){return this.data.scale9}},is3Slice:{get:function(){return this.data.is3Slice}},canvasData:{get:function(){return this.data.drawImage}}});p.exports=r}),79237:((p,S,t)=>{var d=t(83419),c=t(4327),h=t(11876),r='Texture "%s" has no frame "%s"',n=new d({initialize:function(s,o,i,a,l){Array.isArray(i)||(i=[i]),this.manager=s,this.key=o,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var f=0;f<i.length;f++)this.source.push(new h(this,i[f],a,l))},add:function(e,s,o,i,a,l){if(this.has(e))return null;var f=new c(this,e,s,o,i,a,l);return this.frames[e]=f,this.firstFrame==="__BASE"&&(this.firstFrame=e),this.frameTotal++,f},remove:function(e){if(this.has(e)){var s=this.get(e);return s.destroy(),delete this.frames[e],!0}return!1},has:function(e){return this.frames.hasOwnProperty(e)},get:function(e){e||(e=this.firstFrame);var s=this.frames[e];return s||(console.warn(r,this.key,e),s=this.frames[this.firstFrame]),s},getTextureSourceIndex:function(e){for(var s=0;s<this.source.length;s++)if(this.source[s]===e)return s;return-1},getFramesFromTextureSource:function(e,s){s===void 0&&(s=!1);var o=[];for(var i in this.frames)if(!(i==="__BASE"&&!s)){var a=this.frames[i];a.sourceIndex===e&&o.push(a)}return o},getFrameBounds:function(e){e===void 0&&(e=0);for(var s=this.getFramesFromTextureSource(e,!0),o=s[0],i=o.cutX,a=o.cutY,l=o.cutX+o.cutWidth,f=o.cutY+o.cutHeight,u=1;u<s.length;u++){var v=s[u];v.cutX<i&&(i=v.cutX),v.cutY<a&&(a=v.cutY),v.cutX+v.cutWidth>l&&(l=v.cutX+v.cutWidth),v.cutY+v.cutHeight>f&&(f=v.cutY+v.cutHeight)}return{x:i,y:a,width:l-i,height:f-a}},getFrameNames:function(e){e===void 0&&(e=!1);var s=Object.keys(this.frames);if(!e){var o=s.indexOf("__BASE");o!==-1&&s.splice(o,1)}return s},getSourceImage:function(e){(e==null||this.frameTotal===1)&&(e="__BASE");var s=this.frames[e];return s?s.source.image:(console.warn(r,this.key,e),this.frames.__BASE.source.image)},getDataSourceImage:function(e){(e==null||this.frameTotal===1)&&(e="__BASE");var s=this.frames[e],o;return s?o=s.sourceIndex:(console.warn(r,this.key,e),o=this.frames.__BASE.sourceIndex),this.dataSource[o].image},setDataSource:function(e){Array.isArray(e)||(e=[e]);for(var s=0;s<e.length;s++){var o=this.source[s];this.dataSource.push(new h(this,e[s],o.width,o.height))}},setFilter:function(e){var s;for(s=0;s<this.source.length;s++)this.source[s].setFilter(e);for(s=0;s<this.dataSource.length;s++)this.dataSource[s].setFilter(e)},destroy:function(){var e,s=this.source,o=this.dataSource;for(e=0;e<s.length;e++)s[e]&&s[e].destroy();for(e=0;e<o.length;e++)o[e]&&o[e].destroy();for(var i in this.frames){var a=this.frames[i];a&&a.destroy()}this.source=[],this.dataSource=[],this.frames={},this.manager.removeKey(this.key),this.manager=null}});p.exports=n}),17130:((p,S,t)=>{var d=t(27919),c=t(57382),h=t(83419),r=t(40987),n=t(8054),e=t(81320),s=t(50792),o=t(69442),i=t(4327),a=t(8443),l=t(99584),f=t(35154),u=t(88571),v=t(41212),m=t(61309),x=t(87841),g=t(79237),y=new h({Extends:s,initialize:function(C){s.call(this),this.game=C,this.name="TextureManager",this.list={},this._tempCanvas=d.create2D(this),this._tempContext=this._tempCanvas.getContext("2d",{willReadFrequently:!0}),this._pending=0,this.stamp,this.stampCrop=new x,this.silentWarnings=!1,C.events.once(a.BOOT,this.boot,this)},boot:function(){this._pending=3,this.on(o.LOAD,this.updatePending,this),this.on(o.ERROR,this.updatePending,this);var T=this.game.config;T.defaultImage!==null&&this.addBase64("__DEFAULT",T.defaultImage),T.missingImage!==null&&this.addBase64("__MISSING",T.missingImage),T.whiteImage!==null&&this.addBase64("__WHITE",T.whiteImage),this.game.renderer&&this.game.renderer.gl&&this.addUint8Array("__NORMAL",new Uint8Array([127,127,255,255]),1,1),this.game.events.once(a.DESTROY,this.destroy,this),this.game.events.once(a.SYSTEM_READY,function(C){this.stamp=new u(C).setOrigin(0)},this)},updatePending:function(){this._pending--,this._pending===0&&(this.off(o.LOAD),this.off(o.ERROR),this.emit(o.READY))},checkKey:function(T){return!T||typeof T!="string"||this.exists(T)?(this.silentWarnings||console.error("Texture key already in use: "+T),!1):!0},remove:function(T){if(typeof T=="string")if(this.exists(T))T=this.get(T);else return this.silentWarnings||console.warn("No texture found matching key: "+T),this;var C=T.key;return this.list.hasOwnProperty(C)&&(T.destroy(),this.emit(o.REMOVE,C),this.emit(o.REMOVE_KEY+C)),this},removeKey:function(T){return this.list.hasOwnProperty(T)&&delete this.list[T],this},addBase64:function(T,C){if(this.checkKey(T)){var E=this,M=new Image;M.onerror=function(){E.emit(o.ERROR,T)},M.onload=function(){var P=E.create(T,M);P&&(m.Image(P,0),E.emit(o.ADD,T,P),E.emit(o.ADD_KEY+T,P),E.emit(o.LOAD,T,P))},M.src=C}return this},getBase64:function(T,C,E,M){E===void 0&&(E="image/png"),M===void 0&&(M=.92);var P="",A=this.getFrame(T,C);if(A&&(A.source.isRenderTexture||A.source.isGLTexture))this.silentWarnings||console.warn("Cannot getBase64 from WebGL Texture");else if(A){var R=A.canvasData,F=d.create2D(this,R.width,R.height),w=F.getContext("2d",{willReadFrequently:!0});R.width>0&&R.height>0&&w.drawImage(A.source.image,R.x,R.y,R.width,R.height,0,0,R.width,R.height),P=F.toDataURL(E,M),d.remove(F)}return P},addImage:function(T,C,E){var M=null;return this.checkKey(T)&&(M=this.create(T,C),m.Image(M,0),E&&M.setDataSource(E),this.emit(o.ADD,T,M),this.emit(o.ADD_KEY+T,M)),M},addGLTexture:function(T,C){var E=null;if(this.checkKey(T)){var M=C.width,P=C.height;E=this.create(T,C,M,P),E.add("__BASE",0,0,0,M,P),this.emit(o.ADD,T,E),this.emit(o.ADD_KEY+T,E)}return E},addCompressedTexture:function(T,C,E){var M=null;if(this.checkKey(T)){if(M=this.create(T,C),M.add("__BASE",0,0,0,C.width,C.height),E){var P=function(R,F,w){Array.isArray(w.textures)||Array.isArray(w.frames)?m.JSONArray(R,F,w):m.JSONHash(R,F,w)};if(Array.isArray(E))for(var A=0;A<E.length;A++)P(M,A,E[A]);else P(M,0,E)}this.emit(o.ADD,T,M),this.emit(o.ADD_KEY+T,M)}return M},addRenderTexture:function(T,C){var E=null;return this.checkKey(T)&&(E=this.create(T,C),E.add("__BASE",0,0,0,C.width,C.height),this.emit(o.ADD,T,E),this.emit(o.ADD_KEY+T,E)),E},generate:function(T,C){if(this.checkKey(T)){var E=d.create(this,1,1);return C.canvas=E,l(C),this.addCanvas(T,E)}else return null},createCanvas:function(T,C,E){if(C===void 0&&(C=256),E===void 0&&(E=256),this.checkKey(T)){var M=d.create(this,C,E,n.CANVAS,!0);return this.addCanvas(T,M)}return null},addCanvas:function(T,C,E){E===void 0&&(E=!1);var M=null;return E?M=new c(this,T,C,C.width,C.height):this.checkKey(T)&&(M=new c(this,T,C,C.width,C.height),this.list[T]=M,this.emit(o.ADD,T,M),this.emit(o.ADD_KEY+T,M)),M},addDynamicTexture:function(T,C,E){var M=null;return typeof T=="string"&&!this.exists(T)?M=new e(this,T,C,E):(M=T,T=M.key),this.checkKey(T)?(this.list[T]=M,this.emit(o.ADD,T,M),this.emit(o.ADD_KEY+T,M)):M=null,M},addAtlas:function(T,C,E,M){return Array.isArray(E.textures)||Array.isArray(E.frames)?this.addAtlasJSONArray(T,C,E,M):this.addAtlasJSONHash(T,C,E,M)},addAtlasJSONArray:function(T,C,E,M){var P=null;if(C instanceof g?(T=C.key,P=C):this.checkKey(T)&&(P=this.create(T,C)),P){if(Array.isArray(E))for(var A=E.length===1,R=0;R<P.source.length;R++){var F=A?E[0]:E[R];m.JSONArray(P,R,F)}else m.JSONArray(P,0,E);M&&P.setDataSource(M),this.emit(o.ADD,T,P),this.emit(o.ADD_KEY+T,P)}return P},addAtlasJSONHash:function(T,C,E,M){var P=null;if(C instanceof g?(T=C.key,P=C):this.checkKey(T)&&(P=this.create(T,C)),P){if(Array.isArray(E))for(var A=0;A<E.length;A++)m.JSONHash(P,A,E[A]);else m.JSONHash(P,0,E);M&&P.setDataSource(M),this.emit(o.ADD,T,P),this.emit(o.ADD_KEY+T,P)}return P},addAtlasXML:function(T,C,E,M){var P=null;return C instanceof g?(T=C.key,P=C):this.checkKey(T)&&(P=this.create(T,C)),P&&(m.AtlasXML(P,0,E),M&&P.setDataSource(M),this.emit(o.ADD,T,P),this.emit(o.ADD_KEY+T,P)),P},addUnityAtlas:function(T,C,E,M){var P=null;return C instanceof g?(T=C.key,P=C):this.checkKey(T)&&(P=this.create(T,C)),P&&(m.UnityYAML(P,0,E),M&&P.setDataSource(M),this.emit(o.ADD,T,P),this.emit(o.ADD_KEY+T,P)),P},addSpriteSheet:function(T,C,E,M){var P=null;if(C instanceof g?(T=C.key,P=C):this.checkKey(T)&&(P=this.create(T,C)),P){var A=P.source[0].width,R=P.source[0].height;m.SpriteSheet(P,0,0,0,A,R,E),M&&P.setDataSource(M),this.emit(o.ADD,T,P),this.emit(o.ADD_KEY+T,P)}return P},addSpriteSheetFromAtlas:function(T,C){if(!this.checkKey(T))return null;var E=f(C,"atlas",null),M=f(C,"frame",null);if(!(!E||!M)){var P=this.get(E),A=P.get(M);if(A){var R=A.source.image;R||(R=A.source.glTexture);var F=this.create(T,R);return A.trimmed?m.SpriteSheetFromAtlas(F,A,C):m.SpriteSheet(F,0,A.cutX,A.cutY,A.cutWidth,A.cutHeight,C),this.emit(o.ADD,T,F),this.emit(o.ADD_KEY+T,F),F}}},addUint8Array:function(T,C,E,M){if(!this.checkKey(T)||C.length/4!==E*M)return null;var P=this.create(T,C,E,M);return P.add("__BASE",0,0,0,E,M),this.emit(o.ADD,T,P),this.emit(o.ADD_KEY+T,P),P},create:function(T,C,E,M){var P=null;return this.checkKey(T)&&(P=new g(this,T,C,E,M),this.list[T]=P),P},exists:function(T){return this.list.hasOwnProperty(T)},get:function(T){return T===void 0&&(T="__DEFAULT"),this.list[T]?this.list[T]:T instanceof g?T:T instanceof i?T.texture:this.list.__MISSING},cloneFrame:function(T,C){if(this.list[T])return this.list[T].get(C).clone()},getFrame:function(T,C){if(this.list[T])return this.list[T].get(C)},parseFrame:function(T){if(T){if(typeof T=="string")return this.getFrame(T);if(Array.isArray(T)&&T.length===2)return this.getFrame(T[0],T[1]);if(v(T))return this.getFrame(T.key,T.frame);if(T instanceof g)return T.get();if(T instanceof i)return T}else return},getTextureKeys:function(){var T=[];for(var C in this.list)C!=="__DEFAULT"&&C!=="__MISSING"&&C!=="__WHITE"&&C!=="__NORMAL"&&T.push(C);return T},getPixel:function(T,C,E,M){var P=this.getFrame(E,M);if(P){T-=P.x,C-=P.y;var A=P.data.cut;if(T+=A.x,C+=A.y,T>=A.x&&T<A.r&&C>=A.y&&C<A.b){var R=this._tempContext;R.clearRect(0,0,1,1),R.drawImage(P.source.image,T,C,1,1,0,0,1,1);var F=R.getImageData(0,0,1,1);return new r(F.data[0],F.data[1],F.data[2],F.data[3])}}return null},getPixelAlpha:function(T,C,E,M){var P=this.getFrame(E,M);if(P){T-=P.x,C-=P.y;var A=P.data.cut;if(T+=A.x,C+=A.y,T>=A.x&&T<A.r&&C>=A.y&&C<A.b){var R=this._tempContext;R.clearRect(0,0,1,1),R.drawImage(P.source.image,T,C,1,1,0,0,1,1);var F=R.getImageData(0,0,1,1);return F.data[3]}}return null},setTexture:function(T,C,E){return this.list[C]&&(T.texture=this.list[C],T.frame=T.texture.get(E)),T},renameTexture:function(T,C){var E=this.get(T);return E&&T!==C?(E.key=C,this.list[C]=E,delete this.list[T],!0):!1},each:function(T,C){for(var E=[null],M=1;M<arguments.length;M++)E.push(arguments[M]);for(var P in this.list)E[0]=this.list[P],T.apply(C,E)},resetStamp:function(T,C){T===void 0&&(T=1),C===void 0&&(C=16777215);var E=this.stamp;return E.setCrop(),E.setPosition(0),E.setAngle(0),E.setScale(1),E.setAlpha(T),E.setTint(C),E.setTexture("__WHITE"),E},destroy:function(){for(var T in this.list)this.list[T].destroy();this.list={},this.stamp.destroy(),this.game=null,this.stamp=null,d.remove(this._tempCanvas)}});p.exports=y}),11876:((p,S,t)=>{var d=t(27919),c=t(83419),h=t(50030),r=t(29795),n=t(82751),e=new c({initialize:function(o,i,a,l,f){f===void 0&&(f=!1);var u=o.manager.game;this.renderer=u.renderer,this.texture=o,this.source=i,this.image=i.compressed?null:i,this.compressionAlgorithm=i.compressed?i.format:null,this.resolution=1,this.width=a||i.naturalWidth||i.videoWidth||i.width||0,this.height=l||i.naturalHeight||i.videoHeight||i.height||0,this.scaleMode=r.DEFAULT,this.isCanvas=i instanceof HTMLCanvasElement,this.isVideo=window.hasOwnProperty("HTMLVideoElement")&&i instanceof HTMLVideoElement,this.isRenderTexture=i.type==="RenderTexture"||i.type==="DynamicTexture",this.isGLTexture=i instanceof n,this.isPowerOf2=h(this.width,this.height),this.glTexture=null,this.flipY=f,this.init(u)},init:function(s){var o=this.renderer;if(o){var i=this.source;if(o.gl){var a=this.image,l=this.flipY,f=this.width,u=this.height,v=this.scaleMode;this.isCanvas?this.glTexture=o.createCanvasTexture(a,!1,l):this.isVideo?this.glTexture=o.createVideoTexture(a,!1,l):this.isRenderTexture?this.glTexture=o.createTextureFromSource(null,f,u,v):this.isGLTexture?this.glTexture=i:this.compressionAlgorithm?this.glTexture=o.createTextureFromSource(i,void 0,void 0,v):i instanceof Uint8Array?this.glTexture=o.createUint8ArrayTexture(i,f,u,v):this.glTexture=o.createTextureFromSource(a,f,u,v)}else this.isRenderTexture&&(this.image=i.canvas)}s.config.antialias||this.setFilter(1)},setFilter:function(s){this.renderer&&this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,s),this.scaleMode=s},setFlipY:function(s){return s===void 0&&(s=!0),s===this.flipY?this:(this.flipY=s,this.update(),this)},update:function(){var s=this.renderer,o=this.image,i=this.flipY,a=s.gl;a&&this.isCanvas?s.updateCanvasTexture(o,this.glTexture,i):a&&this.isVideo&&s.updateVideoTexture(o,this.glTexture,i)},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture),this.isCanvas&&d.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});p.exports=e}),19673:(p=>{var S={LINEAR:0,NEAREST:1};p.exports=S}),44538:(p=>{p.exports="addtexture"}),63486:(p=>{p.exports="addtexture-"}),94851:(p=>{p.exports="onerror"}),29099:(p=>{p.exports="onload"}),8678:(p=>{p.exports="ready"}),86415:(p=>{p.exports="removetexture"}),30879:(p=>{p.exports="removetexture-"}),69442:((p,S,t)=>{p.exports={ADD:t(44538),ADD_KEY:t(63486),ERROR:t(94851),LOAD:t(29099),READY:t(8678),REMOVE:t(86415),REMOVE_KEY:t(30879)}}),27458:((p,S,t)=>{var d=t(79291),c=t(19673),h={CanvasTexture:t(57382),DynamicTexture:t(81320),Events:t(69442),FilterMode:c,Frame:t(4327),Parsers:t(61309),Texture:t(79237),TextureManager:t(17130),TextureSource:t(11876)};h=d(!1,h,c),p.exports=h}),89905:(p=>{var S=function(t,d,c){if(!c.getElementsByTagName("TextureAtlas")){console.warn("Invalid Texture Atlas XML given");return}var h=t.source[d];t.add("__BASE",d,0,0,h.width,h.height);for(var r=c.getElementsByTagName("SubTexture"),n,e=0;e<r.length;e++){var s=r[e].attributes,o=s.name.value,i=parseInt(s.x.value,10),a=parseInt(s.y.value,10),l=parseInt(s.width.value,10),f=parseInt(s.height.value,10);if(n=t.add(o,d,i,a,l,f),s.frameX){var u=Math.abs(parseInt(s.frameX.value,10)),v=Math.abs(parseInt(s.frameY.value,10)),m=parseInt(s.frameWidth.value,10),x=parseInt(s.frameHeight.value,10);n.setTrim(l,f,u,v,m,x)}}return t};p.exports=S}),72893:(p=>{var S=function(t,d){var c=t.source[d];return t.add("__BASE",d,0,0,c.width,c.height),t};p.exports=S}),4832:(p=>{var S=function(t,d){var c=t.source[d];return t.add("__BASE",d,0,0,c.width,c.height),t};p.exports=S}),78566:((p,S,t)=>{var d=t(41786),c=function(h,r,n){if(!n.frames&&!n.textures){console.warn("Invalid Texture Atlas JSON Array");return}var e=h.source[r];h.add("__BASE",r,0,0,e.width,e.height);for(var s=Array.isArray(n.textures)?n.textures[r].frames:n.frames,o,i=0;i<s.length;i++){var a=s[i];if(o=h.add(a.filename,r,a.frame.x,a.frame.y,a.frame.w,a.frame.h),!o){console.warn("Invalid atlas json, frame already exists: "+a.filename);continue}a.trimmed&&o.setTrim(a.sourceSize.w,a.sourceSize.h,a.spriteSourceSize.x,a.spriteSourceSize.y,a.spriteSourceSize.w,a.spriteSourceSize.h),a.rotated&&(o.rotated=!0,o.updateUVsInverted());var l=a.anchor||a.pivot;l&&(o.customPivot=!0,o.pivotX=l.x,o.pivotY=l.y),a.scale9Borders&&o.setScale9(a.scale9Borders.x,a.scale9Borders.y,a.scale9Borders.w,a.scale9Borders.h),o.customData=d(a)}for(var f in n)f!=="frames"&&(Array.isArray(n[f])?h.customData[f]=n[f].slice(0):h.customData[f]=n[f]);return h};p.exports=c}),39711:((p,S,t)=>{var d=t(41786),c=function(h,r,n){if(!n.frames){console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object");return}var e=h.source[r];h.add("__BASE",r,0,0,e.width,e.height);var s=n.frames,o;for(var i in s)if(s.hasOwnProperty(i)){var a=s[i];if(o=h.add(i,r,a.frame.x,a.frame.y,a.frame.w,a.frame.h),!o){console.warn("Invalid atlas json, frame already exists: "+i);continue}a.trimmed&&o.setTrim(a.sourceSize.w,a.sourceSize.h,a.spriteSourceSize.x,a.spriteSourceSize.y,a.spriteSourceSize.w,a.spriteSourceSize.h),a.rotated&&(o.rotated=!0,o.updateUVsInverted());var l=a.anchor||a.pivot;l&&(o.customPivot=!0,o.pivotX=l.x,o.pivotY=l.y),a.scale9Borders&&o.setScale9(a.scale9Borders.x,a.scale9Borders.y,a.scale9Borders.w,a.scale9Borders.h),o.customData=d(a)}for(var f in n)f!=="frames"&&(Array.isArray(n[f])?h.customData[f]=n[f].slice(0):h.customData[f]=n[f]);return h};p.exports=c}),31403:(p=>{var S=function(t){var d=[171,75,84,88,32,49,49,187,13,10,26,10],c,h=new Uint8Array(t,0,12);for(c=0;c<h.length;c++)if(h[c]!==d[c]){console.warn("KTXParser - Invalid file format");return}var r=Uint32Array.BYTES_PER_ELEMENT,n=new DataView(t,12,13*r),e=n.getUint32(0,!0)===67305985,s=n.getUint32(1*r,e);if(s!==0){console.warn("KTXParser - Only compressed formats supported");return}var o=n.getUint32(4*r,e),i=n.getUint32(6*r,e),a=n.getUint32(7*r,e),l=Math.max(1,n.getUint32(11*r,e)),f=n.getUint32(12*r,e),u=new Array(l),v=64+f,m=i,x=a;for(c=0;c<l;c++){var g=new Int32Array(t,v,1)[0];v+=4,u[c]={data:new Uint8Array(t,v,g),width:m,height:x},m=Math.max(1,m>>1),x=Math.max(1,x>>1),v+=g}return{mipmaps:u,width:i,height:a,internalFormat:o,compressed:!0,generateMipmap:!1}};p.exports=S}),82038:(p=>{function S(C,E,M,P,A,R,F){return F===void 0&&(F=16),Math.floor((C+M)/A)*Math.floor((E+P)/R)*F}function t(C,E){return C=Math.max(C,16),E=Math.max(E,8),C*E/4}function d(C,E){return C=Math.max(C,8),E=Math.max(E,8),C*E/2}function c(C,E){return Math.ceil(C/4)*Math.ceil(E/4)*16}function h(C,E){return S(C,E,3,3,4,4,8)}function r(C,E){return S(C,E,3,3,4,4)}function n(C,E){return S(C,E,4,3,5,4)}function e(C,E){return S(C,E,4,4,5,5)}function s(C,E){return S(C,E,5,4,6,5)}function o(C,E){return S(C,E,5,5,6,6)}function i(C,E){return S(C,E,7,4,8,5)}function a(C,E){return S(C,E,7,5,8,6)}function l(C,E){return S(C,E,7,7,8,8)}function f(C,E){return S(C,E,9,4,10,5)}function u(C,E){return S(C,E,9,5,10,6)}function v(C,E){return S(C,E,9,7,10,8)}function m(C,E){return S(C,E,9,9,10,10)}function x(C,E){return S(C,E,11,9,12,10)}function g(C,E){return S(C,E,11,11,12,12)}var y={0:{sizeFunc:t,glFormat:[35841]},1:{sizeFunc:t,glFormat:[35843]},2:{sizeFunc:d,glFormat:[35840]},3:{sizeFunc:d,glFormat:[35842]},6:{sizeFunc:h,glFormat:[36196]},7:{sizeFunc:h,glFormat:[33776,35916]},8:{sizeFunc:r,glFormat:[33777,35917]},9:{sizeFunc:r,glFormat:[33778,35918]},11:{sizeFunc:r,glFormat:[33779,35919]},14:{sizeFunc:c,glFormat:[36494,36495]},15:{sizeFunc:c,glFormat:[36492,36493]},22:{sizeFunc:h,glFormat:[37492,37493]},23:{sizeFunc:r,glFormat:[37496,37497]},24:{sizeFunc:h,glFormat:[37494,37495]},25:{sizeFunc:h,glFormat:[37488]},26:{sizeFunc:r,glFormat:[37490]},27:{sizeFunc:r,glFormat:[37808,37840]},28:{sizeFunc:n,glFormat:[37809,37841]},29:{sizeFunc:e,glFormat:[37810,37842]},30:{sizeFunc:s,glFormat:[37811,37843]},31:{sizeFunc:o,glFormat:[37812,37844]},32:{sizeFunc:i,glFormat:[37813,37845]},33:{sizeFunc:a,glFormat:[37814,37846]},34:{sizeFunc:l,glFormat:[37815,37847]},35:{sizeFunc:f,glFormat:[37816,37848]},36:{sizeFunc:u,glFormat:[37817,37849]},37:{sizeFunc:v,glFormat:[37818,37850]},38:{sizeFunc:m,glFormat:[37819,37851]},39:{sizeFunc:x,glFormat:[37820,37852]},40:{sizeFunc:g,glFormat:[37821,37853]}},T=function(C){for(var E=new Uint32Array(C,0,13),M=E[0],P=M===55727696,A=P?E[2]:E[3],R=E[4],F=y[A].glFormat[R],w=y[A].sizeFunc,I=E[11],U=E[7],N=E[6],D=52+E[12],B=new Uint8Array(C,D),L=new Array(I),G=0,O=U,X=N,z=0;z<I;z++){var V=w(O,X);L[z]={data:new Uint8Array(B.buffer,B.byteOffset+G,V),width:O,height:X},O=Math.max(1,O>>1),X=Math.max(1,X>>1),G+=V}return{mipmaps:L,width:U,height:N,internalFormat:F,compressed:!0,generateMipmap:!1}};p.exports=T}),75549:((p,S,t)=>{var d=t(95540),c=function(h,r,n,e,s,o,i){var a=d(i,"frameWidth",null),l=d(i,"frameHeight",a);if(a===null)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var f=h.source[r];h.add("__BASE",r,0,0,f.width,f.height);var u=d(i,"startFrame",0),v=d(i,"endFrame",-1),m=d(i,"margin",0),x=d(i,"spacing",0),g=Math.floor((s-m+x)/(a+x)),y=Math.floor((o-m+x)/(l+x)),T=g*y;T===0&&console.warn("SpriteSheet frame dimensions will result in zero frames for texture:",h.key),(u>T||u<-T)&&(u=0),u<0&&(u=T+u),(v===-1||v>T||v<u)&&(v=T);for(var C=m,E=m,M=0,P=0,A=0,R=0;R<T;R++){M=0,P=0;var F=C+a,w=E+l;F>s&&(M=F-s),w>o&&(P=w-o),R>=u&&R<=v&&(h.add(A,r,n+C,e+E,a-M,l-P),A++),C+=a+x,C+a>s&&(C=m,E+=l+x)}return h};p.exports=c}),47534:((p,S,t)=>{var d=t(95540),c=function(h,r,n){var e=d(n,"frameWidth",null),s=d(n,"frameHeight",e);if(!e)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var o=h.source[0];h.add("__BASE",0,0,0,o.width,o.height),d(n,"startFrame",0),d(n,"endFrame",-1);for(var i=d(n,"margin",0),a=d(n,"spacing",0),l=r.cutX,f=r.cutY,u=r.cutWidth,v=r.cutHeight,m=r.realWidth,x=r.realHeight,g=Math.floor((m-i+a)/(e+a)),y=Math.floor((x-i+a)/(s+a)),T=r.x,C=e-T,E=e-(m-u-T),M=r.y,P=s-M,A=s-(x-v-M),R,F=i,w=i,I=0,U=0,N=0;N<y;N++){for(var D=N===0,B=N===y-1,L=0;L<g;L++){var G=L===0,O=L===g-1;if(R=h.add(I,U,l+F,f+w,e,s),G||D||O||B){var X=G?T:0,z=D?M:0,V=0,Y=0;G&&(V+=e-C),O&&(V+=e-E),D&&(Y+=s-P),B&&(Y+=s-A);var W=e-V,H=s-Y;R.cutWidth=W,R.cutHeight=H,R.setTrim(e,s,X,z,W,H)}F+=a,G?F+=C:O?F+=E:F+=e,I++}F=i,w+=a,D?w+=P:B?w+=A:w+=s}return h};p.exports=c}),86147:(p=>{var S=0,t=function(c,h,r,n){var e=S-n.y-n.height;c.add(r,h,n.x,e,n.width,n.height)},d=function(c,h,r){var n=c.source[h];c.add("__BASE",h,0,0,n.width,n.height),S=n.height;for(var e=r.split(`
|
|
`),s=/^[ ]*(- )*(\w+)+[: ]+(.*)/,o="",i="",a={x:0,y:0,width:0,height:0},l=0;l<e.length;l++){var f=e[l].match(s);if(f){var u=f[1]==="- ",v=f[2],m=f[3];if(u&&(i!==o&&(t(c,h,i,a),o=i),a={x:0,y:0,width:0,height:0}),v==="name"){i=m;continue}switch(v){case"x":case"y":case"width":case"height":a[v]=parseInt(m,10);break}}}return i!==o&&t(c,h,i,a),c};p.exports=d}),55222:((p,S,t)=>{var d=t(50030),c=function(o){for(var i=o.mipmaps,a=1;a<i.length;a++){var l=i[a].width,f=i[a].height;if(!d(l,f))return console.warn("Mip level "+a+" is not a power-of-two size: "+l+"x"+f),!1}var u=s[o.internalFormat];return u?u(o):(console.warn("No format checker found for internal format "+o.internalFormat+". Assuming valid."),!0)};function h(o){for(var i=o.mipmaps,a=0;a<i.length;a++){var l=i[a].width,f=i[a].height;if((l<<a)%4!==0||(f<<a)%4!==0)return console.warn("BPTC, RGTC, and S3TC dimensions must be a multiple of 4 pixels, and each successive mip level must be half the size of the previous level, rounded down. Mip level "+a+" is "+l+"x"+f),!1}return!0}function r(){return!0}function n(o){var i=o.mipmaps,a=i[0];return d(a.width,a.height)?!0:(console.warn("PVRTC base dimensions must be power of two. Base level is "+a.width+"x"+a.height),!1)}function e(o){var i=o.mipmaps,a=i[0];return a.width%4!==0||a.height%4!==0?(console.warn("S3TC SRGB base dimensions must be a multiple of 4 pixels. Base level is "+a.width+"x"+a.height+" pixels"),!1):!0}var s={37488:r,37489:r,37490:r,37491:r,37492:r,37493:r,37494:r,37495:r,37496:r,37497:r,36196:r,37808:r,37809:r,37810:r,37811:r,37812:r,37813:r,37814:r,37815:r,37816:r,37817:r,37818:r,37819:r,37820:r,37821:r,37840:r,37841:r,37842:r,37843:r,37844:r,37845:r,37846:r,37847:r,37848:r,37849:r,37850:r,37851:r,37852:r,37853:r,36492:h,36493:h,36494:h,36495:h,36283:h,36284:h,36285:h,36286:h,35840:n,35841:n,35842:n,35843:n,33776:h,33777:h,33778:h,33779:h,35916:e,35917:e,35918:e,35919:e};p.exports=c}),61309:((p,S,t)=>{p.exports={AtlasXML:t(89905),Canvas:t(72893),Image:t(4832),JSONArray:t(78566),JSONHash:t(39711),KTXParser:t(31403),PVRParser:t(82038),SpriteSheet:t(75549),SpriteSheetFromAtlas:t(47534),UnityYAML:t(86147)}}),80341:(p=>{p.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}}),16536:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r,n,e,s,o,i,a){(e===void 0||e<=0)&&(e=32),(s===void 0||s<=0)&&(s=32),o===void 0&&(o=0),i===void 0&&(i=0),this.name=r,this.firstgid=n|0,this.imageWidth=e|0,this.imageHeight=s|0,this.imageMargin=o|0,this.imageSpacing=i|0,this.properties=a||{},this.images=[],this.total=0},containsImageIndex:function(h){return h>=this.firstgid&&h<this.firstgid+this.total},addImage:function(h,r,n,e){return this.images.push({gid:h,image:r,width:n,height:e}),this.total++,this}});p.exports=c}),27462:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r){if(this.gids=[],r!==void 0)for(var n=0;n<r.length;++n)for(var e=r[n],s=0;s<e.total;++s)this.gids[e.firstgid+s]=e;this._gids=this.gids},enabled:{get:function(){return!!this.gids},set:function(h){this.gids=h?this._gids:void 0}},getTypeIncludingTile:function(h){if(h.type!==void 0&&h.type!=="")return h.type;if(!(!this.gids||h.gid===void 0)){var r=this.gids[h.gid];if(r){var n=r.getTileData(h.gid);if(n)return n.type}}},setTextureAndFrame:function(h,r,n,e){if(r===null&&this.gids&&e.gid!==void 0){var s=this.gids[e.gid];s&&(r===null&&s.image!==void 0&&(r=s.image.key),n===null&&(n=e.gid-s.firstgid),h.scene.textures.getFrame(r,n)||(r=null,n=null))}h.setTexture(r,n)},setPropertiesFromTiledObject:function(h,r){if(this.gids!==void 0&&r.gid!==void 0){var n=this.gids[r.gid];n!==void 0&&this.setFromJSON(h,n.getTileProperties(r.gid))}this.setFromJSON(h,r.properties)},setFromJSON:function(h,r){if(r){if(Array.isArray(r)){for(var n=0;n<r.length;n++){var e=r[n];h[e.name]!==void 0?h[e.name]=e.value:h.setData(e.name,e.value)}return}for(var s in r)h[s]!==void 0?h[s]=r[s]:h.setData(s,r[s])}}});p.exports=c}),31989:((p,S,t)=>{var d=t(80341),c=t(87010),h=t(46177),r=t(49075),n=function(e,s,o,i,a,l,f,u){o===void 0&&(o=32),i===void 0&&(i=32),a===void 0&&(a=10),l===void 0&&(l=10),u===void 0&&(u=!1);var v=null;if(Array.isArray(f)){var m=s!==void 0?s:"map";v=h(m,d.ARRAY_2D,f,o,i,u)}else if(s!==void 0){var x=e.cache.tilemap.get(s);x?v=h(s,x.format,x.data,o,i,u):console.warn("No map data found for key "+s)}return v===null&&(v=new c({tileWidth:o,tileHeight:i,width:a,height:l})),new r(e,v)};p.exports=n}),23029:((p,S,t)=>{var d=t(83419),c=t(31401),h=t(91907),r=t(62644),n=t(93232),e=new d({Mixins:[c.AlphaSingle,c.Flip,c.Visible],initialize:function(o,i,a,l,f,u,v,m){this.layer=o,this.index=i,this.x=a,this.y=l,this.width=f,this.height=u,this.right,this.bottom,this.baseWidth=v!==void 0?v:f,this.baseHeight=m!==void 0?m:u,this.pixelX=0,this.pixelY=0,this.updatePixelXY(),this.properties={},this.rotation=0,this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceLeft=!1,this.faceRight=!1,this.faceTop=!1,this.faceBottom=!1,this.collisionCallback=void 0,this.collisionCallbackContext=this,this.tint=16777215,this.tintFill=!1,this.physics={}},containsPoint:function(s,o){return!(s<this.pixelX||o<this.pixelY||s>this.right||o>this.bottom)},copy:function(s){return this.index=s.index,this.alpha=s.alpha,this.properties=r(s.properties),this.visible=s.visible,this.setFlip(s.flipX,s.flipY),this.tint=s.tint,this.rotation=s.rotation,this.collideUp=s.collideUp,this.collideDown=s.collideDown,this.collideLeft=s.collideLeft,this.collideRight=s.collideRight,this.collisionCallback=s.collisionCallback,this.collisionCallbackContext=s.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(s){var o=this.tilemapLayer;if(o){var i=o.tileToWorldXY(this.x,this.y,void 0,s);return i.x}return this.x*this.baseWidth},getRight:function(s){var o=this.tilemapLayer;return o?this.getLeft(s)+this.width*o.scaleX:this.getLeft(s)+this.width},getTop:function(s){var o=this.tilemapLayer;if(o){var i=o.tileToWorldXY(this.x,this.y,void 0,s);return i.y}return this.y*this.baseWidth-(this.height-this.baseHeight)},getBottom:function(s){var o=this.tilemapLayer;return o?this.getTop(s)+this.height*o.scaleY:this.getTop(s)+this.height},getBounds:function(s,o){return o===void 0&&(o=new n),o.x=this.getLeft(s),o.y=this.getTop(s),o.width=this.getRight(s)-o.x,o.height=this.getBottom(s)-o.y,o},getCenterX:function(s){return(this.getLeft(s)+this.getRight(s))/2},getCenterY:function(s){return(this.getTop(s)+this.getBottom(s))/2},intersects:function(s,o,i,a){return!(i<=this.pixelX||a<=this.pixelY||s>=this.right||o>=this.bottom)},isInteresting:function(s,o){return s&&o?this.canCollide||this.hasInterestingFace:s?this.collides:o?this.hasInterestingFace:!1},resetCollision:function(s){if(s===void 0&&(s=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,s){var o=this.tilemapLayer;o&&this.tilemapLayer.calculateFacesAt(this.x,this.y)}return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(s,o,i,a,l){if(o===void 0&&(o=s),i===void 0&&(i=s),a===void 0&&(a=s),l===void 0&&(l=!0),this.collideLeft=s,this.collideRight=o,this.collideUp=i,this.collideDown=a,this.faceLeft=s,this.faceRight=o,this.faceTop=i,this.faceBottom=a,l){var f=this.tilemapLayer;f&&this.tilemapLayer.calculateFacesAt(this.x,this.y)}return this},setCollisionCallback:function(s,o){return s===null?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=s,this.collisionCallbackContext=o),this},setSize:function(s,o,i,a){return s!==void 0&&(this.width=s),o!==void 0&&(this.height=o),i!==void 0&&(this.baseWidth=i),a!==void 0&&(this.baseHeight=a),this.updatePixelXY(),this},updatePixelXY:function(){var s=this.layer.orientation;if(s===h.ORTHOGONAL)this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight;else if(s===h.ISOMETRIC)this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5;else if(s===h.STAGGERED)this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2);else if(s===h.HEXAGONAL){var o=this.layer.staggerAxis,i=this.layer.staggerIndex,a=this.layer.hexSideLength,l,f;o==="y"?(f=(this.baseHeight-a)/2+a,i==="odd"?this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2):this.pixelX=this.x*this.baseWidth-this.y%2*(this.baseWidth/2),this.pixelY=this.y*f):o==="x"&&(l=(this.baseWidth-a)/2+a,this.pixelX=this.x*l,i==="odd"?this.pixelY=this.y*this.baseHeight+this.x%2*(this.baseHeight/2):this.pixelY=this.y*this.baseHeight-this.x%2*(this.baseHeight/2))}return this.right=this.pixelX+this.baseWidth,this.bottom=this.pixelY+this.baseHeight,this},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback!==void 0}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var s=this.layer.tilemapLayer;if(s){var o=s.gidMap[this.index];if(o)return o}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var s=this.tilemapLayer;return s?s.tilemap:null}}});p.exports=e}),49075:((p,S,t)=>{var d=t(84101),c=t(83419),h=t(39506),r=t(80341),n=t(95540),e=t(14977),s=t(27462),o=t(91907),i=t(36305),a=t(19133),l=t(68287),f=t(23029),u=t(81086),v=t(20442),m=t(33629),x=new c({initialize:function(y,T){this.scene=y,this.tileWidth=T.tileWidth,this.tileHeight=T.tileHeight,this.width=T.width,this.height=T.height,this.orientation=T.orientation,this.renderOrder=T.renderOrder,this.format=T.format,this.version=T.version,this.properties=T.properties,this.widthInPixels=T.widthInPixels,this.heightInPixels=T.heightInPixels,this.imageCollections=T.imageCollections,this.images=T.images,this.layers=T.layers,this.tiles=T.tiles,this.tilesets=T.tilesets,this.objects=T.objects,this.currentLayerIndex=0,this.hexSideLength=T.hexSideLength;var C=this.orientation;this._convert={WorldToTileXY:u.GetWorldToTileXYFunction(C),WorldToTileX:u.GetWorldToTileXFunction(C),WorldToTileY:u.GetWorldToTileYFunction(C),TileToWorldXY:u.GetTileToWorldXYFunction(C),TileToWorldX:u.GetTileToWorldXFunction(C),TileToWorldY:u.GetTileToWorldYFunction(C),GetTileCorners:u.GetTileCornersFunction(C)}},setRenderOrder:function(g){var y=["right-down","left-down","right-up","left-up"];return typeof g=="number"&&(g=y[g]),y.indexOf(g)>-1&&(this.renderOrder=g),this},addTilesetImage:function(g,y,T,C,E,M,P,A){if(g===void 0)return null;y==null&&(y=g);var R=this.scene.sys.textures;if(!R.exists(y))return console.warn('Texture key "%s" not found',y),null;var F=R.get(y),w=this.getTilesetIndex(g);if(w===null&&this.format===r.TILED_JSON)return console.warn('Tilemap has no tileset "%s". Its tilesets are %o',g,this.tilesets),null;var I=this.tilesets[w];return I?((T||C)&&I.setTileSize(T,C),(E||M)&&I.setSpacing(E,M),I.setImage(F),I):(T===void 0&&(T=this.tileWidth),C===void 0&&(C=this.tileHeight),E===void 0&&(E=0),M===void 0&&(M=0),P===void 0&&(P=0),A===void 0&&(A={x:0,y:0}),I=new m(g,P,T,C,E,M,void 0,void 0,A),I.setImage(F),this.tilesets.push(I),this.tiles=d(this),I)},copy:function(g,y,T,C,E,M,P,A){return A=this.getLayer(A),A!==null?(u.Copy(g,y,T,C,E,M,P,A),this):null},createBlankLayer:function(g,y,T,C,E,M,P,A){T===void 0&&(T=0),C===void 0&&(C=0),E===void 0&&(E=this.width),M===void 0&&(M=this.height),P===void 0&&(P=this.tileWidth),A===void 0&&(A=this.tileHeight);var R=this.getLayerIndex(g);if(R!==null)return console.warn("Invalid Tilemap Layer ID: "+g),null;for(var F=new e({name:g,tileWidth:P,tileHeight:A,width:E,height:M,orientation:this.orientation,hexSideLength:this.hexSideLength}),w,I=0;I<M;I++){w=[];for(var U=0;U<E;U++)w.push(new f(F,-1,U,I,P,A,this.tileWidth,this.tileHeight));F.data.push(w)}this.layers.push(F),this.currentLayerIndex=this.layers.length-1;var N=new v(this.scene,this,this.currentLayerIndex,y,T,C);return N.setRenderOrder(this.renderOrder),this.scene.sys.displayList.add(N),N},createLayer:function(g,y,T,C){var E=this.getLayerIndex(g);if(E===null)return console.warn("Invalid Tilemap Layer ID: "+g),typeof g=="string"&&console.warn("Valid tilelayer names: %o",this.getTileLayerNames()),null;var M=this.layers[E];if(M.tilemapLayer)return console.warn("Tilemap Layer ID already exists:"+g),null;this.currentLayerIndex=E,T===void 0&&(T=M.x),C===void 0&&(C=M.y);var P=new v(this.scene,this,E,y,T,C);return P.setRenderOrder(this.renderOrder),this.scene.sys.displayList.add(P),P},createFromObjects:function(g,y,T){T===void 0&&(T=!0);var C=[],E=this.getObjectLayer(g);if(!E)return console.warn("createFromObjects: Invalid objectLayerName given: "+g),C;var M=new s(T?this.tilesets:void 0);Array.isArray(y)||(y=[y]);for(var P=E.objects,A=0;A<y.length;A++){var R=y[A],F=n(R,"id",null),w=n(R,"gid",null),I=n(R,"name",null),U=n(R,"type",null);M.enabled=!n(R,"ignoreTileset",null);for(var N,D=[],B=0;B<P.length;B++)N=P[B],(F===null&&w===null&&I===null&&U===null||F!==null&&N.id===F||w!==null&&N.gid===w||I!==null&&N.name===I||U!==null&&M.getTypeIncludingTile(N)===U)&&D.push(N);for(var L=n(R,"classType",l),G=n(R,"scene",this.scene),O=n(R,"container",null),X=n(R,"key",null),z=n(R,"frame",null),V=0;V<D.length;V++){N=D[V];var Y=new L(G);if(Y.setName(N.name),Y.setPosition(N.x,N.y),M.setTextureAndFrame(Y,X,z,N),N.width&&(Y.displayWidth=N.width),N.height&&(Y.displayHeight=N.height),this.orientation===o.ISOMETRIC){var W=this.tileWidth/this.tileHeight,H={x:Y.x-Y.y,y:(Y.x+Y.y)/W};Y.x=H.x,Y.y=H.y}var K={x:Y.originX*N.width,y:(Y.originY-(N.gid?1:0))*N.height};if(N.rotation){var b=h(N.rotation);i(K,b),Y.rotation=b}Y.x+=K.x,Y.y+=K.y,(N.flippedHorizontal!==void 0||N.flippedVertical!==void 0)&&Y.setFlip(N.flippedHorizontal,N.flippedVertical),N.visible||(Y.visible=!1),M.setPropertiesFromTiledObject(Y,N),O?O.add(Y):G.add.existing(Y),C.push(Y)}}return C},createFromTiles:function(g,y,T,C,E,M){return M=this.getLayer(M),M===null?null:u.CreateFromTiles(g,y,T,C,E,M)},fill:function(g,y,T,C,E,M,P){return M===void 0&&(M=!0),P=this.getLayer(P),P===null?null:(u.Fill(g,y,T,C,E,M,P),this)},filterObjects:function(g,y,T){if(typeof g=="string"){var C=g;if(g=this.getObjectLayer(g),!g)return console.warn("No object layer found with the name: "+C),null}return g.objects.filter(y,T)},filterTiles:function(g,y,T,C,E,M,P,A){return A=this.getLayer(A),A===null?null:u.FilterTiles(g,y,T,C,E,M,P,A)},findByIndex:function(g,y,T,C){return C=this.getLayer(C),C===null?null:u.FindByIndex(g,y,T,C)},findObject:function(g,y,T){if(typeof g=="string"){var C=g;if(g=this.getObjectLayer(g),!g)return console.warn("No object layer found with the name: "+C),null}return g.objects.find(y,T)||null},findTile:function(g,y,T,C,E,M,P,A){return A=this.getLayer(A),A===null?null:u.FindTile(g,y,T,C,E,M,P,A)},forEachTile:function(g,y,T,C,E,M,P,A){return A=this.getLayer(A),A===null?null:(u.ForEachTile(g,y,T,C,E,M,P,A),this)},getImageIndex:function(g){return this.getIndex(this.images,g)},getImageLayerNames:function(){return!this.images||!Array.isArray(this.images)?[]:this.images.map(function(g){return g.name})},getIndex:function(g,y){for(var T=0;T<g.length;T++)if(g[T].name===y)return T;return null},getLayer:function(g){var y=this.getLayerIndex(g);return y!==null?this.layers[y]:null},getObjectLayer:function(g){var y=this.getIndex(this.objects,g);return y!==null?this.objects[y]:null},getObjectLayerNames:function(){return!this.objects||!Array.isArray(this.objects)?[]:this.objects.map(function(g){return g.name})},getLayerIndex:function(g){return g===void 0?this.currentLayerIndex:typeof g=="string"?this.getLayerIndexByName(g):typeof g=="number"&&g<this.layers.length?g:g instanceof v&&g.tilemap===this?g.layerIndex:null},getLayerIndexByName:function(g){return this.getIndex(this.layers,g)},getTileAt:function(g,y,T,C){return C=this.getLayer(C),C===null?null:u.GetTileAt(g,y,T,C)},getTileAtWorldXY:function(g,y,T,C,E){return E=this.getLayer(E),E===null?null:u.GetTileAtWorldXY(g,y,T,C,E)},getTileLayerNames:function(){return!this.layers||!Array.isArray(this.layers)?[]:this.layers.map(function(g){return g.name})},getTilesWithin:function(g,y,T,C,E,M){return M=this.getLayer(M),M===null?null:u.GetTilesWithin(g,y,T,C,E,M)},getTilesWithinShape:function(g,y,T,C){return C=this.getLayer(C),C===null?null:u.GetTilesWithinShape(g,y,T,C)},getTilesWithinWorldXY:function(g,y,T,C,E,M,P){return P=this.getLayer(P),P===null?null:u.GetTilesWithinWorldXY(g,y,T,C,E,M,P)},getTileset:function(g){var y=this.getIndex(this.tilesets,g);return y!==null?this.tilesets[y]:null},getTilesetIndex:function(g){return this.getIndex(this.tilesets,g)},hasTileAt:function(g,y,T){return T=this.getLayer(T),T===null?null:u.HasTileAt(g,y,T)},hasTileAtWorldXY:function(g,y,T,C){return C=this.getLayer(C),C===null?null:u.HasTileAtWorldXY(g,y,T,C)},layer:{get:function(){return this.layers[this.currentLayerIndex]},set:function(g){this.setLayer(g)}},putTileAt:function(g,y,T,C,E){return C===void 0&&(C=!0),E=this.getLayer(E),E===null?null:u.PutTileAt(g,y,T,C,E)},putTileAtWorldXY:function(g,y,T,C,E,M){return C===void 0&&(C=!0),M=this.getLayer(M),M===null?null:u.PutTileAtWorldXY(g,y,T,C,E,M)},putTilesAt:function(g,y,T,C,E){return C===void 0&&(C=!0),E=this.getLayer(E),E===null?null:(u.PutTilesAt(g,y,T,C,E),this)},randomize:function(g,y,T,C,E,M){return M=this.getLayer(M),M===null?null:(u.Randomize(g,y,T,C,E,M),this)},calculateFacesAt:function(g,y,T){return T=this.getLayer(T),T===null?null:(u.CalculateFacesAt(g,y,T),this)},calculateFacesWithin:function(g,y,T,C,E){return E=this.getLayer(E),E===null?null:(u.CalculateFacesWithin(g,y,T,C,E),this)},removeLayer:function(g){var y=this.getLayerIndex(g);if(y!==null){a(this.layers,y);for(var T=y;T<this.layers.length;T++)this.layers[T].tilemapLayer&&this.layers[T].tilemapLayer.layerIndex--;return this.currentLayerIndex===y&&(this.currentLayerIndex=0),this}else return null},destroyLayer:function(g){var y=this.getLayerIndex(g);return y!==null?(g=this.layers[y],g.tilemapLayer.destroy(),a(this.layers,y),this.currentLayerIndex===y&&(this.currentLayerIndex=0),this):null},removeAllLayers:function(){for(var g=this.layers,y=0;y<g.length;y++)g[y].tilemapLayer&&g[y].tilemapLayer.destroy(!1);return g.length=0,this.currentLayerIndex=0,this},removeTile:function(g,y,T){y===void 0&&(y=-1),T===void 0&&(T=!0);var C=[];Array.isArray(g)||(g=[g]);for(var E=0;E<g.length;E++){var M=g[E];C.push(this.removeTileAt(M.x,M.y,!0,T,M.tilemapLayer)),y>-1&&this.putTileAt(y,M.x,M.y,T,M.tilemapLayer)}return C},removeTileAt:function(g,y,T,C,E){return T===void 0&&(T=!0),C===void 0&&(C=!0),E=this.getLayer(E),E===null?null:u.RemoveTileAt(g,y,T,C,E)},removeTileAtWorldXY:function(g,y,T,C,E,M){return T===void 0&&(T=!0),C===void 0&&(C=!0),M=this.getLayer(M),M===null?null:u.RemoveTileAtWorldXY(g,y,T,C,E,M)},renderDebug:function(g,y,T){return T=this.getLayer(T),T===null?null:(this.orientation===o.ORTHOGONAL&&u.RenderDebug(g,y,T),this)},renderDebugFull:function(g,y){for(var T=this.layers,C=0;C<T.length;C++)u.RenderDebug(g,y,T[C]);return this},replaceByIndex:function(g,y,T,C,E,M,P){return P=this.getLayer(P),P===null?null:(u.ReplaceByIndex(g,y,T,C,E,M,P),this)},setCollision:function(g,y,T,C,E){return y===void 0&&(y=!0),T===void 0&&(T=!0),E===void 0&&(E=!0),C=this.getLayer(C),C===null?null:(u.SetCollision(g,y,T,C,E),this)},setCollisionBetween:function(g,y,T,C,E){return T===void 0&&(T=!0),C===void 0&&(C=!0),E=this.getLayer(E),E===null?null:(u.SetCollisionBetween(g,y,T,C,E),this)},setCollisionByProperty:function(g,y,T,C){return y===void 0&&(y=!0),T===void 0&&(T=!0),C=this.getLayer(C),C===null?null:(u.SetCollisionByProperty(g,y,T,C),this)},setCollisionByExclusion:function(g,y,T,C){return y===void 0&&(y=!0),T===void 0&&(T=!0),C=this.getLayer(C),C===null?null:(u.SetCollisionByExclusion(g,y,T,C),this)},setCollisionFromCollisionGroup:function(g,y,T){return g===void 0&&(g=!0),y===void 0&&(y=!0),T=this.getLayer(T),T===null?null:(u.SetCollisionFromCollisionGroup(g,y,T),this)},setTileIndexCallback:function(g,y,T,C){return C=this.getLayer(C),C===null?null:(u.SetTileIndexCallback(g,y,T,C),this)},setTileLocationCallback:function(g,y,T,C,E,M,P){return P=this.getLayer(P),P===null?null:(u.SetTileLocationCallback(g,y,T,C,E,M,P),this)},setLayer:function(g){var y=this.getLayerIndex(g);return y!==null&&(this.currentLayerIndex=y),this},setBaseTileSize:function(g,y){this.tileWidth=g,this.tileHeight=y,this.widthInPixels=this.width*g,this.heightInPixels=this.height*y;for(var T=0;T<this.layers.length;T++){this.layers[T].baseTileWidth=g,this.layers[T].baseTileHeight=y;for(var C=this.layers[T].data,E=this.layers[T].width,M=this.layers[T].height,P=0;P<M;P++)for(var A=0;A<E;A++){var R=C[P][A];R!==null&&R.setSize(void 0,void 0,g,y)}}return this},setLayerTileSize:function(g,y,T){if(T=this.getLayer(T),T===null)return this;T.tileWidth=g,T.tileHeight=y;for(var C=T.data,E=T.width,M=T.height,P=0;P<M;P++)for(var A=0;A<E;A++){var R=C[P][A];R!==null&&R.setSize(g,y)}return this},shuffle:function(g,y,T,C,E){return E=this.getLayer(E),E===null?null:(u.Shuffle(g,y,T,C,E),this)},swapByIndex:function(g,y,T,C,E,M,P){return P=this.getLayer(P),P===null?null:(u.SwapByIndex(g,y,T,C,E,M,P),this)},tileToWorldX:function(g,y,T){return T=this.getLayer(T),T===null?null:this._convert.TileToWorldX(g,y,T)},tileToWorldY:function(g,y,T){return T=this.getLayer(T),T===null?null:this._convert.TileToWorldY(g,y,T)},tileToWorldXY:function(g,y,T,C,E){return E=this.getLayer(E),E===null?null:this._convert.TileToWorldXY(g,y,T,C,E)},getTileCorners:function(g,y,T,C){return C=this.getLayer(C),C===null?null:this._convert.GetTileCorners(g,y,T,C)},weightedRandomize:function(g,y,T,C,E,M){return M=this.getLayer(M),M===null?null:(u.WeightedRandomize(y,T,C,E,g,M),this)},worldToTileX:function(g,y,T,C){return C=this.getLayer(C),C===null?null:this._convert.WorldToTileX(g,y,T,C)},worldToTileY:function(g,y,T,C){return C=this.getLayer(C),C===null?null:this._convert.WorldToTileY(g,y,T,C)},worldToTileXY:function(g,y,T,C,E,M){return M=this.getLayer(M),M===null?null:this._convert.WorldToTileXY(g,y,T,C,E,M)},destroy:function(){this.removeAllLayers(),this.tiles.length=0,this.tilesets.length=0,this.objects.length=0,this.scene=null}});p.exports=x}),45939:((p,S,t)=>{var d=t(44603),c=t(31989);d.register("tilemap",function(h){var r=h!==void 0?h:{};return c(this.scene,r.key,r.tileWidth,r.tileHeight,r.width,r.height,r.data,r.insertNull)})}),46029:((p,S,t)=>{var d=t(39429),c=t(31989);d.register("tilemap",function(h,r,n,e,s,o,i){return h===null&&(h=void 0),r===null&&(r=void 0),n===null&&(n=void 0),e===null&&(e=void 0),s===null&&(s=void 0),c(this.scene,h,r,n,e,s,o,i)})}),20442:((p,S,t)=>{var d=t(83419),c=t(78389),h=t(31401),r=t(95643),n=t(81086),e=t(19218),s=t(26099),o=new d({Extends:r,Mixins:[h.Alpha,h.BlendMode,h.ComputedSize,h.Depth,h.Flip,h.GetBounds,h.Mask,h.Origin,h.Pipeline,h.PostPipeline,h.Transform,h.Visible,h.ScrollFactor,c,e],initialize:function(a,l,f,u,v,m){r.call(this,a,"TilemapLayer"),this.isTilemap=!0,this.tilemap=l,this.layerIndex=f,this.layer=l.layers[f],this.layer.tilemapLayer=this,this.tileset=[],this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.culledTiles=[],this.skipCull=!1,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=n.GetCullTilesFunction(this.layer.orientation),this._renderOrder=0,this.gidMap=[],this.tempVec=new s,this.collisionCategory=1,this.collisionMask=1,this.setTilesets(u),this.setAlpha(this.layer.alpha),this.setPosition(v,m),this.setOrigin(0,0),this.setSize(l.tileWidth*this.layer.width,l.tileHeight*this.layer.height),this.initPipeline(),this.initPostPipeline(!1)},setTilesets:function(i){var a=[],l=[],f=this.tilemap;Array.isArray(i)||(i=[i]);for(var u=0;u<i.length;u++){var v=i[u];if(typeof v=="string"&&(v=f.getTileset(v)),v){l.push(v);for(var m=v.firstgid,x=0;x<v.total;x++)a[m+x]=v}}this.gidMap=a,this.tileset=l},setRenderOrder:function(i){var a=["right-down","left-down","right-up","left-up"];return typeof i=="string"&&(i=a.indexOf(i)),i>=0&&i<4&&(this._renderOrder=i),this},calculateFacesAt:function(i,a){return n.CalculateFacesAt(i,a,this.layer),this},calculateFacesWithin:function(i,a,l,f){return n.CalculateFacesWithin(i,a,l,f,this.layer),this},createFromTiles:function(i,a,l,f,u){return n.CreateFromTiles(i,a,l,f,u,this.layer)},cull:function(i){return this.cullCallback(this.layer,i,this.culledTiles,this._renderOrder)},copy:function(i,a,l,f,u,v,m){return n.Copy(i,a,l,f,u,v,m,this.layer),this},fill:function(i,a,l,f,u,v){return n.Fill(i,a,l,f,u,v,this.layer),this},filterTiles:function(i,a,l,f,u,v,m){return n.FilterTiles(i,a,l,f,u,v,m,this.layer)},findByIndex:function(i,a,l){return n.FindByIndex(i,a,l,this.layer)},findTile:function(i,a,l,f,u,v,m){return n.FindTile(i,a,l,f,u,v,m,this.layer)},forEachTile:function(i,a,l,f,u,v,m){return n.ForEachTile(i,a,l,f,u,v,m,this.layer),this},setTint:function(i,a,l,f,u,v){i===void 0&&(i=16777215);var m=function(x){x.tint=i,x.tintFill=!1};return this.forEachTile(m,this,a,l,f,u,v)},setTintFill:function(i,a,l,f,u,v){i===void 0&&(i=16777215);var m=function(x){x.tint=i,x.tintFill=!0};return this.forEachTile(m,this,a,l,f,u,v)},getTileAt:function(i,a,l){return n.GetTileAt(i,a,l,this.layer)},getTileAtWorldXY:function(i,a,l,f){return n.GetTileAtWorldXY(i,a,l,f,this.layer)},getIsoTileAtWorldXY:function(i,a,l,f,u){l===void 0&&(l=!0);var v=this.tempVec;return n.IsometricWorldToTileXY(i,a,!0,v,u,this.layer,l),this.getTileAt(v.x,v.y,f)},getTilesWithin:function(i,a,l,f,u){return n.GetTilesWithin(i,a,l,f,u,this.layer)},getTilesWithinShape:function(i,a,l){return n.GetTilesWithinShape(i,a,l,this.layer)},getTilesWithinWorldXY:function(i,a,l,f,u,v){return n.GetTilesWithinWorldXY(i,a,l,f,u,v,this.layer)},hasTileAt:function(i,a){return n.HasTileAt(i,a,this.layer)},hasTileAtWorldXY:function(i,a,l){return n.HasTileAtWorldXY(i,a,l,this.layer)},putTileAt:function(i,a,l,f){return n.PutTileAt(i,a,l,f,this.layer)},putTileAtWorldXY:function(i,a,l,f,u){return n.PutTileAtWorldXY(i,a,l,f,u,this.layer)},putTilesAt:function(i,a,l,f){return n.PutTilesAt(i,a,l,f,this.layer),this},randomize:function(i,a,l,f,u){return n.Randomize(i,a,l,f,u,this.layer),this},removeTileAt:function(i,a,l,f){return n.RemoveTileAt(i,a,l,f,this.layer)},removeTileAtWorldXY:function(i,a,l,f,u){return n.RemoveTileAtWorldXY(i,a,l,f,u,this.layer)},renderDebug:function(i,a){return n.RenderDebug(i,a,this.layer),this},replaceByIndex:function(i,a,l,f,u,v){return n.ReplaceByIndex(i,a,l,f,u,v,this.layer),this},setSkipCull:function(i){return i===void 0&&(i=!0),this.skipCull=i,this},setCullPadding:function(i,a){return i===void 0&&(i=1),a===void 0&&(a=1),this.cullPaddingX=i,this.cullPaddingY=a,this},setCollision:function(i,a,l,f){return n.SetCollision(i,a,l,this.layer,f),this},setCollisionBetween:function(i,a,l,f){return n.SetCollisionBetween(i,a,l,f,this.layer),this},setCollisionByProperty:function(i,a,l){return n.SetCollisionByProperty(i,a,l,this.layer),this},setCollisionByExclusion:function(i,a,l){return n.SetCollisionByExclusion(i,a,l,this.layer),this},setCollisionFromCollisionGroup:function(i,a){return n.SetCollisionFromCollisionGroup(i,a,this.layer),this},setTileIndexCallback:function(i,a,l){return n.SetTileIndexCallback(i,a,l,this.layer),this},setTileLocationCallback:function(i,a,l,f,u,v){return n.SetTileLocationCallback(i,a,l,f,u,v,this.layer),this},shuffle:function(i,a,l,f){return n.Shuffle(i,a,l,f,this.layer),this},swapByIndex:function(i,a,l,f,u,v){return n.SwapByIndex(i,a,l,f,u,v,this.layer),this},tileToWorldX:function(i,a){return this.tilemap.tileToWorldX(i,a,this)},tileToWorldY:function(i,a){return this.tilemap.tileToWorldY(i,a,this)},tileToWorldXY:function(i,a,l,f){return this.tilemap.tileToWorldXY(i,a,l,f,this)},getTileCorners:function(i,a,l){return this.tilemap.getTileCorners(i,a,l,this)},weightedRandomize:function(i,a,l,f,u){return n.WeightedRandomize(a,l,f,u,i,this.layer),this},worldToTileX:function(i,a,l){return this.tilemap.worldToTileX(i,a,l,this)},worldToTileY:function(i,a,l){return this.tilemap.worldToTileY(i,a,l,this)},worldToTileXY:function(i,a,l,f,u){return this.tilemap.worldToTileXY(i,a,l,f,u,this)},destroy:function(i){i===void 0&&(i=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),i&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],r.prototype.destroy.call(this))}});p.exports=o}),16153:((p,S,t)=>{var d=t(61340),c=new d,h=new d,r=new d,n=function(e,s,o,i){var a=s.cull(o),l=a.length,f=o.alpha*s.alpha;if(!(l===0||f<=0)){var u=c,v=h,m=r;v.applyITRS(s.x,s.y,s.rotation,s.scaleX,s.scaleY),u.copyFrom(o.matrix);var x=e.currentContext,g=s.gidMap;x.save(),i?(u.multiplyWithOffset(i,-o.scrollX*s.scrollFactorX,-o.scrollY*s.scrollFactorY),v.e=s.x,v.f=s.y,u.multiply(v,m),m.copyToContext(x)):(v.e-=o.scrollX*s.scrollFactorX,v.f-=o.scrollY*s.scrollFactorY,v.copyToContext(x)),(!e.antialias||s.scaleX>1||s.scaleY>1)&&(x.imageSmoothingEnabled=!1);for(var y=0;y<l;y++){var T=a[y],C=g[T.index];if(C){var E=C.image.getSourceImage(),M=C.getTileTextureCoordinates(T.index),P=C.tileWidth,A=C.tileHeight;if(!(M===null||P===0||A===0)){var R=P*.5,F=A*.5;M.x+=C.tileOffset.x,M.y+=C.tileOffset.y,x.save(),x.translate(T.pixelX+R,T.pixelY+F),T.rotation!==0&&x.rotate(T.rotation),(T.flipX||T.flipY)&&x.scale(T.flipX?-1:1,T.flipY?-1:1),x.globalAlpha=f*T.alpha,x.drawImage(E,M.x,M.y,P,A,-R,-F,P,A),x.restore()}}}x.restore()}};p.exports=n}),19218:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(99558),h=t(16153),p.exports={renderWebGL:c,renderCanvas:h}}),99558:((p,S,t)=>{var d=t(70554),c=function(h,r,n){var e=r.cull(n),s=e.length,o=n.alpha*r.alpha;if(!(s===0||o<=0)){var i=r.gidMap,a=h.pipelines.set(r.pipeline,r),l=d.getTintAppendFloatAlpha,f=r.scrollFactorX,u=r.scrollFactorY,v=r.x,m=r.y,x=r.scaleX,g=r.scaleY;h.pipelines.preBatch(r);for(var y=0;y<s;y++){var T=e[y],C=i[T.index];if(C){var E=C.getTileTextureCoordinates(T.index),M=C.tileWidth,P=C.tileHeight;if(!(!E||M===0||P===0)){var A=M*.5,R=P*.5,F=C.glTexture,w=a.setTexture2D(F,r),I=M,U=P,N=E.x,D=E.y,B=C.tileOffset.x,L=C.tileOffset.y,G=l(T.tint,o*T.alpha);a.batchTexture(r,F,F.width,F.height,v+T.pixelX*x+(A*x-B),m+T.pixelY*g+(R*g-L),M,P,x,g,T.rotation,T.flipX,T.flipY,f,u,A,R,N,D,I,U,G,G,G,G,T.tintFill,0,0,n,null,!0,w,!0)}}}h.pipelines.postBatch(r)}};p.exports=c}),33629:((p,S,t)=>{var d=t(83419),c=t(26099),h=new d({initialize:function(n,e,s,o,i,a,l,f,u){(s===void 0||s<=0)&&(s=32),(o===void 0||o<=0)&&(o=32),i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l={}),f===void 0&&(f={}),this.name=n,this.firstgid=e,this.tileWidth=s,this.tileHeight=o,this.tileMargin=i,this.tileSpacing=a,this.tileProperties=l,this.tileData=f,this.tileOffset=new c,u!==void 0&&this.tileOffset.set(u.x,u.y),this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(r){return this.containsTileIndex(r)?this.tileProperties[r-this.firstgid]:null},getTileData:function(r){return this.containsTileIndex(r)?this.tileData[r-this.firstgid]:null},getTileCollisionGroup:function(r){var n=this.getTileData(r);return n&&n.objectgroup?n.objectgroup:null},containsTileIndex:function(r){return r>=this.firstgid&&r<this.firstgid+this.total},getTileTextureCoordinates:function(r){return this.containsTileIndex(r)?this.texCoordinates[r-this.firstgid]:null},setImage:function(r){this.image=r;var n=r.get(),e=r.getFrameBounds();return this.glTexture=n.source.glTexture,n.width>e.width||n.height>e.height?this.updateTileData(n.width,n.height):this.updateTileData(e.width,e.height,e.x,e.y),this},setTileSize:function(r,n){return r!==void 0&&(this.tileWidth=r),n!==void 0&&(this.tileHeight=n),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},setSpacing:function(r,n){return r!==void 0&&(this.tileMargin=r),n!==void 0&&(this.tileSpacing=n),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},updateTileData:function(r,n,e,s){e===void 0&&(e=0),s===void 0&&(s=0);var o=(n-this.tileMargin*2+this.tileSpacing)/(this.tileHeight+this.tileSpacing),i=(r-this.tileMargin*2+this.tileSpacing)/(this.tileWidth+this.tileSpacing);(o%1!==0||i%1!==0)&&console.warn("Image tile area not tile size multiple in: "+this.name),o=Math.floor(o),i=Math.floor(i),this.rows=o,this.columns=i,this.total=o*i,this.texCoordinates.length=0;for(var a=this.tileMargin+e,l=this.tileMargin+s,f=0;f<this.rows;f++){for(var u=0;u<this.columns;u++)this.texCoordinates.push({x:a,y:l}),a+=this.tileWidth+this.tileSpacing;a=this.tileMargin+e,l+=this.tileHeight+this.tileSpacing}return this}});p.exports=h}),72023:((p,S,t)=>{var d=t(7423),c=function(h,r,n){var e=d(h,r,!0,n),s=d(h,r-1,!0,n),o=d(h,r+1,!0,n),i=d(h-1,r,!0,n),a=d(h+1,r,!0,n),l=e&&e.collides;return l&&(e.faceTop=!0,e.faceBottom=!0,e.faceLeft=!0,e.faceRight=!0),s&&s.collides&&(l&&(e.faceTop=!1),s.faceBottom=!l),o&&o.collides&&(l&&(e.faceBottom=!1),o.faceTop=!l),i&&i.collides&&(l&&(e.faceLeft=!1),i.faceRight=!l),a&&a.collides&&(l&&(e.faceRight=!1),a.faceLeft=!l),e&&!e.collides&&e.resetFaces(),e};p.exports=c}),42573:((p,S,t)=>{var d=t(7423),c=t(7386),h=function(r,n,e,s,o){for(var i=null,a=null,l=null,f=null,u=c(r,n,e,s,null,o),v=0;v<u.length;v++){var m=u[v];m&&(m.collides?(i=d(m.x,m.y-1,!0,o),a=d(m.x,m.y+1,!0,o),l=d(m.x-1,m.y,!0,o),f=d(m.x+1,m.y,!0,o),m.faceTop=!(i&&i.collides),m.faceBottom=!(a&&a.collides),m.faceLeft=!(l&&l.collides),m.faceRight=!(f&&f.collides)):m.resetFaces())}};p.exports=h}),33528:((p,S,t)=>{var d=t(26099),c=new d,h=function(r,n,e,s){var o=e.tilemapLayer,i=o.cullPaddingX,a=o.cullPaddingY,l=o.tilemap.tileToWorldXY(r,n,c,s,o);return l.x>s.worldView.x+o.scaleX*e.tileWidth*(-i-.5)&&l.x<s.worldView.right+o.scaleX*e.tileWidth*(i-.5)&&l.y>s.worldView.y+o.scaleY*e.tileHeight*(-a-1)&&l.y<s.worldView.bottom+o.scaleY*e.tileHeight*(a-.5)};p.exports=h}),1785:((p,S,t)=>{var d=t(42573),c=t(7386),h=t(62991),r=t(23029),n=function(e,s,o,i,a,l,f,u){f===void 0&&(f=!0);var v=c(e,s,o,i,null,u),m=[];v.forEach(function(M){var P=new r(M.layer,M.index,M.x,M.y,M.width,M.height,M.baseWidth,M.baseHeight);P.copy(M),m.push(P)});for(var x=a-e,g=l-s,y=0;y<m.length;y++){var T=m[y],C=T.x+x,E=T.y+g;h(C,E,u)&&u.data[E][C]&&(T.x=C,T.y=E,T.updatePixelXY(),u.data[E][C]=T)}f&&d(a-1,l-1,o+2,i+2,u),v.length=0,m.length=0};p.exports=n}),78419:((p,S,t)=>{var d=t(62644),c=t(7386),h=t(27987),r=function(n,e,s,o,i,a){s||(s={}),Array.isArray(n)||(n=[n]);var l=a.tilemapLayer;o||(o=l.scene),i||(i=o.cameras.main);var f=a.width,u=a.height,v=c(0,0,f,u,null,a),m=[],x,g=function(E,M,P){for(var A=0;A<P.length;A++){var R=P[A];E.hasOwnProperty(R)||(E[R]=M[R])}};for(x=0;x<v.length;x++){var y=v[x],T=d(s);if(n.indexOf(y.index)!==-1){var C=l.tileToWorldXY(y.x,y.y,void 0,i,a);T.x=C.x,T.y=C.y,g(T,y,["rotation","flipX","flipY","alpha","visible","tint"]),T.hasOwnProperty("origin")||(T.x+=y.width*.5,T.y+=y.height*.5),T.hasOwnProperty("useSpriteSheet")&&(T.key=y.tileset.image,T.frame=y.index-y.tileset.firstgid),m.push(o.make.sprite(T))}}if(Array.isArray(e))for(x=0;x<n.length;x++)h(n[x],e[x],0,0,f,u,a);else if(e!==null)for(x=0;x<n.length;x++)h(n[x],e,0,0,f,u,a);return m};p.exports=r}),19545:((p,S,t)=>{var d=t(87841),c=t(63448),h=t(56583),r=new d,n=function(e,s){var o=e.tilemapLayer.tilemap,i=e.tilemapLayer,a=Math.floor(o.tileWidth*i.scaleX),l=Math.floor(o.tileHeight*i.scaleY),f=h(s.worldView.x-i.x,a,0,!0)-i.cullPaddingX,u=c(s.worldView.right-i.x,a,0,!0)+i.cullPaddingX,v=h(s.worldView.y-i.y,l,0,!0)-i.cullPaddingY,m=c(s.worldView.bottom-i.y,l,0,!0)+i.cullPaddingY;return r.setTo(f,v,u-f,m-v)};p.exports=n}),30003:((p,S,t)=>{var d=t(19545),c=t(32483),h=function(r,n,e,s){e===void 0&&(e=[]),s===void 0&&(s=0),e.length=0;var o=r.tilemapLayer,i=d(r,n);return(o.skipCull||o.scrollFactorX!==1||o.scrollFactorY!==1)&&(i.left=0,i.right=r.width,i.top=0,i.bottom=r.height),c(r,i,s,e),e};p.exports=h}),35137:((p,S,t)=>{var d=t(7386),c=t(42573),h=t(20576),r=function(n,e,s,o,i,a,l){for(var f=l.collideIndexes.indexOf(n)!==-1,u=d(e,s,o,i,null,l),v=0;v<u.length;v++)u[v].index=n,h(u[v],f);a&&c(e-1,s-1,o+2,i+2,l)};p.exports=r}),40253:((p,S,t)=>{var d=t(7386),c=function(h,r,n,e,s,o,i,a){var l=d(n,e,s,o,i,a);return l.filter(h,r)};p.exports=c}),52692:(p=>{var S=function(t,d,c,h){d===void 0&&(d=0),c===void 0&&(c=!1);var r=0,n,e,s;if(c){for(e=h.height-1;e>=0;e--)for(n=h.width-1;n>=0;n--)if(s=h.data[e][n],s&&s.index===t){if(r===d)return s;r+=1}}else for(e=0;e<h.height;e++)for(n=0;n<h.width;n++)if(s=h.data[e][n],s&&s.index===t){if(r===d)return s;r+=1}return null};p.exports=S}),66151:((p,S,t)=>{var d=t(7386),c=function(h,r,n,e,s,o,i,a){var l=d(n,e,s,o,i,a);return l.find(h,r)||null};p.exports=c}),97560:((p,S,t)=>{var d=t(7386),c=function(h,r,n,e,s,o,i,a){var l=d(n,e,s,o,i,a);l.forEach(h,r)};p.exports=c}),43305:((p,S,t)=>{var d=t(91907),c=t(30003),h=t(9474),r=t(14018),n=t(29747),e=t(54503),s=function(o){return o===d.ORTHOGONAL?c:o===d.HEXAGONAL?h:o===d.STAGGERED?e:o===d.ISOMETRIC?r:n};p.exports=s}),7423:((p,S,t)=>{var d=t(62991),c=function(h,r,n,e){if(d(h,r,e)){var s=e.data[r][h]||null;return s?s.index===-1?n?s:null:s:null}else return null};p.exports=c}),60540:((p,S,t)=>{var d=t(7423),c=t(26099),h=new c,r=function(n,e,s,o,i){return i.tilemapLayer.worldToTileXY(n,e,!0,h,o),d(h.x,h.y,s,i)};p.exports=r}),55826:((p,S,t)=>{var d=t(26099),c=function(h,r,n,e){var s=e.baseTileWidth,o=e.baseTileHeight,i=e.tilemapLayer,a=0,l=0;i&&(n||(n=i.scene.cameras.main),a=i.x+n.scrollX*(1-i.scrollFactorX),l=i.y+n.scrollY*(1-i.scrollFactorY),s*=i.scaleX,o*=i.scaleY);var f=a+h*s,u=l+r*o;return[new d(f,u),new d(f+s,u),new d(f+s,u+o),new d(f,u+o)]};p.exports=c}),11758:((p,S,t)=>{var d=t(91907),c=t(27229),h=t(29747),r=t(55826),n=function(e){return e===d.ORTHOGONAL?r:e===d.ISOMETRIC?h:e===d.HEXAGONAL?c:(e===d.STAGGERED,h)};p.exports=n}),39167:((p,S,t)=>{var d=t(91907),c=t(29747),h=t(97281),r=function(n){return n===d.ORTHOGONAL?h:c};p.exports=r}),62e3:((p,S,t)=>{var d=t(91907),c=t(19951),h=t(14127),r=t(29747),n=t(97202),e=t(70326),s=function(o){return o===d.ORTHOGONAL?e:o===d.ISOMETRIC?h:o===d.HEXAGONAL?c:o===d.STAGGERED?n:r};p.exports=s}),5984:((p,S,t)=>{var d=t(91907),c=t(29747),h=t(28054),r=t(29650),n=function(e){return e===d.ORTHOGONAL?r:e===d.STAGGERED?h:c};p.exports=n}),7386:((p,S,t)=>{var d=t(95540),c=function(h,r,n,e,s,o){h===void 0&&(h=0),r===void 0&&(r=0),n===void 0&&(n=o.width),e===void 0&&(e=o.height),s||(s={});var i=d(s,"isNotEmpty",!1),a=d(s,"isColliding",!1),l=d(s,"hasInterestingFace",!1);h<0&&(n+=h,h=0),r<0&&(e+=r,r=0),h+n>o.width&&(n=Math.max(o.width-h,0)),r+e>o.height&&(e=Math.max(o.height-r,0));for(var f=[],u=r;u<r+e;u++)for(var v=h;v<h+n;v++){var m=o.data[u][v];if(m!==null){if(i&&m.index===-1||a&&!m.collides||l&&!m.hasInterestingFace)continue;f.push(m)}}return f};p.exports=c}),91141:((p,S,t)=>{var d=t(55738),c=t(7386),h=t(91865),r=t(29747),n=t(26099),e=t(91907),s=function(f,u){return h.RectangleToTriangle(u,f)},o=new n,i=new n,a=new n,l=function(f,u,v,m){if(m.orientation!==e.ORTHOGONAL)return console.warn("GetTilesWithinShape only works with orthogonal tilemaps"),[];if(f===void 0)return[];var x=r;f instanceof d.Circle?x=h.CircleToRectangle:f instanceof d.Rectangle?x=h.RectangleToRectangle:f instanceof d.Triangle?x=s:f instanceof d.Line&&(x=h.LineToRectangle),m.tilemapLayer.worldToTileXY(f.left,f.top,!0,i,v);var g=i.x,y=i.y;m.tilemapLayer.worldToTileXY(f.right,f.bottom,!1,a,v);var T=Math.ceil(a.x),C=Math.ceil(a.y),E=Math.max(T-g,1),M=Math.max(C-y,1),P=c(g,y,E,M,u,m),A=m.tileWidth,R=m.tileHeight;m.tilemapLayer&&(A*=m.tilemapLayer.scaleX,R*=m.tilemapLayer.scaleY);for(var F=[],w=new d.Rectangle(0,0,A,R),I=0;I<P.length;I++){var U=P[I];m.tilemapLayer.tileToWorldXY(U.x,U.y,o,v),w.x=o.x,w.y=o.y,x(f,w)&&F.push(U)}return F};p.exports=l}),96523:((p,S,t)=>{var d=t(7386),c=t(26099),h=new c,r=new c,n=function(e,s,o,i,a,l,f){var u=f.tilemapLayer.tilemap._convert.WorldToTileXY;u(e,s,!0,h,l,f);var v=h.x,m=h.y;u(e+o,s+i,!1,r,l,f);var x=Math.ceil(r.x),g=Math.ceil(r.y);return d(v,m,x-v,g-m,a,f)};p.exports=n}),96113:((p,S,t)=>{var d=t(91907),c=t(20242),h=t(10095),r=function(n){return n===d.ORTHOGONAL?h:c};p.exports=r}),16926:((p,S,t)=>{var d=t(91907),c=t(86625),h=t(96897),r=t(29747),n=t(15108),e=t(85896),s=function(o){return o===d.ORTHOGONAL?e:o===d.ISOMETRIC?h:o===d.HEXAGONAL?c:o===d.STAGGERED?n:r};p.exports=s}),55762:((p,S,t)=>{var d=t(91907),c=t(20242),h=t(51900),r=t(63288),n=function(e){return e===d.ORTHOGONAL?r:e===d.STAGGERED?h:c};p.exports=n}),45091:((p,S,t)=>{var d=t(62991),c=function(h,r,n){if(d(h,r,n)){var e=n.data[r][h];return e!==null&&e.index>-1}else return!1};p.exports=c}),24152:((p,S,t)=>{var d=t(45091),c=t(26099),h=new c,r=function(n,e,s,o){o.tilemapLayer.worldToTileXY(n,e,!0,h,s);var i=h.x,a=h.y;return d(i,a,o)};p.exports=r}),90454:((p,S,t)=>{var d=t(63448),c=t(56583),h=function(r,n){var e=r.tilemapLayer.tilemap,s=r.tilemapLayer,o=Math.floor(e.tileWidth*s.scaleX),i=Math.floor(e.tileHeight*s.scaleY),a=r.hexSideLength,l,f,u,v;if(r.staggerAxis==="y"){var m=(i-a)/2+a;l=c(n.worldView.x-s.x,o,0,!0)-s.cullPaddingX,f=d(n.worldView.right-s.x,o,0,!0)+s.cullPaddingX,u=c(n.worldView.y-s.y,m,0,!0)-s.cullPaddingY,v=d(n.worldView.bottom-s.y,m,0,!0)+s.cullPaddingY}else{var x=(o-a)/2+a;l=c(n.worldView.x-s.x,x,0,!0)-s.cullPaddingX,f=d(n.worldView.right-s.x,x,0,!0)+s.cullPaddingX,u=c(n.worldView.y-s.y,i,0,!0)-s.cullPaddingY,v=d(n.worldView.bottom-s.y,i,0,!0)+s.cullPaddingY}return{left:l,right:f,top:u,bottom:v}};p.exports=h}),9474:((p,S,t)=>{var d=t(90454),c=t(32483),h=function(r,n,e,s){e===void 0&&(e=[]),s===void 0&&(s=0),e.length=0;var o=r.tilemapLayer,i=d(r,n);return o.skipCull&&o.scrollFactorX===1&&o.scrollFactorY===1&&(i.left=0,i.right=r.width,i.top=0,i.bottom=r.height),c(r,i,s,e),e};p.exports=h}),27229:((p,S,t)=>{var d=t(19951),c=t(26099),h=new c,r=function(n,e,s,o){var i=o.baseTileWidth,a=o.baseTileHeight,l=o.tilemapLayer;l&&(i*=l.scaleX,a*=l.scaleY);var f=d(n,e,h,s,o),u=[],v=.5773502691896257,m,x;o.staggerAxis==="y"?(m=v*i,x=a/2):(m=i/2,x=v*a);for(var g=0;g<6;g++){var y=2*Math.PI*(.5-g)/6;u.push(new c(f.x+m*Math.cos(y),f.y+x*Math.sin(y)))}return u};p.exports=r}),19951:((p,S,t)=>{var d=t(26099),c=function(h,r,n,e,s){n||(n=new d);var o=s.baseTileWidth,i=s.baseTileHeight,a=s.tilemapLayer,l=0,f=0;a&&(e||(e=a.scene.cameras.main),l=a.x+e.scrollX*(1-a.scrollFactorX),f=a.y+e.scrollY*(1-a.scrollFactorY),o*=a.scaleX,i*=a.scaleY);var u=o/2,v=i/2,m,x,g=s.staggerAxis,y=s.staggerIndex;return g==="y"?(m=l+o*h+o,x=f+1.5*r*v+v,r%2===0&&(y==="odd"?m-=u:m+=u)):g==="x"&&y==="odd"&&(m=l+1.5*h*u+u,x=f+i*h+i,h%2===0&&(y==="odd"?x-=v:x+=v)),n.set(m,x)};p.exports=c}),86625:((p,S,t)=>{var d=t(26099),c=function(h,r,n,e,s,o){e||(e=new d);var i=o.baseTileWidth,a=o.baseTileHeight,l=o.tilemapLayer;l&&(s||(s=l.scene.cameras.main),h=h-(l.x+s.scrollX*(1-l.scrollFactorX)),r=r-(l.y+s.scrollY*(1-l.scrollFactorY)),i*=l.scaleX,a*=l.scaleY);var f=.5773502691896257,u=-.3333333333333333,v=0,m=.6666666666666666,x=i/2,g=a/2,y,T,C,E,M;o.staggerAxis==="y"?(y=(h-x)/(f*i),T=(r-g)/g,C=f*y+u*T,E=v*y+m*T):(y=(h-x)/x,T=(r-g)/(f*a),C=u*y+f*T,E=m*y+v*T),M=-C-E;var P=Math.round(C),A=Math.round(E),R=Math.round(M),F=Math.abs(P-C),w=Math.abs(A-E),I=Math.abs(R-M);F>w&&F>I?P=-A-R:w>I&&(A=-P-R);var U,N=A;return o.staggerIndex==="odd"?U=N%2===0?A/2+P:A/2+P-.5:U=N%2===0?A/2+P:A/2+P+.5,e.set(U,N)};p.exports=c}),62991:(p=>{var S=function(t,d,c){return t>=0&&t<c.width&&d>=0&&d<c.height};p.exports=S}),14018:((p,S,t)=>{var d=t(33528),c=function(h,r,n,e){n===void 0&&(n=[]),e===void 0&&(e=0),n.length=0;var s=h.tilemapLayer,o=h.data,i=h.width,a=h.height,l=s.skipCull,f=0,u=i,v=0,m=a,x,g,y;if(e===0)for(g=v;g<m;g++)for(x=f;x<u;x++)y=o[g][x],!(!y||y.index===-1||!y.visible||y.alpha===0)&&(!l&&!d(x,g,h,r)||n.push(y));else if(e===1)for(g=v;g<m;g++)for(x=u;x>=f;x--)y=o[g][x],!(!y||y.index===-1||!y.visible||y.alpha===0)&&(!l&&!d(x,g,h,r)||n.push(y));else if(e===2)for(g=m;g>=v;g--)for(x=f;x<u;x++)y=o[g][x],!(!y||y.index===-1||!y.visible||y.alpha===0)&&(!l&&!d(x,g,h,r)||n.push(y));else if(e===3)for(g=m;g>=v;g--)for(x=u;x>=f;x--)y=o[g][x],!(!y||y.index===-1||!y.visible||y.alpha===0)&&(!l&&!d(x,g,h,r)||n.push(y));return s.tilesDrawn=n.length,s.tilesTotal=i*a,n};p.exports=c}),14127:((p,S,t)=>{var d=t(26099),c=function(h,r,n,e,s){n||(n=new d);var o=s.baseTileWidth,i=s.baseTileHeight,a=s.tilemapLayer,l=0,f=0;a&&(e||(e=a.scene.cameras.main),l=a.x+e.scrollX*(1-a.scrollFactorX),o*=a.scaleX,f=a.y+e.scrollY*(1-a.scrollFactorY),i*=a.scaleY);var u=l+(h-r)*(o/2),v=f+(h+r)*(i/2);return n.set(u,v)};p.exports=c}),96897:((p,S,t)=>{var d=t(26099),c=function(h,r,n,e,s,o,i){e||(e=new d);var a=o.baseTileWidth,l=o.baseTileHeight,f=o.tilemapLayer;f&&(s||(s=f.scene.cameras.main),r=r-(f.y+s.scrollY*(1-f.scrollFactorY)),l*=f.scaleY,h=h-(f.x+s.scrollX*(1-f.scrollFactorX)),a*=f.scaleX);var u=a/2,v=l/2;h=h-u,i||(r=r-l);var m=.5*(h/u+r/v),x=.5*(-h/u+r/v);return n&&(m=Math.floor(m),x=Math.floor(x)),e.set(m,x)};p.exports=c}),71558:((p,S,t)=>{var d=t(23029),c=t(62991),h=t(72023),r=t(20576),n=function(e,s,o,i,a){if(i===void 0&&(i=!0),!c(s,o,a))return null;var l,f=a.data[o][s],u=f&&f.collides;e instanceof d?(a.data[o][s]===null&&(a.data[o][s]=new d(a,e.index,s,o,a.tileWidth,a.tileHeight)),a.data[o][s].copy(e)):(l=e,a.data[o][s]===null?a.data[o][s]=new d(a,l,s,o,a.tileWidth,a.tileHeight):a.data[o][s].index=l);var v=a.data[o][s],m=a.collideIndexes.indexOf(v.index)!==-1;if(l=e instanceof d?e.index:e,l===-1)v.width=a.tileWidth,v.height=a.tileHeight;else{var x=a.tilemapLayer.tilemap,g=x.tiles,y=g[l][2],T=x.tilesets[y];v.width=T.tileWidth,v.height=T.tileHeight}return r(v,m),i&&u!==v.collides&&h(s,o,a),v};p.exports=n}),26303:((p,S,t)=>{var d=t(71558),c=t(26099),h=new c,r=function(n,e,s,o,i,a){return a.tilemapLayer.worldToTileXY(e,s,!0,h,i,a),d(n,h.x,h.y,o,a)};p.exports=r}),14051:((p,S,t)=>{var d=t(42573),c=t(71558),h=function(r,n,e,s,o){if(s===void 0&&(s=!0),!Array.isArray(r))return null;Array.isArray(r[0])||(r=[r]);for(var i=r.length,a=r[0].length,l=0;l<i;l++)for(var f=0;f<a;f++){var u=r[l][f];c(u,n+f,e+l,!1,o)}s&&d(n-1,e-1,a+2,i+2,o)};p.exports=h}),77389:((p,S,t)=>{var d=t(7386),c=t(26546),h=function(r,n,e,s,o,i){var a,l=d(r,n,e,s,{},i);if(!o)for(o=[],a=0;a<l.length;a++)o.indexOf(l[a].index)===-1&&o.push(l[a].index);for(a=0;a<l.length;a++)l[a].index=c(o)};p.exports=h}),63557:((p,S,t)=>{var d=t(23029),c=t(62991),h=t(72023),r=function(n,e,s,o,i){if(s===void 0&&(s=!0),o===void 0&&(o=!0),!c(n,e,i))return null;var a=i.data[e][n];if(a)i.data[e][n]=s?null:new d(i,-1,n,e,i.tileWidth,i.tileHeight);else return null;return o&&a&&a.collides&&h(n,e,i),a};p.exports=r}),94178:((p,S,t)=>{var d=t(63557),c=t(26099),h=new c,r=function(n,e,s,o,i,a){return a.tilemapLayer.worldToTileXY(n,e,!0,h,i,a),d(h.x,h.y,s,o,a)};p.exports=r}),15533:((p,S,t)=>{var d=t(7386),c=t(3956),h=new c(105,210,231,150),r=new c(243,134,48,200),n=new c(40,39,37,150),e=function(s,o,i){o===void 0&&(o={});var a=o.tileColor!==void 0?o.tileColor:h,l=o.collidingTileColor!==void 0?o.collidingTileColor:r,f=o.faceColor!==void 0?o.faceColor:n,u=d(0,0,i.width,i.height,null,i);s.translateCanvas(i.tilemapLayer.x,i.tilemapLayer.y),s.scaleCanvas(i.tilemapLayer.scaleX,i.tilemapLayer.scaleY);for(var v=0;v<u.length;v++){var m=u[v],x=m.tileset?m.tileset.tileOffset:{x:0,y:0},g=m.width,y=m.height,T=m.pixelX-x.x,C=m.pixelY-x.y,E=m.collides?l:a;E!==null&&(s.fillStyle(E.color,E.alpha/255),s.fillRect(T,C,g,y)),T+=1,C+=1,g-=2,y-=2,f!==null&&(s.lineStyle(1,f.color,f.alpha/255),m.faceTop&&s.lineBetween(T,C,T+g,C),m.faceRight&&s.lineBetween(T+g,C,T+g,C+y),m.faceBottom&&s.lineBetween(T,C+y,T+g,C+y),m.faceLeft&&s.lineBetween(T,C,T,C+y))}};p.exports=e}),27987:((p,S,t)=>{var d=t(7386),c=function(h,r,n,e,s,o,i){for(var a=d(n,e,s,o,null,i),l=0;l<a.length;l++)a[l]&&a[l].index===h&&(a[l].index=r)};p.exports=c}),32483:(p=>{var S=function(t,d,c,h){var r=t.data,n=t.width,e=t.height,s=t.tilemapLayer,o=Math.max(0,d.left),i=Math.min(n,d.right),a=Math.max(0,d.top),l=Math.min(e,d.bottom),f,u,v;if(c===0)for(u=a;u<l;u++)for(f=o;r[u]&&f<i;f++)v=r[u][f],!(!v||v.index===-1||!v.visible||v.alpha===0)&&h.push(v);else if(c===1)for(u=a;u<l;u++)for(f=i;r[u]&&f>=o;f--)v=r[u][f],!(!v||v.index===-1||!v.visible||v.alpha===0)&&h.push(v);else if(c===2)for(u=l;u>=a;u--)for(f=o;r[u]&&f<i;f++)v=r[u][f],!(!v||v.index===-1||!v.visible||v.alpha===0)&&h.push(v);else if(c===3)for(u=l;u>=a;u--)for(f=i;r[u]&&f>=o;f--)v=r[u][f],!(!v||v.index===-1||!v.visible||v.alpha===0)&&h.push(v);return s.tilesDrawn=h.length,s.tilesTotal=n*e,h};p.exports=S}),57068:((p,S,t)=>{var d=t(20576),c=t(42573),h=t(9589),r=function(n,e,s,o,i){e===void 0&&(e=!0),s===void 0&&(s=!0),i===void 0&&(i=!0),Array.isArray(n)||(n=[n]);for(var a=0;a<n.length;a++)h(n[a],e,o);if(i)for(var l=0;l<o.height;l++)for(var f=0;f<o.width;f++){var u=o.data[l][f];u&&n.indexOf(u.index)!==-1&&d(u,e)}s&&c(0,0,o.width,o.height,o)};p.exports=r}),37266:((p,S,t)=>{var d=t(20576),c=t(42573),h=t(9589),r=function(n,e,s,o,i,a){if(s===void 0&&(s=!0),o===void 0&&(o=!0),a===void 0&&(a=!0),!(n>e)){for(var l=n;l<=e;l++)h(l,s,i);if(a)for(var f=0;f<i.height;f++)for(var u=0;u<i.width;u++){var v=i.data[f][u];v&&v.index>=n&&v.index<=e&&d(v,s)}o&&c(0,0,i.width,i.height,i)}};p.exports=r}),75661:((p,S,t)=>{var d=t(20576),c=t(42573),h=t(9589),r=function(n,e,s,o){e===void 0&&(e=!0),s===void 0&&(s=!0),Array.isArray(n)||(n=[n]);for(var i=0;i<o.height;i++)for(var a=0;a<o.width;a++){var l=o.data[i][a];l&&n.indexOf(l.index)===-1&&(d(l,e),h(l.index,e,o))}s&&c(0,0,o.width,o.height,o)};p.exports=r}),64740:((p,S,t)=>{var d=t(20576),c=t(42573),h=t(97022),r=function(n,e,s,o){e===void 0&&(e=!0),s===void 0&&(s=!0);for(var i=0;i<o.height;i++)for(var a=0;a<o.width;a++){var l=o.data[i][a];if(l){for(var f in n)if(h(l.properties,f)){var u=n[f];Array.isArray(u)||(u=[u]);for(var v=0;v<u.length;v++)l.properties[f]===u[v]&&d(l,e)}}}s&&c(0,0,o.width,o.height,o)};p.exports=r}),63307:((p,S,t)=>{var d=t(20576),c=t(42573),h=function(r,n,e){r===void 0&&(r=!0),n===void 0&&(n=!0);for(var s=0;s<e.height;s++)for(var o=0;o<e.width;o++){var i=e.data[s][o];if(i){var a=i.getCollisionGroup();a&&a.objects&&a.objects.length>0&&d(i,r)}}n&&c(0,0,e.width,e.height,e)};p.exports=h}),9589:(p=>{var S=function(t,d,c){var h=c.collideIndexes.indexOf(t);d&&h===-1?c.collideIndexes.push(t):!d&&h!==-1&&c.collideIndexes.splice(h,1)};p.exports=S}),20576:(p=>{var S=function(t,d){d?t.setCollision(!0,!0,!0,!0,!1):t.resetCollision(!1)};p.exports=S}),79583:(p=>{var S=function(t,d,c,h){if(typeof t=="number")h.callbacks[t]=d!==null?{callback:d,callbackContext:c}:void 0;else for(var r=0,n=t.length;r<n;r++)h.callbacks[t[r]]=d!==null?{callback:d,callbackContext:c}:void 0};p.exports=S}),93254:((p,S,t)=>{var d=t(7386),c=function(h,r,n,e,s,o,i){for(var a=d(h,r,n,e,null,i),l=0;l<a.length;l++)a[l].setCollisionCallback(s,o)};p.exports=c}),32903:((p,S,t)=>{var d=t(7386),c=t(33680),h=function(r,n,e,s,o){var i=d(r,n,e,s,null,o),a=i.map(function(f){return f.index});c(a);for(var l=0;l<i.length;l++)i[l].index=a[l]};p.exports=h}),61325:((p,S,t)=>{var d=t(63448),c=t(56583),h=function(r,n){var e=r.tilemapLayer.tilemap,s=r.tilemapLayer,o=Math.floor(e.tileWidth*s.scaleX),i=Math.floor(e.tileHeight*s.scaleY),a=c(n.worldView.x-s.x,o,0,!0)-s.cullPaddingX,l=d(n.worldView.right-s.x,o,0,!0)+s.cullPaddingX,f=c(n.worldView.y-s.y,i/2,0,!0)-s.cullPaddingY,u=d(n.worldView.bottom-s.y,i/2,0,!0)+s.cullPaddingY;return{left:a,right:l,top:f,bottom:u}};p.exports=h}),54503:((p,S,t)=>{var d=t(61325),c=t(32483),h=function(r,n,e,s){e===void 0&&(e=[]),s===void 0&&(s=0),e.length=0;var o=r.tilemapLayer,i=d(r,n);return o.skipCull&&o.scrollFactorX===1&&o.scrollFactorY===1&&(i.left=0,i.right=r.width,i.top=0,i.bottom=r.height),c(r,i,s,e),e};p.exports=h}),97202:((p,S,t)=>{var d=t(26099),c=function(h,r,n,e,s){n||(n=new d);var o=s.baseTileWidth,i=s.baseTileHeight,a=s.tilemapLayer,l=0,f=0;a&&(e||(e=a.scene.cameras.main),l=a.x+e.scrollX*(1-a.scrollFactorX),o*=a.scaleX,f=a.y+e.scrollY*(1-a.scrollFactorY),i*=a.scaleY);var u=l+h*o+r%2*(o/2),v=f+r*(i/2);return n.set(u,v)};p.exports=c}),28054:(p=>{var S=function(t,d,c){var h=c.baseTileHeight,r=c.tilemapLayer,n=0;return r&&(d===void 0&&(d=r.scene.cameras.main),n=r.y+d.scrollY*(1-r.scrollFactorY),h*=r.scaleY),n+t*(h/2)+h};p.exports=S}),15108:((p,S,t)=>{var d=t(26099),c=function(h,r,n,e,s,o){e||(e=new d);var i=o.baseTileWidth,a=o.baseTileHeight,l=o.tilemapLayer;l&&(s||(s=l.scene.cameras.main),r=r-(l.y+s.scrollY*(1-l.scrollFactorY)),a*=l.scaleY,h=h-(l.x+s.scrollX*(1-l.scrollFactorX)),i*=l.scaleX);var f=n?Math.floor(r/(a/2)):r/(a/2),u=n?Math.floor((h+f%2*.5*i)/i):(h+f%2*.5*i)/i;return e.set(u,f)};p.exports=c}),51900:(p=>{var S=function(t,d,c,h){var r=h.baseTileHeight,n=h.tilemapLayer;return n&&(c||(c=n.scene.cameras.main),t=t-(n.y+c.scrollY*(1-n.scrollFactorY)),r*=n.scaleY),d?Math.floor(t/(r/2)):t/(r/2)};p.exports=S}),86560:((p,S,t)=>{var d=t(7386),c=function(h,r,n,e,s,o,i){for(var a=d(n,e,s,o,null,i),l=0;l<a.length;l++)a[l]&&(a[l].index===h?a[l].index=r:a[l].index===r&&(a[l].index=h))};p.exports=c}),97281:(p=>{var S=function(t,d,c){var h=c.baseTileWidth,r=c.tilemapLayer,n=0;return r&&(d||(d=r.scene.cameras.main),n=r.x+d.scrollX*(1-r.scrollFactorX),h*=r.scaleX),n+t*h};p.exports=S}),70326:((p,S,t)=>{var d=t(97281),c=t(29650),h=t(26099),r=function(n,e,s,o,i){return s||(s=new h(0,0)),s.x=d(n,o,i),s.y=c(e,o,i),s};p.exports=r}),29650:(p=>{var S=function(t,d,c){var h=c.baseTileHeight,r=c.tilemapLayer,n=0;return r&&(d||(d=r.scene.cameras.main),n=r.y+d.scrollY*(1-r.scrollFactorY),h*=r.scaleY),n+t*h};p.exports=S}),77366:((p,S,t)=>{var d=t(7386),c=t(75508),h=function(r,n,e,s,o,i){if(o){var a,l=d(r,n,e,s,null,i),f=0;for(a=0;a<o.length;a++)f+=o[a].weight;if(!(f<=0))for(a=0;a<l.length;a++){for(var u=c.RND.frac()*f,v=0,m=-1,x=0;x<o.length;x++)if(v+=o[x].weight,u<=v){var g=o[x].index;m=Array.isArray(g)?g[Math.floor(c.RND.frac()*g.length)]:g;break}l[a].index=m}}};p.exports=h}),10095:((p,S,t)=>{var d=t(85896),c=t(26099),h=new c,r=function(n,e,s,o){return d(n,0,e,h,s,o),h.x};p.exports=r}),85896:((p,S,t)=>{var d=t(26099),c=function(h,r,n,e,s,o){n===void 0&&(n=!0),e||(e=new d);var i=o.baseTileWidth,a=o.baseTileHeight,l=o.tilemapLayer;l&&(s||(s=l.scene.cameras.main),h=h-(l.x+s.scrollX*(1-l.scrollFactorX)),r=r-(l.y+s.scrollY*(1-l.scrollFactorY)),i*=l.scaleX,a*=l.scaleY);var f=h/i,u=r/a;return n&&(f=Math.floor(f),u=Math.floor(u)),e.set(f,u)};p.exports=c}),63288:((p,S,t)=>{var d=t(85896),c=t(26099),h=new c,r=function(n,e,s,o){return d(0,n,e,h,s,o),h.y};p.exports=r}),81086:((p,S,t)=>{p.exports={CalculateFacesAt:t(72023),CalculateFacesWithin:t(42573),CheckIsoBounds:t(33528),Copy:t(1785),CreateFromTiles:t(78419),CullBounds:t(19545),CullTiles:t(30003),Fill:t(35137),FilterTiles:t(40253),FindByIndex:t(52692),FindTile:t(66151),ForEachTile:t(97560),GetCullTilesFunction:t(43305),GetTileAt:t(7423),GetTileAtWorldXY:t(60540),GetTileCorners:t(55826),GetTileCornersFunction:t(11758),GetTilesWithin:t(7386),GetTilesWithinShape:t(91141),GetTilesWithinWorldXY:t(96523),GetTileToWorldXFunction:t(39167),GetTileToWorldXYFunction:t(62e3),GetTileToWorldYFunction:t(5984),GetWorldToTileXFunction:t(96113),GetWorldToTileXYFunction:t(16926),GetWorldToTileYFunction:t(55762),HasTileAt:t(45091),HasTileAtWorldXY:t(24152),HexagonalCullBounds:t(90454),HexagonalCullTiles:t(9474),HexagonalGetTileCorners:t(27229),HexagonalTileToWorldXY:t(19951),HexagonalWorldToTileXY:t(86625),IsInLayerBounds:t(62991),IsometricCullTiles:t(14018),IsometricTileToWorldXY:t(14127),IsometricWorldToTileXY:t(96897),PutTileAt:t(71558),PutTileAtWorldXY:t(26303),PutTilesAt:t(14051),Randomize:t(77389),RemoveTileAt:t(63557),RemoveTileAtWorldXY:t(94178),RenderDebug:t(15533),ReplaceByIndex:t(27987),RunCull:t(32483),SetCollision:t(57068),SetCollisionBetween:t(37266),SetCollisionByExclusion:t(75661),SetCollisionByProperty:t(64740),SetCollisionFromCollisionGroup:t(63307),SetLayerCollisionIndex:t(9589),SetTileCollision:t(20576),SetTileIndexCallback:t(79583),SetTileLocationCallback:t(93254),Shuffle:t(32903),StaggeredCullBounds:t(61325),StaggeredCullTiles:t(54503),StaggeredTileToWorldXY:t(97202),StaggeredTileToWorldY:t(28054),StaggeredWorldToTileXY:t(15108),StaggeredWorldToTileY:t(51900),SwapByIndex:t(86560),TileToWorldX:t(97281),TileToWorldXY:t(70326),TileToWorldY:t(29650),WeightedRandomize:t(77366),WorldToTileX:t(10095),WorldToTileXY:t(85896),WorldToTileY:t(63288)}}),91907:(p=>{p.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}}),21829:((p,S,t)=>{var d={ORIENTATION:t(91907)};p.exports=d}),62501:((p,S,t)=>{var d=t(79291),c=t(21829),h={Components:t(81086),Parsers:t(57442),Formats:t(80341),ImageCollection:t(16536),ParseToTilemap:t(31989),Tile:t(23029),Tilemap:t(49075),TilemapCreator:t(45939),TilemapFactory:t(46029),Tileset:t(33629),TilemapLayer:t(20442),Orientation:t(91907),LayerData:t(14977),MapData:t(87010),ObjectLayer:t(48700)};h=d(!1,h,c.ORIENTATION),p.exports=h}),14977:((p,S,t)=>{var d=t(83419),c=t(91907),h=t(95540),r=new d({initialize:function(e){e===void 0&&(e={}),this.name=h(e,"name","layer"),this.id=h(e,"id",0),this.x=h(e,"x",0),this.y=h(e,"y",0),this.width=h(e,"width",0),this.height=h(e,"height",0),this.tileWidth=h(e,"tileWidth",0),this.tileHeight=h(e,"tileHeight",0),this.baseTileWidth=h(e,"baseTileWidth",this.tileWidth),this.baseTileHeight=h(e,"baseTileHeight",this.tileHeight),this.orientation=h(e,"orientation",c.ORTHOGONAL),this.widthInPixels=h(e,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=h(e,"heightInPixels",this.height*this.baseTileHeight),this.alpha=h(e,"alpha",1),this.visible=h(e,"visible",!0),this.properties=h(e,"properties",[]),this.indexes=h(e,"indexes",[]),this.collideIndexes=h(e,"collideIndexes",[]),this.callbacks=h(e,"callbacks",[]),this.bodies=h(e,"bodies",[]),this.data=h(e,"data",[]),this.tilemapLayer=h(e,"tilemapLayer",null),this.hexSideLength=h(e,"hexSideLength",0),this.staggerAxis=h(e,"staggerAxis","y"),this.staggerIndex=h(e,"staggerIndex","odd")}});p.exports=r}),87010:((p,S,t)=>{var d=t(83419),c=t(91907),h=t(95540),r=new d({initialize:function(e){e===void 0&&(e={}),this.name=h(e,"name","map"),this.width=h(e,"width",0),this.height=h(e,"height",0),this.infinite=h(e,"infinite",!1),this.tileWidth=h(e,"tileWidth",0),this.tileHeight=h(e,"tileHeight",0),this.widthInPixels=h(e,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=h(e,"heightInPixels",this.height*this.tileHeight),this.format=h(e,"format",null),this.orientation=h(e,"orientation",c.ORTHOGONAL),this.renderOrder=h(e,"renderOrder","right-down"),this.version=h(e,"version","1"),this.properties=h(e,"properties",{}),this.layers=h(e,"layers",[]),this.images=h(e,"images",[]),this.objects=h(e,"objects",[]),Array.isArray(this.objects)||(this.objects=[]),this.collision=h(e,"collision",{}),this.tilesets=h(e,"tilesets",[]),this.imageCollections=h(e,"imageCollections",[]),this.tiles=h(e,"tiles",[]),this.hexSideLength=h(e,"hexSideLength",0),this.staggerAxis=h(e,"staggerAxis","y"),this.staggerIndex=h(e,"staggerIndex","odd")}});p.exports=r}),48700:((p,S,t)=>{var d=t(83419),c=t(95540),h=new d({initialize:function(n){n===void 0&&(n={}),this.name=c(n,"name","object layer"),this.id=c(n,"id",0),this.opacity=c(n,"opacity",1),this.properties=c(n,"properties",{}),this.propertyTypes=c(n,"propertytypes",{}),this.type=c(n,"type","objectgroup"),this.visible=c(n,"visible",!0),this.objects=c(n,"objects",[]),Array.isArray(this.objects)||(this.objects=[])}});p.exports=h}),6641:((p,S,t)=>{var d=t(91907),c=function(h){return h=h.toLowerCase(),h==="isometric"?d.ISOMETRIC:h==="staggered"?d.STAGGERED:h==="hexagonal"?d.HEXAGONAL:d.ORTHOGONAL};p.exports=c}),46177:((p,S,t)=>{var d=t(80341),c=t(2342),h=t(82593),r=t(46594),n=t(87021),e=function(s,o,i,a,l,f){var u;switch(o){case d.ARRAY_2D:u=c(s,i,a,l,f);break;case d.CSV:u=h(s,i,a,l,f);break;case d.TILED_JSON:u=r(s,i,f);break;case d.WELTMEISTER:u=n(s,i,f);break;default:console.warn("Unrecognized tilemap data format: "+o),u=null}return u};p.exports=e}),2342:((p,S,t)=>{var d=t(80341),c=t(14977),h=t(87010),r=t(23029),n=function(e,s,o,i,a){for(var l=new c({tileWidth:o,tileHeight:i}),f=new h({name:e,tileWidth:o,tileHeight:i,format:d.ARRAY_2D,layers:[l]}),u=[],v=s.length,m=0,x=0;x<s.length;x++){u[x]=[];for(var g=s[x],y=0;y<g.length;y++){var T=parseInt(g[y],10);isNaN(T)||T===-1?u[x][y]=a?null:new r(l,-1,y,x,o,i):u[x][y]=new r(l,T,y,x,o,i)}m===0&&(m=g.length)}return f.width=l.width=m,f.height=l.height=v,f.widthInPixels=l.widthInPixels=m*o,f.heightInPixels=l.heightInPixels=v*i,l.data=u,f};p.exports=n}),82593:((p,S,t)=>{var d=t(80341),c=t(2342),h=function(r,n,e,s,o){var i=n.trim().split(`
|
|
`).map(function(l){return l.split(",")}),a=c(r,i,e,s,o);return a.format=d.CSV,a};p.exports=h}),6656:((p,S,t)=>{var d=t(14977),c=t(23029),h=function(r,n){for(var e=[],s=0;s<r.layer.length;s++){for(var o=r.layer[s],i=new d({name:o.name,width:o.width,height:o.height,tileWidth:o.tilesize,tileHeight:o.tilesize,visible:o.visible===1}),a=[],l=[],f=0;f<o.data.length;f++){for(var u=0;u<o.data[f].length;u++){var v=o.data[f][u]-1,m;v>-1?m=new c(i,v,u,f,o.tilesize,o.tilesize):m=n?null:new c(i,-1,u,f,o.tilesize,o.tilesize),a.push(m)}l.push(a),a=[]}i.data=l,e.push(i)}return e};p.exports=h}),96483:((p,S,t)=>{var d=t(33629),c=function(h){for(var r=[],n=[],e=0;e<h.layer.length;e++){var s=h.layer[e],o=s.tilesetName;o!==""&&n.indexOf(o)===-1&&(n.push(o),r.push(new d(o,0,s.tilesize,s.tilesize,0,0)))}return r};p.exports=c}),87021:((p,S,t)=>{var d=t(80341),c=t(87010),h=t(6656),r=t(96483),n=function(e,s,o){if(s.layer.length===0)return console.warn("No layers found in the Weltmeister map: "+e),null;for(var i=0,a=0,l=0;l<s.layer.length;l++)s.layer[l].width>i&&(i=s.layer[l].width),s.layer[l].height>a&&(a=s.layer[l].height);var f=new c({width:i,height:a,name:e,tileWidth:s.layer[0].tilesize,tileHeight:s.layer[0].tilesize,format:d.WELTMEISTER});return f.layers=h(s,o),f.tilesets=r(s),f};p.exports=n}),52833:((p,S,t)=>{p.exports={ParseTileLayers:t(6656),ParseTilesets:t(96483),ParseWeltmeister:t(87021)}}),57442:((p,S,t)=>{p.exports={FromOrientationString:t(6641),Parse:t(46177),Parse2DArray:t(2342),ParseCSV:t(82593),Impact:t(52833),Tiled:t(96761)}}),51233:((p,S,t)=>{var d=t(79291),c=function(h){for(var r,n,e,s,o,i=0;i<h.layers.length;i++){r=h.layers[i],s=null;for(var a=0;a<r.data.length;a++){o=r.data[a];for(var l=0;l<o.length;l++)n=o[l],!(n===null||n.index<0)&&(e=h.tiles[n.index][2],s=h.tilesets[e],n.width=s.tileWidth,n.height=s.tileHeight,s.tileProperties&&s.tileProperties[n.index-s.firstgid]&&(n.properties=d(n.properties,s.tileProperties[n.index-s.firstgid])))}}};p.exports=c}),41868:(p=>{var S=function(t){for(var d=window.atob(t),c=d.length,h=new Array(c/4),r=0;r<c;r+=4)h[r/4]=(d.charCodeAt(r)|d.charCodeAt(r+1)<<8|d.charCodeAt(r+2)<<16|d.charCodeAt(r+3)<<24)>>>0;return h};p.exports=S}),84101:((p,S,t)=>{var d=t(33629),c=function(h){var r,n,e=[];for(r=0;r<h.imageCollections.length;r++)for(var s=h.imageCollections[r],o=s.images,i=0;i<o.length;i++){var a=o[i],l={x:0,y:a.height-h.tileHeight};n=new d(a.image,a.gid,a.width,a.height,0,0,void 0,void 0,l),n.updateTileData(a.width,a.height),h.tilesets.push(n)}for(r=0;r<h.tilesets.length;r++){n=h.tilesets[r];for(var f=n.tileMargin,u=n.tileMargin,v=0,m=0,x=0,g=n.firstgid;g<n.firstgid+n.total&&(e[g]=[f,u,r],f+=n.tileWidth+n.tileSpacing,v++,!(v===n.total||(m++,m===n.columns&&(f=n.tileMargin,u+=n.tileHeight+n.tileSpacing,m=0,x++,x===n.rows))));g++);}return e};p.exports=c}),79677:((p,S,t)=>{var d=t(95540),c=function(h,r,n){if(!r)return{i:0,layers:h.layers,name:"",opacity:1,visible:!0,x:0,y:0};var e=r.x+d(r,"startx",0)*h.tilewidth+d(r,"offsetx",0),s=r.y+d(r,"starty",0)*h.tileheight+d(r,"offsety",0);return{i:0,layers:r.layers,name:n.name+r.name+"/",opacity:n.opacity*r.opacity,visible:n.visible&&r.visible,x:n.x+e,y:n.y+s}};p.exports=c}),29920:(p=>{var S=2147483648,t=1073741824,d=536870912,c=function(h){var r=!!(h&S),n=!!(h&t),e=!!(h&d);h=h&536870911;var s=0,o=!1;return r&&n&&e?(s=Math.PI/2,o=!0):r&&n&&!e?(s=Math.PI,o=!1):r&&!n&&e?(s=Math.PI/2,o=!1):r&&!n&&!e?(s=0,o=!0):!r&&n&&e?(s=3*Math.PI/2,o=!1):!r&&n&&!e?(s=Math.PI,o=!0):!r&&!n&&e?(s=3*Math.PI/2,o=!0):!r&&!n&&!e&&(s=0,o=!1),{gid:h,flippedHorizontal:r,flippedVertical:n,flippedAntiDiagonal:e,rotation:s,flipped:o}};p.exports=c}),12635:((p,S,t)=>{var d=t(95540),c=t(79677),h=function(r){for(var n=[],e=[],s=c(r);s.i<s.layers.length||e.length>0;){if(s.i>=s.layers.length){if(e.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}s=e.pop();continue}var o=s.layers[s.i];if(s.i++,o.type!=="imagelayer"){if(o.type==="group"){var i=c(r,o,s);e.push(s),s=i}continue}var a=d(o,"offsetx",0)+d(o,"startx",0),l=d(o,"offsety",0)+d(o,"starty",0);n.push({name:s.name+o.name,image:o.image,x:s.x+a+o.x,y:s.y+l+o.y,alpha:s.opacity*o.opacity,visible:s.visible&&o.visible,properties:d(o,"properties",{})})}return n};p.exports=h}),46594:((p,S,t)=>{var d=t(51233),c=t(84101),h=t(91907),r=t(62644),n=t(80341),e=t(6641),s=t(87010),o=t(12635),i=t(22611),a=t(28200),l=t(24619),f=function(u,v,m){var x=r(v),g=new s({width:x.width,height:x.height,name:u,tileWidth:x.tilewidth,tileHeight:x.tileheight,orientation:e(x.orientation),format:n.TILED_JSON,version:x.version,properties:x.properties,renderOrder:x.renderorder,infinite:x.infinite});if(g.orientation===h.HEXAGONAL)if(g.hexSideLength=x.hexsidelength,g.staggerAxis=x.staggeraxis,g.staggerIndex=x.staggerindex,g.staggerAxis==="y"){var y=(g.tileHeight-g.hexSideLength)/2;g.widthInPixels=g.tileWidth*(g.width+.5),g.heightInPixels=g.height*(g.hexSideLength+y)+y}else{var T=(g.tileWidth-g.hexSideLength)/2;g.widthInPixels=g.width*(g.hexSideLength+T)+T,g.heightInPixels=g.tileHeight*(g.height+.5)}g.layers=a(x,m),g.images=o(x);var C=l(x);return g.tilesets=C.tilesets,g.imageCollections=C.imageCollections,g.objects=i(x),g.tiles=c(g),d(g),g};p.exports=f}),52205:((p,S,t)=>{var d=t(18254),c=t(29920),h=function(e){return{x:e.x,y:e.y}},r=["id","name","type","rotation","properties","visible","x","y","width","height"],n=function(e,s,o){s===void 0&&(s=0),o===void 0&&(o=0);var i=d(e,r);if(i.x+=s,i.y+=o,e.gid){var a=c(e.gid);i.gid=a.gid,i.flippedHorizontal=a.flippedHorizontal,i.flippedVertical=a.flippedVertical,i.flippedAntiDiagonal=a.flippedAntiDiagonal}else e.polyline?i.polyline=e.polyline.map(h):e.polygon?i.polygon=e.polygon.map(h):e.ellipse?i.ellipse=e.ellipse:e.text?i.text=e.text:e.point?i.point=!0:i.rectangle=!0;return i};p.exports=n}),22611:((p,S,t)=>{var d=t(95540),c=t(52205),h=t(48700),r=t(79677),n=function(e){for(var s=[],o=[],i=r(e);i.i<i.layers.length||o.length>0;){if(i.i>=i.layers.length){if(o.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}i=o.pop();continue}var a=i.layers[i.i];if(i.i++,a.opacity*=i.opacity,a.visible=i.visible&&a.visible,a.type!=="objectgroup"){if(a.type==="group"){var l=r(e,a,i);o.push(i),i=l}continue}a.name=i.name+a.name;for(var f=i.x+d(a,"startx",0)+d(a,"offsetx",0),u=i.y+d(a,"starty",0)+d(a,"offsety",0),v=[],m=0;m<a.objects.length;m++){var x=c(a.objects[m],f,u);v.push(x)}var g=new h(a);g.objects=v,s.push(g)}return s};p.exports=n}),28200:((p,S,t)=>{var d=t(41868),c=t(91907),h=t(79677),r=t(6641),n=t(95540),e=t(14977),s=t(29920),o=t(23029),i=function(a,l){for(var f=n(a,"infinite",!1),u=[],v=[],m=h(a);m.i<m.layers.length||v.length>0;){if(m.i>=m.layers.length){if(v.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}m=v.pop();continue}var x=m.layers[m.i];if(m.i++,x.type!=="tilelayer"){if(x.type==="group"){var g=h(a,x,m);v.push(m),m=g}continue}if(x.compression){console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+x.name+"'");continue}else if(x.encoding&&x.encoding==="base64"){if(x.chunks)for(var y=0;y<x.chunks.length;y++)x.chunks[y].data=d(x.chunks[y].data);x.data&&(x.data=d(x.data)),delete x.encoding}var T,C,E,M,P,A,R=[],F=0;if(f){var w=n(x,"startx",0)+x.x,I=n(x,"starty",0)+x.y;T=new e({name:m.name+x.name,id:x.id,x:m.x+n(x,"offsetx",0)+w*a.tilewidth,y:m.y+n(x,"offsety",0)+I*a.tileheight,width:x.width,height:x.height,tileWidth:a.tilewidth,tileHeight:a.tileheight,alpha:m.opacity*x.opacity,visible:m.visible&&x.visible,properties:n(x,"properties",[]),orientation:r(a.orientation)}),T.orientation===c.HEXAGONAL&&(T.hexSideLength=a.hexsidelength,T.staggerAxis=a.staggeraxis,T.staggerIndex=a.staggerindex,T.staggerAxis==="y"?(P=(T.tileHeight-T.hexSideLength)/2,T.widthInPixels=T.tileWidth*(T.width+.5),T.heightInPixels=T.height*(T.hexSideLength+P)+P):(A=(T.tileWidth-T.hexSideLength)/2,T.widthInPixels=T.width*(T.hexSideLength+A)+A,T.heightInPixels=T.tileHeight*(T.height+.5)));for(var U=0;U<x.height;U++){R[U]=[null];for(var N=0;N<x.width;N++)R[U][N]=null}for(U=0,H=x.chunks.length;U<H;U++)for(var D=x.chunks[U],B=D.x-w,L=D.y-I,G=0,O=0,X=D.data.length;O<X;O++){var z=F+B,V=G+L;C=s(D.data[O]),C.gid>0?(E=new o(T,C.gid,z,V,a.tilewidth,a.tileheight),E.rotation=C.rotation,E.flipX=C.flipped,R[V][z]=E):(M=l?null:new o(T,-1,z,V,a.tilewidth,a.tileheight),R[V][z]=M),F++,F===D.width&&(G++,F=0)}}else{T=new e({name:m.name+x.name,id:x.id,x:m.x+n(x,"offsetx",0)+x.x,y:m.y+n(x,"offsety",0)+x.y,width:x.width,height:x.height,tileWidth:a.tilewidth,tileHeight:a.tileheight,alpha:m.opacity*x.opacity,visible:m.visible&&x.visible,properties:n(x,"properties",[]),orientation:r(a.orientation)}),T.orientation===c.HEXAGONAL&&(T.hexSideLength=a.hexsidelength,T.staggerAxis=a.staggeraxis,T.staggerIndex=a.staggerindex,T.staggerAxis==="y"?(P=(T.tileHeight-T.hexSideLength)/2,T.widthInPixels=T.tileWidth*(T.width+.5),T.heightInPixels=T.height*(T.hexSideLength+P)+P):(A=(T.tileWidth-T.hexSideLength)/2,T.widthInPixels=T.width*(T.hexSideLength+A)+A,T.heightInPixels=T.tileHeight*(T.height+.5)));for(var Y=[],W=0,H=x.data.length;W<H;W++)C=s(x.data[W]),C.gid>0?(E=new o(T,C.gid,F,R.length,a.tilewidth,a.tileheight),E.rotation=C.rotation,E.flipX=C.flipped,Y.push(E)):(M=l?null:new o(T,-1,F,R.length,a.tilewidth,a.tileheight),Y.push(M)),F++,F===x.width&&(R.push(Y),F=0,Y=[])}T.data=R,u.push(T)}return u};p.exports=i}),24619:((p,S,t)=>{var d=t(33629),c=t(16536),h=t(52205),r=t(57880),n=function(e){for(var s=[],o=[],i=null,a,l=0;l<e.tilesets.length;l++){var f=e.tilesets[l];if(f.source)console.warn("External tilesets unsupported. Use Embed Tileset and re-export");else if(f.image){var u=new d(f.name,f.firstgid,f.tilewidth,f.tileheight,f.margin,f.spacing,void 0,void 0,f.tileoffset);if(e.version>1){var v=void 0,m=void 0;if(Array.isArray(f.tiles)){v=v||{},m=m||{};for(var x=0;x<f.tiles.length;x++){var g=f.tiles[x];if(g.properties){var y={};g.properties.forEach(function(U){y[U.name]=U.value}),m[g.id]=y}if(g.objectgroup&&((v[g.id]||(v[g.id]={})).objectgroup=g.objectgroup,g.objectgroup.objects)){var T=g.objectgroup.objects.map(function(U){return h(U)});v[g.id].objectgroup.objects=T}g.animation&&((v[g.id]||(v[g.id]={})).animation=g.animation),g.type&&((v[g.id]||(v[g.id]={})).type=g.type)}}Array.isArray(f.wangsets)&&(v=v||{},m=m||{},r(f.wangsets,v)),v&&(u.tileData=v,u.tileProperties=m)}else if(f.tileproperties&&(u.tileProperties=f.tileproperties),f.tiles){u.tileData=f.tiles;for(a in u.tileData){var C=u.tileData[a].objectgroup;if(C&&C.objects){var E=C.objects.map(function(U){return h(U)});u.tileData[a].objectgroup.objects=E}}}u.updateTileData(f.imagewidth,f.imageheight),s.push(u)}else{var M=new c(f.name,f.firstgid,f.tilewidth,f.tileheight,f.margin,f.spacing,f.properties),P=0;for(x=0;x<f.tiles.length;x++){g=f.tiles[x];var A=g.image,R=parseInt(g.id,10),F=f.firstgid+R,w=g.imagewidth,I=g.imageheight;M.addImage(F,A,w,I),P=Math.max(R,P)}M.maxId=P,o.push(M)}i&&(i.lastgid=f.firstgid-1),i=f}return{tilesets:s,imageCollections:o}};p.exports=n}),57880:(p=>{var S=function(t,d){for(var c=0;c<t.length;c++){var h=t[c],r=c;if(h.name&&h.name!==""&&(r=h.name),Array.isArray(h.wangtiles)&&h.wangtiles.length>0){var n={},e={},s,o,i;if(Array.isArray(h.edgecolors))for(s=0;s<h.edgecolors.length;s++)i=1+s,o=h.edgecolors[s],o.name!==""&&(n[i]=o.name);if(Array.isArray(h.cornercolors))for(s=0;s<h.cornercolors.length;s++)i=1+s,o=h.cornercolors[s],o.name!==""&&(e[i]=o.name);if(Array.isArray(h.colors))for(s=0;s<h.colors.length;s++)o=h.colors[s],i=1+s,o.name!==""&&(n[i]=e[i]=o.name);for(var a=[n,e,n,e,n,e,n,e],l=0;l<h.wangtiles.length;l++){var f=h.wangtiles[l],u=d[f.tileid]||(d[f.tileid]={});u=u.wangid||(u.wangid={});for(var v=[],m=0;m<Math.min(a.length,f.wangid.length);m++){if(o=f.wangid[m],o===0){v.push(void 0);continue}var x=a[m][o];if(x!==void 0){v.push(x);continue}v.push(o)}u[r]=v}}}};p.exports=S}),96761:((p,S,t)=>{p.exports={AssignTileProperties:t(51233),Base64Decode:t(41868),BuildTilesetIndex:t(84101),CreateGroupLayer:t(79677),ParseGID:t(29920),ParseImageLayers:t(12635),ParseJSONTiled:t(46594),ParseObject:t(52205),ParseObjectLayers:t(22611),ParseTileLayers:t(28200),ParseTilesets:t(24619)}}),33385:((p,S,t)=>{var d=t(83419),c=t(37277),h=t(44594),r=t(94880),n=t(72905),e=new d({initialize:function(o){this.scene=o,this.systems=o.sys,this.now=0,this.startTime=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],o.sys.events.once(h.BOOT,this.boot,this),o.sys.events.on(h.START,this.start,this)},boot:function(){this.now=this.systems.game.loop.time,this.systems.events.once(h.DESTROY,this.destroy,this)},start:function(){this.startTime=this.systems.game.loop.time;var s=this.systems.events;s.on(h.PRE_UPDATE,this.preUpdate,this),s.on(h.UPDATE,this.update,this),s.once(h.SHUTDOWN,this.shutdown,this)},addEvent:function(s){var o;if(s instanceof r){if(o=s,this.removeEvent(o),o.elapsed=o.startAt,o.hasDispatched=!1,o.repeatCount=o.repeat===-1||o.loop?999999999999:o.repeat,o.delay<=0&&o.repeatCount>0)throw new Error("TimerEvent infinite loop created via zero delay")}else o=new r(s);return this._pendingInsertion.push(o),o},delayedCall:function(s,o,i,a){return this.addEvent({delay:s,callback:o,args:i,callbackScope:a})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeEvent:function(s){Array.isArray(s)||(s=[s]);for(var o=0;o<s.length;o++){var i=s[o];n(this._pendingRemoval,i),n(this._pendingInsertion,i),n(this._active,i)}return this},removeAllEvents:function(){return this._pendingRemoval=this._pendingRemoval.concat(this._active),this},preUpdate:function(){var s=this._pendingRemoval.length,o=this._pendingInsertion.length;if(!(s===0&&o===0)){var i,a;for(i=0;i<s;i++){a=this._pendingRemoval[i];var l=this._active.indexOf(a);l>-1&&this._active.splice(l,1),a.destroy()}for(i=0;i<o;i++)a=this._pendingInsertion[i],this._active.push(a);this._pendingRemoval.length=0,this._pendingInsertion.length=0}},update:function(s,o){if(this.now=s,!this.paused){o*=this.timeScale;for(var i=0;i<this._active.length;i++){var a=this._active[i];if(!a.paused&&(a.elapsed+=o*a.timeScale,a.elapsed>=a.delay)){var l=a.elapsed-a.delay;if(a.elapsed=a.delay,!a.hasDispatched&&a.callback&&(a.hasDispatched=!0,a.callback.apply(a.callbackScope,a.args)),a.repeatCount>0){if(a.repeatCount--,l>=a.delay)for(;l>=a.delay&&a.repeatCount>0;)a.callback&&a.callback.apply(a.callbackScope,a.args),l-=a.delay,a.repeatCount--;a.elapsed=l,a.hasDispatched=!1}else a.hasDispatched&&this._pendingRemoval.push(a)}}}},shutdown:function(){var s;for(s=0;s<this._pendingInsertion.length;s++)this._pendingInsertion[s].destroy();for(s=0;s<this._active.length;s++)this._active[s].destroy();for(s=0;s<this._pendingRemoval.length;s++)this._pendingRemoval[s].destroy();this._active.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;var o=this.systems.events;o.off(h.PRE_UPDATE,this.preUpdate,this),o.off(h.UPDATE,this.update,this),o.off(h.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(h.START,this.start,this),this.scene=null,this.systems=null}});c.register("Clock",e,"time"),p.exports=e}),96120:((p,S,t)=>{var d=t(83419),c=t(50792),h=t(39429),r=t(95540),n=t(44594),e=t(89809),s=new d({Extends:c,initialize:function(i,a){c.call(this),this.scene=i,this.systems=i.sys,this.elapsed=0,this.timeScale=1,this.paused=!0,this.complete=!1,this.totalComplete=0,this.loop=0,this.iteration=0,this.events=[];var l=this.systems.events;l.on(n.PRE_UPDATE,this.preUpdate,this),l.on(n.UPDATE,this.update,this),l.once(n.SHUTDOWN,this.destroy,this),a&&this.add(a)},preUpdate:function(o,i){this.paused||(this.elapsed+=i*this.timeScale)},update:function(){if(!(this.paused||this.complete)){var o,i=this.events,a=!1,l=this.systems,f;for(o=0;o<i.length;o++){var u=i[o];if(!u.complete&&u.time<=this.elapsed){if(u.complete=!0,this.totalComplete++,f=u.target?u.target:this,u.if&&!u.if.call(f,u))continue;if(u.once&&(a=!0),u.set&&u.target)for(var v in u.set)u.target[v]=u.set[v];this.iteration&&u.repeat++,u.loop&&u.repeat&&u.loop.call(f),u.tween&&(u.tweenInstance=l.tweens.add(u.tween)),u.sound&&(typeof u.sound=="string"?l.sound.play(u.sound):l.sound.play(u.sound.key,u.sound.config)),u.event&&this.emit(u.event,f),u.run&&u.run.call(f),u.stop&&this.stop()}}if(a)for(o=0;o<i.length;o++)i[o].complete&&i[o].once&&(i.splice(o,1),o--);this.totalComplete>=i.length&&(this.loop!==0&&(this.loop===-1||this.loop>this.iteration)?(this.iteration++,this.reset(!0)):this.complete=!0),this.complete&&this.emit(e.COMPLETE,this)}},play:function(o){return o===void 0&&(o=!0),this.paused=!1,this.complete=!1,this.totalComplete=0,o&&this.reset(),this},pause:function(){this.paused=!0;for(var o=this.events,i=0;i<o.length;i++){var a=o[i];a.tweenInstance&&(a.tweenInstance.paused=!0)}return this},repeat:function(o){return(o===void 0||o===!0)&&(o=-1),o===!1&&(o=0),this.loop=o,this},resume:function(){this.paused=!1;for(var o=this.events,i=0;i<o.length;i++){var a=o[i];a.tweenInstance&&(a.tweenInstance.paused=!1)}return this},stop:function(){return this.paused=!0,this.complete=!0,this},reset:function(o){o===void 0&&(o=!1),this.elapsed=0,o||(this.iteration=0);for(var i=this.events,a=0;a<i.length;a++){var l=i[a];l.complete=!1,o||(l.repeat=0),l.tweenInstance&&l.tweenInstance.stop()}return this.play(!1)},add:function(o){Array.isArray(o)||(o=[o]);var i=this.events,a=0;i.length>0&&(a=i[i.length-1].time);for(var l=0;l<o.length;l++){var f=o[l],u=r(f,"at",0),v=r(f,"in",null);v!==null&&(u=this.elapsed+v);var m=r(f,"from",null);m!==null&&(u=a+m),i.push({complete:!1,time:u,repeat:0,if:r(f,"if",null),run:r(f,"run",null),loop:r(f,"loop",null),event:r(f,"event",null),target:r(f,"target",null),set:r(f,"set",null),tween:r(f,"tween",null),sound:r(f,"sound",null),once:r(f,"once",!1),stop:r(f,"stop",!1)}),a=u}return this.complete=!1,this},clear:function(){for(var o=this.events,i=0;i<o.length;i++){var a=o[i];a.tweenInstance&&a.tweenInstance.stop()}return o=[],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(n.PRE_UPDATE,this.preUpdate,this),o.off(n.UPDATE,this.update,this),o.off(n.SHUTDOWN,this.destroy,this),this.clear(),this.scene=null,this.systems=null}});h.register("timeline",function(o){return new s(this.scene,o)}),p.exports=s}),94880:((p,S,t)=>{var d=t(83419),c=t(95540),h=new d({initialize:function(n){this.delay=0,this.repeat=0,this.repeatCount=0,this.loop=!1,this.callback,this.callbackScope,this.args,this.timeScale=1,this.startAt=0,this.elapsed=0,this.paused=!1,this.hasDispatched=!1,this.reset(n)},reset:function(r){if(this.delay=c(r,"delay",0),this.repeat=c(r,"repeat",0),this.loop=c(r,"loop",!1),this.callback=c(r,"callback",void 0),this.callbackScope=c(r,"callbackScope",this),this.args=c(r,"args",[]),this.timeScale=c(r,"timeScale",1),this.startAt=c(r,"startAt",0),this.paused=c(r,"paused",!1),this.elapsed=this.startAt,this.hasDispatched=!1,this.repeatCount=this.repeat===-1||this.loop?999999999999:this.repeat,this.delay<=0&&this.repeatCount>0)throw new Error("TimerEvent infinite loop created via zero delay");return this},getProgress:function(){return this.elapsed/this.delay},getOverallProgress:function(){if(this.repeat>0){var r=this.delay+this.delay*this.repeat,n=this.elapsed+this.delay*(this.repeat-this.repeatCount);return n/r}else return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return this.elapsed*.001},getRemaining:function(){return this.delay-this.elapsed},getRemainingSeconds:function(){return this.getRemaining()*.001},getOverallRemaining:function(){return this.delay*(1+this.repeatCount)-this.elapsed},getOverallRemainingSeconds:function(){return this.getOverallRemaining()*.001},remove:function(r){r===void 0&&(r=!1),this.elapsed=this.delay,this.hasDispatched=!r,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});p.exports=h}),35945:(p=>{p.exports="complete"}),89809:((p,S,t)=>{p.exports={COMPLETE:t(35945)}}),90291:((p,S,t)=>{p.exports={Clock:t(33385),Events:t(89809),Timeline:t(96120),TimerEvent:t(94880)}}),40382:((p,S,t)=>{var d=t(72905),c=t(83419),h=t(43491),r=t(88032),n=t(37277),e=t(44594),s=t(93109),o=t(86081),i=t(8357),a=t(43960),l=t(26012),f=new c({initialize:function(v){this.scene=v,this.events=v.sys.events,this.timeScale=1,this.paused=!1,this.processing=!1,this.tweens=[],this.time=0,this.startTime=0,this.nextTime=0,this.prevTime=0,this.maxLag=500,this.lagSkip=33,this.gap=1e3/240,this.events.once(e.BOOT,this.boot,this),this.events.on(e.START,this.start,this)},boot:function(){this.events.once(e.DESTROY,this.destroy,this)},start:function(){this.timeScale=1,this.paused=!1,this.startTime=Date.now(),this.prevTime=this.startTime,this.nextTime=this.gap,this.events.on(e.UPDATE,this.update,this),this.events.once(e.SHUTDOWN,this.shutdown,this)},create:function(u){Array.isArray(u)||(u=[u]);for(var v=[],m=0;m<u.length;m++){var x=u[m];x instanceof o||x instanceof a?v.push(x):Array.isArray(x.tweens)?v.push(l(this,x)):v.push(i(this,x))}return v.length===1?v[0]:v},add:function(u){var v=u,m=this.tweens;return v instanceof o||v instanceof a||(Array.isArray(v.tweens)?v=l(this,v):v=i(this,v)),m.push(v.reset()),v},addMultiple:function(u){for(var v,m=[],x=this.tweens,g=0;g<u.length;g++)v=u[g],v instanceof o||v instanceof a||(Array.isArray(v.tweens)?v=l(this,v):v=i(this,v)),x.push(v.reset()),m.push(v);return m},chain:function(u){var v=l(this,u);return this.tweens.push(v.init()),v},getChainedTweens:function(u){return u.getChainedTweens()},has:function(u){return this.tweens.indexOf(u)>-1},existing:function(u){return this.has(u)||this.tweens.push(u.reset()),this},addCounter:function(u){var v=r(this,u);return this.tweens.push(v.reset()),v},stagger:function(u,v){return s(u,v)},setLagSmooth:function(u,v){return u===void 0&&(u=1/1e-8),v===void 0&&(v=0),this.maxLag=u,this.lagSkip=Math.min(v,this.maxLag),this},setFps:function(u){return u===void 0&&(u=240),this.gap=1e3/u,this.nextTime=this.time*1e3+this.gap,this},getDelta:function(u){var v=Date.now()-this.prevTime;v>this.maxLag&&(this.startTime+=v-this.lagSkip),this.prevTime+=v;var m=this.prevTime-this.startTime,x=m-this.nextTime,g=m-this.time*1e3;return x>0||u?(m/=1e3,this.time=m,this.nextTime+=x+(x>=this.gap?4:this.gap-x)):g=0,g},tick:function(){return this.step(!0),this},update:function(){this.paused||this.step(!1)},step:function(u){u===void 0&&(u=!1);var v=this.getDelta(u);if(!(v<=0)){this.processing=!0;var m,x,g=[],y=this.tweens;for(m=0;m<y.length;m++)x=y[m],x.update(v)&&g.push(x);var T=g.length;if(T&&y.length>0){for(m=0;m<T;m++){x=g[m];var C=y.indexOf(x);C>-1&&(x.isPendingRemove()||x.isDestroyed())&&(y.splice(C,1),x.destroy())}g.length=0}this.processing=!1}},remove:function(u){return this.processing?u.setPendingRemoveState():(d(this.tweens,u),u.setRemovedState()),this},reset:function(u){return this.existing(u),u.seek(),u.setActiveState(),this},makeActive:function(u){return this.existing(u),u.setActiveState(),this},each:function(u,v){var m,x=[null];for(m=1;m<arguments.length;m++)x.push(arguments[m]);return this.tweens.forEach(function(g){x[0]=g,u.apply(v,x)}),this},getTweens:function(){return this.tweens.slice()},getTweensOf:function(u){var v=[],m=this.tweens;Array.isArray(u)?u=h(u):u=[u];for(var x=u.length,g=0;g<m.length;g++)for(var y=m[g],T=0;T<x;T++)!y.isDestroyed()&&y.hasTarget(u[T])&&v.push(y);return v},getGlobalTimeScale:function(){return this.timeScale},setGlobalTimeScale:function(u){return this.timeScale=u,this},isTweening:function(u){for(var v=this.tweens,m,x=0;x<v.length;x++)if(m=v[x],m.isPlaying()&&m.hasTarget(u))return!0;return!1},killAll:function(){for(var u=this.processing?this.getTweens():this.tweens,v=0;v<u.length;v++)u[v].destroy();return this.processing||(u.length=0),this},killTweensOf:function(u){for(var v=this.getTweensOf(u),m=0;m<v.length;m++)v[m].destroy();return this},pauseAll:function(){return this.paused=!0,this},resumeAll:function(){return this.paused=!1,this},shutdown:function(){this.killAll(),this.tweens=[],this.events.off(e.UPDATE,this.update,this),this.events.off(e.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(e.START,this.start,this),this.scene=null,this.events=null}});n.register("TweenManager",f,"tweens"),p.exports=f}),57355:(p=>{var S=function(t,d,c){return t&&t.hasOwnProperty(d)?t[d]:c};p.exports=S}),6113:((p,S,t)=>{var d=t(62640),c=t(35355),h=function(r,n){var e=d.Power0;if(typeof r=="string")if(d.hasOwnProperty(r))e=d[r];else{var s="";if(r.indexOf(".")){s=r.substring(r.indexOf(".")+1);var o=s.toLowerCase();o==="in"?s="easeIn":o==="out"?s="easeOut":o==="inout"&&(s="easeInOut")}r=c(r.substring(0,r.indexOf(".")+1)+s),d.hasOwnProperty(r)&&(e=d[r])}else typeof r=="function"&&(e=r);if(!n)return e;var i=n.slice(0);return i.unshift(0),function(a){return i[0]=a,e.apply(this,i)}};p.exports=h}),91389:((p,S,t)=>{var d=t(89318),c=t(77259),h=t(28392),r={bezier:d,catmull:c,catmullrom:c,linear:h},n=function(e){if(e===null)return null;var s=r.linear;return typeof e=="string"?r.hasOwnProperty(e)&&(s=r[e]):typeof e=="function"&&(s=e),s};p.exports=n}),55292:(p=>{var S=function(t,d,c){var h;if(t.hasOwnProperty(d)){var r=typeof t[d];r==="function"?h=function(n,e,s,o,i,a){return t[d](n,e,s,o,i,a)}:h=function(){return t[d]}}else typeof c=="function"?h=c:h=function(){return c};return h};p.exports=S}),82985:((p,S,t)=>{var d=t(81076),c=function(h){var r,n=[];if(h.hasOwnProperty("props"))for(r in h.props)r.substring(0,1)!=="_"&&n.push({key:r,value:h.props[r]});else for(r in h)d.indexOf(r)===-1&&r.substring(0,1)!=="_"&&n.push({key:r,value:h[r]});return n};p.exports=c}),62329:((p,S,t)=>{var d=t(35154),c=function(h){var r=d(h,"targets",null);return r===null||(typeof r=="function"&&(r=r.call()),Array.isArray(r)||(r=[r])),r};p.exports=c}),17777:((p,S,t)=>{var d=t(30976),c=t(99472);function h(o){return!!o.getActive&&typeof o.getActive=="function"}function r(o){return!!o.getStart&&typeof o.getStart=="function"}function n(o){return!!o.getEnd&&typeof o.getEnd=="function"}function e(o){return r(o)||n(o)||h(o)}var s=function(o,i){var a,l=function(U,N,D){return D},f=function(U,N,D){return D},u=null,v=typeof i;if(v==="number")l=function(){return i};else if(Array.isArray(i))f=function(){return i[0]},l=function(){return i[i.length-1]};else if(v==="string"){var m=i.toLowerCase(),x=m.substring(0,6)==="random",g=m.substring(0,3)==="int";if(x||g){var y=m.indexOf("("),T=m.indexOf(")"),C=m.indexOf(",");if(y&&T&&C){var E=parseFloat(m.substring(y+1,C)),M=parseFloat(m.substring(C+1,T));x?l=function(){return c(E,M)}:l=function(){return d(E,M)}}else throw new Error("invalid random() format")}else{m=m[0];var P=parseFloat(i.substr(2));switch(m){case"+":l=function(U,N,D){return D+P};break;case"-":l=function(U,N,D){return D-P};break;case"*":l=function(U,N,D){return D*P};break;case"/":l=function(U,N,D){return D/P};break;default:l=function(){return parseFloat(i)}}}}else if(v==="function")l=i;else if(v==="object")if(e(i))h(i)&&(u=i.getActive),n(i)&&(l=i.getEnd),r(i)&&(f=i.getStart);else if(i.hasOwnProperty("value"))a=s(o,i.value);else{var A=i.hasOwnProperty("to"),R=i.hasOwnProperty("from"),F=i.hasOwnProperty("start");if(A&&(R||F)){if(a=s(o,i.to),F){var w=s(o,i.start);a.getActive=w.getEnd}if(R){var I=s(o,i.from);a.getStart=I.getEnd}}}return a||(a={getActive:u,getEnd:l,getStart:f}),a};p.exports=s}),88032:((p,S,t)=>{var d=t(70402),c=t(69902),h=t(23568),r=t(57355),n=t(6113),e=t(95540),s=t(55292),o=t(35154),i=t(17777),a=t(269),l=t(86081),f=function(u,v,m){if(v instanceof l)return v.parent=u,v;m===void 0?m=c:m=a(c,m);var x=e(v,"from",0),g=e(v,"to",1),y=[{value:x}],T=e(v,"delay",m.delay),C=e(v,"easeParams",m.easeParams),E=e(v,"ease",m.ease),M=i("value",g),P=new l(u,y),A=P.add(0,"value",M.getEnd,M.getStart,M.getActive,n(e(v,"ease",E),e(v,"easeParams",C)),s(v,"delay",T),e(v,"duration",m.duration),r(v,"yoyo",m.yoyo),e(v,"hold",m.hold),e(v,"repeat",m.repeat),e(v,"repeatDelay",m.repeatDelay),!1,!1);A.start=x,A.current=x,P.completeDelay=h(v,"completeDelay",0),P.loop=Math.round(h(v,"loop",0)),P.loopDelay=Math.round(h(v,"loopDelay",0)),P.paused=r(v,"paused",!1),P.persist=r(v,"persist",!1),P.isNumberTween=!0,P.callbackScope=o(v,"callbackScope",P);for(var R=d.TYPES,F=0;F<R.length;F++){var w=R[F],I=o(v,w,!1);if(I){var U=o(v,w+"Params",[]);P.setCallback(w,I,U)}}return P};p.exports=f}),93109:((p,S,t)=>{var d=t(6113),c=t(35154),h=t(36383),r=function(n,e){e===void 0&&(e={});var s,o=c(e,"start",0),i=c(e,"ease",null),a=c(e,"grid",null),l=c(e,"from",0),f=l==="first",u=l==="center",v=l==="last",m=typeof l=="number",x=Array.isArray(n),g=parseFloat(x?n[0]:n),y=x?parseFloat(n[1]):0,T=Math.max(g,y);if(x&&(o+=g),a){var C=a[0],E=a[1],M=0,P=0,A=0,R=0,F=[];v?(M=C-1,P=E-1):m?(M=l%C,P=Math.floor(l/C)):u&&(M=(C-1)/2,P=(E-1)/2);for(var w=h.MIN_SAFE_INTEGER,I=0;I<E;I++){F[I]=[];for(var U=0;U<C;U++){A=M-U,R=P-I;var N=Math.sqrt(A*A+R*R);N>w&&(w=N),F[I][U]=N}}}var D=i?d(i):null;return a?s=function(B,L,G,O){var X=0,z=O%C,V=Math.floor(O/C);z>=0&&z<C&&V>=0&&V<E&&(X=F[V][z]);var Y;if(x){var W=y-g;D?Y=X/w*W*D(X/w):Y=X/w*W}else D?Y=X*g*D(X/w):Y=X*g;return Y+o}:s=function(B,L,G,O,X){X--;var z;f?z=O:u?z=Math.abs(X/2-O):v?z=X-O:m&&(z=Math.abs(l-O));var V;if(x){var Y;u?Y=(y-g)/X*(z*2):Y=(y-g)/X*z,D?V=Y*D(z/X):V=Y}else D?V=X*T*D(z/X):V=z*g;return V+o},s};p.exports=r}),8357:((p,S,t)=>{var d=t(70402),c=t(69902),h=t(23568),r=t(57355),n=t(6113),e=t(95540),s=t(91389),o=t(55292),i=t(82985),a=t(62329),l=t(35154),f=t(17777),u=t(269),v=t(86081),m=function(x,g,y){if(g instanceof v)return g.parent=x,g;y===void 0?y=c:y=u(c,y);var T=a(g);!T&&y.targets&&(T=y.targets);for(var C=i(g),E=e(g,"delay",y.delay),M=e(g,"duration",y.duration),P=e(g,"easeParams",y.easeParams),A=e(g,"ease",y.ease),R=e(g,"hold",y.hold),F=e(g,"repeat",y.repeat),w=e(g,"repeatDelay",y.repeatDelay),I=r(g,"yoyo",y.yoyo),U=r(g,"flipX",y.flipX),N=r(g,"flipY",y.flipY),D=e(g,"interpolation",y.interpolation),B=function(b,J,$,Z){if($==="texture"){var q=Z,_=void 0;Array.isArray(Z)?(q=Z[0],_=Z[1]):Z.hasOwnProperty("value")?(q=Z.value,Array.isArray(Z.value)?(q=Z.value[0],_=Z.value[1]):typeof Z.value=="string"&&(q=Z.value)):typeof Z=="string"&&(q=Z),b.addFrame(J,q,_,o(Z,"delay",E),e(Z,"duration",M),e(Z,"hold",R),e(Z,"repeat",F),e(Z,"repeatDelay",w),r(Z,"flipX",U),r(Z,"flipY",N))}else{var tt=f($,Z),Q=s(e(Z,"interpolation",D));b.add(J,$,tt.getEnd,tt.getStart,tt.getActive,n(e(Z,"ease",A),e(Z,"easeParams",P)),o(Z,"delay",E),e(Z,"duration",M),r(Z,"yoyo",I),e(Z,"hold",R),e(Z,"repeat",F),e(Z,"repeatDelay",w),r(Z,"flipX",U),r(Z,"flipY",N),Q,Q?Z:null)}},L=new v(x,T),G=0;G<C.length;G++)for(var O=C[G].key,X=C[G].value,z=0;z<T.length;z++)O==="scale"&&!T[z].hasOwnProperty("scale")?(B(L,z,"scaleX",X),B(L,z,"scaleY",X)):B(L,z,O,X);L.completeDelay=h(g,"completeDelay",0),L.loop=Math.round(h(g,"loop",0)),L.loopDelay=Math.round(h(g,"loopDelay",0)),L.paused=r(g,"paused",!1),L.persist=r(g,"persist",!1),L.callbackScope=e(g,"callbackScope",L);for(var V=d.TYPES,Y=0;Y<V.length;Y++){var W=V[Y],H=l(g,W,!1);if(H){var K=l(g,W+"Params",[]);L.setCallback(W,H,K)}}return L};p.exports=m}),26012:((p,S,t)=>{var d=t(70402),c=t(23568),h=t(57355),r=t(62329),n=t(35154),e=t(8357),s=t(43960),o=function(i,a){if(a instanceof s)return a.parent=i,a;var l=new s(i);l.startDelay=n(a,"delay",0),l.completeDelay=c(a,"completeDelay",0),l.loop=Math.round(c(a,"loop",n(a,"repeat",0))),l.loopDelay=Math.round(c(a,"loopDelay",n(a,"repeatDelay",0))),l.paused=h(a,"paused",!1),l.persist=h(a,"persist",!1),l.callbackScope=n(a,"callbackScope",l);var f,u=d.TYPES;for(f=0;f<u.length;f++){var v=u[f],m=n(a,v,!1);if(m){var x=n(a,v+"Params",[]);l.setCallback(v,m,x)}}var g=n(a,"tweens",null);if(Array.isArray(g)){var y=[],T=r(a),C=void 0;for(T&&(C={targets:T}),f=0;f<g.length;f++)y.push(e(l,g[f],C));l.add(y)}return l};p.exports=o}),30231:((p,S,t)=>{p.exports={GetBoolean:t(57355),GetEaseFunction:t(6113),GetInterpolationFunction:t(91389),GetNewValue:t(55292),GetProps:t(82985),GetTargets:t(62329),GetValueOp:t(17777),NumberTweenBuilder:t(88032),StaggerBuilder:t(93109),TweenBuilder:t(8357)}}),73685:(p=>{p.exports="active"}),98540:(p=>{p.exports="complete"}),67233:(p=>{p.exports="loop"}),2859:(p=>{p.exports="pause"}),98336:(p=>{p.exports="repeat"}),25764:(p=>{p.exports="resume"}),32193:(p=>{p.exports="start"}),84371:(p=>{p.exports="stop"}),70766:(p=>{p.exports="update"}),55659:(p=>{p.exports="yoyo"}),842:((p,S,t)=>{p.exports={TWEEN_ACTIVE:t(73685),TWEEN_COMPLETE:t(98540),TWEEN_LOOP:t(67233),TWEEN_PAUSE:t(2859),TWEEN_RESUME:t(25764),TWEEN_REPEAT:t(98336),TWEEN_START:t(32193),TWEEN_STOP:t(84371),TWEEN_UPDATE:t(70766),TWEEN_YOYO:t(55659)}}),43066:((p,S,t)=>{var d={States:t(86353),Builders:t(30231),Events:t(842),TweenManager:t(40382),Tween:t(86081),TweenData:t(48177),TweenFrameData:t(42220),BaseTween:t(70402),TweenChain:t(43960)};p.exports=d}),70402:((p,S,t)=>{var d=t(83419),c=t(50792),h=t(842),r=t(86353),n=new d({Extends:c,initialize:function(s){c.call(this),this.parent=s,this.data=[],this.totalData=0,this.startDelay=0,this.hasStarted=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.state=r.PENDING,this.paused=!1,this.callbacks={onActive:null,onComplete:null,onLoop:null,onPause:null,onRepeat:null,onResume:null,onStart:null,onStop:null,onUpdate:null,onYoyo:null},this.callbackScope,this.persist=!1},setTimeScale:function(e){return this.timeScale=e,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return!this.paused&&this.isActive()},isPaused:function(){return this.paused},pause:function(){return this.paused||(this.paused=!0,this.dispatchEvent(h.TWEEN_PAUSE,"onPause")),this},resume:function(){return this.paused&&(this.paused=!1,this.dispatchEvent(h.TWEEN_RESUME,"onResume")),this},makeActive:function(){this.parent.makeActive(this),this.dispatchEvent(h.TWEEN_ACTIVE,"onActive")},onCompleteHandler:function(){this.setPendingRemoveState(),this.dispatchEvent(h.TWEEN_COMPLETE,"onComplete")},complete:function(e){return e===void 0&&(e=0),e?(this.setCompleteDelayState(),this.countdown=e):this.onCompleteHandler(),this},completeAfterLoop:function(e){return e===void 0&&(e=0),this.loopCounter>e&&(this.loopCounter=e),this},remove:function(){return this.parent&&this.parent.remove(this),this},stop:function(){return this.parent&&!this.isRemoved()&&!this.isPendingRemove()&&!this.isDestroyed()&&(this.dispatchEvent(h.TWEEN_STOP,"onStop"),this.setPendingRemoveState()),this},updateLoopCountdown:function(e){this.countdown-=e,this.countdown<=0&&(this.setActiveState(),this.dispatchEvent(h.TWEEN_LOOP,"onLoop"))},updateStartCountdown:function(e){return this.countdown-=e,this.countdown<=0&&(this.hasStarted=!0,this.setActiveState(),this.dispatchEvent(h.TWEEN_START,"onStart"),e=0),e},updateCompleteDelay:function(e){this.countdown-=e,this.countdown<=0&&this.onCompleteHandler()},setCallback:function(e,s,o){return o===void 0&&(o=[]),this.callbacks.hasOwnProperty(e)&&(this.callbacks[e]={func:s,params:o}),this},setPendingState:function(){this.state=r.PENDING},setActiveState:function(){this.state=r.ACTIVE,this.hasStarted=!1},setLoopDelayState:function(){this.state=r.LOOP_DELAY},setCompleteDelayState:function(){this.state=r.COMPLETE_DELAY},setStartDelayState:function(){this.state=r.START_DELAY,this.countdown=this.startDelay,this.hasStarted=!1},setPendingRemoveState:function(){this.state=r.PENDING_REMOVE},setRemovedState:function(){this.state=r.REMOVED},setFinishedState:function(){this.state=r.FINISHED},setDestroyedState:function(){this.state=r.DESTROYED},isPending:function(){return this.state===r.PENDING},isActive:function(){return this.state===r.ACTIVE},isLoopDelayed:function(){return this.state===r.LOOP_DELAY},isCompleteDelayed:function(){return this.state===r.COMPLETE_DELAY},isStartDelayed:function(){return this.state===r.START_DELAY},isPendingRemove:function(){return this.state===r.PENDING_REMOVE},isRemoved:function(){return this.state===r.REMOVED},isFinished:function(){return this.state===r.FINISHED},isDestroyed:function(){return this.state===r.DESTROYED},destroy:function(){this.data&&this.data.forEach(function(e){e.destroy()}),this.removeAllListeners(),this.callbacks=null,this.data=null,this.parent=null,this.setDestroyedState()}});n.TYPES=["onActive","onComplete","onLoop","onPause","onRepeat","onResume","onStart","onStop","onUpdate","onYoyo"],p.exports=n}),95042:((p,S,t)=>{var d=t(83419),c=t(842),h=t(86353),r=new d({initialize:function(e,s,o,i,a,l,f,u,v,m){this.tween=e,this.targetIndex=s,this.duration=i<=0?.01:i,this.totalDuration=0,this.delay=0,this.getDelay=o,this.yoyo=a,this.hold=l,this.repeat=f,this.repeatDelay=u,this.repeatCounter=0,this.flipX=v,this.flipY=m,this.progress=0,this.elapsed=0,this.state=0,this.isCountdown=!1},getTarget:function(){return this.tween.targets[this.targetIndex]},setTargetValue:function(n){n===void 0&&(n=this.current),this.tween.targets[this.targetIndex][this.key]=n},setCreatedState:function(){this.state=h.CREATED,this.isCountdown=!1},setDelayState:function(){this.state=h.DELAY,this.isCountdown=!0},setPendingRenderState:function(){this.state=h.PENDING_RENDER,this.isCountdown=!1},setPlayingForwardState:function(){this.state=h.PLAYING_FORWARD,this.isCountdown=!1},setPlayingBackwardState:function(){this.state=h.PLAYING_BACKWARD,this.isCountdown=!1},setHoldState:function(){this.state=h.HOLD_DELAY,this.isCountdown=!0},setRepeatState:function(){this.state=h.REPEAT_DELAY,this.isCountdown=!0},setCompleteState:function(){this.state=h.COMPLETE,this.isCountdown=!1},isCreated:function(){return this.state===h.CREATED},isDelayed:function(){return this.state===h.DELAY},isPendingRender:function(){return this.state===h.PENDING_RENDER},isPlayingForward:function(){return this.state===h.PLAYING_FORWARD},isPlayingBackward:function(){return this.state===h.PLAYING_BACKWARD},isHolding:function(){return this.state===h.HOLD_DELAY},isRepeating:function(){return this.state===h.REPEAT_DELAY},isComplete:function(){return this.state===h.COMPLETE},setStateFromEnd:function(n){this.yoyo?this.onRepeat(n,!0,!0):this.repeatCounter>0?this.onRepeat(n,!0,!1):this.setCompleteState()},setStateFromStart:function(n){this.repeatCounter>0?this.onRepeat(n,!1):this.setCompleteState()},reset:function(){var n=this.tween,e=n.totalTargets,s=this.targetIndex,o=n.targets[s],i=this.key;this.progress=0,this.elapsed=0,this.delay=this.getDelay(o,i,0,s,e,n),this.repeatCounter=this.repeat===-1?h.MAX:this.repeat,this.setPendingRenderState();var a=this.duration+this.hold;this.yoyo&&(a+=this.duration);var l=a+this.repeatDelay;this.totalDuration=this.delay+a,this.repeat===-1?(this.totalDuration+=l*h.MAX,n.isInfinite=!0):this.repeat>0&&(this.totalDuration+=l*this.repeat),this.totalDuration>n.duration&&(n.duration=this.totalDuration),this.delay<n.startDelay&&(n.startDelay=this.delay),this.delay>0&&(this.elapsed=this.delay,this.setDelayState())},onRepeat:function(n,e,s){var o=this.tween,i=o.totalTargets,a=this.targetIndex,l=o.targets[a],f=this.key,u=f!=="texture";if(this.elapsed=n,this.progress=n/this.duration,this.flipX&&l.toggleFlipX(),this.flipY&&l.toggleFlipY(),u&&(e||s)&&(this.start=this.getStartValue(l,f,this.start,a,i,o)),s){this.setPlayingBackwardState(),this.dispatchEvent(c.TWEEN_YOYO,"onYoyo");return}this.repeatCounter--,u&&(this.end=this.getEndValue(l,f,this.start,a,i,o)),this.repeatDelay>0?(this.elapsed=this.repeatDelay-n,u&&(this.current=this.start,l[f]=this.current),this.setRepeatState()):(this.setPlayingForwardState(),this.dispatchEvent(c.TWEEN_REPEAT,"onRepeat"))},destroy:function(){this.tween=null,this.getDelay=null,this.setCompleteState()}});p.exports=r}),69902:(p=>{var S={targets:null,delay:0,duration:1e3,ease:"Power0",easeParams:null,hold:0,repeat:0,repeatDelay:0,yoyo:!1,flipX:!1,flipY:!1,persist:!1,interpolation:null};p.exports=S}),81076:(p=>{p.exports=["callbackScope","completeDelay","delay","duration","ease","easeParams","flipX","flipY","hold","interpolation","loop","loopDelay","onActive","onActiveParams","onComplete","onCompleteParams","onLoop","onLoopParams","onPause","onPauseParams","onRepeat","onRepeatParams","onResume","onResumeParams","onStart","onStartParams","onStop","onStopParams","onUpdate","onUpdateParams","onYoyo","onYoyoParams","paused","persist","props","repeat","repeatDelay","targets","yoyo"]}),86081:((p,S,t)=>{var d=t(70402),c=t(83419),h=t(842),r=t(44603),n=t(39429),e=t(36383),s=t(86353),o=t(48177),i=t(42220),a=new c({Extends:d,initialize:function(f,u){d.call(this,f),this.targets=u,this.totalTargets=u.length,this.isSeeking=!1,this.isInfinite=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0,this.isNumberTween=!1},add:function(l,f,u,v,m,x,g,y,T,C,E,M,P,A,R,F){var w=new o(this,l,f,u,v,m,x,g,y,T,C,E,M,P,A,R,F);return this.totalData=this.data.push(w),w},addFrame:function(l,f,u,v,m,x,g,y,T,C){var E=new i(this,l,f,u,v,m,x,g,y,T,C);return this.totalData=this.data.push(E),E},getValue:function(l){l===void 0&&(l=0);var f=null;return this.data&&(f=this.data[l].current),f},hasTarget:function(l){return this.targets&&this.targets.indexOf(l)!==-1},updateTo:function(l,f,u){if(u===void 0&&(u=!1),l!=="texture")for(var v=0;v<this.totalData;v++){var m=this.data[v];m.key===l&&(m.isPlayingForward()||m.isPlayingBackward())&&(m.end=f,u&&(m.start=m.current))}return this},restart:function(){switch(this.state){case s.REMOVED:case s.FINISHED:this.seek(),this.parent.makeActive(this);break;case s.PENDING:case s.PENDING_REMOVE:this.parent.reset(this);break;case s.DESTROYED:console.warn("Cannot restart destroyed Tween",this);break;default:this.seek();break}return this.paused=!1,this.hasStarted=!1,this},nextState:function(){if(this.loopCounter>0)this.elapsed=0,this.progress=0,this.loopCounter--,this.initTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(h.TWEEN_LOOP,"onLoop"));else if(this.completeDelay>0)this.countdown=this.completeDelay,this.setCompleteDelayState();else return this.onCompleteHandler(),!0;return!1},onCompleteHandler:function(){this.progress=1,this.totalProgress=1,d.prototype.onCompleteHandler.call(this)},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed Tween",this),this):((this.isPendingRemove()||this.isFinished())&&this.seek(),this.paused=!1,this.setActiveState(),this)},seek:function(l,f,u){if(l===void 0&&(l=0),f===void 0&&(f=16.6),u===void 0&&(u=!1),this.isDestroyed())return console.warn("Cannot seek destroyed Tween",this),this;u||(this.isSeeking=!0),this.reset(!0),this.initTweenData(!0),this.setActiveState(),this.dispatchEvent(h.TWEEN_ACTIVE,"onActive");var v=this.paused;if(this.paused=!1,l>0){for(var m=Math.floor(l/f),x=l-m*f,g=0;g<m;g++)this.update(f);x>0&&this.update(x)}return this.paused=v,this.isSeeking=!1,this},initTweenData:function(l){l===void 0&&(l=!1),this.duration=0,this.startDelay=e.MAX_SAFE_INTEGER;for(var f=this.data,u=0;u<this.totalData;u++)f[u].reset(l);this.duration=Math.max(this.duration,.01);var v=this.duration,m=this.completeDelay,x=this.loopCounter,g=this.loopDelay;x>0?this.totalDuration=v+m+(v+g)*x:this.totalDuration=v+m},reset:function(l){return l===void 0&&(l=!1),this.elapsed=0,this.totalElapsed=0,this.progress=0,this.totalProgress=0,this.loopCounter=this.loop,this.loop===-1&&(this.isInfinite=!0,this.loopCounter=s.MAX),l||(this.initTweenData(),this.setActiveState(),this.dispatchEvent(h.TWEEN_ACTIVE,"onActive")),this},update:function(l){if(this.isPendingRemove()||this.isDestroyed())return this.persist?(this.setFinishedState(),!1):!0;if(this.paused||this.isFinished())return!1;if(l*=this.timeScale*this.parent.timeScale,this.isLoopDelayed())return this.updateLoopCountdown(l),!1;if(this.isCompleteDelayed())return this.updateCompleteDelay(l),!1;this.hasStarted||(this.startDelay-=l,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchEvent(h.TWEEN_START,"onStart"),l=0));var f=!1;if(this.isActive())for(var u=this.data,v=0;v<this.totalData;v++)u[v].update(l)&&(f=!0);this.elapsed+=l,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=l,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),f||this.nextState();var m=this.isPendingRemove();return m&&this.persist&&(this.setFinishedState(),m=!1),m},forward:function(l){return this.update(l),this},rewind:function(l){return this.update(-l),this},dispatchEvent:function(l,f){if(!this.isSeeking){if(this.emit(l,this,this.targets),!this.callbacks)return;var u=this.callbacks[f];u&&u.func.apply(this.callbackScope,[this,this.targets].concat(u.params))}},destroy:function(){d.prototype.destroy.call(this),this.targets=null}});n.register("tween",function(l){return this.scene.sys.tweens.add(l)}),r.register("tween",function(l){return this.scene.sys.tweens.create(l)}),p.exports=a}),43960:((p,S,t)=>{var d=t(72905),c=t(70402),h=t(83419),r=t(842),n=t(44603),e=t(39429),s=t(86353),o=new h({Extends:c,initialize:function(a){c.call(this,a),this.currentTween=null,this.currentIndex=0},init:function(){return this.loopCounter=this.loop===-1?s.MAX:this.loop,this.setCurrentTween(0),this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this},add:function(i){var a=this.parent.create(i);Array.isArray(a)||(a=[a]);for(var l=this.data,f=0;f<a.length;f++){var u=a[f];u.parent=this,l.push(u.reset())}return this.totalData=l.length,this},remove:function(i){return d(this.data,i),i.setRemovedState(),i===this.currentTween&&this.nextTween(),this.totalData=this.data.length,this},hasTarget:function(i){for(var a=this.data,l=0;l<this.totalData;l++)if(a[l].hasTarget(i))return!0;return!1},restart:function(){return this.isDestroyed()?(console.warn("Cannot restart destroyed TweenChain",this),this):(this.isRemoved()&&this.parent.makeActive(this),this.resetTweens(),this.paused=!1,this.init())},reset:function(i){return i.seek(),i.setActiveState(),this},makeActive:function(i){return i.reset(),i.setActiveState(),this},nextState:function(){if(this.loopCounter>0)this.loopCounter--,this.resetTweens(),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(r.TWEEN_LOOP,"onLoop"));else if(this.completeDelay>0)this.countdown=this.completeDelay,this.setCompleteDelayState();else return this.onCompleteHandler(),!0;return!1},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed TweenChain",this),this):((this.isPendingRemove()||this.isPending())&&this.resetTweens(),this.paused=!1,this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this)},resetTweens:function(){for(var i=this.data,a=this.totalData,l=0;l<a;l++)i[l].reset(!1);this.setCurrentTween(0)},update:function(i){if(this.isPendingRemove()||this.isDestroyed())return this.persist?(this.setFinishedState(),!1):!0;if(this.isFinished()||this.paused)return!1;if(i*=this.parent.timeScale,this.isLoopDelayed())return this.updateLoopCountdown(i),!1;if(this.isCompleteDelayed())return this.updateCompleteDelay(i),!1;this.hasStarted||(this.startDelay-=i,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchEvent(r.TWEEN_START,"onStart"),i=0));var a=!1;return this.isActive()&&this.currentTween&&(this.currentTween.update(i)&&this.nextTween()&&this.nextState(),a=this.isPendingRemove(),a&&this.persist&&(this.setFinishedState(),a=!1)),a},nextTween:function(){return this.currentIndex++,this.currentIndex===this.totalData?!0:(this.setCurrentTween(this.currentIndex),!1)},setCurrentTween:function(i){this.currentIndex=i,this.currentTween=this.data[i],this.currentTween.setActiveState()},dispatchEvent:function(i,a){this.emit(i,this);var l=this.callbacks[a];l&&l.func.apply(this.callbackScope,[this].concat(l.params))},destroy:function(){c.prototype.destroy.call(this),this.currentTween=null}});e.register("tweenchain",function(i){return this.scene.sys.tweens.chain(i)}),n.register("tweenchain",function(i){return this.scene.sys.tweens.create(i)}),p.exports=o}),48177:((p,S,t)=>{var d=t(95042),c=t(45319),h=t(83419),r=t(842),n=new h({Extends:d,initialize:function(s,o,i,a,l,f,u,v,m,x,g,y,T,C,E,M,P){d.call(this,s,o,v,m,x,g,y,T,C,E),this.key=i,this.getActiveValue=f,this.getEndValue=a,this.getStartValue=l,this.ease=u,this.start=0,this.previous=0,this.current=0,this.end=0,this.interpolation=M,this.interpolationData=P},reset:function(e){d.prototype.reset.call(this);var s=this.tween.targets[this.targetIndex],o=this.key;e&&(s[o]=this.start),this.start=0,this.previous=0,this.current=0,this.end=0,this.getActiveValue&&(s[o]=this.getActiveValue(s,o,0))},update:function(e){var s=this.tween,o=s.totalTargets,i=this.targetIndex,a=s.targets[i],l=this.key;if(!a)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=e,this.elapsed<=0&&(this.elapsed=0,e=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(r.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.start=this.getStartValue(a,l,a[l],i,o,s),this.end=this.getEndValue(a,l,this.start,i,o,s),this.current=this.start,a[l]=this.start,this.setPlayingForwardState(),!0;var f=this.isPlayingForward(),u=this.isPlayingBackward();if(f||u){var v=this.elapsed,m=this.duration,x=0,g=!1;v+=e,v>=m?(x=v-m,v=m,g=!0):v<0&&(v=0);var y=c(v/m,0,1);this.elapsed=v,this.progress=y,this.previous=this.current,f||(y=1-y);var T=this.ease(y);this.interpolation?this.current=this.interpolation(this.interpolationData,T):this.current=this.start+(this.end-this.start)*T,a[l]=this.current,g&&(f?(s.isNumberTween&&(this.current=this.end,a[l]=this.current),this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(x)):(s.isNumberTween&&(this.current=this.start,a[l]=this.current),this.setStateFromStart(x))),this.dispatchEvent(r.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(e,s){var o=this.tween;if(!o.isSeeking){var i=o.targets[this.targetIndex],a=this.key,l=this.current,f=this.previous;o.emit(e,o,a,i,l,f);var u=o.callbacks[s];u&&u.func.apply(o.callbackScope,[o,i,a,l,f].concat(u.params))}},destroy:function(){d.prototype.destroy.call(this),this.getActiveValue=null,this.getEndValue=null,this.getStartValue=null,this.ease=null}});p.exports=n}),42220:((p,S,t)=>{var d=t(95042),c=t(45319),h=t(83419),r=t(842),n=new h({Extends:d,initialize:function(s,o,i,a,l,f,u,v,m,x,g){d.call(this,s,o,l,f,!1,u,v,m,x,g),this.key="texture",this.startTexture=null,this.endTexture=i,this.startFrame=null,this.endFrame=a,this.yoyo=v!==0},reset:function(e){d.prototype.reset.call(this);var s=this.tween.targets[this.targetIndex];this.startTexture||(this.startTexture=s.texture.key,this.startFrame=s.frame.name),e&&s.setTexture(this.startTexture,this.startFrame)},update:function(e){var s=this.tween,o=this.targetIndex,i=s.targets[o];if(!i)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=e,this.elapsed<=0&&(this.elapsed=0,e=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(r.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.startTexture&&i.setTexture(this.startTexture,this.startFrame),this.setPlayingForwardState(),!0;var a=this.isPlayingForward(),l=this.isPlayingBackward();if(a||l){var f=this.elapsed,u=this.duration,v=0,m=!1;f+=e,f>=u?(v=f-u,f=u,m=!0):f<0&&(f=0);var x=c(f/u,0,1);this.elapsed=f,this.progress=x,m&&(a?(i.setTexture(this.endTexture,this.endFrame),this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(v)):(i.setTexture(this.startTexture,this.startFrame),this.setStateFromStart(v))),this.dispatchEvent(r.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(e,s){var o=this.tween;if(!o.isSeeking){var i=o.targets[this.targetIndex],a=this.key;o.emit(e,o,a,i);var l=o.callbacks[s];l&&l.func.apply(o.callbackScope,[o,i,a].concat(l.params))}},destroy:function(){d.prototype.destroy.call(this),this.startTexture=null,this.endTexture=null,this.startFrame=null,this.endFrame=null}});p.exports=n}),86353:(p=>{var S={CREATED:0,DELAY:2,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING:20,ACTIVE:21,LOOP_DELAY:22,COMPLETE_DELAY:23,START_DELAY:24,PENDING_REMOVE:25,REMOVED:26,FINISHED:27,DESTROYED:28,MAX:999999999999};p.exports=S}),83419:(p=>{function S(n){return!!n.get&&typeof n.get=="function"||!!n.set&&typeof n.set=="function"}function t(n,e,s){var o=s?n[e]:Object.getOwnPropertyDescriptor(n,e);return!s&&o.value&&typeof o.value=="object"&&(o=o.value),o&&S(o)?(typeof o.enumerable>"u"&&(o.enumerable=!0),typeof o.configurable>"u"&&(o.configurable=!0),o):!1}function d(n,e){var s=Object.getOwnPropertyDescriptor(n,e);return s?(s.value&&typeof s.value=="object"&&(s=s.value),s.configurable===!1):!1}function c(n,e,s,o){for(var i in e)if(e.hasOwnProperty(i)){var a=t(e,i,s);if(a!==!1){var l=o||n;if(d(l.prototype,i)){if(r.ignoreFinals)continue;throw new Error("cannot override final property '"+i+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(n.prototype,i,a)}else n.prototype[i]=e[i]}}function h(n,e){if(e){Array.isArray(e)||(e=[e]);for(var s=0;s<e.length;s++)c(n,e[s].prototype||e[s])}}function r(n){n||(n={});var e,s;if(n.initialize){if(typeof n.initialize!="function")throw new Error("initialize must be a function");e=n.initialize,delete n.initialize}else if(n.Extends){var o=n.Extends;e=function(){o.apply(this,arguments)}}else e=function(){};n.Extends?(e.prototype=Object.create(n.Extends.prototype),e.prototype.constructor=e,s=n.Extends,delete n.Extends):e.prototype.constructor=e;var i=null;return n.Mixins&&(i=n.Mixins,delete n.Mixins),h(e,i),c(e,n,!0,s),e}r.extend=c,r.mixin=h,r.ignoreFinals=!1,p.exports=r}),29747:(p=>{var S=function(){};p.exports=S}),20242:(p=>{var S=function(){return null};p.exports=S}),71146:(p=>{var S=function(t,d,c,h,r){if(r===void 0&&(r=t),c>0){var n=c-t.length;if(n<=0)return null}if(!Array.isArray(d))return t.indexOf(d)===-1?(t.push(d),h&&h.call(r,d),d):null;for(var e=d.length-1;e>=0;)t.indexOf(d[e])!==-1&&d.splice(e,1),e--;if(e=d.length,e===0)return null;c>0&&e>n&&(d.splice(n),e=n);for(var s=0;s<e;s++){var o=d[s];t.push(o),h&&h.call(r,o)}return d};p.exports=S}),51067:(p=>{var S=function(t,d,c,h,r,n){if(c===void 0&&(c=0),n===void 0&&(n=t),h>0){var e=h-t.length;if(e<=0)return null}if(!Array.isArray(d))return t.indexOf(d)===-1?(t.splice(c,0,d),r&&r.call(n,d),d):null;for(var s=d.length-1;s>=0;)t.indexOf(d[s])!==-1&&d.pop(),s--;if(s=d.length,s===0)return null;h>0&&s>e&&(d.splice(e),s=e);for(var o=s-1;o>=0;o--){var i=d[o];t.splice(c,0,i),r&&r.call(n,i)}return d};p.exports=S}),66905:(p=>{var S=function(t,d){var c=t.indexOf(d);return c!==-1&&c<t.length&&(t.splice(c,1),t.push(d)),d};p.exports=S}),21612:((p,S,t)=>{var d=t(82011),c=function(h,r,n,e,s){e===void 0&&(e=0),s===void 0&&(s=h.length);var o=0;if(d(h,e,s))for(var i=e;i<s;i++){var a=h[i];a[r]===n&&o++}return o};p.exports=c}),95428:(p=>{var S=function(t,d,c){var h,r=[null];for(h=3;h<arguments.length;h++)r.push(arguments[h]);for(h=0;h<t.length;h++)r[0]=t[h],d.apply(c,r);return t};p.exports=S}),36914:((p,S,t)=>{var d=t(82011),c=function(h,r,n,e,s){if(e===void 0&&(e=0),s===void 0&&(s=h.length),d(h,e,s)){var o,i=[null];for(o=5;o<arguments.length;o++)i.push(arguments[o]);for(o=e;o<s;o++)i[0]=h[o],r.apply(n,i)}return h};p.exports=c}),81957:(p=>{var S=function(t,d,c){if(d.length){if(d.length===1)return d[0]}else return NaN;var h=1,r,n;if(c){if(t<d[0][c])return d[0];for(;d[h][c]<t;)h++}else for(;d[h]<t;)h++;return h>d.length&&(h=d.length),c?(r=d[h-1][c],n=d[h][c],n-t<=t-r?d[h]:d[h-1]):(r=d[h-1],n=d[h],n-t<=t-r?n:r)};p.exports=S}),43491:(p=>{var S=function(t,d){d===void 0&&(d=[]);for(var c=0;c<t.length;c++)Array.isArray(t[c])?S(t[c],d):d.push(t[c]);return d};p.exports=S}),46710:((p,S,t)=>{var d=t(82011),c=function(h,r,n,e,s){e===void 0&&(e=0),s===void 0&&(s=h.length);var o=[];if(d(h,e,s))for(var i=e;i<s;i++){var a=h[i];(!r||r&&n===void 0&&a.hasOwnProperty(r)||r&&n!==void 0&&a[r]===n)&&o.push(a)}return o};p.exports=c}),58731:((p,S,t)=>{var d=t(82011),c=function(h,r,n,e,s){if(e===void 0&&(e=0),s===void 0&&(s=h.length),e!==-1){if(d(h,e,s))for(var o=e;o<s;o++){var i=h[o];if(!r||r&&n===void 0&&i.hasOwnProperty(r)||r&&n!==void 0&&i[r]===n)return i}}else if(d(h,0,s))for(var o=s;o>=0;o--){var i=h[o];if(!r||r&&n===void 0&&i.hasOwnProperty(r)||r&&n!==void 0&&i[r]===n)return i}return null};p.exports=c}),26546:(p=>{var S=function(t,d,c){d===void 0&&(d=0),c===void 0&&(c=t.length);var h=d+Math.floor(Math.random()*c);return t[h]===void 0?null:t[h]};p.exports=S}),85835:(p=>{var S=function(t,d,c){if(d===c)return t;var h=t.indexOf(d),r=t.indexOf(c);if(h<0||r<0)throw new Error("Supplied items must be elements of the same array");return h>r||(t.splice(h,1),r=t.indexOf(c),t.splice(r+1,0,d)),t};p.exports=S}),83371:(p=>{var S=function(t,d,c){if(d===c)return t;var h=t.indexOf(d),r=t.indexOf(c);if(h<0||r<0)throw new Error("Supplied items must be elements of the same array");return h<r||(t.splice(h,1),r===0?t.unshift(d):t.splice(r,0,d)),t};p.exports=S}),70864:(p=>{var S=function(t,d){var c=t.indexOf(d);if(c>0){var h=t[c-1],r=t.indexOf(h);t[c]=h,t[r]=d}return t};p.exports=S}),69693:(p=>{var S=function(t,d,c){var h=t.indexOf(d);if(h===-1||c<0||c>=t.length)throw new Error("Supplied index out of bounds");return h!==c&&(t.splice(h,1),t.splice(c,0,d)),d};p.exports=S}),40853:(p=>{var S=function(t,d){var c=t.indexOf(d);if(c!==-1&&c<t.length-1){var h=t[c+1],r=t.indexOf(h);t[c]=h,t[r]=d}return t};p.exports=S}),20283:(p=>{var S=function(t,d,c,h){var r=[],n,e=!1;if((c||h)&&(e=!0,c||(c=""),h||(h="")),d<t)for(n=t;n>=d;n--)e?r.push(c+n.toString()+h):r.push(n);else for(n=t;n<=d;n++)e?r.push(c+n.toString()+h):r.push(n);return r};p.exports=S}),593:((p,S,t)=>{var d=t(2284),c=function(h,r,n){h===void 0&&(h=0),r===void 0&&(r=null),n===void 0&&(n=1),r===null&&(r=h,h=0);for(var e=[],s=Math.max(d((r-h)/(n||1)),0),o=0;o<s;o++)e.push(h),h+=n;return e};p.exports=c}),43886:(p=>{function S(c,h,r){var n=c[h];c[h]=c[r],c[r]=n}function t(c,h){return c<h?-1:c>h?1:0}var d=function(c,h,r,n,e){for(r===void 0&&(r=0),n===void 0&&(n=c.length-1),e===void 0&&(e=t);n>r;){if(n-r>600){var s=n-r+1,o=h-r+1,i=Math.log(s),a=.5*Math.exp(2*i/3),l=.5*Math.sqrt(i*a*(s-a)/s)*(o-s/2<0?-1:1),f=Math.max(r,Math.floor(h-o*a/s+l)),u=Math.min(n,Math.floor(h+(s-o)*a/s+l));d(c,h,f,u,e)}var v=c[h],m=r,x=n;for(S(c,r,h),e(c[n],v)>0&&S(c,r,n);m<x;){for(S(c,m,x),m++,x--;e(c[m],v)<0;)m++;for(;e(c[x],v)>0;)x--}e(c[r],v)===0?S(c,r,x):(x++,S(c,x,n)),x<=h&&(r=x+1),h<=x&&(n=x-1)}};p.exports=d}),88492:((p,S,t)=>{var d=t(35154),c=t(33680),h=function(n,e,s){for(var o=[],i=0;i<n.length;i++)for(var a=0;a<e.length;a++)for(var l=0;l<s;l++)o.push({a:n[i],b:e[a]});return o},r=function(n,e,s){var o=d(s,"max",0),i=d(s,"qty",1),a=d(s,"random",!1),l=d(s,"randomB",!1),f=d(s,"repeat",0),u=d(s,"yoyo",!1),v=[];if(l&&c(e),f===-1)if(o===0)f=0;else{var m=n.length*e.length*i;u&&(m*=2),f=Math.ceil(o/m)}for(var x=0;x<=f;x++){var g=h(n,e,i);a&&c(g),v=v.concat(g),u&&(g.reverse(),v=v.concat(g))}return o&&v.splice(o),v};p.exports=r}),72905:((p,S,t)=>{var d=t(19133),c=function(h,r,n,e){e===void 0&&(e=h);var s;if(!Array.isArray(r))return s=h.indexOf(r),s!==-1?(d(h,s),n&&n.call(e,r),r):null;for(var o=r.length-1,i=[];o>=0;){var a=r[o];s=h.indexOf(a),s!==-1&&(d(h,s),i.push(a),n&&n.call(e,a)),o--}return i};p.exports=c}),60248:((p,S,t)=>{var d=t(19133),c=function(h,r,n,e){if(e===void 0&&(e=h),r<0||r>h.length-1)throw new Error("Index out of bounds");var s=d(h,r);return n&&n.call(e,s),s};p.exports=c}),81409:((p,S,t)=>{var d=t(82011),c=function(h,r,n,e,s){if(r===void 0&&(r=0),n===void 0&&(n=h.length),s===void 0&&(s=h),d(h,r,n)){var o=n-r,i=h.splice(r,o);if(e)for(var a=0;a<i.length;a++){var l=i[a];e.call(s,l)}return i}else return[]};p.exports=c}),31856:((p,S,t)=>{var d=t(19133),c=function(h,r,n){r===void 0&&(r=0),n===void 0&&(n=h.length);var e=r+Math.floor(Math.random()*n);return d(h,e)};p.exports=c}),42169:(p=>{var S=function(t,d,c){var h=t.indexOf(d),r=t.indexOf(c);return h!==-1&&r===-1?(t[h]=c,!0):!1};p.exports=S}),86003:(p=>{var S=function(t,d){d===void 0&&(d=1);for(var c=null,h=0;h<d;h++)c=t.shift(),t.push(c);return c};p.exports=S}),49498:(p=>{var S=function(t,d){d===void 0&&(d=1);for(var c=null,h=0;h<d;h++)c=t.pop(),t.unshift(c);return c};p.exports=S}),82011:(p=>{var S=function(t,d,c,h){var r=t.length;if(d<0||d>=r||d>=c||c>r){if(h)throw new Error("Range Error: Values outside acceptable range");return!1}else return!0};p.exports=S}),89545:(p=>{var S=function(t,d){var c=t.indexOf(d);return c!==-1&&c>0&&(t.splice(c,1),t.unshift(d)),d};p.exports=S}),17810:((p,S,t)=>{var d=t(82011),c=function(h,r,n,e,s){if(e===void 0&&(e=0),s===void 0&&(s=h.length),d(h,e,s))for(var o=e;o<s;o++){var i=h[o];i.hasOwnProperty(r)&&(i[r]=n)}return h};p.exports=c}),33680:(p=>{var S=function(t){for(var d=t.length-1;d>0;d--){var c=Math.floor(Math.random()*(d+1)),h=t[d];t[d]=t[c],t[c]=h}return t};p.exports=S}),90126:(p=>{var S=function(t){var d=/\D/g;return t.sort(function(c,h){return parseInt(c.replace(d,""),10)-parseInt(h.replace(d,""),10)}),t};p.exports=S}),19133:(p=>{var S=function(t,d){if(!(d>=t.length)){for(var c=t.length-1,h=t[d],r=d;r<c;r++)t[r]=t[r+1];return t.length=c,h}};p.exports=S}),19186:((p,S,t)=>{var d=t(82264);function c(e,s){return String(e).localeCompare(s)}function h(e,s){var o=e.length;if(o<=1)return e;for(var i=new Array(o),a=1;a<o;a*=2){r(e,s,a,i);var l=e;e=i,i=l}return e}function r(e,s,o,i){var a=e.length,l=0,f=o*2,u,v,m,x,g;for(u=0;u<a;u+=f)for(v=u+o,m=v+o,v>a&&(v=a),m>a&&(m=a),x=u,g=v;;)if(x<v&&g<m)s(e[x],e[g])<=0?i[l++]=e[x++]:i[l++]=e[g++];else if(x<v)i[l++]=e[x++];else if(g<m)i[l++]=e[g++];else break}var n=function(e,s){if(s===void 0&&(s=c),!e||e.length<2)return e;if(d.features.stableSort)return e.sort(s);var o=h(e,s);return o!==e&&r(o,null,e.length,e),e};p.exports=n}),25630:(p=>{var S=function(t,d,c){if(d===c)return t;var h=t.indexOf(d),r=t.indexOf(c);if(h<0||r<0)throw new Error("Supplied items must be elements of the same array");return t[h]=c,t[r]=d,t};p.exports=S}),37105:((p,S,t)=>{p.exports={Matrix:t(54915),Add:t(71146),AddAt:t(51067),BringToTop:t(66905),CountAllMatching:t(21612),Each:t(95428),EachInRange:t(36914),FindClosestInSorted:t(81957),Flatten:t(43491),GetAll:t(46710),GetFirst:t(58731),GetRandom:t(26546),MoveDown:t(70864),MoveTo:t(69693),MoveUp:t(40853),MoveAbove:t(85835),MoveBelow:t(83371),NumberArray:t(20283),NumberArrayStep:t(593),QuickSelect:t(43886),Range:t(88492),Remove:t(72905),RemoveAt:t(60248),RemoveBetween:t(81409),RemoveRandomElement:t(31856),Replace:t(42169),RotateLeft:t(86003),RotateRight:t(49498),SafeRange:t(82011),SendToBack:t(89545),SetAll:t(17810),Shuffle:t(33680),SortByDigits:t(90126),SpliceOne:t(19133),StableSort:t(19186),Swap:t(25630)}}),86922:(p=>{var S=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var d=t[0].length,c=1;c<t.length;c++)if(t[c].length!==d)return!1;return!0};p.exports=S}),63362:((p,S,t)=>{var d=t(41836),c=t(86922),h=function(r){var n="";if(!c(r))return n;for(var e=0;e<r.length;e++){for(var s=0;s<r[e].length;s++){var o=r[e][s].toString();o!=="undefined"?n+=d(o,2):n+="?",s<r[e].length-1&&(n+=" |")}if(e<r.length-1){n+=`
|
|
`;for(var i=0;i<r[e].length;i++)n+="---",i<r[e].length-1&&(n+="+");n+=`
|
|
`}}return n};p.exports=h}),92598:(p=>{var S=function(t){return t.reverse()};p.exports=S}),21224:(p=>{var S=function(t){for(var d=0;d<t.length;d++)t[d].reverse();return t};p.exports=S}),98717:((p,S,t)=>{var d=t(37829),c=function(h){return d(h,180)};p.exports=c}),44657:((p,S,t)=>{var d=t(37829),c=function(h,r){r===void 0&&(r=1);for(var n=0;n<r;n++)h=d(h,90);return h};p.exports=c}),37829:((p,S,t)=>{var d=t(86922),c=t(2429),h=function(r,n){if(n===void 0&&(n=90),!d(r))return null;if(typeof n!="string"&&(n=(n%360+360)%360),n===90||n===-270||n==="rotateLeft")r=c(r),r.reverse();else if(n===-90||n===270||n==="rotateRight")r.reverse(),r=c(r);else if(Math.abs(n)===180||n==="rotate180"){for(var e=0;e<r.length;e++)r[e].reverse();r.reverse()}return r};p.exports=h}),92632:((p,S,t)=>{var d=t(37829),c=function(h,r){r===void 0&&(r=1);for(var n=0;n<r;n++)h=d(h,-90);return h};p.exports=c}),69512:((p,S,t)=>{var d=t(86003),c=t(49498),h=function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),e!==0&&(e<0?d(r,Math.abs(e)):c(r,e)),n!==0)for(var s=0;s<r.length;s++){var o=r[s];n<0?d(o,Math.abs(n)):c(o,n)}return r};p.exports=h}),2429:(p=>{var S=function(t){for(var d=t.length,c=t[0].length,h=new Array(c),r=0;r<c;r++){h[r]=new Array(d);for(var n=d-1;n>-1;n--)h[r][n]=t[n][r]}return h};p.exports=S}),54915:((p,S,t)=>{p.exports={CheckMatrix:t(86922),MatrixToString:t(63362),ReverseColumns:t(92598),ReverseRows:t(21224),Rotate180:t(98717),RotateLeft:t(44657),RotateMatrix:t(37829),RotateRight:t(92632),Translate:t(69512),TransposeMatrix:t(2429)}}),71334:(p=>{var S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=function(d,c){for(var h=new Uint8Array(d),r=h.length,n=c?"data:"+c+";base64,":"",e=0;e<r;e+=3)n+=S[h[e]>>2],n+=S[(h[e]&3)<<4|h[e+1]>>4],n+=S[(h[e+1]&15)<<2|h[e+2]>>6],n+=S[h[e+2]&63];return r%3===2?n=n.substring(0,n.length-1)+"=":r%3===1&&(n=n.substring(0,n.length-2)+"=="),n};p.exports=t}),53134:(p=>{for(var S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=new Uint8Array(256),d=0;d<S.length;d++)t[S.charCodeAt(d)]=d;var c=function(h){h=h.substr(h.indexOf(",")+1);var r=h.length,n=r*.75,e=0,s,o,i,a;h[r-1]==="="&&(n--,h[r-2]==="="&&n--);for(var l=new ArrayBuffer(n),f=new Uint8Array(l),u=0;u<r;u+=4)s=t[h.charCodeAt(u)],o=t[h.charCodeAt(u+1)],i=t[h.charCodeAt(u+2)],a=t[h.charCodeAt(u+3)],f[e++]=s<<2|o>>4,f[e++]=(o&15)<<4|i>>2,f[e++]=(i&3)<<6|a&63;return l};p.exports=c}),65839:((p,S,t)=>{p.exports={ArrayBufferToBase64:t(71334),Base64ToArrayBuffer:t(53134)}}),91799:((p,S,t)=>{p.exports={Array:t(37105),Base64:t(65839),Objects:t(1183),String:t(31749),NOOP:t(29747),NULL:t(20242)}}),41786:(p=>{var S=function(t){var d={};for(var c in t)Array.isArray(t[c])?d[c]=t[c].slice(0):d[c]=t[c];return d};p.exports=S}),62644:(p=>{var S=function(t){var d,c,h;if(typeof t!="object"||t===null)return t;d=Array.isArray(t)?[]:{};for(h in t)c=t[h],d[h]=S(c);return d};p.exports=S}),79291:((p,S,t)=>{var d=t(41212),c=function(){var h,r,n,e,s,o,i=arguments[0]||{},a=1,l=arguments.length,f=!1;for(typeof i=="boolean"&&(f=i,i=arguments[1]||{},a=2),l===a&&(i=this,--a);a<l;a++)if((h=arguments[a])!=null)for(r in h)n=i[r],e=h[r],i!==e&&(f&&e&&(d(e)||(s=Array.isArray(e)))?(s?(s=!1,o=n&&Array.isArray(n)?n:[]):o=n&&d(n)?n:{},i[r]=c(f,o,e)):e!==void 0&&(i[r]=e));return i};p.exports=c}),23568:((p,S,t)=>{var d=t(75508),c=t(35154),h=function(r,n,e){var s=c(r,n,null);if(s===null)return e;if(Array.isArray(s))return d.RND.pick(s);if(typeof s=="object"){if(s.hasOwnProperty("randInt"))return d.RND.integerInRange(s.randInt[0],s.randInt[1]);if(s.hasOwnProperty("randFloat"))return d.RND.realInRange(s.randFloat[0],s.randFloat[1])}else if(typeof s=="function")return s(n);return s};p.exports=h}),95540:(p=>{var S=function(t,d,c){var h=typeof t;return!t||h==="number"||h==="string"?c:t.hasOwnProperty(d)&&t[d]!==void 0?t[d]:c};p.exports=S}),82840:((p,S,t)=>{var d=t(35154),c=t(45319),h=function(r,n,e,s,o){o===void 0&&(o=e);var i=d(r,n,o);return c(i,e,s)};p.exports=h}),35154:(p=>{var S=function(t,d,c,h){if(!t&&!h||typeof t=="number")return c;if(t&&t.hasOwnProperty(d))return t[d];if(h&&h.hasOwnProperty(d))return h[d];if(d.indexOf(".")!==-1){for(var r=d.split("."),n=t,e=h,s=c,o=c,i=!0,a=!0,l=0;l<r.length;l++)n&&n.hasOwnProperty(r[l])?(s=n[r[l]],n=n[r[l]]):i=!1,e&&e.hasOwnProperty(r[l])?(o=e[r[l]],e=e[r[l]]):a=!1;return i?s:a?o:c}else return c};p.exports=S}),69036:(p=>{var S=function(t,d){for(var c=0;c<d.length;c++)if(!t.hasOwnProperty(d[c]))return!1;return!0};p.exports=S}),1985:(p=>{var S=function(t,d){for(var c=0;c<d.length;c++)if(t.hasOwnProperty(d[c]))return!0;return!1};p.exports=S}),97022:(p=>{var S=function(t,d){return t.hasOwnProperty(d)};p.exports=S}),41212:(p=>{var S=function(t){if(!t||typeof t!="object"||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch{return!1}return!0};p.exports=S}),46975:((p,S,t)=>{var d=t(41786),c=function(h,r){var n=d(h);for(var e in r)n.hasOwnProperty(e)||(n[e]=r[e]);return n};p.exports=c}),269:((p,S,t)=>{var d=t(41786),c=function(h,r){var n=d(h);for(var e in r)n.hasOwnProperty(e)&&(n[e]=r[e]);return n};p.exports=c}),18254:((p,S,t)=>{var d=t(97022),c=function(h,r){for(var n={},e=0;e<r.length;e++){var s=r[e];d(h,s)&&(n[s]=h[s])}return n};p.exports=c}),61622:(p=>{var S=function(t,d,c){if(!t||typeof t=="number")return!1;if(t.hasOwnProperty(d))return t[d]=c,!0;if(d.indexOf(".")!==-1){for(var h=d.split("."),r=t,n=t,e=0;e<h.length;e++)if(r.hasOwnProperty(h[e]))n=r,r=r[h[e]];else return!1;return n[h[h.length-1]]=c,!0}return!1};p.exports=S}),1183:((p,S,t)=>{p.exports={Clone:t(41786),DeepCopy:t(62644),Extend:t(79291),GetAdvancedValue:t(23568),GetFastValue:t(95540),GetMinMaxValue:t(82840),GetValue:t(35154),HasAll:t(69036),HasAny:t(1985),HasValue:t(97022),IsPlainObject:t(41212),Merge:t(46975),MergeRight:t(269),Pick:t(18254),SetValue:t(61622)}}),27902:(p=>{var S=function(t,d){return t.replace(/%([0-9]+)/g,function(c,h){return d[Number(h)-1]})};p.exports=S}),41836:(p=>{var S=function(t,d,c,h){d===void 0&&(d=0),c===void 0&&(c=" "),h===void 0&&(h=3),t=t.toString();var r=0;if(d+1>=t.length)switch(h){case 1:t=new Array(d+1-t.length).join(c)+t;break;case 3:var n=Math.ceil((r=d-t.length)/2),e=r-n;t=new Array(e+1).join(c)+t+new Array(n+1).join(c);break;default:t=t+new Array(d+1-t.length).join(c);break}return t};p.exports=S}),33628:(p=>{var S=function(t,d){return d===0?t.slice(1):t.slice(0,d)+t.slice(d+1)};p.exports=S}),27671:(p=>{var S=function(t){return t.split("").reverse().join("")};p.exports=S}),45650:(p=>{var S=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var d=Math.random()*16|0,c=t==="x"?d:d&3|8;return c.toString(16)})};p.exports=S}),35355:(p=>{var S=function(t){return t&&t[0].toUpperCase()+t.slice(1)};p.exports=S}),31749:((p,S,t)=>{p.exports={Format:t(27902),Pad:t(41836),RemoveAt:t(33628),Reverse:t(27671),UppercaseFirst:t(35355),UUID:t(45650)}})},ht={};function at(p){var S=ht[p];if(S!==void 0)return S.exports;var t=ht[p]={exports:{}};return ot[p](t,t.exports,at),t.exports}at.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})();var mt=at(85454);return mt})())})(Pt)),Pt.exports}var Lt=Ft();const xt=Mt(Lt);class Ot{sprite;targetX;targetY;constructor(ut,ot,ht,at){this.sprite=ut.add.rectangle(ot,ht,32,32,at),this.targetX=ot,this.targetY=ht}setTarget(ut,ot){this.targetX=ut,this.targetY=ot}update(){this.sprite.x=xt.Math.Linear(this.sprite.x,this.targetX,.15),this.sprite.y=xt.Math.Linear(this.sprite.y,this.targetY,.15)}destroy(){this.sprite.destroy()}}class Dt{dx=0;dy=0;constructor(ut){let ot=null;ut.input.on("pointerdown",ht=>{ot=new xt.Math.Vector2(ht.x,ht.y)}),ut.input.on("pointermove",ht=>{ot&&(this.dx=xt.Math.Clamp((ht.x-ot.x)/50,-1,1),this.dy=xt.Math.Clamp((ht.y-ot.y)/50,-1,1))}),ut.input.on("pointerup",()=>{ot=null,this.dx=0,this.dy=0})}}class wt{socket;playerId=null;onState;constructor(ut){this.socket=new WebSocket(ut),this.socket.onmessage=ot=>{const ht=JSON.parse(ot.data);ht.type==="init"&&(this.playerId=ht.payload.id),ht.type==="state"&&this.onState?.(ht.payload)}}sendInput(ut,ot){this.playerId&&this.socket.send(JSON.stringify({dx:ut,dy:ot}))}}class Bt extends Phaser.Scene{players=new Map;socket;inputCtrl;create(){this.inputCtrl=new Dt(this),this.socket=new wt("ws://localhost:8080/ws"),this.socket.onState=ut=>{this.syncPlayers(ut.players)}}update(){this.socket.sendInput(this.inputCtrl.dx,this.inputCtrl.dy);for(const ut of this.players.values())ut.update()}syncPlayers(ut){for(const ot in ut){const ht=ut[ot];let at=this.players.get(ot);if(!at){const p=ot===this.socket.playerId?65280:16729156;at=new Ot(this,ht.x,ht.y,p),this.players.set(ot,at)}at.setTarget(ht.x,ht.y)}for(const[ot,ht]of this.players)ut[ot]||(ht.destroy(),this.players.delete(ot))}}const It={type:xt.AUTO,width:360,height:640,scale:{mode:xt.Scale.FIT,autoCenter:xt.Scale.CENTER_BOTH},backgroundColor:"#1e1e1e",scene:[Bt]};new xt.Game(It);
|